[CM] s7, cm_patterns

James Hearon j_hearon at hotmail.com
Thu Jul 2 11:09:33 PDT 2015

I'm finding myself  s7 challenged, trying to do an example using CM_patterns.scm in Snd using the listener.  

Seems that Snd doesn't have process, sprout etc. which Grace allows for working with patterns, so trying to figure out how to set up a control loop in with-sound in Snd using the patterns, but getting a bit confused.

I understand with-sound can use do for a control structure
(with-sound ( )
    (do ((k 0 (+ k 1)))
    ((= k 10))

But I'm confused about getting from the CM_patterns.scm prototype into a with-sound control loop.

 (define xxx '(100.0  22.345  3000.0  400))
 (define aaa (make-heap xxx))
 (next aaa #t)

I tried something like this just to test, but it prints everything, not just the heap pattern values.
(define (do-loop n)
 (do ((i 0 (+ i 1)))
  ((= i n))
 (next aaa #t)
  (display aaa))

(lambda (n) (do-loop n))
(list 10 20))

I'm wondering if anyone might have a simple working example to share?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20150702/8835356f/attachment.html>

More information about the Cmdist mailing list