[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] quick question regarding Pause.kr



On Jul 22, 2009, at 3:11 PM, casey anderson wrote:

actually, the only reason im using that nodeID is because the help
file for Pause.kr seemed to suggest that one needs to hard code the
nodeID for the synth, however, im not sure if the synth retains that
nodeID, and perhaps that is why this is not working. that seems like a
likely reason for this issue, im just not quite sure how to correct
that.

The help file should probably be fixed to use object style, not OSC style. (As a general note, even if a parameter is hardcoded in a helpfile, more often than not it doesn't *have* to be hardcoded, though.)

I'd say, have a nodeID argument in the pausing synthdef and set it according to the ID of the node you want to control.

nodeToBePaused = Synth(...);

pausingNode = Synth(..., [nodeID: nodeToBePaused.nodeID]);

If the Pause ugen is supposed to pause the same synth, use PauseSelf instead (which is easier), or:

// get the node ID first
pausingNode = Synth.basicNew(\name, s);

// and only *then* send the new synth message
s.sendBundle(nil, pausingNode.newMsg(args: [nodeID: pausingNode.nodeID]);

But if you pause the node containing Pause or PauseSelf, you can't unpause it by setting a control because Pause(Self) is no longer running! The only way to unpause it then is using node.run(true) or the equivalent OSC message.

hjh


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman