<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>re: finding myself s7 challenged for CM_patterns.scm in Snd without Grace process, sprout etc.<br><br>I've kept digging with this and got something working, but it's not very pretty.&nbsp; It uses 'list-ref'<br>in with-sound (), but that could be improved, I'm sure.<br>Regards,<br>Jim<br><br><br>------------------<br>(load "snd/CM_patterns.scm")<br><br>(definstrument (examp1 start-time duration frequency amplitude sampling-rate)<br>&nbsp; (let* ((beg (floor (* start-time sampling-rate)))<br>&nbsp;&nbsp;&nbsp; &nbsp;(end (+ beg (floor (* duration sampling-rate))))<br>&nbsp;&nbsp;&nbsp; &nbsp;(sine-wave (make-oscil :frequency frequency)))<br>&nbsp;&nbsp;&nbsp;&nbsp; (do ((i beg (+ i 1)))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i end))<br>&nbsp;&nbsp;&nbsp;&nbsp; (outa i (* amplitude (oscil sine-wave))) <br>&nbsp;&nbsp;&nbsp;&nbsp; (outb i (* amplitude (oscil sine-wave))) <br>&nbsp;&nbsp;&nbsp;&nbsp; )))<br><br>&nbsp;(define xxx '(160.0&nbsp; 600.345&nbsp; 1000.0&nbsp; 400))<br>&nbsp;(define aaa (make-heap xxx))<br>&nbsp;(define bbb (next aaa #t))<br><br>(with-sound (:output "MyTest.wav" :srate 48000 :channels 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :header-type&nbsp; mus-riff :statistics #t)<br>&nbsp; (do (( i 0.0 (+ i 2.0))) <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((&gt;= i 2.0)) <br>&nbsp;(examp1&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0.25&nbsp;&nbsp;&nbsp; (list-ref bbb 0)&nbsp;&nbsp;&nbsp; 0.5 48000)<br>&nbsp;(examp1&nbsp;&nbsp; (+ i 1.0)&nbsp;&nbsp;&nbsp; 0.25&nbsp;&nbsp;&nbsp; (list-ref bbb 2)&nbsp;&nbsp;&nbsp; 0.5 48000)<br>&nbsp;(examp1&nbsp;&nbsp; (+ i 2.0)&nbsp;&nbsp;&nbsp; 0.25&nbsp;&nbsp;&nbsp; (list-ref bbb 3)&nbsp;&nbsp;&nbsp; 0.5 48000)<br>&nbsp;(examp1&nbsp;&nbsp; (+ i 3.0)&nbsp;&nbsp;&nbsp; 0.25&nbsp;&nbsp;&nbsp; (list-ref bbb 1)&nbsp;&nbsp;&nbsp; 0.5 48000)<br>&nbsp;))<br>                                               </div></body>
</html>