Jump to content

spread pitches and rhythms from one voice into more voices


Recommended Posts

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!

ole

edit: 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 -))
Link to comment
Share on other sites

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 by opmo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy