[CM] newbie: rhythm confusion

Michael Klingbeil michael@klingbeil.com
Fri, 28 Jun 2002 01:30:33 -0400


Try this:

(defprocess my-first ()
   (process with 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)))
            with r = (new rotation of '(q e. h s))
            repeat 96
            for x = (now)
            for ba = (rhythm (next r))
            output (new midi time x
                           keynum (next k)
                           duration ba
                           amplitude .5)
            wait ba))

The patterns are set up before the repeat clause, and then each time 
through the repeat the next element of the patterns is fetched. Also 
if you want a constant rhythmic pattern use "cycle" instead of 
"rotation" since this swaps elements on each period.


>I think I'm having a little trouble understanding the use of rhythm. I was
>trying to get a rotation of a 4 beat phrase but my output has totally even
>durations and timing. Can somebody take a look at the process below and tell
>me what I'm doing wrong.
>
>(defprocess my-first ()
>   (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 r = (new rotation of '(q e. h s))
>            for x = (now)
>            for ba = (rhythm (next r))
>            output (new midi time x
>                           keynum (next k)
>                           duration ba
>                           amplitude .5)
>            wait ba))
>
>Minor hiccups aside, this is the most fun I've had in a good long time.
>
>Thanks in advance.
>
>Carl Edwards
>
>
>_______________________________________________
>Cmdist mailing list
>Cmdist@ccrma.stanford.edu
>http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist