<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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);">
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?&nbsp;</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'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 !important">
&quot;.next()&quot;, &quot;.last()&quot; ... etc...&nbsp;</span>&nbsp;and their use.&nbsp; &nbsp;</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&nbsp; &quot;.last()&quot;&nbsp; in case of a sinewave does it give the last freq, sfreq, phase or sync member.&nbsp;&nbsp;</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 style=""><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"></span></div>
<div>
<div id="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="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> vrijdag 7 februari 2020 19:52<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 and gradualy shift pan from left to right and back</font>
<div>&nbsp;</div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Sorry, guess my email client needs a ChucK interpreter. &nbsp;;)
<div class=""><br class="">
</div>
<div class="">lfo.next() should be lfo.last()<br class="">
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Feb 7, 2020, at 1:26 PM, herman verbaeten &lt;<a href="mailto:hverb54@hotmail.com" class="">hverb54@hotmail.com</a>&gt; wrote:</div>
<br class="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 Michael,</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">
Sorry for all the trouble but when i do as you told me :</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">
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
<br class="">
</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
SinOsc lfo =&gt; blackhole;</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
0.5 =&gt; lfo.freq;</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
<span class="" style="color:rgb(50,49,48)">//…</span><br class="">
</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
while (true)</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
{</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
&nbsp; // ...</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
&nbsp; lfo.next() =&gt; pan.pan;</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
.....</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
<br class="">
</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
Console tells me sinOsc doesn't have a member .next()</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
<br class="">
</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
Kind regards,</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
Herman</div>
<div class="" style="margin:0px; color:rgb(50,49,48); background-color:rgb(255,255,255)">
<br class="">
</div>
&nbsp;&nbsp;</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">
&nbsp;</div>
<div 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">
<div id="x_appendonsend" class=""></div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:569.375px">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">Van:</b><span class="x_Apple-converted-space">&nbsp;</span><a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" class="">chuck-users-bounces@lists.cs.princeton.edu</a>
 &lt;<a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" class="">chuck-users-bounces@lists.cs.princeton.edu</a>&gt; namens Michael Heuer &lt;<a href="mailto:heuermh@gmail.com" class="">heuermh@gmail.com</a>&gt;<br class="">
<b class="">Verzonden:</b><span class="x_Apple-converted-space">&nbsp;</span>donderdag 6 februari 2020 17:02<br class="">
<b class="">Aan:</b><span class="x_Apple-converted-space">&nbsp;</span>ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" class="">chuck-users@lists.cs.princeton.edu</a>&gt;<br class="">
<b class="">Onderwerp:</b><span class="x_Apple-converted-space">&nbsp;</span>Re: [chuck-users] Create a pause and gradualy shift pan from left to right and back</font>
<div class="">&nbsp;</div>
</div>
<div class="" 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" class="">hverb54@hotmail.com</a>&gt; wrote:<br class="">
<div class="">
<blockquote type="cite" class=""><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">
Hello Michael,</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">
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;<a href="mailto:chuck-users@lists.cs.princeton.edu" class="">chuck-users@lists.cs.princeton.edu</a>&quot;.&nbsp;<br class="">
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">The ChucK mailing list is probably best.</div>
<div class=""><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<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">
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 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">
<ol class="">
<li class="">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></ol>
</div>
</div>
</blockquote>
<div class="">Have you seen the miniAudicle? &nbsp;That is the official IDE for ChucK</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://audicle.cs.princeton.edu/mini/" class="">http://audicle.cs.princeton.edu/mini/</a></div>
<div class=""><br class="">
</div>
<div class="">I personally use a mode for Emacs to provide syntax highlighting</div>
<div class=""><br class="">
</div>
<div class=""><a href="https://github.com/heuermh/chuck-mode" class="">https://github.com/heuermh/chuck-mode</a></div>
<div class=""><br class="">
</div>
<div class="">There is support for other editors out there; I seem to remember a wiki with links to such somewhere but I can't find it.</div>
<br class="">
<blockquote type="cite" class="">
<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">
<ol class="" start="2">
<li class="">Is there a way to debug line per line to discover logical errors?<br class="">
</li></ol>
</div>
</div>
</blockquote>
<div class="">Not that I know of. &nbsp;My bit of advice is to not run a ChucK script with headphones on without trying it on speakers first. &nbsp;I learned that the hard way from a mis-configured filter.</div>
<div class=""><br class="">
</div>
<blockquote type="cite" class="">
<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">
<ol class="" start="3">
<li class="">&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></ol>
</div>
</div>
</blockquote>
<div class="">In general, to read from a function/value, use the version with params</div>
<div class=""><br class="">
</div>
<div class="">p.buf() =&gt; float f;</div>
<div class=""><br class="">
</div>
<div class="">To set a value, use the chuck operator into the version without params</div>
<div class=""><br class="">
</div>
<div class="">1.0 =&gt; p.buf;</div>
<div class=""><br class="">
</div>
<div class="">This is equivalent to making a single-argument function call (but the former is more ChucK-y)</div>
<div class=""><br class="">
</div>
<div class="">p.buf(1.0);</div>
<br class="">
<blockquote type="cite" class="">
<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">
<ol class="" start="4">
<li class="">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></ol>
</div>
</div>
</blockquote>
<div class="">Yes, you can use an oscillator as an LFO modulator</div>
<div class=""><br class="">
</div>
<div class="">SinOsc lfo =&gt; blackhole;</div>
<div class="">0.5 =&gt; lfo.freq;</div>
<div class=""><br class="">
</div>
<div class="">//…</div>
<div class="">while (true)</div>
<div class="">{</div>
<div class="">&nbsp; // ...</div>
<div class="">&nbsp; lfo.next() =&gt; pan.pan;</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">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 class=""><br class="">
</div>
<div class="">spork ~ _updateAtSampleRate();</div>
<div class=""><br class="">
</div>
<div class="">fun void _updateAtSampleRate()</div>
<div class="">{</div>
<div class="">&nbsp; while (true)</div>
<div class="">&nbsp; {</div>
<div class="">&nbsp; &nbsp; 1::samp =&gt; now;</div>
<div class="">&nbsp; &nbsp; lfo.next() =&gt; pan.pan;</div>
<div class="">&nbsp; }</div>
<div class="">}</div>
<div class=""><br class="">
</div>
<div class="">Hope this helps!</div>
<br class="">
<blockquote type="cite" class="">
<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">
<ol class="" start="5">
<li class="">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 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">
Please let me know if i have to address all my questions to the general email address.&nbsp; thanks a lot !!</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&nbsp;</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">
<span class="" style="color:rgb(111,192,64)">// sound file</span><span class=""><br class="">
</span>
<div class="">me.sourceDir() &#43; &quot;wavefile.wav&quot; =&gt; string filename;<br class="">
</div>
<div class="">if( me.args() ) me.arg(0) =&gt; filename;<br class="">
</div>
<div class="">&lt;&lt;&lt;me.sourceDir()&gt;&gt;&gt;;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// the patch<span class="x_x_Apple-converted-space">&nbsp;</span></span><br class="">
</div>
<div class="">SndBuf buf =&gt; ADSR e =&gt; Pan2 p =&gt; dac;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// set attack time, decay time, release time and pause time &nbsp;</span><br class="">
</div>
<div class="">dur attack; dur decay ; dur release; dur pauze;<br class="">
</div>
<div class="">12::ms =&gt; attack ; 90::ms =&gt; decay ; 100::ms =&gt; release ; 5::ms =&gt; pauze ;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// load&nbsp; file in buf</span><br class="">
</div>
<div class="">filename =&gt; buf.read;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// set gain</span><br class="">
</div>
<div class="">.5 =&gt; buf.gain;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// set a, d, s and r</span><br class="">
</div>
<div class="">e.set( attack, decay, 0.001, release );<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// switch is needed to stay in the &quot;else&quot; step untill p.pan = -1</span><br class="">
</div>
<div class="">0 =&gt; int switch;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// begin pan extreme left</span><br class="">
</div>
<div class="">-1 =&gt; p.pan;<br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">// time loop</span><br class="">
</div>
<div class="">while( true )<br class="">
</div>
<div class="">{&nbsp;&nbsp;</div>
<div class="">&nbsp; &nbsp; Math.random2(0,900000) =&gt; buf.pos;<br class="">
</div>
<div class="">&nbsp; &nbsp; Math.random2f(1.0,1.2) =&gt; buf.rate;<span class="x_x_Apple-converted-space">&nbsp;</span><br class="">
</div>
<div class="">&nbsp; &nbsp; if( p.pan() &lt; 1.0 &amp;&amp; switch == 0)<br class="">
</div>
<div class="">&nbsp; &nbsp; {<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; p.pan() &#43; .10 =&gt; p.pan;<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&lt;&quot;if p.pan = &quot;,p.pan()&gt;&gt;&gt;;<br class="">
</div>
<div class="">&nbsp; &nbsp; }<br class="">
</div>
<div class="">&nbsp; &nbsp; else<br class="">
</div>
<div class="">&nbsp; &nbsp; {<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; p.pan() - .10 =&gt; p.pan;<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; &lt;&lt;&lt;&quot;else p.pan = &quot;, p.pan()&gt;&gt;&gt;;<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; 1 =&gt; switch;<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; if (p.pan() == -1)<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; {<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0 =&gt; switch;<br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp; &nbsp; }<span class="x_x_Apple-converted-space">&nbsp;</span><br class="">
</div>
<div class="">&nbsp; &nbsp; }<span class="x_x_Apple-converted-space">&nbsp;</span><br class="">
</div>
<div class="">&nbsp;<span class="" style="color:rgb(111,192,64)"><span class="x_x_Apple-converted-space">&nbsp;</span>&nbsp; // key on - start attack</span><br class="">
</div>
<div class="">&nbsp; &nbsp; e.keyOn();<span class="x_x_Apple-converted-space">&nbsp;</span><br class="">
</div>
<div class="">&nbsp; &nbsp; attack &#43; decay =&gt; dur ontime;<span class="x_x_Apple-converted-space">&nbsp;</span><br class="">
</div>
<div class="">&nbsp; &nbsp; ontime =&gt; now;<br class="">
</div>
<div class="">&nbsp; &nbsp;<span class="x_x_Apple-converted-space">&nbsp;</span><br class="">
</div>
<div class=""><span class="" style="color:rgb(111,192,64)">&nbsp; &nbsp; &nbsp;// key off - start release</span><br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp;e.keyOff();<br class="">
</div>
<div class="">&nbsp;<br class="">
</div>
<div class="">&nbsp;<span class="" style="color:rgb(111,192,64)"><span class="x_x_Apple-converted-space">&nbsp;</span>&nbsp; &nbsp;// advance time by releasetime &#43; pausetime</span><br class="">
</div>
<div class="">&nbsp; &nbsp; &nbsp;release &#43; pauze =&gt; now;&nbsp; &nbsp;</div>
<span class="">}</span><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">
---------------------------------------------------------console result print----------------------------------------------------</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">
if p.pan = -0.900000
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.800000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.700000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.600000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.500000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.400000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.300000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.200000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.100000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.000000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.100000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.200000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.300000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.400000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.500000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.600000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.700000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.800000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = 0.900000</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="" style="color:rgb(237,92,87)">if p.pan = 1.000000</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="" style="color:rgb(237,92,87)">if p.pan = 1.000000</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.900000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.800000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.700000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.600000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.500000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.400000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.300000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.200000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.100000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = 0.000000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.100000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.200000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.300000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.400000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.500000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.600000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.700000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.800000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">else p.pan = -0.900000</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="" style="color:rgb(237,92,87)">else p.pan = -1.000000</span></div>
<div class="" style="margin-top:0px; margin-bottom:0px"><span class="" style="color:rgb(237,92,87)">else p.pan = -1.000000</span></div>
if p.pan = -0.900000
<p class="" style="margin-top:0px; margin-bottom:0px"></p>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.800000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.700000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.600000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.500000</div>
<div class="" style="margin-top:0px; margin-bottom:0px">if p.pan = -0.400000</div>
<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">
<br class="">
</div>
<div 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">
<div id="x_x_appendonsend" class=""></div>
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="">
</div>
<hr tabindex="-1" class="" style="display:inline-block; width:517.4375px">
<div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" class="" style="font-size:11pt"><b class="">Van:</b><span class="x_x_Apple-converted-space">&nbsp;</span><a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" class="">chuck-users-bounces@lists.cs.princeton.edu</a><span class="x_Apple-converted-space">&nbsp;</span>&lt;<a href="mailto:chuck-users-bounces@lists.cs.princeton.edu" class="">chuck-users-bounces@lists.cs.princeton.edu</a>&gt;
 namens Michael Heuer &lt;<a href="mailto:heuermh@gmail.com" class="">heuermh@gmail.com</a>&gt;<br class="">
<b class="">Verzonden:</b><span class="x_x_Apple-converted-space">&nbsp;</span>woensdag 5 februari 2020 15:42<br class="">
<b class="">Aan:</b><span class="x_x_Apple-converted-space">&nbsp;</span>ChucK Users Mailing List &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" class="">chuck-users@lists.cs.princeton.edu</a>&gt;<br class="">
<b class="">Onderwerp:</b><span class="x_x_Apple-converted-space">&nbsp;</span>Re: [chuck-users] Create a pause of e.g. 2 seconds between notes or samples to be played</font>
<div class="">&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 class=""><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_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; text-align:start; text-indent:0px; text-transform:none; white-space:normal; 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; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</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; text-align:start; text-indent:0px; text-transform:none; white-space:normal; 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; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a></div>
</blockquote>
</div>
<br class="">
</div>
</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>
</body>
</html>