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

Re: setValueFunctionAtTime for AudioParam

From: Alistair MacDonald <al@signedon.com>
Date: Mon, 26 Mar 2012 13:03:19 -0400
Message-ID: <CAJX8r2n=66WLv6YgG8b_pnSo=ZXgqSeSNn87qipKe02eeifnHw@mail.gmail.com>
To: Patrick Borgeat <patrick@borgeat.de>
Cc: public-audio@w3.org
Thanks Patrick, I think I follow what you're saying.

So in JavaScript, something like....

AudioParam.setFunctionAtTime( callback, time );


Then in the callback...

var callback = function( buffer, time ){
    // iterate channels/buffers
    // update buffer
};


Does that look like what you had in mind?





On Mon, Mar 26, 2012 at 12:48 PM, Patrick Borgeat <patrick@borgeat.de>wrote:

> Yes, sorry for the imprecise explanation.
>
> Basically i mean callback functions as you suggested which provide a
> FloatArray as argument to be filled by the function and additional
> information about the current time position as additional arguments.
>
> So it's related to setValueCurveAtTime but it's more flexible. An ADSR
> envelope would be a good example too, as you don't know in advance when the
> release phase starts.
>
> Setting such a function would override all other setValue methods and give
> all control to the function.
>
> I hope this is more clear now.
>
> Patrick
>
> Am 26.03.2012 um 18:27 schrieb Alistair MacDonald:
>
> Just guessing here... perhaps you are suggesting there should be an
> interface to add callback "functions" which would execute at certain times,
> or within a certain time-ranges?
>
>
> Alistair
>
>
>


-- 
Alistair MacDonald
SignedOn, Inc - W3C Audio WG
Boston, MA, (707) 701-3730
al@signedon.com - http://signedon.com
Received on Monday, 26 March 2012 17:03:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 26 March 2012 17:03:56 GMT