<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><a href="https://chuck.cs.princeton.edu">ChucK&#39;s home page</a> links to the <a href="https://chuck.cs.princeton.edu/doc/program/ugen.html">unit generators reference</a>, which links to <a href="https://chuck.cs.princeton.edu/doc/language/ugen.html">the unit generators section of the language reference</a>, which has:<div><br></div><div><div>&quot;<b>last()</b> (of type float): get the last sample computed by the UGen. if UGen has more than one channel, the average of all components channels are returned.&quot;</div></div><div><br></div><div>You might use it like this:</div><div><br></div><div><div>SinOsc s =&gt; dac;</div><div>&lt;&lt;&lt; s.last() &gt;&gt;&gt;;</div><div>second =&gt; now;</div><div>&lt;&lt;&lt; s.last() &gt;&gt;&gt;;</div></div><div><br></div><div>Or, if you want it to oscillate but not be audible:</div><div><br></div><div><div>SinOsc s =&gt; blackhole;</div><div>&lt;&lt;&lt; s.last() &gt;&gt;&gt;;</div><div>second =&gt; now;</div><div>&lt;&lt;&lt; s.last() &gt;&gt;&gt;;</div></div><div><br></div><div>You can chuck it to dac and blackhole in the same program, but it would be the same as just chucking it to dac.</div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 8, 2020 at 8:40 AM herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com">hverb54@hotmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks again Michael but this brings along a lot of other questions:</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">- the difference between blackhole and dac. Can you use them together? </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">- SinOsc doesn&#39;t have &quot;.last()&quot; as a member eighter. Where can i find
<span style="font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255);display:inline">
&quot;.next()&quot;, &quot;.last()&quot; ... etc... </span> and their use.   </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">- If i refer to  &quot;.last()&quot;  in case of a sinewave does it give the last freq, sfreq, phase or sync member.  </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">Kind regards,</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">Herman</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt"></span></div>
<div>
<div id="gmail-m_2628667020073829006appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_2628667020073829006divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Van:</b> <a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a> &lt;<a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a>&gt; namens Michael Heuer &lt;<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>&gt;<br>
<b>Verzonden:</b> vrijdag 7 februari 2020 19:52<br>
<b>Aan:</b> ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>
<b>Onderwerp:</b> Re: [chuck-users] Create a pause and gradualy shift pan from left to right and back</font>
<div> </div>
</div>
<div style="word-wrap:break-word;line-break:after-white-space">Sorry, guess my email client needs a ChucK interpreter.  ;)
<div><br>
</div>
<div>lfo.next() should be lfo.last()<br>
<div><br>
</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Feb 7, 2020, at 1:26 PM, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" target="_blank">hverb54@hotmail.com</a>&gt; wrote:</div>
<br>
<div>
<div 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 Michael,</div>
<div 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>
</div>
<div 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">
Sorry for all the trouble but when i do as you told me :</div>
<div 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">
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
<br>
</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
SinOsc lfo =&gt; blackhole;</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
0.5 =&gt; lfo.freq;</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
<span style="color:rgb(50,49,48)">//…</span><br>
</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
while (true)</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
{</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
  // ...</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
  lfo.next() =&gt; pan.pan;</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
.....</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
<br>
</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
Console tells me sinOsc doesn&#39;t have a member .next()</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
<br>
</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
Kind regards,</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
Herman</div>
<div style="margin:0px;color:rgb(50,49,48);background-color:rgb(255,255,255)">
<br>
</div>
  </div>
<div 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">
 </div>
<div 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">
<div id="gmail-m_2628667020073829006x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><br>
</div>
<hr style="display:inline-block;width:569.375px">
<div id="gmail-m_2628667020073829006x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt"><b>Van:</b><span> </span><a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a>
 &lt;<a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a>&gt; namens Michael Heuer &lt;<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>&gt;<br>
<b>Verzonden:</b><span> </span>donderdag 6 februari 2020 17:02<br>
<b>Aan:</b><span> </span>ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>
<b>Onderwerp:</b><span> </span>Re: [chuck-users] Create a pause and gradualy shift pan from left to right and back</font>
<div> </div>
</div>
<div style="word-wrap:break-word;line-break:after-white-space">On Feb 6, 2020, at 10:41 AM, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" target="_blank">hverb54@hotmail.com</a>&gt; wrote:<br>
<div>
<blockquote type="cite"><br>
<div>
<div 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">
Hello Michael,</div>
<div 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>
</div>
<div 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">
Thanks a lot for your help. I don&#39;t know if i can reply to you with other questions or if i should use &quot;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&quot;. <br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>The ChucK mailing list is probably best.</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div>
<div 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">
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-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>
</div>
<div 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">
<ol>
<li>Where can i find a chuck editor  with the possibility to find words and replace them (all) and that also gives the colors for reserved words etc.</li></ol>
</div>
</div>
</blockquote>
<div>Have you seen the miniAudicle?  That is the official IDE for ChucK</div>
<div><br>
</div>
<div><a href="http://audicle.cs.princeton.edu/mini/" target="_blank">http://audicle.cs.princeton.edu/mini/</a></div>
<div><br>
</div>
<div>I personally use a mode for Emacs to provide syntax highlighting</div>
<div><br>
</div>
<div><a href="https://github.com/heuermh/chuck-mode" target="_blank">https://github.com/heuermh/chuck-mode</a></div>
<div><br>
</div>
<div>There is support for other editors out there; I seem to remember a wiki with links to such somewhere but I can&#39;t find it.</div>
<br>
<blockquote type="cite">
<div>
<div 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">
<ol start="2">
<li>Is there a way to debug line per line to discover logical errors?<br>
</li></ol>
</div>
</div>
</blockquote>
<div>Not that I know of.  My bit of advice is to not run a ChucK script with headphones on without trying it on speakers first.  I learned that the hard way from a mis-configured filter.</div>
<div><br>
</div>
<blockquote type="cite">
<div>
<div 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">
<ol start="3">
<li> 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></ol>
</div>
</div>
</blockquote>
<div>In general, to read from a function/value, use the version with params</div>
<div><br>
</div>
<div>p.buf() =&gt; float f;</div>
<div><br>
</div>
<div>To set a value, use the chuck operator into the version without params</div>
<div><br>
</div>
<div>1.0 =&gt; p.buf;</div>
<div><br>
</div>
<div>This is equivalent to making a single-argument function call (but the former is more ChucK-y)</div>
<div><br>
</div>
<div>p.buf(1.0);</div>
<br>
<blockquote type="cite">
<div>
<div 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">
<ol start="4">
<li>in the program hereby, is there a way to have the pan do it&#39;s job independantely from the note-envelope-flow? to go faster or slower?</li></ol>
</div>
</div>
</blockquote>
<div>Yes, you can use an oscillator as an LFO modulator</div>
<div><br>
</div>
<div>SinOsc lfo =&gt; blackhole;</div>
<div>0.5 =&gt; lfo.freq;</div>
<div><br>
</div>
<div>//…</div>
<div>while (true)</div>
<div>{</div>
<div>  // ...</div>
<div>  lfo.next() =&gt; pan.pan;</div>
<div><br>
</div>
<div><br>
</div>
<div>If you want to update the pan at sample rate or at a rate independent from your main while loop, create a new shred</div>
<div><br>
</div>
<div>spork ~ _updateAtSampleRate();</div>
<div><br>
</div>
<div>fun void _updateAtSampleRate()</div>
<div>{</div>
<div>  while (true)</div>
<div>  {</div>
<div>    1::samp =&gt; now;</div>
<div>    lfo.next() =&gt; pan.pan;</div>
<div>  }</div>
<div>}</div>
<div><br>
</div>
<div>Hope this helps!</div>
<br>
<blockquote type="cite">
<div>
<div 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">
<ol start="5">
<li>When i run this program it does what i want but i can&#39;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-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">
Please let me know if i have to address all my questions to the general email address.  thanks a lot !!</div>
<div 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>
</div>
<div 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>
<div 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>
</div>
<div 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">
<span style="color:rgb(111,192,64)">// sound file</span><span><br>
</span>
<div>me.sourceDir() + &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> </span></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  </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  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>{  </div>
<div>    Math.random2(0,900000) =&gt; buf.pos;<br>
</div>
<div>    Math.random2f(1.0,1.2) =&gt; buf.rate;<span> </span><br>
</div>
<div>    if( p.pan() &lt; 1.0 &amp;&amp; switch == 0)<br>
</div>
<div>    {<br>
</div>
<div>        p.pan() + .10 =&gt; p.pan;<br>
</div>
<div>        &lt;&lt;&lt;&quot;if p.pan = &quot;,p.pan()&gt;&gt;&gt;;<br>
</div>
<div>    }<br>
</div>
<div>    else<br>
</div>
<div>    {<br>
</div>
<div>        p.pan() - .10 =&gt; p.pan;<br>
</div>
<div>        &lt;&lt;&lt;&quot;else p.pan = &quot;, p.pan()&gt;&gt;&gt;;<br>
</div>
<div>        1 =&gt; switch;<br>
</div>
<div>        if (p.pan() == -1)<br>
</div>
<div>        {<br>
</div>
<div>            0 =&gt; switch;<br>
</div>
<div>        }<span> </span><br>
</div>
<div>    }<span> </span><br>
</div>
<div> <span style="color:rgb(111,192,64)"><span> </span>  // key on - start attack</span><br>
</div>
<div>    e.keyOn();<span> </span><br>
</div>
<div>    attack + decay =&gt; dur ontime;<span> </span><br>
</div>
<div>    ontime =&gt; now;<br>
</div>
<div>   <span> </span><br>
</div>
<div><span style="color:rgb(111,192,64)">     // key off - start release</span><br>
</div>
<div>     e.keyOff();<br>
</div>
<div> <br>
</div>
<div> <span style="color:rgb(111,192,64)"><span> </span>   // advance time by releasetime + pausetime</span><br>
</div>
<div>     release + pauze =&gt; now;   </div>
<span>}</span><br>
</div>
<div 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">
---------------------------------------------------------console result print----------------------------------------------------</div>
<div 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">
if p.pan = -0.900000
<p style="margin-top:0px;margin-bottom:0px"></p>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.800000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.700000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.600000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.500000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.400000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.300000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.200000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.100000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.000000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.100000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.200000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.300000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.400000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.500000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.600000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.700000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.800000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = 0.900000</div>
<div style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(237,92,87)">if p.pan = 1.000000</span></div>
<div style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(237,92,87)">if p.pan = 1.000000</span></div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.900000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.800000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.700000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.600000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.500000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.400000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.300000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.200000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.100000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = 0.000000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.100000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.200000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.300000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.400000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.500000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.600000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.700000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.800000</div>
<div style="margin-top:0px;margin-bottom:0px">else p.pan = -0.900000</div>
<div style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(237,92,87)">else p.pan = -1.000000</span></div>
<div style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(237,92,87)">else p.pan = -1.000000</span></div>
if p.pan = -0.900000
<p style="margin-top:0px;margin-bottom:0px"></p>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.800000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.700000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.600000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.500000</div>
<div style="margin-top:0px;margin-bottom:0px">if p.pan = -0.400000</div>
<br>
</div>
<div 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>
</div>
<div 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">
<div id="gmail-m_2628667020073829006x_x_appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><br>
</div>
<hr style="display:inline-block;width:517.4375px">
<div id="gmail-m_2628667020073829006x_x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt"><b>Van:</b><span> </span><a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a><span> </span>&lt;<a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" target="_blank">chuck-users-bounces@lists.cs.princeton.edu</a>&gt;
 namens Michael Heuer &lt;<a href="mailto:heuermh@gmail.com" target="_blank">heuermh@gmail.com</a>&gt;<br>
<b>Verzonden:</b><span> </span>woensdag 5 februari 2020 15:42<br>
<b>Aan:</b><span> </span>ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>
<b>Onderwerp:</b><span> </span>Re: [chuck-users] Create a pause of e.g. 2 seconds between notes or samples to be played</font>
<div> </div>
</div>
<div style="word-wrap:break-word;line-break:after-white-space">Hello Herman,
<div><br>
</div>
<div>ChucK supports advancing time by chucking a duration to now, e.g.
<div><br>
</div>
<div>note.play();</div>
<div>2::second =&gt; now;</div>
<div>note.play();</div>
<div><br>
</div>
<div><a href="https://github.com/heuermh/lick" target="_blank">LiCK (a Library for ChucK)</a> has a TimeSignature class, which provides static durations</div>
<div><br>
</div>
<div>TimeSignature.common(120) @=&gt; TimeSignature ts;</div>
<div><br>
</div>
<div>note.play();</div>
<div>ts.q =&gt; now;</div>
<div>note.play();</div>
<div><br>
</div>
<div>and those that are dynamic to tempo changes, with anticipation and delay humanization</div>
<div><br>
</div>
<div>TimeSignature.common(120) @=&gt; TimeSignature ts;</div>
<div>ts.quarterProvider() @=&gt; QuarterProvider q;</div>
<div>0.1 =&gt; q.anticipation;</div>
<div>0.0 =&gt; q.delay;</div>
<div><br>
</div>
<div>while (true)</div>
<div>{</div>
<div>  note.play();</div>
<div>  q.get() =&gt; now;</div>
<div>  ts.tempo() - 1 =&gt; ts.tempo;</div>
<div>}</div>
<div><br>
</div>
<div>Cheers!</div>
<div><br>
</div>
<div>   michael</div>
<div><br>
</div>
<div>
<div><br>
<blockquote type="cite">
<div>On Feb 5, 2020, at 9:24 AM, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" target="_blank">hverb54@hotmail.com</a>&gt; wrote:</div>
<br>
<div>
<div 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 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>
</div>
<div 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&#39;ve only recentely started studiing ChucK and i&#39;m looking for an easy way to integrate a pause between notes to be played in a &quot;while()&quot; loop. Could someone  tell me in what direction to look for a solution? thanks in advance!</div>
<div 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>
</div>
<div 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 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">_______________________________________________</span><br 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 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">chuck-users
 mailing list</span><br 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" 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" target="_blank">chuck-users@lists.cs.princeton.edu</a><br 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" 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" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<span 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">_______________________________________________</span><br 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 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">chuck-users
 mailing list</span><br 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" 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" target="_blank">chuck-users@lists.cs.princeton.edu</a><br 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" 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" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
<span 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">_______________________________________________</span><br 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 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">chuck-users
 mailing list</span><br 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" 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" target="_blank">chuck-users@lists.cs.princeton.edu</a><br 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" 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" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div>