Jump to content

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)

 

Link to comment
Share on other sites

  • 4 weeks later...

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