Mike;<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
What gives? &nbsp;It apparently doesn&#39;t like the return of the Shred<br>
object. &nbsp;I&#39;m not sure what&#39;s happening here. &nbsp;It&#39;s not *really* that<br>
important to me, but it would be nice to have the option of killing<br>
that process later.<br>
<br>
Any ideas? &nbsp;Am I doing something wrong???<br>
</blockquote><div><br>Weird. Adding a single line like this;<br><br>class Forkable {<br>&nbsp;&nbsp; // I am a process<br>&nbsp;&nbsp; fun void run() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // sporkable code here...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SinOsc s =&gt; dac;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 100::ms =&gt; now;<br>
<br>//unchuck!<br><span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s =&lt; dac; </span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; me.yield();<br>&nbsp;&nbsp; }<br>}<br></div></div><br>Makes the first example behave as well. The difference seems to be that the SinOsc&#39;s aren&#39;t automatically unchucked from the dac when the their shred exits in the first example.... and this seems due to the existance of that reference. This leads to clipping and a high cpu load, resulting in that weird noise because you are still creating 20 SinOsc&#39;s per second.<br>
<br>My bet would be that this might be a case of reference counting gone wrong. At least it&#39;s fixable with a manual unchuck though it&#39;s quite odd that SinOsc&#39;s that aren&#39;t attached to a Shred can keep running. In fact; with my edit of the Forkable class I can start your code, stop it, and often a tone will keep sounding without a single shred running (!!!).<br>
<br>Strange stuff, good catch!<br><br>Yours,<br>Kas.<br><br><br>