<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br>I'm finding myself&nbsp; s7 challenged, trying to do an example using CM_patterns.scm in Snd using the listener.&nbsp; <br><br>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.<br><br>I understand with-sound can use do for a control structure<br>(with-sound ( )<br>&nbsp;&nbsp;&nbsp; (do ((k 0 (+ k 1)))<br>&nbsp;&nbsp;&nbsp; ((= k 10))<br><br>But I'm confused about getting from the CM_patterns.scm prototype into a with-sound control loop.<br><br>&nbsp;(define xxx '(100.0&nbsp; 22.345&nbsp; 3000.0&nbsp; 400))<br>&nbsp;(define aaa (make-heap xxx))<br>&nbsp;(next aaa #t)<br><br>I tried something like this just to test, but it prints everything, not just the heap pattern values.<br>(define (do-loop n)<br>&nbsp;(do ((i 0 (+ i 1)))<br>&nbsp; ((= i n))<br>&nbsp;(next aaa #t)<br>&nbsp; (display aaa))<br>(newline))<br><br>(for-each<br>(lambda (n) (do-loop n))<br>(list 10 20))<br><br>I'm wondering if anyone might have a simple working example to share?<br><br>Regards,<br>Jim<br>                                               </div></body>
</html>