Strange Error when using mk-synthlib Library

Hello All

I’m trying out Mads Kjeldgaard ‘mk-synthlib’ Synth Library posted here:

https://codeberg.org/madskjeldgaard/mk-synthlib

I installed the library into my Extensions and I believe I have everything set up properly on my end but can’t get any of the example code to work in his synth library for anything…

Here’s some example code from his gutter synth:

MKSynthLib();

I evaluate this to load up the synths in the library… No errors posted

Then add the synth I want with this next batch of code:

(
MKSynthLib.add(
	basename: \gutter,
	synthfunc: {|dur|
		var sig, freq1, freq2, pitch;
        var mod, omega, damp, rate, gain, soften, gain1, gain2, q1, q2;

        mod = \mod.kr(0.2, spec:[0,10]);
        omega = \omega.kr(0.0002, spec:ControlSpec(0.0001, 1, \exponential));
        damp = \damp.kr(0.01, spec:ControlSpec(0.0001, 1, \exponential));
        rate = \rate.kr(0.03, spec:[0, 5]);
        gain = \gain.kr(1.4, spec:[0, 3.5]);
        soften = \soften.kr(1, spec:[0, 5]);
        gain1 = \gain1.kr(1.5, spec:[0.0, 2.0, \lin]);
        gain2 = \gain2.kr(1.5, spec:[0.0, 2.0, \lin]);
        q1 = \q.kr(20, spec:ControlSpec(0.5, 800, \exponential));

        // freq = [56, 174, 194, 97, 139, 52, 363, 118, 353, 629];
        pitch = \pitchShift.kr(0.25, spec: [0.05,2.0]).lag;
        freq1 = pitch * [ 104.08913805616, 272.0241439869, 142.5394121681, 740.98235420089, 3231.1092775615, 598.48984613932, 564.11122601617, 152.53849023618, 4773.6198870775, 798.26171948236, 729.54452005837, 734.37542510625, 661.89936380362, 133.46101940276, 1715.6115033359, 11658.962024239, 6408.5610397899, 11775.302108311, 857.52846512925, 2020.251581889, 14168.220304686, 192.17654523236, 326.55730188427, 4386.8490423436];
        freq2 = freq1 * Array.rand(freq1.size, 0.95,1.0);

        // q = q ! freq1.size;
        q1 = Array.rand(freq1.size, 0.95,1.0) * q1;
        q2 = Array.rand(freq1.size, 0.95,1.0) * q1;

        sig = GutterSynth.ar(
            gamma:         mod,
            omega:         omega,
            c:             damp,
            dt:         rate,
            singlegain: gain,
            smoothing:  soften,
            togglefilters: 1,
            distortionmethod: \distortionmethod.kr(1, spec: [0,4,\lin,1]),
            oversampling: 1,
            enableaudioinput: 0,
            audioinput: SinOsc.ar(SinOsc.ar(LFNoise2.ar(30)*100).exprange(100.0,2500.0)),
            gains1:     gain1,
            gains2:     gain2,
            freqs1:     `freq1,
            qs1:         `q1,
            freqs2:     `freq2,
            qs2:         `q2,
        );

        sig = Limiter.ar(sig);
		sig = LeakDC.ar(sig);

	},
	numChannelsIn: 1);
)

No errors posted on this either… Seems to be loading up fine…

Then I evaluate this…

MKSynthLib.genPat(\gutter);

All good still…

And when I try to play it using Pdef, here’s where the error comes in…

(
Pdef('210818_171928',
	Pbind(
		\instrument, \gutter_adsr_dfm1_o2,
		\amp, 0.25,
		\dur, 1.0,
		\mod, 0.90000000298023,
		\omega, 0.009999999494758,
		\damp, 0.9099999997764826,
		\rate, Pwhite(0.002,0.1),
		\gain, 1.3999999761581,
		\soften, 0.5,
		\gain1, 1.5,
		\gain2, 1.5,
		\q, Pwhite(10,1200),
		\pitchShift, Pwhite(0.525,0.125),
		\distortionmethod, 3,
		\vcaattack, 0.50000000149012,
		// \vcarelease, 0.89999997615814,
		\vcaenvcurve, -5.0,
		// \gate, 1.0,
		\legato, 1.0,
		\decay, 0.00000001192093,
		\vcapeakLevel, 1.0,
		\sustainLevel, 0.94999998807907,
		\flag, 0.010000000149012,
		\fattack, 0.10000000149012,
		\frelease, 0.89999997615814,
		\fenvcurve, -5.0,
		\fpeakLevel, 1.0,
		\fenvPeak, 1.0,
		// \fcutoff, 1800.0,
		// \fenvAmount, 1.0,
		// \fresonance, 0.9,
		\fgain, 1.0,
		// \ftype, 1.0,
		\fnoise, 0.0,
		\pan, Prand([1,-1.0], inf),
		\panFreq, Pwhite(0.001,0.1),
		\autopan, 1,
		\panShape, 1.0,
	)
).play
)

I get this error in the post window:

*** ERROR: SynthDef gutter_adsr_dfm1_o2 not found
FAILURE IN SERVER /s_new SynthDef not found
FAILURE IN SERVER /n_set Node 1000 not found

I made no adjustments to the code so I was assuming it should work out of the box… but could be wrong… I did download all the dependencies needed to use this library as well

Can anybody explain what I’m doing wrong?

maybe the synth library isn’t communicating correctly with SC and I’m just getting lost in the sauce? Not sure?

Thanks in advance to any replies.