Re: setValueFunctionAtTime for AudioParam

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 UTC