~sig.play(t); // This works without sound
~sig.stop;
When I run ~sig.play or ~sn.play SuperCollider reacts as expected, sounding if problems the pattern. However, when I run ~sig.play(t) or ~sn.play(t) apparently everything seems to work correctly without errors but it doesn’t play. I am in a ProxySpace environment with a Setup.scd configuration file where I have the tempo t = p.clock.tempo_(100/60) and sometimes I use to change the tempo on the fly;.
Does anyone have any explanation to this?
Thanks
I only know how to attach a clock to a ProxySpace - does this help you? It allows to change the tempo on the fly.
// create a clock
t = TempoClock(160/60);
// attach it to the proxy space
p = ProxySpace.push(s, clock: t);
(
~pattern = Pbind(
\instrument, \kick,
\rel,0.5,
\dist, 0.5,
\ringTime, 10,
\amp, 0.5,
\dur, Pseq([
Pseq([1/2],6),
Pseq([1/8],8)
],inf)
);
)
~pattern.play;
// update tempo
t.tempo_(120/60);
~pattern.stop;
// move out of proxyspace
p.pop;
edit: The reason why ~pattern.play(t) does not work is that ~pattern is a NodeProxy, and the first argument of its .play method defines the number of the bus to playback the node, so the node will be played back on the value of the clock, therefore you don’t hear anything. NodeProxy also has a .clock variable, but I had no luck using this.
you can also use ~pattern.clock = t; but you have to run the pattern definition (the ~pattern = Pbind(..) block) after the clock definition for the clock to be taken in account