W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2012

Re: Missing information in the Web Audio spec

From: Raymond Toy <rtoy@google.com>
Date: Thu, 10 May 2012 09:38:25 -0700
Message-ID: <CAE3TgXG-VXoWaa_evM+S_4tjtPyibX-h+-q4FXmBqsGz5KzFtw@mail.gmail.com>
To: robert@ocallahan.org
Cc: public-audio@w3.org
On Wed, May 9, 2012 at 6:19 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> In AudioParam, a lot of the processing model is unclear. I assume that
> nominally an AudioParam is a function from time to floats. So, for
> example,what does setValueAtTime actually do? Does it set the value for all
> times >= 'time'? Does setting the 'value' attribute make the function
> constant over all times? And what does it mean to be "relative to the
> AudioContext currentTime"? Does that mean passing 0 changes the value at
> the current time, or that 'time' and 'context.currentTime' are simply on
> the same timeline? If the former, clarify by saying that 0 corresponds to
> the context's currentTime.

Heh.  I thought setValueAtTime was the easiest method to understand.  It
sets the value of the AudioParam to the specified value at time T, where T
is the offset from context.currentTime.  Unless you do something else to
it, it stays at this value.

> The actual values computed by the AudioParam curves must be specified
> mathematically. The current text is too vague to be implemented.

Yes, this could probably be added, although I think linearRampToValueAtTime
is pretty clear.

exponentialRampToValueAtTime is less so because there was some issue raised
that you can't start or end with a negative value (because exp(x) is always
positive for real x).

setValueCurveAtTime seems straighforward, unless you need to describe how
the interpolation is done if the number of values doesn't exactly match the

Received on Thursday, 10 May 2012 16:38:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:04 UTC