[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] automated buffer -- How's that get in there?!?
Monumentally stupid error on my part :)
~watcher = NodeWatcher.newFrom(s);
~stateManager = { |buffer, node, endState = \ready|
buffer.status = \busy; // don't let anyone else use this buffer
// below is to make sure the state changes when the synth stops
~watcher.register(node);
Updater(node, { |node, flag|
[buffer, node, flag].debug("inside updater");
(flag == \n_end).if({
endState.debug("changed state to");
buffer.status = endState;
node.releaseDependants; // this should be inside the if!
});
});
};
Also:
> ~rec = Routine({
> var buf1, buf2, node;
> 1.do {buf1 = ~pool.select({ |b| b.status == \empty }).tryPerform(\choose);
> Line.kr(0, 1, BufDur.kr(\targetbufnum), doneAction: 2);
> buf1.notNil.if({
> node = Synth(\recorder, [\targetbufnum,
> buf1.buffer.bufnum]);
> node.debug("started synth");
> ~stateManager.value(buf1, node);
> });5.wait
> }
> })
Line.kr is a server-side ugen, but you're writing it into a
client-side routine. It will be ignored there, so better to take it
out.
I also noticed you put it in all the filters, and now in the recorder,
but not in the player. The player synth needs to be able to free
itself too...
hjh
On 2/27/06, scacinto <scottpetersen@xxxxxxxxxxxxxxx> wrote:
>
> Hi James,
> I've implemented the changes you cited -- the following code is what
> I'm running. (sorry to keep posting this mess, Y'all)
--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman