<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);">
Thank you for that info.&nbsp; I understand now where I was getting confused re: float-vector-&gt;channel and see I need to adjust the vector size as I go.&nbsp; Clear now.</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);">
Regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jim<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> cmdist-bounces@ccrma.Stanford.EDU &lt;cmdist-bounces@ccrma.Stanford.EDU&gt; on behalf of cmdist-request@ccrma.Stanford.EDU &lt;cmdist-request@ccrma.Stanford.EDU&gt;<br>
<b>Sent:</b> Thursday, September 6, 2018 7:00 PM<br>
<b>To:</b> cmdist@ccrma.Stanford.EDU<br>
<b>Subject:</b> Cmdist Digest, Vol 124, Issue 2</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Send Cmdist mailing list submissions to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdist@ccrma.stanford.edu<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
or, via email, send a message with subject or body 'help' to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdist-request@ccrma.stanford.edu<br>
<br>
You can reach the person managing the list at<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdist-owner@ccrma.stanford.edu<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Cmdist digest...&quot;<br>
<br>
<br>
Today's Topics:<br>
<br>
&nbsp;&nbsp; 1. env-&gt;channel, and float-vector-&gt;channel (James Hearon)<br>
&nbsp;&nbsp; 2. Re: env-&gt;channel, and float-vector-&gt;channel<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (bil@ccrma.Stanford.EDU)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 6 Sep 2018 17:51:00 &#43;0000<br>
From: James Hearon &lt;j_hearon@hotmail.com&gt;<br>
To: &quot;cmdist@ccrma.Stanford.EDU&quot; &lt;cmdist@ccrma.Stanford.EDU&gt;<br>
Subject: [CM] env-&gt;channel, and float-vector-&gt;channel<br>
Message-ID:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;MWHPR1001MB2080A2E3510FF2BDF6232333E5010@MWHPR1001MB2080.namprd10.prod.outlook.com&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi,<br>
I'm having some confusion about successive edits using env-&gt;channel vs. float-vector-&gt;channel.&nbsp; For example if I loop employing env-channel and a vector as an envelope, then I see the successive edits every 1k samples; but when I try to do that using float-vector-&gt;channel
 the spacing is squished.<br>
<br>
Float-vector-&gt;channel works fine if I employ the vector as envelope across the whole snd., but I'm failing to understand how to employ it for successive back-to-back edits within the snd.<br>
<br>
Thank you for Snd 18.7!<br>
<br>
Regards,<br>
Jim<br>
<br>
<br>
(set! (mus-srate) 48000)<br>
<br>
&nbsp;(let*&nbsp;&nbsp; ((mysize 8) ;size of vector for envelope pairs<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (fsize 48000) ;size of the snd<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (myvec (make-float-vector mysize))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>
&nbsp;&nbsp; (new-sound &quot;test.snd&quot; :size fsize)<br>
(insert-silence 0 fsize)<br>
&nbsp;(map-channel (lambda (y) 0.5))<br>
<br>
(float-vector-set! myvec 0 0.1);x1<br>
(float-vector-set! myvec 1 0.5 );y1<br>
(float-vector-set! myvec 2 0.5 );x2<br>
(float-vector-set! myvec 3 1.0 );y2<br>
(float-vector-set! myvec 4 0.75 );x3<br>
(float-vector-set! myvec 5 -1.0 );y3<br>
(float-vector-set! myvec 6 1.0 );x4<br>
(float-vector-set! myvec 7 0.0 );y4<br>
<br>
&nbsp; (do ((i 0 (&#43; i 1000)))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i 24000))<br>
(env-channel (make-env myvec :duration 0.015 :scaler 1.0) i 1000 0 0 )<br>
;(float-vector-&gt;channel myvec i 1000 0) ;place float-vector in the editor ;XXX<br>
))<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20180906/c3da40cd/attachment-0001.html">https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20180906/c3da40cd/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 06 Sep 2018 11:30:10 -0700<br>
From: bil@ccrma.Stanford.EDU<br>
To: James Hearon &lt;j_hearon@hotmail.com&gt;<br>
Cc: &quot;cmdist@ccrma.Stanford.EDU&quot; &lt;cmdist@ccrma.Stanford.EDU&gt;<br>
Subject: Re: [CM] env-&gt;channel, and float-vector-&gt;channel<br>
Message-ID: &lt;b1f4d4784405be5bf9616895019b0491@ccrma.stanford.edu&gt;<br>
Content-Type: text/plain; charset=US-ASCII; format=flowed<br>
<br>
You're talking about the length of each blip?&nbsp; In the<br>
env-channel case, the vector is treated as an envelope<br>
and applied to .015 seconds of samples, but in the<br>
float-vector-&gt;channel case, the vector itself is simply<br>
copied into the file.&nbsp; It only has 8 samples, so in the<br>
float-vector-&gt;channel case, the blips are 8 samples wide,<br>
rather than .015 * 48000 = 720 samples.<br>
<br>
(By the way, I think you don't need the insert-silence<br>
statement -- it just adds 48000 samples to the overall<br>
file length).<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
Cmdist@ccrma.stanford.edu<br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
<br>
<br>
End of Cmdist Digest, Vol 124, Issue 2<br>
**************************************<br>
<br>
</div>
</span></font></div>
</body>
</html>