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

Re: [Bug 17334] (setTargetValueAtTime): AudioParam.setTargetValueAtTime is misleading and underdefined

From: Chris Rogers <crogers@google.com>
Date: Thu, 28 Jun 2012 11:26:05 -0700
Message-ID: <CA+EzO0mW9TJK-9ygXLxCNnjz+WC3H5a5sZW7qa8xi_fCiQoTPw@mail.gmail.com>
To: olivier Thereaux <olivier.thereaux@bbc.co.uk>
Cc: Ray Bellis <ray@bellis.me.uk>, public-audio@w3.org
On Thu, Jun 28, 2012 at 9:16 AM, olivier Thereaux <
olivier.thereaux@bbc.co.uk> wrote:

> hi Ray,
>
> On 28 Jun 2012, at 16:48, Ray Bellis wrote:
>
> > On 28/06/2012 15:23, olivier Thereaux wrote:
> >
> >> However… I may be misunderstanding the essence of this method, but
> >> aren't we talking about a value to be reached at a certain time (or,
> >> in other words, a value pre-set for a given time)?
> >
> > I think you must made my point for me ;-)
>
> Always happy to helps ;)
>
>
> > Chris Rogers described it thus:
> >
> > "It's a *target* value which we start approaching at precisely the time
> > given."
> >
> > which I read to mean that the time given is the _start_ of the curve,
> > not the end of it.
>
> I hadn't read it that way, but now that you mention it, yes, it makes more
> sense.
>
> Chris, any thought? I wouldn't want to impose the change of name if it is
> typical in most software APIs, but I am sensitive to the points made by Ray
> and Philip.
>

This is one method in a family of methods which include "AtTime" in their
name:

setValueAtTime()
linearRampToValueAtTime()
exponentialRampToValueAtTime()
setTargetValueAtTime()
setValueCurveAtTime()

So I think it's important to maintain consistency here.  Also, I believe
the name describes precisely what it does.  In other words, the "target
value" is set at the time given (which for all the methods is the time of
the event in the time-ordered event list):
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#methodsandparams-AudioParam

Chris



>
> Olivier
Received on Thursday, 28 June 2012 18:26:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 28 June 2012 18:26:40 GMT