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

Re: [sc-dev] Possible error on StageLimiter



Thanks for catching this Miguel. Yes it is meaningless to call play on a synth. I'll commit the fix.

Best,
Batuhan Bozkurt




On Dec 17, 2009, at 8:05 PM, Miguel Negrao wrote:

Hi

I’m making a class for Bass management based inspired on StageLimiter and I had one question. In the source there is

activeSynth = Synth(\stageLimiter).play
(
RootNode(Server.default), 
addAction: \addToTail

but as far as I can tell .play doesn’t do anything on a Synth :

+ Synth {

*stop {
RootNode.new.freeAll;
}
*play { arg func;
Server.default.doWhenBooted({
func.play;
})
}
play {
//if not already playing, play
}
*sampleRate {
^Server.default.sampleRate ? Server.default.options.sampleRate ? 44100.0
}

}


By the time .play is called the synth is already running, and if I check the node tree, indeed the StageLimiter is inside the default group, which would not be the case if the target was actually the RootNode.

So I think it should be

activeSynth = Synth(\stageLimiter,
target: RootNode(Server.default), 
addAction: \addToTail
)
.

cheers,
Miguel Negrão



<stagelimitercorrect.patch>