home/ atoms/ sc-synthdef-stale-not-added

A SuperCollider SynthDef must be re-added after every edit or Synth plays the old cached graph

SuperCollider compiles SynthDefs and sends them to the server. If you edit a SynthDef source but do not re-run .add, calling Synth(\name) either fails with ‘FAILURE /s_new SynthDef not found’ or silently plays the original cached graph. The fix is to always re-run SynthDef(\name, {…}).add before Synth(\name). For livecoding, Ndef(\name, {…}) is preferred because it recompiles and replaces the running node on every re-evaluation.

Examples

SynthDef(\kick, {|gate=1| ...}).add; Synth(\kick) — edit the SynthDef body, skip .add, call Synth(\kick) again → old sound, no error.

Assessment

Explain why Ndef is preferred over SynthDef+Synth for SuperCollider livecoding and state what server message appears when Synth references an un-added SynthDef name.

“Re-run `SynthDef( ame, {…}).add;` **then** `Synth( ame)`. Prefer `Ndef( ame, {…})` while livecoding — it recompiles on every re-eval.”
context/ · L5-debug/supercollider.md · chunk 1