o_e Posted January 27, 2015 Share Posted January 27, 2015 Hi,I want to distribute every second note (with its length) to one voice (instrument) and every first and third note to another voice (instrument)like in the example.Is there a way to do this automatically? What I want it to spread a voice to different instruments, preserving the position..Thanks for help!oleedit: I just saw that half of the work could be done with gen-swallow, just need to change every nth length-value into a rest-value (preferably leaving my sublists (bars) untouched)..something like length-to-rest for position instead of size of the length.(setf stimme1 '((h d4 q a4 g4) (q a4 e4 h f4) (h e4 g4) (q f4 e4 d4 cs4) (h d4 q a4 a4))) (flatten (omn :pitch stimme1)) => (d4 a4 g4 a4 e4 f4 e4 g4 f4 e4 d4 cs4 d4 a4 a4) (omn :length stimme1) => ((1/2 1/4 1/4) (1/4 1/4 1/2) (1/2 1/2) (1/4 1/4 1/4 1/4) (1/2 1/4 1/4)) (setf sieve '(d4 g4 e4 e4 f4 d4 d4 a4)) ;first, third, fifth pitch and so on (setf sieve-rhy '((1/2 -1/4 1/4) (-1/4 1/4 -1/2) (1/2 -1/2) (1/4 -1/4 1/4 -1/4) (1/2 -1/4 1/4)) ;every second length is replaced by rest (make-omn :length sieve-rhy :pitch sieve) => (h d4 -q g4 - e4 -h e4 - q f4 - d4 - h d4 -q a4) (setf sieve2 '(a4 a4 f4 g4 e4 cs4 a4)) ;the other way around (setf sieve-rhy2 '((-1/2 1/4 -1/4) (1/4 -1/4 1/2) (-1/2 1/2) (-1/4 1/4 -1/4 1/4) (-1/2 1/4 -1/4))) ;the other way around (make-omn :length sieve-rhy2 :pitch sieve2) => ((-h q a4 -) (q a4 - h f4) (-h g4) (-q e4 - cs4) (-h q a4 -)) Quote Link to comment Share on other sites More sharing options...
opmo Posted January 28, 2015 Share Posted January 28, 2015 (edited) Here it is:(setf stimme1 '((h d4 q a4 g4) (q a4 e4 h f4) (h e4 g4) (q f4 e4 d4 cs4) (h d4 q a4 a4))) (setf pitch (omn :pitch stimme1)) (setf len1 (length-rest-series '(2 2 2 2 2 2 2 2) '((1/2 1/4 1/4) (1/4 1/4 1/2) (1/2 1/2) (1/4 1/4 1/4 1/4) (1/2 1/4 1/4)))) => ((1/2 -1/4 1/4) (-1/4 1/4 -1/2) (1/2 -1/2) (1/4 -1/4 1/4 -1/4) (1/2 -1/4 1/4)) (setf len2 (length-rest-series '(1 2 2 2 2 2 2 2 2) '((1/2 1/4 1/4) (1/4 1/4 1/2) (1/2 1/2) (1/4 1/4 1/4 1/4) (1/2 1/4 1/4)))) => ((-1/2 1/4 -1/4) (1/4 -1/4 1/2) (-1/2 1/2) (-1/4 1/4 -1/4 1/4) (-1/2 1/4 -1/4)) (make-omn :length len1 :pitch (gen-swallow len1 pitch)) => ((h d4 -q g4) (-q e4 -h) (h e4 -) (q f4 - d4 -) (h d4 -q a4)) (make-omn :length len2 :pitch (gen-swallow len2 pitch)) => ((-h q a4 -) (q a4 - h f4) (-h g4) (-q e4 - cs4) (-h q a4 -)) Edited July 25, 2015 by opmo JulioHerrlein 1 Quote Link to comment Share on other sites More sharing options...
o_e Posted January 28, 2015 Author Share Posted January 28, 2015 thanks!! 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.