W3C home > Mailing lists > Public > public-audio@w3.org > January to March 2012

Re: Web Audio working draft comments and questions

From: Raymond Toy <rtoy@google.com>
Date: Mon, 19 Mar 2012 12:40:30 -0700
Message-ID: <CAE3TgXEZG4w+2PpT70iCGkxjNLmEYvwBTP3k2HuwAPBN9LbkjQ@mail.gmail.com>
To: Per Nyblom <perny843@hotmail.com>
Cc: public-audio@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 19 March 2012 19:40:59 GMT