Re: Fading sound in and out

Hello,

You can look at using the exponentialRampToValueAtTime or
setTargetAtTime methods
instead.

Human perception of loudness is logarithmic in nature, so exponential
decays of loudness feel 'smoother' to us than linear decays.

-Chinmay


On Wed, Aug 20, 2014 at 10:29 PM, Yehonathan Sharvit <viebel@gmail.com>
wrote:

> Hi,
>
>
> What is the best way to fade sound in and out?
>
> I tried to achieve that by calling linearRampToValueAtTime (see a demo:
> http://jsfiddle.net/viebel/9La05fg5/7/) on a gain node but the effect was
> not smooth enough?
>
> How could I make it smoother?
>
> Thanks,
> Yehonathan.
>

Received on Wednesday, 20 August 2014 14:44:29 UTC