Skip to content
View in the app

A better way to browse. Learn more.

Learn more

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

Featured Replies

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é

 

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)

  • Author

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..

 

 

 

 

  • Author

i will write a little function and post it at the forum later.

Other solution:

(setf omn '(s. fs5 mf s p s. ff t f4 p fs5 s. mf t f -s))

(make-omn
 :length (omn :length omn)
 :pitch (omn :pitch omn)
 :velocity (omn :velocity omn)
 :articulation (substitute-motif '(3/32) '(acc) (omn :length omn) :otherwise '-))

=> (s. fs5 acc s p s. ff acc t f4 p fs5 s. mf acc t f -s)

 

Create an account or sign in to comment

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.