Michael, thanks for your answer.<div>Do you still live in Brooklyn? Maybe we can get together for a coffee...</div><div>I like 3 blocks away from the Prospect Park station (Q, B, S trains)</div><div><br></div><div>i'll definitely check the code you send me.</div>
<div>looking forward<br><br><div class="gmail_quote">2010/10/25 mike clemow <span dir="ltr"><<a href="mailto:michaelclemow@gmail.com">michaelclemow@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Wolfgang,<div><br></div><div>I really like your instrument!  I had to change a few things to get it running: the file name strings ended in ".ch" rather than ".ck", which threw me for a minute.  Also, there are obviously somethings that are un-implemented (e.g. reverb in Global, etc.)  But I really like the use of the interface to spawn grain-producing shreds.  It gives you some ad hoc control over the grain cloud.</div>

<div><br></div><div>One bit of feedback I will give you is that the most inefficient part of your granular implementation is the sample-level intervention in the Grain class.  The way you're doing it at each sample, the chuck language has to do a bunch of math to calculate the gain for the next sample in order to do your enveloping.  This does work, however, there are UGens that will do this much more efficiently (as they are written in C).  One of them is Envelope, another is ADSR.  These will work more efficiently, however, they have drawbacks.  Namely, the amount of work you have to do to use these UGens doesn't really yield (no pun intended) much more flexibility in particle design.  Envelope style makes a huge difference in the spectral characteristics of individual grains.</div>

<div><br></div><div>There is one UGen, however, which I have found to be extremely flexible, efficient, and generally under-used: CurveTable.  Attached is a the basis (and some simple tests) for a granular synthesis implementation using CurveTable as an envelope.  I find this to be quite elegant and useful.  You may too.  </div>

<div><br></div><div>CurveTable allows you to specify a curve using coefficients to build segments of the curve and fills a buffer with those curve segments.  The segments are specified by three coefficients each, [ time, amplitude, curvature ] and you can have as many segments as you want: [ time, amplitude, curvature, time, amplitude, curvature, time, amplitude, curvature, time, amplitude, curvature... ]   </div>

<div><br></div><div>some documentation:</div><div><br></div><div><a href="http://chuck.cs.princeton.edu/doc/examples/special/GenX-CurveTable-test.ck" target="_blank">http://chuck.cs.princeton.edu/doc/examples/special/GenX-CurveTable-test.ck</a></div>

<div><br></div><div><a href="http://www.music.columbia.edu/cmc/Rtcmix/docs/scorefile/maketable.html#curve" target="_blank">http://www.music.columbia.edu/cmc/Rtcmix/docs/scorefile/maketable.html#curve</a></div><div>
<br></div><div><br></div><div>Anyway, take a look at the attached code and run it / play with it a little bit.  I find this to be a much more efficient and flexible way to envelope grains in Chuck.  I find that I can get a lot more bang for my buck performance-wise.  In this implementation, Chuck only intervenes once per grain (to initiate it).  We get to take advantage of a variable control rate implementation that the Chuck system affords us and we also get to lean on the UGens for the heavy lifting.</div>

<div><br></div><div>That said, I really like the direction you're taking this instrument.  Keep it up!</div><div><br></div><div>Mike</div><div><br><br></div><div><br><div class="gmail_quote">2010/10/23 Wolfgang Gil <span dir="ltr"><<a href="mailto:wolfgang.gil@gmail.com" target="_blank">wolfgang.gil@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5"><div class="gmail_quote"><span style="font-family:arial, sans-serif;font-size:16px">Hello,</span><br>
<span style="font-family:arial, sans-serif;font-size:16px"><span title="">
<div><span style="font-family:arial, sans-serif;font-size:16px"><span title=""><br></span></span></div>I'm working on a granular synthesizer using the language of Chuck (using miniAudicle). </span><span title="">I would like to share the code with the desire to receive feedback from you.</span></span><div>



<span style="font-family:arial, sans-serif;font-size:16px"><span title=""><br></span><span title="">Please take a look at it if you like and feel free to modify it, use it, etc. ..<br></span><span title="">I am also looking for an open-source pulse synthesizer and other microsound-based instruments.<br>



<br></span><span title="">Thanks, open to collaborate.</span></span><br><div><br>-- <br>Wolfgang Gil<br><a href="http://www.wolfganggil.com" target="_blank">http://www.wolfganggil.com</a><br>
</div></div>
</div><br><br clear="all"><br>-- <br>Wolfgang Gil<br><a href="http://www.wolfganggil.com" target="_blank">http://www.wolfganggil.com</a><br>
<br></div></div>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://michaelclemow.com" target="_blank">http://michaelclemow.com</a><br><a href="http://semiotech.org" target="_blank">http://semiotech.org</a><br><br>
</div>
<br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Wolfgang Gil<br><a href="http://www.wolfganggil.com">http://www.wolfganggil.com</a><br>
</div>