Some questions about JavaScriptNode

Hello!

I was recently wondering about a few aspects of JavascriptNode. I was wondering why, in Chrome Linux, every demo involving sound generated by a JavascriptNode was stuttering, e.g. [0]. It does look like the frequency of the stutter changes as the size of the node buffer changes, which seems to indicate that each silence is actually the time it takes to run the process code. Demos involving just reading from a wavetable don't seem to suffer from that. Of course a way around that would be to have an optimised oscillator node, which has been discussed before on this mailing list.

However, I am guessing (as the buffer size is set for each individual processing node) that there is no global buffer with multiple periods. Such a global buffer would mean the data is always generated slightly ahead of being outputted. If it is indeed the case (sorry, lots of assumptions here!) could it be the case that a model similar to jackd where a global buffer size (frames/period and periods/buffer) shared across all processing nodes could help with such artefacts?

Best,
y


[0] http://www.softsynth.com/webaudio/tone.php

Received on Monday, 19 March 2012 11:34:55 UTC