I'm working on a browser-based patching interface for Web Audio API synths. Frequency modulation (hooking an oscillator to the frequency of another oscillator) works as expected in Chrome. It should be a sci-fi sound like a 300Hz sin wave with the frequency wavering 30Hz.
In Safari (and Mobile Safari) it just sounds like a low rumble. It sounds like there is FM, but not the right base frequency. Is this just a browser quirk that will be ironed out in future versions? Is there a workaround now?
Here is the visual/interactive version:
http://forresto.github.com/dataflow-webaudio/
And the fiddle version, with the minimum code to demonstrate the effect:
http://jsfiddle.net/FVaWL/28/
var mod, modGain, osc;
var out = context.destination;
var startTest = function(){
mod = context.createOscillator();
mod.frequency.value = 8;
modGain = context.createGain();
modGain.gain.value = 30;
osc = context.createOscillator();
osc.frequency.value = 300;
mod.connect(modGain);
modGain.connect(osc.frequency);
osc.connect(out);
osc.start(0);
mod.start(0);
};
var stopTest = function(){
osc.stop(0);
mod.stop(0);
mod = modGain = osc = null;
};