Jump to content
Sign in to follow this  
AM

replace-velocity-of-a-length

Recommended Posts

if you like to change dynamics/velocity of specific lengths

 

(defun replace-velocity-of-a-length (omnseq length/velocity-map)
  (loop for i in (single-events (flatten omnseq))
    when (length-restp (car i)) collect i
    else append (omn-replace :velocity (cadr (assoc (car (omn :length i)) length/velocity-map))
                              i)))
                   

(setf omn-seq '(s c4 ffff e e s e. s q q q q q))                   

(replace-velocity-of-a-length omn-seq '((1/16 mp)
                                        (2/16 pp)
                                        (3/16 ppp)))

=> (s c4 mp e c4 pp e c4 pp s c4 mp e. c4 ppp s c4 mp q c4 ffff q c4 ffff q c4 ffff q c4 ffff q c4 ffff)

 

Share this post


Link to post
Share on other sites

i did not realize that there is an OPMO-function for that 😕

 

in OPMO:

(setf omn-seq '(s c4 ffff e e s e. s q q q q q))                   

(length-map '((1/16 mp)
              (2/16 pp)
              (3/16 ppp)) omn-seq)
=> (s c4 mp e pp c4 s mp e. ppp s mp q ffff c4 c4 c4 c4)

 

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...