Jump to content
Sign in to follow this  
AM

replace-articulation-of-a-length

Recommended Posts

if you like to change the articulation of specific lengths

 

(defun replace-articulation-of-a-length (omnseq length/articulation-map)
  (loop for i in (single-events (flatten omnseq))
    when (length-restp (car i)) collect i
    else append (omn-replace :articulation (cadr (assoc (car (omn :length i)) length/articulation-map))
                              i)))
                   
(setf omn-seq '(s c4 ffff ord e ord e ord s ord e. ord s ord q ord q q q q))  
                 
(replace-articulation-of-a-length omn-seq '((1/16 mute) (2/16 pizz) (3/16 arco)))

=> (s c4 ffff mute e c4 ffff pizz e c4 ffff pizz s c4 ffff mute e. c4 ffff arco s c4 ffff mute q c4 ffff ord q c4 ffff q c4 ffff q c4 ffff q c4 ffff)

 

Share this post


Link to post
Share on other sites

....you are totally right!!!! i did not know this function, i did not find it when i was searching  😕

so, perhaps somebody could need/read my function "as a LISP-example"...

 

in OPMO:

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

(length-map '((1/16 mute) (2/16 pizz) (3/16 arco)) omn-seq)
=> (s c4 ffff mute e pizz c4 pizz s mute e. arco s mute q ord 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  

×