Running Ctk in SC 13.12.2

Hi community!

This is my first post on this forum and I’m coming back to SC after some time away. I’ve also upgraded to SC 13.12.2 and am unable to play or write CTK scores.

I’ve tried this with a couple different code snippets, and neither work. They throw the same error:

Execution warning: Class ‘InterplEnv’ not found
ERROR: Primitive ‘_ObjectIsKindOf’ failed.

Here’s an example:

(
var pnotes, group, noisesynth, noisebus, filtbus, ampsynth, ampbus, task, env;
var score, now;
score = CtkScore.new;

pnotes = CtkProtoNotes(
	SynthDef(\noise, {arg outbus;
		Out.ar(outbus, WhiteNoise.ar(1));
	}),
	SynthDef(\filts, {arg outbus, inbus, dur, freq, amp;
		var env, envgen, src;
		env = Control.names([\env]).kr(Env.newClear(8));
		envgen = EnvGen.kr(env, timeScale: dur, doneAction: 2);
		src = BPF.ar(In.ar(inbus), freq, 0.01);
		Out.ar(outbus, Pan2.ar(src * envgen * amp, Rand(-1.0, 1.0)));
	}),
	SynthDef(\dels, {arg inbus, deltime, dur, amp;
		var env, envgen, src;
		env = Control.names([\env]).kr(Env.newClear(8));
		envgen = EnvGen.kr(env, timeScale: dur, doneAction: 2);
		src = CombN.ar(In.ar(inbus, 2), deltime, [deltime, Rand.new(0.01, deltime)]);
		Out.ar(0, src * envgen * amp);
	}),
	SynthDef(\controlenv, {arg gate = 1, outbus;
		var env;
		env = Control.names([\env]).kr(Env.newClear(8));
		Out.kr(outbus, EnvGen.kr(env, gate));
	}).load(s)
);

env = Env([0, 1, 0], [1, 4], [3, -4], 1);

group = CtkGroup.new.addTo(score);
noisebus = CtkAudio.new; // allocate an audio bus to route noise
filtbus = CtkAudio.new(2); // sends stereo
ampbus = CtkControl.new; // for global amp control

noisesynth = pnotes[\noise].note(0.1, addAction: \head, target: group)
.outbus_(noisebus) // a CtkAudio! No need to call .bus
.addTo(score);

ampsynth = pnotes[\controlenv].note(1.0, 10, addAction: \head, target: group)
.outbus_(ampbus.bus) // a CtkControl... need to call .bus!
.env_(env)
.release(10 - env.releaseTime)
.addTo(score);

now = 0.0;

while({
	// place the filter notes after the noisesynth
	pnotes[\filts].note(1.0 + now, addAction: \after, target: noisesynth)
	.dur_(1)
	.outbus_(filtbus) // route output for the delays
	.inbus_(noisebus) // read in the noisebus
	.env_(Env([0, 1, 0], [0.5, 0.5], \sin))
	.freq_(1200.rrand(2400))
	.amp_(ampbus)
	.addTo(score);
	pnotes[\dels].note(1.0 + now, addAction: \tail, target: group)
	.inbus_(filtbus) // read in the filtered noise
	.deltime_(0.01.rrand(0.03))
	.dur_(1.5)
	.env_(Env([0, 1, 0], [0.5, 0.5], \sin))
	.amp_(ampbus) // don't call .bus here... it will map the arg for you
	.addTo(score);
	now = now + 0.5;
	now < 10;
});

// uncomment to play the CtkScore you have created
score.play(s);

// uncomment to write the score to a soundfile
// score.write("~/Desktop/test.aiff".standardizePath, options: ServerOptions.new.numOutputBusChannels_(2));

// uncomment to save the CtkScore as a file
// score.saveToFile("~/Desktop/test.sc".standardizePath);
)