MixerChannel issues

I’ve been going through the tutorials at:


I can’t seem to get the channels to work…

Also when I use

~chan = MixerChannel(\blippy, s, 2, 2, postSendReady:true);

…from the tutorial, I get an error: WARNING: keyword arg ‘postSendReady’ not found in call to Meta_MixerChannel:new

// Load these two simple SynthDefs

	SynthDef(\reverb, {
		|in, predelay=1, revtime=10, lpf=4500,mix=0.5,amp=1,out=0|
		var dry,wet,temp,sig;
		dry = In.ar(in, 2);
		temp = In.ar(in, 2);
		temp=DelayN.ar(temp, 0.2, predelay);
		32.do {temp=AllpassN.ar(temp, 0.05, {Rand(0.001,0.05)}!2,revtime);

SynthDef("snare", {
		arg outBus=0, amp=0.8;
		var env0, env1, env2, env1m, oscs, noise, out;

		env0 = EnvGen.ar(Env.new([0.5, 1, 0.5, 0], [0.005, 0.03, 0.10], [-4, -2, -4]));
		env1 = EnvGen.ar(Env.new([110, 60, 49], [0.005, 0.1], [-4, -5]));
		env1m = env1.midicps;
		env2 = EnvGen.ar(Env.new([1, 0.4, 0], [0.05, 0.13], [-2, -2]), doneAction:2);

		oscs = LFPulse.ar(env1m, 0, 0.5, 1, -0.5) + LFPulse.ar(env1m * 1.6, 0, 0.5, 0.5, -0.25);
		oscs = LPF.ar(oscs, env1m*1.2, env0);
		oscs = oscs + SinOsc.ar(env1m, 0.8, env0);

		noise = WhiteNoise.ar(0.2);
		noise = HPF.ar(noise, 200, 2);
		noise = BPF.ar(noise, 6900, 0.6, 3) + noise;
		noise = noise * env2;

		out = oscs + noise;
		out = out.clip2(1) * amp;

		Out.ar(outBus, out.dup);

// Create a MixerChannel

~keltest = MixerChannel(\test, s, 2, 2); //Make a MixerChannel

// Create a reverb on it

~refchan = ~keltest.playfx(\reverb);

	\instrument, \snare,
	\degree, Pseq([0,3,7,9], inf),
	\dur, 1

It’s probably something simple I’m doing wrong, but I’ve been trying for a few hours to get it to work to no avail.

What’s frustrating, is I can get the tutorial example to work, but not my own.

I think maybe I’m doing the MixerChannel.play with the PBind wrong, but I’ve been trying various ways, including using an outBus key in the pbind, but it wont work…

Also getting “FAILURE IN SERVER /n_set Node 1090 not found” alot when trying

Ok…it’s working now after recompiling, I have no idea,…

I still get the Node not found errors, but I guess that doesn’t matter if it’s working

Wish I could delete this post.

Ah, I need to rewrite that part of the tutorial. The postSendReady argument no longer exists; you don’t need it.

EDIT: Fixed on my site now.

Just use out. (If I recall correctly, not at the computer now, supported argument names for the output bus number are out, outbus [no capital B!], or i_out – misspelling the argument name would break bus routing. EDIT: Confirmed on my computer – outbus would have been OK but outBus is not OK. But in any case, out is the standard argument name used throughout the class library. There’s no need to be clever and use a different one.)

Also I’d recommend ReplaceOut instead of Out in your reverb synth.

Oh, why are you .send-ing the snare SynthDef, instead of .add-ing it? This might indirectly cause the node not found errors.


I think the tutorial says .send instead of .add. Coincidentally, I just started going through some of this stuff a few days ago, and that bit jumped out at me because I hadn’t seen it before and I was getting all kinds of errors.

Ah… These tutorials are ancient; I should either rewrite them or delete them.

One rule for your future exploration: SynthDefs should in general always be added, not sent. If a tutorial uses send, it’s probably out of date. (Do not trust a tutorial that says SynthDef().send.) There’s no longer any reason to use send, not really.

If the SynthDef is being used with a pattern, then you must add, no matter what you saw in the tutorial. The add requirement is documented in main SC help, which should be trusted sooner than third party tutorials (even mine). (It happens that the tutorial that you linked to doesn’t use patterns at all, so, technically it’s internally consistent. But it is out of date.)

I’ll try to update those when I can. Sorry for the false leads for you.


1 Like

Oh no problem! I’m still grateful for the tutorials. and learned something from them.

Do you still maintain MixerChannel? Is there any reason to use the vanilla way of routing over MixerChannel? I like the functionality and I can see how great it will be when I start making bigger projects.

I still use MixerChannel in everything I do with SC, except small examples for the forum. I “maintain” it in the sense that, if I find a bug or one is reported to me, I’ll fix it, but tbh I don’t remember when was the last time I had to do that. (Though I should update the code style for readability, and use model-view-controller for the GUI instead of the direct reference I’m using now.)

If I were making a large project and were forced to use only built-in objects, it would feel like “one hand tied behind my back.” I can’t think of a good reason why you’d want to ensure that :laughing:

Just use and enjoy –


1 Like