Skip to content
View in the app

A better way to browse. Learn more.

Learn more

spread pitches and rhythms from one voice into more voices

Featured Replies

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 -))

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 -))
  • Author

thanks!!

Create an account or sign in to comment

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.