Pbindef not working!

Hey everyone,

So for some reason and without any errors, Pbindef and Pbinds are not working for me anymore! I didn’t change anything or add anything to SuperCollider but Pbinds are failing silently without any errors. When I look at the Node, there’s also nothing there. I tested in with Pbindef examples in SuperCollider’s help file, but still nothing. Anyone know what could possibly cause this before I reinstall SuperCollider?

Thank you

Post code?

My guess offhand would be that something in the pattern is accidentally nil, but there’s no way to be specific without seeing what you’re running.


I’m just using the default examples to make sure I’m not doing something stupid. Here’s the code I’m running for example:

SynthDef("Pdefhelp", { arg out, freq, sustain=1, amp=1, pan;
    var env, u=1;
    env = EnvGen.kr(Env.perc(0.01, sustain), 1, doneAction: Done.freeSelf);
    5.do { var d; d = exprand(0.01, 1); u = SinOsc.ar(d * 300, u, rrand(0.1,1.2) * d, 1) };
    Out.ar(out, Pan2.ar(SinOsc.ar(u + 1 * freq, 0, amp * env), pan));

Pbindef(\a, \instrument, \Pdefhelp).play;
Pbindef(\a, \degree, Pseq([0, 2, 5b, 1b], inf));

Oh OK… I’m afraid I can’t reproduce this. I get sound as expected.

Which OS?

Does the server make any sound at all? { SinOsc.ar(440, 0, 0.1).dup }.play

Try Pbindef(\a, \instrument, \Pdefhelp).trace.play – you’ll need cmd-. to stop it, but this should show you the events being generated.

Also try enabling Server Dump OSC (Server menu). With both .trace and dump OSC, it should be like:

( 'instrument': Pdefhelp, 'degree': 0 )
[ "#bundle", 16524891704707534203, 
  [ 9, "Pdefhelp", 1035, 0, 1, "out", 0, "freq", 261.626, "sustain", 0.8, "amp", 0.1, "pan", 0 ]
( 'instrument': Pdefhelp, 'degree': 2 )
[ "#bundle", 16524891709002501499, 
  [ 9, "Pdefhelp", 1036, 0, 1, "out", 0, "freq", 329.628, "sustain", 0.8, "amp", 0.1, "pan", 0 ]


I think this is caused by the SynthDef name being a string and the Pbindef using a symbol to look it up. Try changing "Pdefhelp" to \Pdefhelp and see if that works

No, string names are converted to symbols when adding into the SynthDescLib. This isn’t the problem. https://github.com/supercollider/supercollider/blob/develop/SCClassLibrary/Common/Audio/SynthDesc.sc#L553


1 Like

Ah okay sorry about that.

The issue went away when I restarted my laptop. It happened to me a few more times, but restarting the laptop seems to be fixing it. I’m going to try to upgrade SC to the latest version and see if the issue keeps on happening. Will update this topic soon.

Edit: for those interested, I’m using the new M1 Macbook Pro (with M1 Max chip).