sc_render
Render SuperCollider code offline to a WAV file without audio hardware, then get peak and RMS stats to detect silence or clipping.
Instructions
Render SuperCollider code to a WAV file offline (faster than realtime, no audio hardware needed) and report level stats. The code runs in sclang and must provide what to render in one of three ways: ~pattern = Pbind(...) (or return a Pattern as the last expression); ~score = Score([...]) for raw server messages. Optionally set ~defs = [SynthDef(\name, {...}), ...] for any custom instruments the pattern uses (a basic \default instrument is always included). Use SynthDef objects without .add/.store. Example: ~defs = [SynthDef(\pluck, { |out=0, freq=440, amp=0.2| Out.ar(out, Pluck.ar(WhiteNoise.ar, 1, 0.1, freq.reciprocal, 3) ! 2 * amp * EnvGen.kr(Env.perc(0.01, 2), doneAction: 2)) })]; ~pattern = Pbind(\instrument, \pluck, \degree, Pseq([0, 2, 4, 7], 2), \dur, 0.25); The result includes peak/RMS so you can tell silence or clipping without listening. Returns the WAV path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | SuperCollider code (see tool description). | |
| name | No | File name without extension. | render |
| tail | No | Extra seconds rendered after the content so releases and reverbs can ring out. | |
| duration | Yes | Length of the musical content in seconds. | |
| sampleRate | No |