Re: JavaScriptNode Tone Generation

> But the API should be simplified for the output-only case, such as you're doing here.  Because in your case you're not processing audio, but synthesizing (generating) it, it's *currently* necessary to connect a "dummy" source to the JavaScriptAudioNode.  Then in your callback, you're basically ignoring the audio input, since you're synthesizing instead of processing.
> Ideally, we would be able to specify in the createJavaScriptNode() call that we're not interested in any input and only want to have an output.  Then we wouldn't need to connect a "dummy" source.  This is something which should be improved in the API, but I simply haven't yet had time to do it. But, in the mean-time the work-around of connecting a dummy source (although clunky) will achieve the same effect.

I have made the same point in the past and I feel that once the dummy source is removed, we will have a very elegant means of creating simple sources like this.  As Al says, think of the event as originating from from the context's "need for data", rather than from an imaginary source.

... .  .    .       Joe

Joe Berkovitz
Noteflight LLC
84 Hamilton St, Cambridge, MA 02139
phone: +1 978 314 6271

Received on Friday, 22 April 2011 12:45:32 UTC