<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">I'm really stuck on trying to use map-channel to replace a newly created snd file with a dsp modified version of it.&nbsp; I've been looking at snd-test.scm for examples but still don't have it right yet and not sure
 how to craft the let/map-channel/lambda to make it work.&nbsp; All I get is a flat line so far.</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; I'm trying to place values in a float-vector, then modify those values and output to the editor.&nbsp; I know</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; (float-vector-&gt;channel im 0 fsize 0) works,</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; and I also tried sample (but very slow):</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (do ((i 0 (&#43; i 1)))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i fsize))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set! (sample i) (im i)))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; Wondering if there's an example someplace I haven't found yet for how to dsp modify a vector of values and use map-channel to output to the editor?</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;"><br>
</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; Thank You,</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; Jim</span></p>
<p class="p2" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255); min-height: 17px;">
<span class="s1" style="font-kerning: none;"></span><br>
</p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">I’ve been trying something like below…</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">but cannot seem to get the map-channel/let/lambda part right.</span></p>
<p class="p2" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255); min-height: 17px;">
<span class="s1" style="font-kerning: none;"></span><br>
</p>
<p class="p2" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255); min-height: 17px;">
<span class="s1" style="font-kerning: none;"></span><br>
</p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (let*&nbsp; ((fsize 22050)</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (increment (/ (* 440.0 2.0 pi) fsize))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (im (make-float-vector fsize)) ;empy vector</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (current-phase 0.0)</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (val 0.0) );init var</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new-sound &quot;test.snd&quot; :size fsize)&nbsp; ;creates a new snd in editor</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;place values in a vector</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (do ((i 0 (&#43; i 1)))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i fsize))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set! val (* .1 (sin current-phase)))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set! current-phase (&#43; current-phase increment))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (set! (im i) val)</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp; ;(format #t &quot;~%i: ~F&nbsp; ~0,6F\t &quot; i (im i) )</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (map-channel (lambda (y)</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (do ((i 0 (&#43; i 1)))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i fsize))</span></p>
<p class="p1" style="margin: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-stretch: normal; font-size: 14.7px; line-height: normal; font-family: &quot;Helvetica Neue&quot;; color: rgb(33, 33, 33); -webkit-text-stroke: rgb(33, 33, 33); background-color: rgb(255, 255, 255);">
<span class="s1" style="font-kerning: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (* (amplitude-modulation 0.5) (im i))))0 fsize))</span></p>
<br>
</div>
</body>
</html>