Atte :<br><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;">Thanks alot. I feel embarrased that I didn&#39;t know about last being available for all ugens. I (believe it or not) did look in the documentation, but for ugens and no last is listed there, however I should have looked at <a href="http://chuck.cs.princeton.edu/doc/language/ugen.html" target="_blank">http://chuck.cs.princeton.edu/doc/language/ugen.html</a><br>

</blockquote><div><br>Yes, it is. Back when I was a young little ChucKer I -for a while- had the impression ChucK was a bit like a Buchla modular; Buchla uses/used different types of plugs for control and audio signals. It&#39;s not at all but the key is .last() on the one end and Step (or Impulse) on the other. This might be a good candidate for a small section in the manual because you (and me) weren&#39;t tthe only ones that were confused by it for a while.<br>
<br>I would, BTW, be in favour of allowing Envelope to ramp to negative values. I think we could do this by removing a single check from Envelope&#39;s C++ code and as far as I could tell when I looked at that there wouldn&#39;t be any real repercussions but I might be wrong there. (Perry? Ge?). This would allow for linear interpolation when we go from code to Ugens if we don&#39;t like (too much) aliassing (at the moment).<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I&#39;ll have a look at your examples, and modify for my needs.<div class="Ih2E3d"></div></blockquote><div><br>Great. I think the aliassing one is correct (but no waranties!), this should be fairly easy to work with.<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Ok, so you&#39;re in chuck, I was thinking about going c++...<br>
</blockquote><div><br>Me too, that&#39;s why I used the word &quot;also&quot;. I think the two would both be nice on their own but I also think that prototyping in ChucK could help in developing the C++. ChucK is after all faster and easier to write.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Anyways, I had the impression that defining our own ugens in chuck-code wasn&#39;t supported, but I sure hope I was wrong. </blockquote><div><br>Well, the example I just send (extending Step) was my best shot. I don&#39;t think we can and considdering how much stuff I tried I&#39;d be very surprised indeed if this was possible. Frankly I think that bit of code demonstrates a issue. I feel that either we should be able to extend a Ugen (and have the result be a Ugen) or it should throw a warning like trying to extend a primitive does.<br>
<br><br>==================<br>//example of this<br>//this doesn&#39;t work which is documented and correct behaviour<br><br>class value extends int<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; //stupid example function<br>&nbsp;&nbsp;&nbsp; fun void increment()<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; this++;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>==================<br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Obviously this would make the LoFi example sooo smooth:<br>

<br>
SndBuf s =&gt; LoFi l =&gt; dac;<br>
s.read(&quot;something.wav&quot;);<br>
<br>
22100 =&gt; l.rate;<br>
8 =&gt; l.bits;<br>
<br>
1::week =&gt; now;</blockquote><div><br>Yes, I agree. Developing our own Ugens in C++ is possible already but the lack of documentation on exactly what this would mean makes it a rather daunting project if you&#39;re not already fluent in C++. extending/making Ugens in ChucK on the other hand would could help maintain readable code in larger projects, etc.<br>
<br>I think both would be worthwhile aditions. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
The second last section on <a href="http://chuck.cs.princeton.edu/doc/language/ugen.html" target="_blank">http://chuck.cs.princeton.edu/doc/language/ugen.html</a> says &quot;creating [ugens], comming soon&quot;. It seems this (missing) info is exactly what I&#39;m looking for.<br>

</blockquote><div>&nbsp;</div></div>Yeah.... I suspect that&#39;s simply one of the bits that has been on The List for a long time due to other stuff getting more priority. We need it, but we also need garabage collection, fileIO and (I feel) updating the code of just a part of a shred, etc, etc, etc.<br>
<br>At least we can be confident that our esteemed DEV&#39;s aren&#39;t in any danger of feeling bored and having nothing at hand any time soon, that&#39;s at least something :¬).<br><br>Cheers,<br>Kas.<br>