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

Re: Reflections on writing a sequencer

From: Peter van der Noord <peterdunord@gmail.com>
Date: Thu, 26 Jul 2012 16:56:12 +0200
Message-ID: <CAL9tNz_k0DpGGDpqMdWd=Y73pUFXcZsJYnq3qaDtoLcUdhCejg@mail.gmail.com>
To: public-audio@w3.org
can you give an example?

Let's say i am in my buffer-write loop (in response to an
AudioProcessingEvent), and at a certain point in that loop (i may or may
not have written a number of values already) i want to call note-on on
another node to be fired exactly at the same time that the buffervalue i'm
writing (or about to write) would reach the soundcard. how would that work?

at least, that's what i understand i can do then...?


> An AudioProcessingEvent exposes the exact time of the audio to be generated in the sample stream as the "playbackTime" attribute.  Not that this makes callbacks any more useful as a source of exact timing, but it does mean that there is no need to keep track of time in separate variables.
>
>
Received on Thursday, 26 July 2012 14:56:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 July 2012 14:56:45 GMT