o_e Posted January 17, 2015 Posted January 17, 2015 Hi, what I want to do is to use ambitus-pitch-remove in the second voicebut preserving the rhythmical places for the remaining pitches (so that the pitches swallowed by ambitus-pitch-remove are replaced by rests of the same lengths).Or asking more generally: Is it possible to manipulate on the level where pitches and length are already glued together (omn?)?code:(setf mel '(c4 d4 e4 gs4 bb5 eb6)) (setf rhy '(1/4 -1/8 1/8 1/8 -1/8 1/4 1/4 -1/8 1/8 1/8 -1/4)) (setf mel2 (gen-eval 20 '(rnd-sample 6 mel))) (setf rhy2 (gen-eval 10 '(rnd-sample 12 rhy))) (setf rhy3 (assemble-seq '(-1/4) rhy2)) (setf eins (make-omn :length rhy2 :pitch mel2)) (setf zwei (make-omn :length rhy3 :pitch mel2)) (def-score hocket (:key-signature atonal :time-signature '(8 8) :tempo 100) (eins :omn eins :channel 1 :sound 'gm :program 0) (zwei :omn zwei :channel 2 :program 0)) Quote
opmo Posted January 18, 2015 Posted January 18, 2015 (edited) I have created new function AMBITUS-SWALLOW which is doing what you are looking for.The function AMBITUS-PITCH-REMOVE has new name AMBITUS-REMOVE.ambitus-swallow range omn-sequence &key section [Function] Arguments and Values: range an integer (low high), a pitch symbol (low high) or instrument-name.omn-list omn sequencesection an integer (list number selection). Description: This function swallows pitches, velocities and articulations from the omn-sequence which are outside the given range. The length of the removed pitch is inverted into rest-length. The span of the sequence stays unchanged. Examples: (ambitus-swallow '(-11 21) '((q c4ds3 e c4 c-1 q d5 g9) (q c4 e d6 = = = c8 q d5 g9)))=> ((q c4ds3 e c4 - q d5 -) (q c4 -e - - - - q d5 -)) With section: Only the first list is processed (0-based). (ambitus-swallow '(db3 a5) '((q c4ds3 e c4 c-1 q d5 g9) (q c4 e d6 = = = c8 q d5 g9)) :section '(0))=> ((q c4ds3 e c4 - q d5 -) (q c4 e d6 = = = c8 q d5 g9)) (ambitus-swallow '(c4 f4) '((e c4e4g4 h_e c5) (q c4 = = - - =) (q cs4 = - - = =) (e c4 db4d4eb4 d4 db4 c4 cs5) (e c4 e4 g4 h_e c5) (q c4 = = - - =) (q cs4 = - - = =) (e c4 db4d6 d4 db4 c4 cs5))) => ((e c4e4 -h_e) (q c4 c4 c4 - - c4) (q cs4 cs4 - - cs4 cs4) (e c4 db4d4eb4 d4 db4 c4 -) (e c4 e4 - -h_e) (q c4 c4 c4 - - c4) (q cs4 cs4 - - cs4 cs4) (e c4 db4 d4 db4 c4 -)) Edited July 22, 2015 by opmo Quote
o_e Posted January 18, 2015 Author Posted January 18, 2015 Thank you!I will find the new function in the next OM update, right (can't wait trying it :-))? Quote
Stephane Boussuge Posted January 18, 2015 Posted January 18, 2015 Very useful new function. Great !SB. Quote
o_e Posted January 21, 2015 Author Posted January 21, 2015 Hi,May I ask politely when the new function(s) will be released (planning my workflow..)?thanks!ole Quote
opmo Posted January 21, 2015 Posted January 21, 2015 I am in Salzburg today. I will release the new update as soon I am back in my studio - tomorrow :-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.