Jump to content

Aligning Pitches with a Rhythm Across 12 Bars


Recommended Posts

Hello,

I am working on a 12-bar sequence based on the harmonic grid of Charlie Parker's "Blues for Alice."

I have a list of pitches in sixteenth notes that correspond to the chords of the piece:


(setf alice-chord4 '((s fs4 g4 b4 d5)(s bb4 b4 d5 fs5)(s cs5 d5 fs5 a5)(s f5 fs5 a5 cs6);GM7
(s f4 fs4 a4 c5) (s ab4 a4 c5 e5)(s bb4 b4 eb5 fs5)(s d5 eb5 fs5 a5);F#m7b5/B7
(s eb5 e5 g5 b5) (s fs4 g4 b4 d5) (s gs4 a4 cs5 e5)(s c5 cs5 e5 g5);Em7/A7
(s cs5 d5 f5 a5)(s e5 f5 a5 c6)(s fs5 g5 b5 d6)(s bb4 b4 d5 f5);Dm7/G7
(s b4 c5 e5 g5)(s eb5 e5 g5 bb5)(s fs4 g4 bb4 d5)(s a4 bb4 d5 fs5);C7
(s b4 c5 eb5 g5)(s d5 eb5 g5 bb5)(s e5 f5 a5 c6)(s ab5 a5 c6 eb6);Cm7/F7
(s bb4 b4 d5 fs5)(s cs5 d5 fs5 a5)(s eb5 e5 gs5 b5)(s g5 gs5 b5 d6);Bm7/E7
(s a4 bb4 cs5 f5)(s c5 db5 f5 ab5)(s d5 eb5 g5 bb5)(s fs5 g5 bb5 db6);Bbm7/Eb7
(s gs4 a4 c5 e5)(s b4 c5 e5 g5)(s eb5 e5 g5 b5)(s fs5 g5 b5 d6);Am7
(s cs5 d5 fs5 a5)(s f5 fs5 a5 c6)(s gs5 a5 c6 e6)(s b4 c5 e5 gs5);D7
(s fs5 g5 b5 d6)(s bb4 b4 d5 fs5)(s eb5 e5 gs5 b5)(s g5 gs5 b5 d6);GM7/E7
(s gs4 a4 c5 e5)(s b4 c5 e5 g5)(s cs5 d5 fs5 a5)(s f5 fs5 a5 c6)));Am7/D7

 

I want to apply a  rhythm that spans 12 beats (which is equivalent to 3 bars in 4/4) and repeat it across the entire 12 bars.

Here is the rhythm I'm using:


(e. s -q -q e. s -q -q e. s -q -q e. s -q -q)

 

(setf Gr3+9 
    (omn-to-measure (make-omn 
                                       :pitch (omn :pitch (omn-to-measure 
                                       (loop for x in alice-chord3 collect

                                        (filter-repeat 1 (rnd-order x :type :pitch :seed 3 ))) 
                                       '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2))) 
                                      :length (omn :length (omn-to-measure 
                                      (gen-repeat 4  '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q )); phrase 12/4 
                                      '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2))))  4/4))

 

 

The problem I’m encountering is that when I try to align the pitches from `alice-chord3` with this rhythm, they don’t match the bar divisions correctly. I’ve tried different functions like `length-adjust`, but this stretches or compresses the pitches, altering the note order or distributing them incorrectly.

 What I need:
- Keep the exact order of the pitches from `alice-chord3`.
- Apply the 12-beat rhythm without modifying or stretching the pitches.
- Repeat this rhythmic pattern over the 12 bars, while ensuring that the pitches follow the harmonic grid of the piece.

Unsuccessful attempts:
- Using functions like `length-adjust` stretches the pitches or redistributes them in an unwanted way.
- When I repeat the rhythm with `gen-repeat`, it causes misalignment where the pitches no longer correspond to the measures.

I'm looking for a way to correctly align the pitches with the rhythm while keeping the structure of 12 bars and without altering the pitch content. Is there a specific method or function in Opusmodus that can handle this?

 

Thank you in advance for your help!

 

Link to comment
Share on other sites

Hi, after several attempts with chatGPT which really talks nonsense, I come back to humans who are very rare around here!

 

I'm still trying to rephrase my request.

 

This is my pitches, I specify that each bars must correspond to beats in the end

 

(setf alice-chord3

'((s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s a4 cs5 e5 a5);Gmaj7

(s fs4 a4 c5 fs5) (s a4 c5 e5 a5)(s b4 eb5 fs5 b5)(s eb5 fs5 a5 eb6); F#m7b5/ B7

(s e5 g5 b5 e6) (s g4 b4 d5 g5) (s a4 cs5 e5 a5)(s cs5 e5 g5 cs6);Em7/A7

(s d5 f5 a5 d6)(s f5 a5 c6 f6)(s g4 b4 d5 g5)(s b4 d5 f5 b5);Dm7/G7

(s c5 e5 g5 c6)(s e5 g5 bb5 e6)(s g4 bb4 d5 g5)(s bb4 d5 fs5 bb5);C7

(s c5 eb5 g5 c6)(s eb5 g5 bb5 eb6)(s f5 a5 c6 f6)(s a4 c5 eb5 a5);Cm7/F7

(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5);Bm7/E7

(s bb4 cs5 f5 bb5)(s db5 f5 ab5 db6)(s eb5 g5 bb5 eb6)(s g4 bb4 db5 g5);Bbm7/Eb7

(s a4 c5 e5 a5)(s c5 e5 g5 c6)(s e5 g5 b5 e6)(s g4 b4 d5 g5);Am7

(s d5 fs5 a5 d6)(s fs5 a5 c6 fs6)(s a4 c5 e5 a5)(s c5 e5 gs5 c6);D7

(s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5);Gmaj7/E7

(s a4 c5 e5 a5)(s c5 e5 g5 c6)(s d5 fs5 a5 d6)(s fs4 a4 c5 fs5)));Am7/D7

 

My little rhythmic study on chords of "Blues for Alice"

(setf Gr3 (omn-to-measure (make-omn :pitch (omn :pitch (omn-to-measure (loop for x in alice-chord4 collect (filter-repeat 1 (rnd-order x :type :pitch :seed 3))) '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2)))

:length (omn :length (omn-to-measure (gen-repeat 4 '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q)) '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2)))) 4/4))

 

After a Print Expression I get this result which shows a shift of the notes in relation to the alignment of the rhythm:

(setf Gr3result

'(#|1|# (e. g4 s b4 -h e. d5 s g5), Gmaj

#|2|# (-h e. fs4 s a4 -q);F#m7b5/B7

#|3|# (-q e. b4 s eb5 -h);Em7/A7

#|4|# (e. e5 s g5 -h e. a4 s cs5);Dm7/G7

#|5|# (-h e. d5 s f5 -q);C7

#|6|# (-q e. g4 s b4 -h);Cm7/F7

#|7|# (e. c5 s e5 -h e. c5 s eb5);Bm7/E7

#|8|# (-h e. f5 s a5 -q);Bbm7/Eb7

#|9|# (-q e. b4 s d5 -h);Am7

#|10|# (e. e5 s gs5 -h e. b5 s e6);D7

#|11|# (-h e. bb4 s cs5 -q);Gmaj/E7

#|12|# (-q e. eb5 s g5 -h) ));Am7/D7

 

To check with my seed 3 with sixteenth notes, I get the same result as alice-chord3 (pitch)

 

what i want is to get this result, which i did manually and which corresponds exactly to the logic of my seed 3. here is this result:

 

:(setf correctnotes

'(#|1|# (e. g4 s b4 -h e. a4 s cs5);Gmaj

#|2|# (-h e. b4 s eb5 -q);F#m7b5/B7

#|3|# (-q e. g4 s b4 -h);Em7/A7

#|4|# (e. d5 s f5 -h e. b4 s d5);Dm7/G7

#|5|# (-h e. g4 s bb4 -q);C7

#|6|# (-q e. eb5 s g5 -h);Cm7/F7

#|7|# (e. b4 s d5 -h e. gs4 s b4);Bm7/E7

#|8|# (-h e. eb5 s g5 -q);Bbm7/Eb7

#|9|# (-q e. c5 s e5 -h);Am7

#|10|# (e. d5 s fs5 -h e. c5 s e5);D7

#|11|# (-h e. e5 s gs5 -q);Gmaj/E7

#|12|# (-q e. c5 s e5 -h) ));Am7/D7

 

 

So I'm trying to find this result but I'm at the end of the solutions I know. If someone can try to solve my problem.

 

Thanks in advance.

 

Link to comment
Share on other sites

Hi, David

 

Please, try this

 

(setf alice-chord4 '((s fs4 g4 b4 d5)(s bb4 b4 d5 fs5)(s cs5 d5 fs5 a5)(s f5 fs5 a5 cs6);GM7
(s f4 fs4 a4 c5) (s ab4 a4 c5 e5)(s bb4 b4 eb5 fs5)(s d5 eb5 fs5 a5);F#m7b5/B7
(s eb5 e5 g5 b5) (s fs4 g4 b4 d5) (s gs4 a4 cs5 e5)(s c5 cs5 e5 g5);Em7/A7
(s cs5 d5 f5 a5)(s e5 f5 a5 c6)(s fs5 g5 b5 d6)(s bb4 b4 d5 f5);Dm7/G7
(s b4 c5 e5 g5)(s eb5 e5 g5 bb5)(s fs4 g4 bb4 d5)(s a4 bb4 d5 fs5);C7
(s b4 c5 eb5 g5)(s d5 eb5 g5 bb5)(s e5 f5 a5 c6)(s ab5 a5 c6 eb6);Cm7/F7
(s bb4 b4 d5 fs5)(s cs5 d5 fs5 a5)(s eb5 e5 gs5 b5)(s g5 gs5 b5 d6);Bm7/E7
(s a4 bb4 cs5 f5)(s c5 db5 f5 ab5)(s d5 eb5 g5 bb5)(s fs5 g5 bb5 db6);Bbm7/Eb7
(s gs4 a4 c5 e5)(s b4 c5 e5 g5)(s eb5 e5 g5 b5)(s fs5 g5 b5 d6);Am7
(s cs5 d5 fs5 a5)(s f5 fs5 a5 c6)(s gs5 a5 c6 e6)(s b4 c5 e5 gs5);D7
(s fs5 g5 b5 d6)(s bb4 b4 d5 fs5)(s eb5 e5 gs5 b5)(s g5 gs5 b5 d6);GM7/E7
(s gs4 a4 c5 e5)(s b4 c5 e5 g5)(s cs5 d5 fs5 a5)(s f5 fs5 a5 c6)));Am7/D7



(make-omn
:pitch (find-bar '(1 4 8 12 16 20 24 28 32 36 40 44) (omn :pitch alice-chord4))
:length (omn-to-time-signature (gen-repeat 12 '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q)) '(4 4))
)

 

Best,

Julio

Link to comment
Share on other sites

Hi Julio,

It's nice to see someone around here.

 

for simplicity take his pitches please, I'm sure you'll understand

 

(setf alice-chord3

'((s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s a4 cs5 e5 a5);Gmaj7

(s fs4 a4 c5 fs5) (s a4 c5 e5 a5)(s b4 eb5 fs5 b5)(s eb5 fs5 a5 eb6); F#m7b5/ B7

(s e5 g5 b5 e6) (s g4 b4 d5 g5) (s a4 cs5 e5 a5)(s cs5 e5 g5 cs6);Em7/A7

(s d5 f5 a5 d6)(s f5 a5 c6 f6)(s g4 b4 d5 g5)(s b4 d5 f5 b5);Dm7/G7

(s c5 e5 g5 c6)(s e5 g5 bb5 e6)(s g4 bb4 d5 g5)(s bb4 d5 fs5 bb5);C7

(s c5 eb5 g5 c6)(s eb5 g5 bb5 eb6)(s f5 a5 c6 f6)(s a4 c5 eb5 a5);Cm7/F7

(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5);Bm7/E7

(s bb4 cs5 f5 bb5)(s db5 f5 ab5 db6)(s eb5 g5 bb5 eb6)(s g4 bb4 db5 g5);Bbm7/Eb7

(s a4 c5 e5 a5)(s c5 e5 g5 c6)(s e5 g5 b5 e6)(s g4 b4 d5 g5);Am7

(s d5 fs5 a5 d6)(s fs5 a5 c6 fs6)(s a4 c5 e5 a5)(s c5 e5 gs5 c6);D7

(s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5);Gmaj7/E7

(s a4 c5 e5 a5)(s c5 e5 g5 c6)(s d5 fs5 a5 d6)(s fs4 a4 c5 fs5)));Am7/D7

 

I modified gen-repeat 4 to get 12 bars.

(make-omn
:pitch (find-bar '(1 4 8 12 16 20 24 28 32 36 40 44) (omn :pitch alice-chord3))
:length (omn-to-time-signature (gen-repeat 4 '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q)) '(4 4))
)

 

After Pprint Expression..........the notes are offset from the chords

(setf Juilo
      '(#|1|# (e. g4 s b4 -q - e. d5 s g5)
        #|2|# (-q - e. a4 s cs5 -q)
        #|3|# (-q e. eb5 s fs5 -q -)
        #|4|# (e. cs5 s e5 -q - e. g5 s cs6)
        #|5|# (-q - e. b4 s d5 -q)
        #|6|# (-q e. bb4 s d5 -q -)
        #|7|# (e. a4 s c5 -q - e. eb5 s a5)
        #|8|# (-q - e. gs4 s b4 -q)
        #|9|# (-q e. g4 s bb4 -q -)
        #|10|# (e. g4 s b4 -q - e. d5 s g5)
        #|11|# (-q - e. c5 s e5 -q)
        #|12|# (-q e. gs4 s b4 -q -)
        ))

 

After Pprint Expression manually we must find this result

it corresponds to each time of alice-chord3

 

(setf david
      '(#|1|# (e. g4 s b4 -h e. a4 s cs5)
        #|2|# (-h e. b4 s eb5 -q)
        #|3|# (-q e. g4 s b4 -h)
        #|4|# (e. d5 s f5 -h e. b4 s d5)
        #|5|# (-h e. g4 s bb4 -q)
        #|6|# (-q e. eb5 s g5 -h)
        #|7|# (e. b4 s d5 -h e. gs4 s b4)
        #|8|# (-h e. eb5 s g5 -q)
        #|9|# (-q e. c5 s e5 -h)
        #|10|# (e. d5 s fs5 -h e. c5 s e5)
        #|11|# (-h e. e5 s gs5 -q)
        #|12|# (-q e. c5 s e5 -h)
        ))

 

 

 

I work on rhythmic note groups

my grouping is in 12/4 because it is repeated 4 times to make 12 bars

 

if you look at bar 2 we have a4 and cs4 which corresponds to the reservoir of notes of the first bar

and the note shift continues until the end

Link to comment
Share on other sites

I just want to use the note pool of alice-chord3 for each beat of the blues.


(#|1|# (s g4 b4 d5 g5) first beat of the first bar of the blues
#|4|# (s a4 cs5 e5 a5) 4th beat of the first bar of the blues
#|7|# (s b4 eb5 fs5 b5) 3rd beat of the second bar of the blues
#|10|# (s g4 b4 d5 g5) 2nd beat of the third bar of the blues

etc etc

 

this amounts to saying list alice-chord3 would be like a beat (s g4 b4 d5 g5) first beat of first bar of a blues, this is why I say reservoir

It's an exercise we do instinctively as jazz musicians;-))

Link to comment
Share on other sites

Je pense que je vais me lancer dans le design ;-)))

Voici un schéma encore plus explicite, 

Voici un schéma encore plus explicite, on voit clairement que les notes ne correspondent pas au rythme.

avec ma graine 3 les notes devraient être les premières de chaque liste d'  alice-chord3.

Merci pour votre aide

 

image.png.00525fa87e40153fecbb60c18ce22b90.png

Link to comment
Share on other sites

Hi Julio,

I found this way of doing things, unfortunately, too laborious for my little eyes.

 

(setf alice-chord3 '((s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s a4 cs5 e5 a5)    
(s fs4 a4 c5 fs5) (s a4 c5 e5 a5)(s b4 eb5 fs5 b5)(s eb5 fs5 a5 eb6)
(s e5 g5 b5 e6) (s g4 b4 d5 g5) (s a4 cs5 e5 a5)(s cs5 e5 g5 cs6)
(s d5 f5 a5 d6)(s f5 a5 c6 f6)(s g4 b4 d5 g5)(s b4 d5 f5 b5)
(s c5 e5 g5 c6)(s e5 g5 bb5 e6)(s g4 bb4 d5 g5)(s bb4 d5 fs5 bb5)
(s c5 eb5 g5 c6)(s eb5 g5 bb5 eb6)(s f5 a5 c6 f6)(s a4 c5 eb5 a5)
(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5)
(s bb4 cs5 f5 bb5)(s db5 f5 ab5 db6)(s eb5 g5 bb5 eb6)(s g4 bb4 db5 g5)
(s a4 c5 e5 a5)(s c5 e5 g5 c6)(s e5 g5 b5 e6)(s g4 b4 d5 g5)
(s d5 fs5 a5 d6)(s fs5 a5 c6 fs6)(s a4 c5 e5 a5)(s c5 e5 gs5 c6)
(s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5)
(s a4 c5 e5 a5)(s c5 e5 g5 c6)(s d5 fs5 a5 d6)(s fs4 a4 c5 fs5)))

 

(setf unis (flatten alice-chord3))

 

(setf une (gen-divide 2 unis))

 

now the notes are perfectly aligned with my rhythm

(setf div1  (omn-to-measure  (make-omn
:pitch (find-bar '(1 2 13 18 25 32 37 43 49 55 61 67 73 79 85 91 92) (omn :pitch une))
:length   (gen-repeat 4 '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q))
:span :length) '(4/4)))

 

too bad the other code doesn't work at the level of the alignment of the notes because it is simpler and especially could be used for other pieces.
I put it here again in case some of you can find the solution.

 

(setf Gr3oc 
      (omn-to-measure (make-omn 
                       :pitch (omn :pitch 
                                   (omn-to-measure 
                                    (loop for x in une
                                          collect (filter-repeat 1 
                                                                   (rnd-order x :type :pitch :seed 3))) 
                                    '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2))) 
                        :length (omn :length 
                                    (omn-to-measure 
                                     (gen-repeat 4  '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q)) 
                                               
                                     '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2)))) 4/4))

 

thank you.

 

Link to comment
Share on other sites

I think this might get you want you want in the simplest way. Essentially, by extracting the pitches from alice-chord3 and grouping the individual beats of the rhythm, you can then use ":swallow t" to keep the overall rhythm aligned. 

 

(setf alice-chord3
      '((s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s a4 cs5 e5 a5);Gmaj7
        (s fs4 a4 c5 fs5) (s a4 c5 e5 a5)(s b4 eb5 fs5 b5)(s eb5 fs5 a5 eb6); F#m7b5/ B7
        (s e5 g5 b5 e6) (s g4 b4 d5 g5) (s a4 cs5 e5 a5)(s cs5 e5 g5 cs6);Em7/A7
        (s d5 f5 a5 d6)(s f5 a5 c6 f6)(s g4 b4 d5 g5)(s b4 d5 f5 b5);Dm7/G7
        (s c5 e5 g5 c6)(s e5 g5 bb5 e6)(s g4 bb4 d5 g5)(s bb4 d5 fs5 bb5);C7
        (s c5 eb5 g5 c6)(s eb5 g5 bb5 eb6)(s f5 a5 c6 f6)(s a4 c5 eb5 a5);Cm7/F7
        (s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5);Bm7/E7
        (s bb4 cs5 f5 bb5)(s db5 f5 ab5 db6)(s eb5 g5 bb5 eb6)(s g4 bb4 db5 g5);Bbm7/Eb7
        (s a4 c5 e5 a5)(s c5 e5 g5 c6)(s e5 g5 b5 e6)(s g4 b4 d5 g5);Am7
        (s d5 fs5 a5 d6)(s fs5 a5 c6 fs6)(s a4 c5 e5 a5)(s c5 e5 gs5 c6);D7
        (s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s e5 gs5 b5 e6)(s gs4 b4 d5 gs5);Gmaj7/E7
        (s a4 c5 e5 a5)(s c5 e5 g5 c6)(s d5 fs5 a5 d6)(s fs4 a4 c5 fs5)));Am7/D7

(setf alice.rhy (gen-repeat 4 '((e. s)(-q)(-q)(e. s)(-q)(-q)(e. s)(-q)(-q)(e. s)(-q)(-q))))

(setf alice.pch (omn :pitch alice-chord3))

(setf alice.aligned (omn-to-time-signature (make-omn :pitch alice.pch :length alice.rhy :swallow t) '(4 4)))

 

 

Cheers,

Jon

image.png

Link to comment
Share on other sites

thanks jon, it works fine!
however, can you try to tell me why it doesn't work this way

I want pitches and rhythm to be perfectly aligned without having to do work visually and manually. I'm looking for a simple code generates  correct result without note shifts.

 

Thank you for your help

 

(setf Gr3oc 
       (omn-to-measure (make-omn 
                       :pitch (omn :pitch 
                                   (omn-to-measure 
                                    (loop for x in alice-chord3
                                          collect (filter-repeat 1 
                                                                  (rnd-order x :type :pitch :seed 3))) 
                                    '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2))) 
                        :length (omn :length 
                                    (omn-to-measure 
                                     (gen-repeat 4 '((e. s)(-q)(-q)(e. s)(-q)(-q)(e. s)(-q)(-q)(e. s)(-q)(-q)))
                                               
                                     '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2)))) 4/4))

Link to comment
Share on other sites

I come back to your code, how to make the pitches randomized ?

if I use rnd-order, the pitches will always be for the first bar either g4 b4 or b4 g4 and a4 cs5 or cs5 a4 '((s g4 b4 d5 g5)(s b4 d5 fs5 b5)(s d5 fs5 a5 d6)(s a4 cs5 e5 a5);Gmaj7
While in each list we have 4 possibilities (s g4 b4 d5 g5) and (s a4 cs5 e5 a5)

 

(setf alice.aligned (omn-to-time-signature (rnd-order (make-omn :pitch alice.pch :length alice.rhy :swallow t)) '(4 4)))

 

Thank you for your help

 

 

Link to comment
Share on other sites

rnd-order is not on the right place.

you have to apply it only to pitches, not to the full omn expression, if you do that , you will broke the omn expressions.

 

Maybe something like:

(setf alice.aligned (omn-to-time-signature (make-omn :pitch (rnd-order alice.pch) :length alice.rhy :swallow t)) '(4 4)))

Link to comment
Share on other sites

Edit: Stephane's answer showed on my feed just as I was hitting send. As a rank amateur, I was happy to see my answer matches his.

 

---

 

Hi David. I'm a relative newbie to OM, so I can't answer the why. I can only note that it worked when the rhythm was split into nested lists, each a 1/4 duration (to match the nested lists of the pitches), but when both the pitches and rhythms were flattened before the make-omn, it no longer worked.

 

As far as randomizing the pitches, you need to do that before the omn assembly. 

 

(setf alice.aligned.rnd (omn-to-time-signature (make-omn :pitch (rnd-order alice.pch) :length alice.rhy :swallow t) '(4 4)))

 

works as you want

 

Cheers,

Jon

Edited by jon
brief comment about matching Stephane's answer
Link to comment
Share on other sites

While we're on the topic, I'd like to point out how well-designed the rnd-order function is. My initial thought was that you'd have to do a mapcar on the the list of sublists in order to avoid just shuffling the order of the sublists. It was great to see in the documentation (which is overall quite excellent for a system this complex) that the default behavior is to shuffle the order within the sublists, but that a key parameter (:list) allowed access to shuffling the order of the sublists. In another system with the same initials, mapcar and lambda modes would be needed to achieve this. (Don't take this as a flame on that other system--I still quite like that system.)

 

Cheers,

Jon

 

Link to comment
Share on other sites

Hi Jon, Stephane,

Thank you for taking time to answer me🙏

3 hours ago, Stephane Boussuge said:

rnd-order is not on the right place.

you have to apply it only to pitches, not to the full omn expression, if you do that , you will broke the omn expressions.

Stephane, This solution works without changing the rhythmic placement,

setf alice.aligned (omn-to-time-signature (rnd-order (make-omn :pitch alice.pch :length alice.rhy :swallow t)) '(4 4)))

 

 

otherwise you are also right for the right place on rnd-order

(setf alice.aligned (omn-to-time-signature (make-omn :pitch (rnd-order alice.pch) :length alice.rhy :swallow t) '(4 4)))

 

that being said, can you tell me what do you think of my code?

I try to do the same thing but without success,I am trying to reproduce exactly the same alignment between pitches and rhythm

but there is a shift in the pitches and I do not understand why this is the case regardless of the parentheses of the rhythm.

Thank you for your valuable help

 

(setf Gr3oc 
       (omn-to-measure (make-omn 
                       :pitch (omn :pitch 
                                   (omn-to-measure 
                                    (loop for x in alice-chord3
                                     collect (filter-repeat 1 
                                     (rnd-order x :type :pitch :seed 3))) 
                                    '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2))) 
                        :length (omn :length 
                                    (omn-to-measure 
                                     (gen-repeat 4 '((e. s)(-q)(-q)(e. s)(-q)(-q)(e. s)(-q)(-q)(e. s)(-q)(-q))) or '(e. s -q -q e. s -q -q e. s -q -q e. s -q -q)) 

                                     '(1 1/2 1/2 1/2 1/2 1/2 1/2 1 1/2 1/2 1/2 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1/2)))) 4/4))

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy