r/supercollider • u/ElaborateSloth • 21d ago
Using Pbinds with variables in ProxySpaces
I'm relatively new to SC, and have lately gotten into ProxySpaces to make changes on the fly. One issue I'm having is using environment variables in Pbinds, like this:
~key = 60; // C
~interval = [0, 2, 3, 5, 7, 8, 10, 12] // Minor
(
~p3 = Pbind(
\instrument, \bell,
\dur, 1,
\amp, 0.07,
\midinote, Pxrand(~interval, inf) + ~key
);
)
Pxrand expects a list, but is presented with a nodeproxy instead. I can't use a normal variable as it has to be declared in the local scope of a function. I feel there should be a straight forward method for something like this.
4
Upvotes
View all comments
Show parent comment
2
u/ElaborateSloth 21d ago
I'll use the forum next time