home/ atoms/ sc-server-memsize-delay

Delay and comb UGens allocate memory dynamically; increase s.options.memSize to avoid allocation failures

SuperCollider delay-family UGens (DelayL, DelayN, DelayC, CombL, CombN, CombC) allocate an internal buffer dynamically based on the maximum delay time argument. The audio server has a limited dynamic memory pool controlled by s.options.memSize (in kilobytes, default 8192). Creating many simultaneous delay Synths or using long maximum delay times can exhaust this pool, causing ‘memory allocation failure’ errors and server instability. Increasing s.options.memSize before booting the server resolves this. A value of 2.pow(20) (~1 GB) is recommended as a safe default for delay-heavy work. This setting must be changed before s.boot.

Examples

s.options.memSize = 2.pow(20); s.boot; // Then you can create many CombL Synths without memory allocation failures.

Assessment

A student creates 20 simultaneous CombL Synths and sees ‘memory allocation failure’ in the post window. Identify the cause and show the two lines of code needed before booting that fix the issue.

“is determined by a ServerOptions attribute called memSize”
corpus · supercollider-tutorials-full-transcripts-and-code-eli-fields · chunk 72