<div dir="ltr">Hello there! I&#39;m trying to duplicate each N samples of an audio file so that ABCD becomes AABBCCDD and so on. I have modified one of the examples to produce the following code below, but it doesn&#39;t work. It makes a properly-sized blank audio file, but only the first block is written. Indeed, putting in a print statement shows that the loop is only run once. But NUM-BLOCKS turns out to be 51 which is what I expected. Forgive me if this is a simple Scheme error, as I am more familiar with Common Lisp and Elisp than I am with Scheme. Or I may be misunderstanding something about Snd itself. I would greatly appreciate any help you can offer. Thank you. ---_David<div><br></div><div>(when (= 0 (length (sounds)))<br>  (open-sound &quot;/home/dto/Desktop/beatloop.wav&quot;))<br><br>(define echo-mosaic<br>  (lambda* (block-len snd chn)<br>    (let* ((len (framples snd chn))<br>           (num-blocks (floor (/ len (srate snd) block-len)))<br>           (new (new-sound #f :size (* 2 len))))<br>      (if (&gt; num-blocks 1)<br>          (let ((actual-block-len (ceiling (/ len num-blocks))))<br>            (do ((n 0 (+ n 1)))<br>                ((= n num-blocks))<br>              (let ((beg (* n actual-block-len)))<br>                (let ((reg (make-region beg (+ beg actual-block-len) chn)))<br>                  (mix-region reg (* 2 beg) new chn)<br>                  (mix-region reg (+ (* 2 beg) actual-block-len) new chn)<br>                  (forget-region reg))))<br>            new)))))<br><br>(echo-mosaic 0.25 0 0)<br></div></div>