Jump to content

replace-velocity-of-a-technique


Recommended Posts

if you want to change VELOCITY of a technique... 

 


(defun replace-velocity-of-a-technique (omn-list &key technique velocity)
   (flatten (loop for i in (single-events omn-list)
              when (equal (car (omn :articulation i)) technique)
              collect (pattern-map (list (list (list '? technique) (list velocity technique))) i)
              else collect i)))


(replace-velocity-of-a-technique  '(e. c4 p tasto d4 ponte e4) 
                                  :technique 'tasto 
                                  :velocity 'f)

 

Link to post
Share on other sites
  • 1 month later...

Thank you André.

 

I've made that based on you code for replace pitch on technique:

 

;;; REPLACE-PITCH-OF-A-TECHNIQUE
;;; Based on code from AM. (replace-velocity-of-a-technique)
(defun replace-pitch-of-a-technique (omn-list &key technique pitch)
   (flatten (loop for i in (single-events omn-list)
              when (equal (nth 3 i) technique)
              collect `(,(nth 0 i) ,(rnd-pick pitch) ,(nth 2 i) ,(nth 3 i))
              else collect i)))


(replace-pitch-of-a-technique  '(e. c4 p tasto d4 ponte e4) 
                                  :technique 'tasto 
                                  :pitch '(g6))


(replace-pitch-of-a-technique  '(e. c4 p tasto d4 ponte e4 d4 tasto f5 tasto)  
                                  :technique 'tasto 
                                  :pitch '(g4 e5 a6))

S.

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.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy