<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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);">
I get a crash that I cannot seem to understand with the following code.&nbsp; In the do loop when I set the test to (= i 40400) I get a squarish-wave in the editor; but when I set it to 40500 or above&nbsp; I get an endless loop and a crash.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I was trying to create a 2 sec. test.snd, then write the samples to the editor to fill out the 2 sec. or 44100 samples if sr is 22050, but I must be doing something wrong.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>(set! *clm-srate* 22050) <br>
</span>
<div><br>
</div>
<div>&nbsp; &nbsp; &nbsp; (let* ((dur (* *clm-srate* 2)) <br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (ind (new-sound &quot;test.snd&quot; 1 *clm-srate* mus-ldouble mus-riff :size dur))<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (v1 (make-float-vector 100 .75))<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (v2 (make-float-vector 98 -.5))<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (do ((i 0 (&#43; i 200)))<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ((= i 40400)) &nbsp;;xxx 40400 works, but 40500 crashes<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(set! (samples i (&#43; i 100)) v1)<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(set! (samples (&#43; i 101) (&#43; i 199)) v2)<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ) <br>
</div>
<span>&nbsp; &nbsp; &nbsp; &nbsp; )</span><br>
</div>
</body>
</html>