I tried to make the oscillator sound play in only one channel, and I could not get it to work.
I tried using the panner node to set the position of the sound, but it still plays in both channels, but not so loud in the more distant channel.
My last attempt tried using channel merging, but it still plays in both channels:
var audioContext = new webkitAudioContext(); var merger = audioContext.createChannelMerger(); merger.connect(audioContext.destination); var osc = audioContext.createOscillator(); osc.frequency.value = 500; osc.connect( merger, 0, 1 ); osc.start( audioContext.currentTime ); osc.stop( audioContext.currentTime + 2 );
How to create a generator that plays in only one channel?
Randy
source share