W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: setTargetAtTime and the meaning of .value in the spec

From: Chris Rogers <crogers@google.com>
Date: Mon, 29 Jul 2013 12:10:15 -0700
Message-ID: <CA+EzO0n7tUcvZfu0nvu12zW2xs9oFspgu6mwGbyBy-Eb-Okb-w@mail.gmail.com>
To: padenot@mozilla.com
Cc: "public-audio@w3.org" <public-audio@w3.org>
On Mon, Jul 29, 2013 at 4:48 AM, Paul Adenot <padenot@mozilla.com> wrote:

> First, some context [1], specifically, comment 2.
> The paragraph that describes the `setTargetAtTime` method of an
> AudioParam currently says:
> > During the time interval: T0 <= t < T1, where T0 is the startTime
> > parameter and T1 represents the time of the event following this
> > event (or infinity if there are no following events):
> >
> >      v(t) = V1 + (V0 - V1) * exp(-(t - T0) / timeConstant)
> >
> >
> > Where V0 is the initial value (the .value attribute) at T0 (the
> > startTime parameter) and V1 is equal to the target parameter.
> Here, V0 should be the "computedValue" attribute to make it explicit
> that we are doing a curve from the last value this AudioParam had, to
> the "target" parameter. Otherwise, the feature works in a surprising way
> (i.e. does a curve from the last value set to the .value attribute to
> the target parameter, or from the default value to the target
> parameter), and makes it difficult for the author to use this feature to
> implement sustain and release part of an ADSR-like envelope.

The computedValue is an internal value which also includes (by summing in)
all audio-rate connections to the param, but the V0 and V1 values are not
meant to include that part.  It's really the last "intrinsic" value as
described in the spec which matters here.

> If we don't want to use the term "computedValue" at this point in the
> spec (since it is only described later on), we should at least use a
> wording along the lines of:
> > Where V0 is the value of the AudioParam at the time T0

Maybe we could say that V0 is the last intrinsic value.

> instead of
> > Where V0 is the initial value (the .value attribute) at T0
> since we have not settled yet whether .value should return the
> "computedValue", or the value that was last assigned ([2] and replies).
> Thanks,
> Paul.
> [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=897092
> [2]: http://lists.w3.org/Archives/Public/public-audio/2012OctDec/0191.html
Received on Monday, 29 July 2013 19:10:50 UTC

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