[Stk] Rate parameter (as in StopBlowing(StkFloat rate) )
gary at ccrma.Stanford.EDU
Tue Jun 2 11:46:49 PDT 2009
Its actually the amount that the envelope is decremented for each
sample. So, you need to account for the sample rate as well (like you
did in your first example). Thus, to make it go from 1.0 to 0.0 over
3 seconds, the rate would need to be:
1.0 / (3.0*Stk::sampleRate())
Note, however, that your envelope might not be at a value of 1.0 to
start with ... that is usually set in the NoteOn function based on the
On 2-Jun-09, at 2:29 PM, Michael Chinen wrote:
> I'm having trouble getting a StopBlowing to provide a behavior that
> stops the air going into instrument over a period of time.
> Can someone explain what units rate (e.g. in Saxofony's StartBlowing
> or StopBlowing) is in? Looking at envelope it appears to be in
> change per tick - is this correct?
> For example, how would you decrease an instrument's input air to
> zero over three seconds?
> I've tried both
> Michael Chinen
> Stk mailing list
> Stk at ccrma.stanford.edu
More information about the Stk