Product SiteDocumentation Site

11.3.12.3. Replace a Running Synth

The server allows you to replace a running synth with a newly-created one, maintaining all of the ordering relationships.
This is the syntax:
variableHoldingNewSynth = Synth.replace( variableHoldingSynthToReplace, nameOfSynthDef, ListOfArguments );
The "variableHoldingNewSynth" will often be the same as the "variableHoldingSynthToReplace," but not always. When you use this Function, the synth being replaced is freed from the server (equivalent to running "free"), so that variable should always be assigned something.