Re: Fading sound in and out

> What I would expect is that calling the function "linearRampToValueAtTime"
> would use the current value at current time as a start point and ramp from
> there to the given value at the given time. In that case the fade times
> are always respected (even though the slopes wouldn't).
> I could not think of any scenario in which this behaviour would not be
> desired, do you?

See endless threads passim where it has been noted that for an ADSR EG it
is the slope that's most important.

Consequently to maintain that slope you must somehow both determine the
current value of the EG (if non-zero) and the amount of time you expect
the EG to take to go from that value to the new value.

As far as I know this is still an unsolved problem, unless you adhere to
the notion that every new sound played should result in the creation of a
new set of AudioNodes.  That's kinda OK for polysynth emulation, but no
good for monosynths.

Ray

Received on Tuesday, 26 August 2014 19:48:46 UTC