<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div>
<meta content="text/html; charset=us-ascii">
</div>
<div dir="auto" style="color:rgb(33,33,33); background-color:rgb(255,255,255); text-align:left">
I didn't realize there were other Michael's LOL, to answer just the editor question: Visual Studio has a ChucK extension. That paired with the &quot;revert save&quot; option under the file tab works pretty well!</div>
<div id="ms-outlook-mobile-signature" dir="auto" style="text-align: left;">
<div><br>
</div>
Best regards,<br>
<br>
Michael Pierluissi</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> chuck-users-bounces@lists.cs.princeton.edu &lt;chuck-users-bounces@lists.cs.princeton.edu&gt; on behalf of herman verbaeten &lt;hverb54@hotmail.com&gt;<br>
<b>Sent:</b> Thursday, February 6, 2020 11:41:29 AM<br>
<b>To:</b> ChucK Users Mailing List &lt;chuck-users@lists.cs.princeton.edu&gt;<br>
<b>Subject:</b> Re: [chuck-users] Create a pause and gradualy shift pan from left to right and back</font>
<div>&nbsp;</div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello Michael,</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)">
Thanks a lot for your help. I don't know if i can reply to you with other questions or if i should use &quot;chuck-users@lists.cs.princeton.edu&quot;.&nbsp;<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
In the meantime i found a solution for my &quot;pause&quot; problem in the use of ADSR. But i still have some general questions and some about the program that follows:</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)">
<ol>
<li>Where can i find a chuck editor&nbsp; with the possibility to find words and replace them (all) and that also gives the colors for reserved words etc.</li><li>Is there a way to debug line per line to discover logical errors?<br>
</li><li>&nbsp;i discovered by accident that sometimes i can use &quot;p.puf&quot; but on other occasions i have to write &quot;p.buf()&quot; why is this?</li><li>in the program hereby, is there a way to have the pan do it's job independantely from the note-envelope-flow? to go faster or slower?</li><li>When i run this program it does what i want but i can't figure out why it says 2 times &quot;p.pan = 1.000000&quot; and 2 times &quot;p.pan= -1.000000&quot; (see below)</li></ol>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Please let me know if i have to address all my questions to the general email address.&nbsp; thanks a lot !!</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)">
Herman&nbsp;</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)">
<span style="color:rgb(111,192,64)">// sound file</span><span><br>
</span>
<div>me.sourceDir() &#43; &quot;wavefile.wav&quot; =&gt; string filename;<br>
</div>
<div>if( me.args() ) me.arg(0) =&gt; filename;<br>
</div>
<div>&lt;&lt;&lt;me.sourceDir()&gt;&gt;&gt;;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// the patch </span><br>
</div>
<div>SndBuf buf =&gt; ADSR e =&gt; Pan2 p =&gt; dac;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// set attack time, decay time, release time and pause time &nbsp;</span><br>
</div>
<div>dur attack; dur decay ; dur release; dur pauze;<br>
</div>
<div>12::ms =&gt; attack ; 90::ms =&gt; decay ; 100::ms =&gt; release ; 5::ms =&gt; pauze ;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// load&nbsp; file in buf</span><br>
</div>
<div>filename =&gt; buf.read;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// set gain</span><br>
</div>
<div>.5 =&gt; buf.gain;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// set a, d, s and r</span><br>
</div>
<div>e.set( attack, decay, 0.001, release );<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// switch is needed to stay in the &quot;else&quot; step untill p.pan = -1</span><br>
</div>
<div>0 =&gt; int switch;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// begin pan extreme left</span><br>
</div>
<div>-1 =&gt; p.pan;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// time loop</span><br>
</div>
<div>while( true )<br>
</div>
<div>{&nbsp;&nbsp;</div>
<div>&nbsp; &nbsp; Math.random2(0,900000) =&gt; buf.pos;<br>
</div>
<div>&nbsp; &nbsp; Math.random2f(1.0,1.2) =&gt; buf.rate; <br>
</div>
<div>&nbsp; &nbsp; if( p.pan() &lt; 1.0 &amp;&amp; switch == 0)<br>
</div>
<div>&nbsp; &nbsp; {<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; p.pan() &#43; .10 =&gt; p.pan;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&lt;&quot;if p.pan = &quot;,p.pan()&gt;&gt;&gt;;<br>
</div>
<div>&nbsp; &nbsp; }<br>
</div>
<div>&nbsp; &nbsp; else<br>
</div>
<div>&nbsp; &nbsp; {<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; p.pan() - .10 =&gt; p.pan;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&lt;&quot;else p.pan = &quot;, p.pan()&gt;&gt;&gt;;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; 1 =&gt; switch;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; if (p.pan() == -1)<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; {<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 =&gt; switch;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; } <br>
</div>
<div>&nbsp; &nbsp; } <br>
</div>
<div>&nbsp;<span style="color:rgb(111,192,64)"> &nbsp; // key on - start attack</span><br>
</div>
<div>&nbsp; &nbsp; e.keyOn(); <br>
</div>
<div>&nbsp; &nbsp; attack &#43; decay =&gt; dur ontime; <br>
</div>
<div>&nbsp; &nbsp; ontime =&gt; now;<br>
</div>
<div>&nbsp; &nbsp; <br>
</div>
<div><span style="color:rgb(111,192,64)">&nbsp; &nbsp; &nbsp;// key off - start release</span><br>
</div>
<div>&nbsp; &nbsp; &nbsp;e.keyOff();<br>
</div>
<div>&nbsp;<br>
</div>
<div>&nbsp;<span style="color:rgb(111,192,64)"> &nbsp; &nbsp;// advance time by releasetime &#43; pausetime</span><br>
</div>
<div>&nbsp; &nbsp; &nbsp;release &#43; pauze =&gt; now;&nbsp; &nbsp;</div>
<span>}</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
---------------------------------------------------------console result print----------------------------------------------------</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
if p.pan = -0.900000
<p></p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.000000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.900000 </p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">if p.pan = 1.000000
</span></p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">if p.pan = 1.000000</span>
</p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.900000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.000000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.900000 </p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">else p.pan = -1.000000
</span></p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">else p.pan = -1.000000</span>
</p>
if p.pan = -0.900000
<p></p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.400000 </p>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div>
<div id="x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Van:</b> chuck-users-bounces@lists.cs.princeton.edu &lt;chuck-users-bounces@lists.cs.princeton.edu&gt; namens Michael Heuer &lt;heuermh@gmail.com&gt;<br>
<b>Verzonden:</b> woensdag 5 februari 2020 15:42<br>
<b>Aan:</b> ChucK Users Mailing List &lt;chuck-users@lists.cs.princeton.edu&gt;<br>
<b>Onderwerp:</b> Re: [chuck-users] Create a pause of e.g. 2 seconds between notes or samples to be played</font>
<div>&nbsp;</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hello Herman,
<div class=""><br class="">
</div>
<div class="">ChucK supports advancing time by chucking a duration to now, e.g.
<div class=""><br class="">
</div>
<div class="">note.play();</div>
<div class="">2::second =&gt; now;</div>
<div class="">note.play();</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/heuermh/lick" class="">LiCK (a Library for ChucK)</a>&nbsp;has a TimeSignature class, which provides static durations</div>
<div class=""><br class="">
</div>
<div class="">TimeSignature.common(120) @=&gt; TimeSignature ts;</div>
<div class=""><br class="">
</div>
<div class="">note.play();</div>
<div class="">ts.q =&gt; now;</div>
<div class="">note.play();</div>
<div class=""><br class="">
</div>
<div class="">and those that are dynamic to tempo changes, with anticipation and delay humanization</div>
<div class=""><br class="">
</div>
<div class="">TimeSignature.common(120) @=&gt; TimeSignature ts;</div>
<div class="">ts.quarterProvider() @=&gt; QuarterProvider q;</div>
<div class="">0.1 =&gt; q.anticipation;</div>
<div class="">0.0 =&gt; q.delay;</div>
<div class=""><br class="">
</div>
<div class="">while (true)</div>
<div class="">{</div>
<div class="">&nbsp; note.play();</div>
<div class="">&nbsp; q.get() =&gt; now;</div>
<div class="">&nbsp; ts.tempo() - 1 =&gt; ts.tempo;</div>
<div class="">}</div>
<div class=""><br class="">
</div>
<div class="">Cheers!</div>
<div class=""><br class="">
</div>
<div class="">&nbsp; &nbsp;michael</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 5, 2020, at 9:24 AM, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" class="">hverb54@hotmail.com</a>&gt; wrote:</div>
<br class="x_x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Hi,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I've only recentely started studiing ChucK and i'm looking for an easy way to integrate a pause between notes to be played in a &quot;while()&quot; loop. Could someone&nbsp; tell me in what direction to look for a solution? thanks in advance!</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Herman</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">chuck-users
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="mailto:chuck-users@lists.cs.princeton.edu" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">chuck-users@lists.cs.princeton.edu</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</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> chuck-users-bounces@lists.cs.princeton.edu &lt;chuck-users-bounces@lists.cs.princeton.edu&gt; on behalf of herman verbaeten &lt;hverb54@hotmail.com&gt;<br>
<b>Sent:</b> Thursday, February 6, 2020 11:41:29 AM<br>
<b>To:</b> ChucK Users Mailing List &lt;chuck-users@lists.cs.princeton.edu&gt;<br>
<b>Subject:</b> Re: [chuck-users] Create a pause and gradualy shift pan from left to right and back</font>
<div>&nbsp;</div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello Michael,</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)">
Thanks a lot for your help. I don't know if i can reply to you with other questions or if i should use &quot;chuck-users@lists.cs.princeton.edu&quot;.&nbsp;<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
In the meantime i found a solution for my &quot;pause&quot; problem in the use of ADSR. But i still have some general questions and some about the program that follows:</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)">
<ol>
<li>Where can i find a chuck editor&nbsp; with the possibility to find words and replace them (all) and that also gives the colors for reserved words etc.</li><li>Is there a way to debug line per line to discover logical errors?<br>
</li><li>&nbsp;i discovered by accident that sometimes i can use &quot;p.puf&quot; but on other occasions i have to write &quot;p.buf()&quot; why is this?</li><li>in the program hereby, is there a way to have the pan do it's job independantely from the note-envelope-flow? to go faster or slower?</li><li>When i run this program it does what i want but i can't figure out why it says 2 times &quot;p.pan = 1.000000&quot; and 2 times &quot;p.pan= -1.000000&quot; (see below)</li></ol>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Please let me know if i have to address all my questions to the general email address.&nbsp; thanks a lot !!</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)">
Herman&nbsp;</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)">
<span style="color:rgb(111,192,64)">// sound file</span><span><br>
</span>
<div>me.sourceDir() &#43; &quot;wavefile.wav&quot; =&gt; string filename;<br>
</div>
<div>if( me.args() ) me.arg(0) =&gt; filename;<br>
</div>
<div>&lt;&lt;&lt;me.sourceDir()&gt;&gt;&gt;;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// the patch </span><br>
</div>
<div>SndBuf buf =&gt; ADSR e =&gt; Pan2 p =&gt; dac;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// set attack time, decay time, release time and pause time &nbsp;</span><br>
</div>
<div>dur attack; dur decay ; dur release; dur pauze;<br>
</div>
<div>12::ms =&gt; attack ; 90::ms =&gt; decay ; 100::ms =&gt; release ; 5::ms =&gt; pauze ;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// load&nbsp; file in buf</span><br>
</div>
<div>filename =&gt; buf.read;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// set gain</span><br>
</div>
<div>.5 =&gt; buf.gain;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// set a, d, s and r</span><br>
</div>
<div>e.set( attack, decay, 0.001, release );<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// switch is needed to stay in the &quot;else&quot; step untill p.pan = -1</span><br>
</div>
<div>0 =&gt; int switch;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// begin pan extreme left</span><br>
</div>
<div>-1 =&gt; p.pan;<br>
</div>
<div><br>
</div>
<div><span style="color:rgb(111,192,64)">// time loop</span><br>
</div>
<div>while( true )<br>
</div>
<div>{&nbsp;&nbsp;</div>
<div>&nbsp; &nbsp; Math.random2(0,900000) =&gt; buf.pos;<br>
</div>
<div>&nbsp; &nbsp; Math.random2f(1.0,1.2) =&gt; buf.rate; <br>
</div>
<div>&nbsp; &nbsp; if( p.pan() &lt; 1.0 &amp;&amp; switch == 0)<br>
</div>
<div>&nbsp; &nbsp; {<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; p.pan() &#43; .10 =&gt; p.pan;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&lt;&quot;if p.pan = &quot;,p.pan()&gt;&gt;&gt;;<br>
</div>
<div>&nbsp; &nbsp; }<br>
</div>
<div>&nbsp; &nbsp; else<br>
</div>
<div>&nbsp; &nbsp; {<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; p.pan() - .10 =&gt; p.pan;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&lt;&quot;else p.pan = &quot;, p.pan()&gt;&gt;&gt;;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; 1 =&gt; switch;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; if (p.pan() == -1)<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; {<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 =&gt; switch;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; } <br>
</div>
<div>&nbsp; &nbsp; } <br>
</div>
<div>&nbsp;<span style="color:rgb(111,192,64)"> &nbsp; // key on - start attack</span><br>
</div>
<div>&nbsp; &nbsp; e.keyOn(); <br>
</div>
<div>&nbsp; &nbsp; attack &#43; decay =&gt; dur ontime; <br>
</div>
<div>&nbsp; &nbsp; ontime =&gt; now;<br>
</div>
<div>&nbsp; &nbsp; <br>
</div>
<div><span style="color:rgb(111,192,64)">&nbsp; &nbsp; &nbsp;// key off - start release</span><br>
</div>
<div>&nbsp; &nbsp; &nbsp;e.keyOff();<br>
</div>
<div>&nbsp;<br>
</div>
<div>&nbsp;<span style="color:rgb(111,192,64)"> &nbsp; &nbsp;// advance time by releasetime &#43; pausetime</span><br>
</div>
<div>&nbsp; &nbsp; &nbsp;release &#43; pauze =&gt; now;&nbsp; &nbsp;</div>
<span>}</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
---------------------------------------------------------console result print----------------------------------------------------</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
if p.pan = -0.900000
<p></p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.000000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = 0.900000 </p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">if p.pan = 1.000000
</span></p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">if p.pan = 1.000000</span>
</p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.900000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = 0.000000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.100000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.200000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.300000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.400000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">else p.pan = -0.900000 </p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">else p.pan = -1.000000
</span></p>
<p style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(237,92,87)">else p.pan = -1.000000</span>
</p>
if p.pan = -0.900000
<p></p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.800000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.700000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.600000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.500000 </p>
<p style="margin-top:0px; margin-bottom:0px">if p.pan = -0.400000 </p>
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div>
<div id="x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Van:</b> chuck-users-bounces@lists.cs.princeton.edu &lt;chuck-users-bounces@lists.cs.princeton.edu&gt; namens Michael Heuer &lt;heuermh@gmail.com&gt;<br>
<b>Verzonden:</b> woensdag 5 februari 2020 15:42<br>
<b>Aan:</b> ChucK Users Mailing List &lt;chuck-users@lists.cs.princeton.edu&gt;<br>
<b>Onderwerp:</b> Re: [chuck-users] Create a pause of e.g. 2 seconds between notes or samples to be played</font>
<div>&nbsp;</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Hello Herman,
<div class=""><br class="">
</div>
<div class="">ChucK supports advancing time by chucking a duration to now, e.g.
<div class=""><br class="">
</div>
<div class="">note.play();</div>
<div class="">2::second =&gt; now;</div>
<div class="">note.play();</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/heuermh/lick" class="">LiCK (a Library for ChucK)</a>&nbsp;has a TimeSignature class, which provides static durations</div>
<div class=""><br class="">
</div>
<div class="">TimeSignature.common(120) @=&gt; TimeSignature ts;</div>
<div class=""><br class="">
</div>
<div class="">note.play();</div>
<div class="">ts.q =&gt; now;</div>
<div class="">note.play();</div>
<div class=""><br class="">
</div>
<div class="">and those that are dynamic to tempo changes, with anticipation and delay humanization</div>
<div class=""><br class="">
</div>
<div class="">TimeSignature.common(120) @=&gt; TimeSignature ts;</div>
<div class="">ts.quarterProvider() @=&gt; QuarterProvider q;</div>
<div class="">0.1 =&gt; q.anticipation;</div>
<div class="">0.0 =&gt; q.delay;</div>
<div class=""><br class="">
</div>
<div class="">while (true)</div>
<div class="">{</div>
<div class="">&nbsp; note.play();</div>
<div class="">&nbsp; q.get() =&gt; now;</div>
<div class="">&nbsp; ts.tempo() - 1 =&gt; ts.tempo;</div>
<div class="">}</div>
<div class=""><br class="">
</div>
<div class="">Cheers!</div>
<div class=""><br class="">
</div>
<div class="">&nbsp; &nbsp;michael</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 5, 2020, at 9:24 AM, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" class="">hverb54@hotmail.com</a>&gt; wrote:</div>
<br class="x_x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Hi,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
I've only recentely started studiing ChucK and i'm looking for an easy way to integrate a pause between notes to be played in a &quot;while()&quot; loop. Could someone&nbsp; tell me in what direction to look for a solution? thanks in advance!</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Helvetica,sans-serif; font-size:12pt">
Herman</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">chuck-users
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="mailto:chuck-users@lists.cs.princeton.edu" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">chuck-users@lists.cs.princeton.edu</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</body>
</html>