Re: Web Audio working draft comments and questions

On Thu, Mar 15, 2012 at 2:54 PM, Per Nyblom <perny843@hotmail.com> wrote:

>
> The AudioParam Interface
> ------------------------
> Is it the exponential with base 10 that is used?
>

If you're talking about the exponentialRampToValueAtTime, it doesn't really
matter.  The formula is basically value =  value1*(value2/value1)^(t/T).
where value1 is the starting value and value2 is the desired value, and T
is time interval.  Thus, at time 0, value = value1 and after T seconds, the
value is value2.

>
> What exactly is the timeConstant in setTargetValueAtTime(). It would be
> great with a formula like 10^(-timeConstant * t) or something.
>

The time constant is such that after timeConstant amount of time, the value
has changed by a factor of 1/e.  (e = 2.71828...).  So if we start with a
value of 1 and the target value is 0 with a time constant of T, after T
seconds, the value is 1/e.

Ray

Received on Monday, 19 March 2012 19:40:58 UTC