<div dir="ltr">Dear list.<br><br>Suppose we have a SinOsc named &quot;s&quot;, connected to the dac,&nbsp; that has been playing for some arbitrary amount of time at a arbitrary frequency. Suppose we&#39;d like to disconnect this from the dac while minimising the &quot;click&quot;.<br>
<br>One thing to try would be this;<br><br>(1 - s.phase() )::s.period() =&gt; now;  //strong timing to the rescue!<br>s =&lt; dac;<br><br>Quite ChucKian, I thought, however this still clicks a bit. Some clickery is to be expected as not all frequencies will have a period that can be expressed in a integer number of samp&#39;s but this seemed like a bit much.<br>
<br>On a whim I tried;<br><br>
(1 - s.phase() )::s.period() + samp =&gt; now;<br>
s =&lt; dac;<br><br>This clicks less and when I print the s.last(), the value is on -average- lower in magnitude. I then tried lining up the shred&#39;s timing with the UGen graph&#39;s;<br><br>samp - (now % samp) =&gt; now; //yes; that&#39;s quite anal<br>
(1 - s.phase() )::s.period()&nbsp; =&gt; now;<br>

s =&lt; dac;<br>
<br>This doesn&#39;t affect matters quite as much as simply adding a samp to the time advanced; waiting a extra sample generally seems (to me) to decrease the magnitude of the s.last() right before we disconnect it.<br><br>
This would lead us to ask; &quot;where does this samp come from?&quot;. I&#39;m a bit at loss here, does anybody have any insights?<br><br>Yours,<br>Kas.<br></div>