Jump to content

replace pitch/rhy-val -> acciaccatura - in OMN


AM

Recommended Posts

simple question, perhaps someone could help me.

i like to replace some ordinary notes (example) with an "acciaccatura"?

 

example:

from...

'((e c6 q. ab5 3e g5 f5 e5 q f5 -)) 

to...

'((acc c6) q. ab5 3e g5 f5 e5 q f5 -) ; = replace e c6 with (acc c6)

 

i think, its not complicated but i didn't found the OMN-solution.

 

thanx for your help!!

andré

 

Link to comment
Share on other sites

Is this what you are looking for:

(substitute-motif '((e c6)) '(((acc c6))) '(e c6 q. ab5 3e g5 f5 e5 q f5 -))
=> ((acc c6) q. ab5 3e g5 f5 e5 q f5 -)

 

The SUBSTITUTE-MOTIF function is not documented but it is in the system.

I will document the function in the next few days.

 

Here are few more examples:

(substitute-motif '((a b c) (d b)) '((1 2 3) (8 9)) '(d b s a b c e j g))
=> (8 9 S 1 2 3 E J G)

(substitute-motif '((a b c) (d b)) '((1 2 3) (8 9)) '(d b s a b c e j g) :otherwise 'x)
=> (8 9 x 1 2 3 x x x)

(substitute-motif '(q) '(1 2 3) '(d b s a b c e j g a b c q q q))
=> (D B S A B C E J G A B C 1 2 3 1 2 3 1 2 3)

 

substitute-motif (old new list &key (test #'equal) otherwise)

Link to comment
Share on other sites

yes, that's the way it will works... only one little "problem"...

 

the pitch will be always different... so the search-pattern should be something like '(e ?) -> to '((acc ?) -> pitch sould be overtaken to (acc ?), i only want to replace the length-val to an acc..

 

 

 

 

Link to comment
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