From 8322a8ab79cd3a0653abfd787f6a101496587e74 Mon Sep 17 00:00:00 2001 From: gauthiier Date: Mon, 17 Aug 2015 10:26:17 +0200 Subject: [PATCH] oscillator safari compatibility --- synthesis/lib/hhhh.js | 2 +- synthesis/lib/yyyy.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/synthesis/lib/hhhh.js b/synthesis/lib/hhhh.js index d482065..dfcd12a 100644 --- a/synthesis/lib/hhhh.js +++ b/synthesis/lib/hhhh.js @@ -3,7 +3,7 @@ var modfactor = 750.0; var modfactor_gain = 10750.0; function create_none_synth() { - var s = new FMSynth('triangle', 100, 'saw', 2, 300); + var s = new FMSynth('triangle', 100, 'sawtooth', 2, 300); s.add_filter(new LowPassFilter()); s.update = function(val) { this.modulator_freq(val / modfactor); diff --git a/synthesis/lib/yyyy.js b/synthesis/lib/yyyy.js index ec863d8..5e63d44 100644 --- a/synthesis/lib/yyyy.js +++ b/synthesis/lib/yyyy.js @@ -40,8 +40,8 @@ function FMSynth(waveform_c, freq_c, waveform_m, freq_m, gain_m) { this.start = function() { if(!this.started) { - this.carrier.osc.start(); - this.modulator.osc.start(); + this.carrier.osc.start(0); + this.modulator.osc.start(0); this.started = true; } else { this.carrier.gain.gain.value = 1.0; @@ -78,7 +78,7 @@ function SimpleOscillator(waveform, freq) { this.start = function() { if(!this.started) { - this.oscillator.osc.start(); + this.oscillator.osc.start(0); this.started = true; } else { this.oscillator.gain.gain.value = 1.0;