NagyMusic Posted March 26, 2022 Share Posted March 26, 2022 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)) Quote Link to comment Share on other sites More sharing options...
opmo Posted March 26, 2022 Share Posted March 26, 2022 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)) NagyMusic 1 Quote Link to comment Share on other sites More sharing options...
NagyMusic Posted March 28, 2022 Author Share Posted March 28, 2022 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!! Quote Link to comment Share on other sites More sharing options...
o_e Posted March 28, 2022 Share Posted March 28, 2022 (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)) Stephane Boussuge and AM 2 Quote Link to comment Share on other sites More sharing options...
opmo Posted March 28, 2022 Share Posted March 28, 2022 (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 -)) Stephane Boussuge, o_e and AM 3 Quote Link to comment Share on other sites More sharing options...
NagyMusic Posted March 28, 2022 Author Share Posted March 28, 2022 (edited) 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 Edited March 28, 2022 by NagyMusic question clarification Quote Link to comment Share on other sites More sharing options...
o_e Posted March 28, 2022 Share Posted March 28, 2022 Sorry, but I don't get what you are after Quote Link to comment Share on other sites More sharing options...
opmo Posted March 29, 2022 Share Posted March 29, 2022 (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)) o_e, AM and NagyMusic 3 Quote Link to comment Share on other sites More sharing options...
NagyMusic Posted March 29, 2022 Author Share Posted March 29, 2022 Thank you so much! length-staccato was exactly what I was looking for! I appreciate you help and patience with my question. Quote Link to comment Share on other sites More sharing options...
opmo Posted March 29, 2022 Share Posted March 29, 2022 You need to search and study more the documents. NagyMusic 1 Quote Link to comment Share on other sites More sharing options...
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.