Jump to content

Merge-voices from list


Recommended Posts

Dear Opmo users, i would like to merge voices from one single list. So I would like this (not-working) merge-voice function:

(setf test '((s) (-s s) (-e s)))
(merge-voices test)

To work like this:

(merge-voices '(s) '(-s s) '(-e s))

 

 

Does anyone has an Idea how to achieve it?

 

Best,

Vili

Link to comment
Share on other sites

Dear Stephane,

 

thank you, even if try with "OMN expressions" in a list , if i understand it correctly, is pretty same.

 

(setf test '((s c4) (-s s c4) (-e s c4)))

(merge-voices test)
(merge-voices '(s c4) '(-s s c4) '(-e s c4))

 

But anyways, does anyone knows how this function is programmed so I could program own one, with result I wanna achieve.

 

 

Best,

 

Vili

 

 

Link to comment
Share on other sites

some "ugly code" ...but it works.... 😃

you want to use (merge-voices) with ONE list as input?

 


(setf test '((w c2) (h c4 d4) (q g5 g5 g5 g5)))

(defun your-merge-voices (alist) 
          (merge-voices (first alist) 
                        (second alist) 
                        (third alist) 
                        (fourth alist) 
                        (fifth alist)))

(your-merge-voices test)

 

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