November 20, 20232 yr Hello, I am trying to assign articulations (attributes) to certain note lengths my attempt: (setf omn '((q e3 p -q s a4) (s f3 mp -s) (e g3 mf))) (setf rh (omn :length omn)) ;=> ((1/4 -1/4 1/16) (1/16 -1/16) (1/8)) ;; how is it possible to convert the ratios to omn-notation?: (setf rhomn '((q -q s) (s -s) (e))) (setf aq '(ord) as '(stacc) ae '(spicc) a-q '(-) a-s '(-)) (setf art (assemble-section 'a (flatten rhomn))) ;;I don't understand how to handle the rests (setf pch (omn :pitch omn)) (setf vel (omn :velocity omn)) (make-omn :length rh :pitch pch :velocity vel :articulation art) ; => ((q e3 p ord - s a4 ord) (s f3 mp -) (e g3 mf stacc)) Which method can I use to achieve the correct assignment of the attributes to the specific note lengths, in order to obtain this result? ((q e3 p ord -q s a4 stacc ) (s f3 mp stacc -s) (e g3 mf spicc)) Thank you very much for any help or advice you can give me, best wishes AO
November 20, 20232 yr One solution would be: (setf omn '((q e3 p -q s a4) (s f3 mp -s) (e g3 mf))) (setf dictum '((:any q :apply ord) (:any e :apply spicc) (:any s :apply stacc))) (dictum dictum omn) => ((q e3 p ord - s a4 stacc) (s f3 mp stacc -) (e g3 mf spicc))
November 20, 20232 yr Another solution is also possible with the function length-map: (setf omn '((q e3 p -q s a4) (s f3 mp -s) (e g3 mf))) (setf out (length-map '((q ord)(s stacc)(e spicc)) omn)) => ((q e3 p ord - s a4 stacc) (s f3 mp stacc -) (e g3 mf spicc))
Create an account or sign in to comment