home/ atoms/ sc-synthdef-must-readd

Editing a SynthDef without re-running .add spawns the old definition on the server silently

In SuperCollider, a SynthDef is compiled on the client and sent to the server via .add. If you edit the SynthDef source and then spawn a Synth without re-running .add, the server still holds the previous compiled definition. No error is raised; the sound simply does not match the new definition. The JITLib Ndef proxy avoids this problem by recompiling and swapping on every re-evaluation, which is why it is preferred in live-coding contexts where silent-wrong-state is dangerous.

Examples

SynthDef(\mysynth, { Out.ar(0, SinOsc.ar(880)) }).add; // new version not sent without .add Synth(\mysynth); // plays OLD version // Fix: always re-run .add after editing a SynthDef body

Assessment

You edit a SynthDef body and immediately call Synth(name) — the pitch has not changed. What is the cause and fix?

“Editing a SynthDef and spawning it without re-running `.add` uses the **old** definition — silent-wrong, not an error. Re-`.add` after every SynthDef edit”
context/ · L1-instruments/supercollider/gotchas.md · chunk 1