I'm attempting to apply a low-pass filter to a sound I load and play through SoundJS.
Right now I'm attempting to do this like this:
var audio = createjs.Sound.activePlugin;
var source = audio.context.createBufferSource();
// Create the filter
var filter = audio.context.createBiquadFilter();
// Create the audio graph.
source.connect(filter);
filter.connect(audio.context.destination);
// Create and specify parameters for the low-pass filter.
filter.type = 0; // Low-pass filter. See BiquadFilterNode docs
filter.frequency.value = 440; // Set cutoff to 440 HZ
// Playback the sound.
createjs.Sound.play("Song");
But I'm not having much luck. Could someone point me in the right direction?
Thanks