<br><br><div><span class="gmail_quote">On 14/01/2008, <b class="gmail_sendername">Johan Nilsson</b> &lt;<a href="mailto:artbysnipers@hotmail.com">artbysnipers@hotmail.com</a>&gt; wrote:</span><div><br>&nbsp;Hi, Johan!<br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>2) Suppose I want to rout the synth from the above example through a delay, this would feel like a natural way to do that:
<br>
<br>Synth synth =&gt; Delay delay =&gt; dac;<br>
<br>Is it possible to define your own chuck operator for some class? To get around this I have added a Gain out to the synth which can be routed like this:<br>
<br>synth.out =&gt; delay =&gt; dac;<br>
<br>It works, but it is not too beautiful</div></blockquote><div><br>You are right. It works, it&#39;s not beautifull. What would be good would indeed be a way to extend Ugen, for example by having a equivalent of what &quot;return&quot; does for functions for in and out. Being a rather young language ChucK has a rather long wish-list....
<br><br>For now though the method you found is probably the best one, it works just fine, I use it too.<br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
3) I got the idea I wanted to kill a shread someting like this:<br>
<br>spork~theShred() =&gt; @ Shred handle; // this is exactly like the &quot;sporking shreds&quot; chapter in the lang spec<br>handle.kill(); //this is pure imagination<br>
&nbsp;<br>
3a) My first concern is that the first line doesn't compile. The compiler gives "cannot resolve operator '=&gt;' on types 'Shred' and 'Shred'… Am I supposed to use the @=&gt; operator in this situation?</div></blockquote>
<div><br>Yeah, the @=&gt; operator is your friend here.<br>&nbsp;The language specs may be wrong here or it may be a ommision in ChucK itself. This happens and can be confusing.<br></div><br>If you have the time and would like to contribute you can make a account on the WiKi and add such confusing items to the page on erata in the manual and docs where the maintainers can find them when they do another round of documentation updating.
<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>3b) Is it possible to kill a shred by reference?</div></blockquote><div><br><br>
It is. It&#39;s also possible to ask a shred reference for the shred&#39;s id. Personally (but I&#39;m no language designer) it&#39;s my opinion that this could be extended and used for inter-shred comunication as well. Right now you can just kill them, ask them for their id or replace them, I think, kinda like playing a absolute goverment :-).
<br></div><br><br>Keep on ChucKing!<br>Kas.<br></div>