[chuck-users] increase chuck memory usage

Robert Poor rdpoor at gmail.com
Thu Jan 26 18:52:07 EST 2012


On Thu, Jan 26, 2012 at 15:22, Kassen <signal.automatique at gmail.com> wrote:

> If you keep all of them in a big array then they are all indexed. Then
> you can have a array of 10 (or so) integers that keeps track of the
> current 10 in use. When a new sample needs playing you look up in that
> array what the oldest sample is, unchuck that, replace the number with
> the number of the new one and chuck the new one to dac. Then you just
> need to cover for re-triggering buffers that are already connected,
> but that's quite simple.
>
> That will work, but it won't deal with clicks for you. How hard clicks
> are to deal with will depend on how dense your drumming gets, compared
> to the length of the sample. If you are lucky you won't need to care
> at all.
>
> Yours,
> Kas.


It's not too hard to create an instrument with noteOn / noteOff methods for
each SndBuf.  A noteOn patches the instrument into a chain with a quick
gain ramp up from zero, a noteOff ramps it down and sporks a thread to
unpatch it after the ramp hits zero.  At least, that what I think I used to
do... ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120126/ba54594f/attachment.html>


More information about the chuck-users mailing list