Posted March 26, 20223 yr I want to trim every full-duration measure so that it always first starts with a quarter note and fills the rest of the measure with corresponding rests. For example, is it's possible to consider an omn sequence like the one below and trim the durations so that every (firtst) note in a measure is a quarter note followed by a quarter note rest (in 1/4) or a quarter note followed by an eight-note rest (in 3/8)? Thank you! ((e. e3) (e. e3) (q g3) (e. d3) (q a3))
March 26, 20223 yr You should generate the sequence correctly in the first place and not make correction to an existing sequence. (loop for i in '((q e3) (q e3) (q g3) (q d3) (q a3)) collect (fit-to-span 3/8 i)) => ((q e3 -e) (q e3 -e) (q g3 -e) (q d3 -e) (q a3 -e))
March 28, 20223 yr Author Thanks, Janusz. This is very helpful! The suggestion you made works. I just wonder if it could be applied to a sequence of alternating 3/8 and 1/4 measures? Something like: (loop for i in '((q e3) (q. e3) (q g3) (q d3) (q. a3)) collect (fit-to-span '(3/8 2/8) i)) Thank you!!
March 28, 20223 yr (loop for (a b) on '((q e3) (q. e3) (q g3) (q d3) (q. a3)) by #'cddr when a collect (fit-to-span 3/8 a) when b collect (fit-to-span 2/8 b)) => ((q e3 -e) (q e3) (q g3 -e) (q d3) (q. a3))
March 28, 20223 yr (loop for seq in '((q e3) (q. e3) (q g3) (q d3) (q. a3)) for span in '(3/8 1/4 3/8 1/2) collect (fit-to-span span seq)) => ((q e3 -e) (q e3) (q g3 -e) (q d3 -))
March 28, 20223 yr Author Thanks, everyone, for your suggestions. I apologize for not being as knowledgeable in lisp programming to figure this out! Most importantly, I'm sorry for not asking my question with more clarity! I want to retain the same measure lengths and shorten the duration of notes by 1/16 so that there's always a 16-note rests at the end of each measure: '((q e3) (q. e3) (q g3) (q d3) (q. a3)) => '((e e3 -e) (e e3 -s) (e g3 -e) (e d3 -e) (e a3 -s)) I would take measure spans from an existing sequence that features a somewhat random pattern of 3/16 and 1/4 measures and then have eighth notes in each bar followed by 16-note or 8-note rests, depending on the measure length. Do you think something like this might be possible! Thank you for your help and patience! Zvony
March 29, 20223 yr (setf omn-ls (length-staccato '((q e3) (q. e3) (q g3) (q d3) (q. a3)) :value 1/8)) => ((e e3 -) (e e3 -q) (e g3 -) (e d3 -) (e a3 -q)) (loop for i in omn-ls collect (fit-to-span 3/8 i)) => ((e e3 -q) (e e3 -q) (e g3 -q) (e d3 -q) (e a3 -q))
March 29, 20223 yr Author Thank you so much! length-staccato was exactly what I was looking for! I appreciate you help and patience with my question.
Create an account or sign in to comment