[CM] newbie: rhythm confusion

Carl Edwards carl.boingie@rcn.com
Fri, 28 Jun 2002 00:47:30 -0400


Thanks a million Linda.

I'm glad I wrote. That would have taken me a week to figure out. I owe you a
slice (at least)! =)

Carl Edwards

> Here's my take on your code:
>
> (defprocess my-first ()
>   (let (
>       (r (new rotation of '(q e. h s)))
>       )
>   (process repeat 96
>            for k =(new random of '((60 weight .2143)
>                          (62 weight .0714)
>                          (64 weight .1429)
>                          (65 weight .0714)
>                          (67 weight .2143)
>                          (69 weight .1429)
>                          (70 weight .1429)))
>
>            for x = (now)
>            for ba = (rhythm (next r)) do
>            (output (new midi time x
>                         keynum (next k)
>                         duration ba
>                         amplitude .5))
>            (wait ba))))
>
>
> 1--The reason all your rhythms were the same is that the pattern
> containing them was being started from the beginning every time you looped
> back to the top of the process. Declaring the rhythm item stream in a (let
> fixes this.
>
> 2--you'll need a DO before the output
>
> 3--add a paren around 'output' that closes after the amplitude is set.
>
> 4--the 'wait' comes at the very end of the process and also deserves a set
> of parens.
>
> cheers,
> la