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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×