Re: Sample-accurate JS output (was: scheduling subgraphs)

On Tue, Oct 19, 2010 at 7:43 AM, Joe Turner <joe@oampo.co.uk> wrote:
>
> I think partly my point is that the native-scheduler concept is almost
> already a part of the spec.  You can specify a time for noteOn
> playback, which is essentially a native scheduler.  If this can be
> made more generic and accessed from JavaScript (assuming this is
> technically feasible) then noteOn, and sub-graph scheduling should be
> almost trivial to implement on top of it.  I think maybe I'm missing
> some of the subtleties how noteOn style scheduling might apply to
> other AudioSourceNodes though.  Is there anything which I should have
> read on this?
>
> Joe


Hi Joe,

Yes, the idea with noteOn() and noteOff() is that they can be scheduled at
exact times.  Any more complex notion of scheduling sub-graphs or
implementing sequencers can be done in JavaScript.  We've also been
discussing the idea of AudioCurves for automation, modulation, envelopes,
etc.  which also could be attached to parameters and scheduled to happen at
exact times.  But this hasn't yet been written up in the spec.

As far as doing the audio DSP directly in JavaScript, the
JavaScriptAudioNode does this.  As Joseph Berkovitz points out, it needs a
"playbackTime" attribute so that this can be synchronized with the rest of
the audio graph.

Chris

Received on Tuesday, 19 October 2010 20:35:55 UTC