Does web audio API support controlling the volume of each of stereo channels, left and right?

338 views Asked by At

I'm going to develop a JavaScript game which depends mainly on audio effects.

I made some searches on whether Web Audio API supports controlling the volume of both of stereo channels, left and right so that I can volume Up/Down one of them? I did not find any answers for my inquiry.

1

There are 1 answers

2
Raphael Serota On

It sounds like you just want a stereo panner node. That would be the simplest way to control volume in the left/right channels.

If for some reason you want more control over the individual channels, you can use a splitter node to turn the stereo signal into two mono signals, modify the mono signals individually, and then use a channel merger node to turn them back into a stereo signal.