<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. I understand now where I was getting confused re: float-vector->channel and see I need to adjust the vector size as I go. 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 <cmdist-bounces@ccrma.Stanford.EDU> on behalf of cmdist-request@ccrma.Stanford.EDU <cmdist-request@ccrma.Stanford.EDU><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> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Send Cmdist mailing list submissions to<br>
cmdist@ccrma.stanford.edu<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<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>
cmdist-request@ccrma.stanford.edu<br>
<br>
You can reach the person managing the list at<br>
cmdist-owner@ccrma.stanford.edu<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Cmdist digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. env->channel, and float-vector->channel (James Hearon)<br>
2. Re: env->channel, and float-vector->channel<br>
(bil@ccrma.Stanford.EDU)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 6 Sep 2018 17:51:00 +0000<br>
From: James Hearon <j_hearon@hotmail.com><br>
To: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU><br>
Subject: [CM] env->channel, and float-vector->channel<br>
Message-ID:<br>
<MWHPR1001MB2080A2E3510FF2BDF6232333E5010@MWHPR1001MB2080.namprd10.prod.outlook.com><br>
<br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
I'm having some confusion about successive edits using env->channel vs. float-vector->channel. 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->channel
the spacing is squished.<br>
<br>
Float-vector->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>
(let* ((mysize 8) ;size of vector for envelope pairs<br>
(fsize 48000) ;size of the snd<br>
(myvec (make-float-vector mysize))<br>
)<br>
(new-sound "test.snd" :size fsize)<br>
(insert-silence 0 fsize)<br>
(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>
(do ((i 0 (+ i 1000)))<br>
((= i 24000))<br>
(env-channel (make-env myvec :duration 0.015 :scaler 1.0) i 1000 0 0 )<br>
;(float-vector->channel myvec i 1000 0) ;place float-vector in the editor ;XXX<br>
))<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<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>><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 <j_hearon@hotmail.com><br>
Cc: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU><br>
Subject: Re: [CM] env->channel, and float-vector->channel<br>
Message-ID: <b1f4d4784405be5bf9616895019b0491@ccrma.stanford.edu><br>
Content-Type: text/plain; charset=US-ASCII; format=flowed<br>
<br>
You're talking about the length of each blip? 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->channel case, the vector itself is simply<br>
copied into the file. It only has 8 samples, so in the<br>
float-vector->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>