<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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 Bill,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Yes, that's very helpful.&nbsp; I believe I was confused about trying to add a list to the</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
make-pulsed-env dur or frequency component, which only takes a real num:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(e (make-pulsed-env '(0 0 1 1 2 0) 1.0&nbsp; '(0 0 .5 .15 1 0) ))&nbsp;&nbsp; <br>
</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);">
versus applying an env. to the polyshape index or fm parameter:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(polyshape gen (* (pulsed-env e (env frq))) &nbsp;0.1)</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);">
But I see how it should work now.<br>
</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);">
So this was the effect I was after. Morse Code?</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);">
(with-sound (:srate 48000 :channels 1 :play #t)
<div>&nbsp; (let ((gen (make-polyshape 400.0 :partials (list 1 .5 &nbsp;2 .25 &nbsp;3 .125 &nbsp;4 .125)))</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(e (make-pulsed-env '(0 0 1 1 2 0) 1.0 1)) ;w/ dur freq</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(frq (make-env '(0 0 .5 .15 1 0) :duration 1.0 :scaler (hz-&gt;radians 50)))</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; )</div>
<div>&nbsp; &nbsp; (do ((i 0 (+ i 1)))</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; ((= i 192000))</div>
<div>&nbsp; &nbsp; (outa i (* 5.95 (polyshape gen (* (pulsed-env e (env frq))) &nbsp;0.1) &nbsp;)) &nbsp;;w/ index, fm</div>
&nbsp; &nbsp; &nbsp; ))) <br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" 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> Wednesday, June 23, 2021 9:00 AM<br>
<b>To:</b> cmdist@ccrma.Stanford.EDU &lt;cmdist@ccrma.Stanford.EDU&gt;<br>
<b>Subject:</b> Cmdist Digest, Vol 157, Issue 4</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. make-pulsed-env (James Hearon)<br>
&nbsp;&nbsp; 2. Re: make-pulsed-env (bil@ccrma.Stanford.EDU)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 23 Jun 2021 17:56:03 +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] make-pulsed-env<br>
Message-ID:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;BYAPR10MB2536A2781AAB5012906BC7DEE5089@BYAPR10MB2536.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 was trying to figure out how to use an env on the freq parameter of make-pulsed-env<br>
(make-pulsed-env envelope duration frequency) but it wants a real, not a pair.&nbsp; I thought I'd look-see the code for make-pulsed-env, but I can't seem to locate it.&nbsp; Wondering if there's a way to go about achieving the effect?&nbsp; make-freqpulsed-env?<br>
<br>
I tried adding an amp to the pulsed-env but that's not the effect I was after.<br>
&nbsp;&nbsp;&nbsp; (outa i (* 5.95 (polyshape gen (* (env ampenv) (pulsed-env jsenvel))&nbsp; 0.01)&nbsp; ))<br>
Also tried a vibrato type effect using an LFO, but still no joy.<br>
Just trying to get make-pulsed-env to change frequency within the duration of the note.<br>
Something like: &lt;&gt;,&nbsp;&nbsp;&nbsp; &lt;&nbsp; &gt;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&nbsp;&nbsp;&nbsp;&nbsp; &gt;, &lt;&gt;, &lt;&gt;,&lt;&gt;,&lt;&gt;<br>
<br>
(with-sound (:srate 48000 :channels 1 :play #t)<br>
&nbsp; (let ((gen (make-polyshape 400.0 :partials (list 1 .5&nbsp; 2 .25&nbsp; 3 .125&nbsp; 4 .125)))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (jsenvel (make-pulsed-env '(0 0&nbsp; .25&nbsp; 0.01&nbsp; .5&nbsp; 0.2 1&nbsp; 0.0)&nbsp; 1.0&nbsp; 1.0))&nbsp; ;XXX<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>
&nbsp;&nbsp;&nbsp; (do ((i 0 (+ i 1)))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i 96000))<br>
&nbsp;&nbsp;&nbsp; (outa i (* 5.95 (polyshape gen&nbsp; (pulsed-env jsenvel)&nbsp; 0.01)&nbsp; ))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )))<br>
<br>
Regards,<br>
Jim<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210623/5f62e957/attachment-0001.html">https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210623/5f62e957/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 23 Jun 2021 11:26:53 -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] make-pulsed-env<br>
Message-ID: &lt;f8637c31b04a201ec47b62861f5a9d4c@ccrma.stanford.edu&gt;<br>
Content-Type: text/plain; charset=US-ASCII; format=flowed<br>
<br>
The make-pulsed-env frequency parameter sets the<br>
base frequency (it can be 0); you change the pulse<br>
rate while running via the fm argument to the<br>
pulsed-env generator.&nbsp; For example:<br>
<br>
(with-sound ()<br>
&nbsp;&nbsp; (let ((e (make-pulsed-env '(0 0 1 1 2 0) .01 1))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (frq (make-env '(0 0 1 1) :duration 1.0 :scaler (hz-&gt;radians <br>
50))))<br>
&nbsp;&nbsp;&nbsp;&nbsp; (do ((i 0 (+ i 1)))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((= i 44100))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (outa i (* .5 (pulsed-env e (env frq)))))))<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 157, Issue 4<br>
**************************************<br>
</div>
</span></font></div>
</body>
</html>