Jump to content

merge several rhythms into one


Recommended Posts

Hi all,

is there a function/ method to merge several rhythms into one which is displaying all the onsets of these rhythms.

Here the first two systems are merged into the third.

Thanks for help.

Achim

 

image.png.a0b55e32b0e63faf4f933484595c5677.png

Link to comment
Share on other sites

There is a merge-voices function.

(setf r1 '(q e e 3q 3q 3q -e. s))
(setf r2 '(e e e. s -e e s -s s -s))
(setf r3 (merge-voices r1 r2))
=> '(z^q c4 e e z^e e^e. s^e s 3q 3e^3q 3e^e 3q s - c4 c4)

(omn :length r3)

 

The output looks different from what you expect.  The z^ is not really documented in the omn-language-description but has to do with the :duration in make-omn. You see it in the merge-voices doc. Merge-voices is for omn-lists. It will add a c4 as default if only length are in the list.

 

With:

(omn :length r3)

 

you get this: 

(0 1/8 1/8 0 1/8 1/16 1/16 1/12 1/24 1/24 1/12 1/16 -1/16 1/16 1/16)

 

What the 0 means I don't know.

 

Link to comment
Share on other sites

Hi born,

 

AM from this Forum wrote the following function:

 

(under the topic Rhythmic Resultants)

 

(progn
(defun gen-resultant** (r)
  (difference (remove-duplicates 
               (sort-asc (flatten (loop for i in r
                                    append (cons 0 (gen-accumulate i))))))))

(setf rha '(1/4 1/8 1/8 1/12 1/12 1/12 -3/16 1/16))
(setf rhb '(1/8 1/8 3/16 1/16 -1/8 1/8 1/16 -1/16 1/16 -1/16))

(setf rr2 (gen-resultant** (list rha rhb)))

(ps 'gm
    :rhy (list  rha)
    :rhy (list  rhb)
    :rhy (list rr2)
    :time-signature '(4 4 1)
 )
)

 

When putting your 2 rhythms into the function, the last beat is not correct, I don´t know why,

perhaps this helps to find a solution for rhythmic resultants (Schillinger u.a.) in OM, what would be very to have I think.

 

best wishes

AO

 

Bildschirmfoto 2023-05-18 um 16.25.53.png

Link to comment
Share on other sites

  • 2 weeks later...

The new function UNIFY-RHYTHMS will solve your problem - 3.0.28916
 

Examples:

 

(setf l1 '(q e e 3q 3q 3q -e. s))
(setf l2 '(e e e. s -e e s -s s -s))

 

(list l1 l2) ; select and press cmd-2

 image.png

 

(unify-rhythms l1 l2)

image.png

 

(setf r1 (rhythm-series 6 5 3/8 :length '(q. e. e s 3q)))
(setf r2 (rhythm-series 6 4 1/2 :length '(q. e. e s 3q)))
(setf r3 (rhythm-series 6 3 1/2 :length '(q. e. e s 3q)))

 

(list r1 r2 r3) ; select and press cmd-2

 

image.png

 

Now we merge all three voices to form a single entity:

 

(unify-rhythms r1 r2 r3)

 

image.png

 

 

 

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