One thing that surprised me when discovering Supercollider :
With Pdef you can define it with Pdef(\name, Pbind()) and access the value with Pdef(\name), but with SynthDef, SynthDef(\name) doesn’t give you the synthdef definition, you only get an error. To get the synthdef, you have to use completely another class : SynthDescLib.global.at(\default). It took me long time to remember, confusing it with SynthDefLib and SynthDesc. It would be way friendlier to just use SynthDef(\name).
Another surprising thing : There is a way to store UGen graph function, SynthDef, and a way to combine UGen graph functions to build a bigger one, SynthDef.wrap. But there is no easy way to use both.
SynthDef.wrap doesn’t accept synthdef name, only a function. So you have to store your UGen graph functions elsewhere. For example in environment variable, but then it can break when changing the environment, so this is lot of complication to maintain a parallel UGen graph function storing system while you already have SynthDef storing mecanism.
Just a couple quick comments, can’t really go in depth at the moment… Anyway, one difference is that a Pdef(\name) is directly useful (.play, .stop etc) while there is nothing actually useful you can do directly with a SynthDef object. It’s necessary to produce a resource (a binary graphdef) that will be consumed and used elsewhere.
I suppose it may be worthwhile to fold SynthDesc into SynthDef but there are a couple subtle points that I can’t get into right now.
That’s a nice syntax idea but … I spent a lot of time in the past trying to modularize my SynthDef construction, and eventually I gave up. SynthDef.wrap “modularizes” in a very limited way but it doesn’t truly support full modularity. (A big problem – huge problem – is argument name collision: say you add two instances of your ADSR modular function – how should the arguments be differentiated? This is where I got stuck, to the degree that I think SynthDef by itself cannot solve this problem.) It’s not a bad idea to add that to .wrap but I don’t think it will be a full, general solution.