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

Re: Reflections on writing a sequencer

From: Jonathan Baudanza <jon@jonb.org>
Date: Tue, 24 Jul 2012 12:38:30 -0400
Message-ID: <CAP26MZvo2tO2bj9pF0uW4_qD0XKLcai_Qi7oNJwhLWmW0=CnOQ@mail.gmail.com>
To: Audio Working Group <public-audio@w3.org>
On Tue, Jul 24, 2012 at 11:40 AM, Adam Goode <agoode@google.com> wrote:

> I essentially want to have a callback for getting new control data, to
> keep the event pipeline filled without overflowing any noteOn buffer or
> falling behind. Is the javascript node appropriate for this? I feel like
> there could be something more explicit, like a setInterval off of the audio
> context.
I've run into the same issue, and this has been discussed on the list

AFAIK, either using setTimeout or a JavaScriptNode is the currently the
best solution. There is an issue in the webkit issue tracker to create
a callbackAtTime()
method on audio context.
I'm not sure if a similar issue exists on the Web Audio API issue tracker,
but there probably should be one.

I don't think window.requestAnimationFrame() is a solution, because the
callback is only called when the browser frame is visible.
Received on Tuesday, 24 July 2012 16:39:04 UTC

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