Once a SynthDef
is add
ed etc., a corresponding SynthDesc
is stored in the global (client-side) library. And a SynthDef
can be “converted” to as SynthDesc
with asSynthDesc
. But can you convert the other way around, i.e. from Desc to Def? (This would be most useful when retriving the Descs from the library with SynthDescLib.global
)
No, some of the data are missing that way. SynthDesc is reliable for control names and not much else (which is understandable, considering that its original purpose was to make it easy for Events to know which control names to look up).
Edit: I should say more accurately: if the SynthDef was .add
ed, the SynthDesc retains a reference to the original SynthDef, so you can retrieve it that way. If the SynthDesc was constructed by loading a binary .scsyndef
file, then the SynthDef object is corrupt in some subtle way that nobody ever analyzed. There’s a flag to tell the difference but I forget its name right now.
hjh