I know the new WebAudio support is capable of this, but I can't seem to figure out how to implement it. I want to be able to specify a ramp-down on the gain over a period of time. I actually have the low level calls, from the MIDI.js code, but I can't figure out how to get the C2 implementation to do the same thing.
From MIDI.js source.gain.linearRampToValueAtTime(1, delay); source.gain.linearRampToValueAtTime(0, delay + 0.2); blackhornet2013-04-21 17:20:14
Figured it out. You apply a Gain effect with a gain of zero, so there is no immediate effect, and then call Set effect parameter when you want to fade, set to Filter/delay/gain gain with your final dB (negative to fade down), and the time period to fade over.