Default SynthDef

aaarg - anyone know where the default SynthDef is defined?

related: is there any way to know in general what file a loaded SynthDef was compiled from ?

thx!!

It’s defined in Event.sc.

Don’t know the answer to the other Q :slight_smile:

1 Like

line 165 of Event.sc:

SynthDef(\default, { arg out=0, freq=440, amp=0.1, pan=0, gate=1;
			var z;
			z = LPF.ar(
				Mix.new(VarSaw.ar(freq + [0, Rand(-0.4,0.0), Rand(0.0,0.4)], 0, 0.3, 0.3)),
				XLine.kr(Rand(4000,5000), Rand(2500,3200), 1)
			) * Linen.kr(gate, 0.01, 0.7, 0.3, 2);
			OffsetOut.ar(out, Pan2.ar(z, pan, amp));
		}, [\ir]).add;
1 Like

In general, I think, no. It’s the job of the global SynthDescLib to store a SynthDef’s relevant data in the language. So, you can investigate by

SynthDescLib.global[\default].dump

No proper candidates here, metadata is an empty Event. If you need that info you could do something like

SynthDef(\test, { Out.ar(0, Silent.ar) }, metadata: (path: "path")).add

1 Like

here’s my override in case anyone is interested!

 + SynthDef  {
	*new { arg name, ugenGraphFunc, rates, prependArgs, variants, metadata;
		^super.newCopyArgs(name.asSymbol).variants_(variants).metadata_((path: thisProcess.nowExecutingPath)).children_(Array.new(64))
			.build(ugenGraphFunc, rates, prependArgs)
	}
}

you can then query SynthDescLib.global[\name].metadata.path