[CM] cm question

Heinrich Taube taube at uiuc.edu
Mon Jul 27 05:37:23 PDT 2009


You can use 'r' to mark rests:
cm> (note 'r)
"r"
cm> (key 'r)
-1
you can use negative values to mark rhythms:

cm> (rhythm -1/4)
-1.0


of course, you need to check for those values and not pass them on to  
you file or port!

(define (foo n)
    (process with pat = (make-weighting '(c4 r d4 r e4 r f4))
                     repeat n
                     for k = (key (next pat))
                     unless (eq? k -1)
                     do (send "mp:midi" :key k)
                     (wait .5)))





> hi,
>
> this is another, possibly completely stupid, question, but I'm just  
> doing some simple
> stuff with patterns, and wonder how you code for rests? I seem only  
> to be able to put
> a note-name on a rhythmic value. can you help?
>
> many thanks,
> peter nelson
>



More information about the Cmdist mailing list