[chuck-users] increase chuck memory usage
Kassen
signal.automatique at gmail.com
Thu Jan 26 16:38:25 EST 2012
On Thu, Jan 26, 2012 at 03:06:24PM -0600, Michael Heuer wrote:
> Hello ChucKers,
>
Hey Michael.
> I have a ChucK class that maps all the samples in a drum kit to SndBufs
>
> https://github.com/heuermh/lick/blob/deab64e5b1eb1783e9a68bb508a0317c0287bf16/BigMono.ck
>
> Altogether this creates 238 SndBufs, which appears to be more than
> ChucK can handle. Sample playback skips, repeats, or is otherwise
> corrupted. Removing some of the mappings improves playback.
>
That's rather a lot! :-)
When I read your mail I suspected that you were connecting all of
those SndBuf's to the DAC, which would indeed cost quite a lot of CPU
(only connecting the ones that you need when you need them and
disconnecting them after that would save a lot in your case)...
However looking at your file I don't see either a SndBuf or a dac at
all. Those must be in another file.
So, let's talk about it; do you mean that simply allocating this
amount of memory causes a large CPU load in and of itself? It
shouldn't, IMHO only UGens and code should cost CPU. It could be that
the garbage collection is going bonkers?
I don't think memory allocation should do this, at least not once it's
allocated. 200 mono drumhits doesn't sound like a lot of memory to put
into the ram of a computer these days, expecting it all to play
*while* the samples are being pulled from the drive into ram might be
a bit much.
Does that help at all?
Kas.
More information about the chuck-users
mailing list