Setting volume to or muting only individual audio channels

Godot Version

Godot 4.2.2 stable Mono

Question

For research purposes I’d like to silence only one channel in the master stereo output for some time which signals a negative stimulus to players, for example the left ear.

At the moment, I could achieve it for ambient sound by turning on/off some AudioStreamPlayer3D sources which are located around the player head but this will be much more difficult for other audio stream players.

Is this something that can be easily implemented in Godot right now? Having a switch in AudioStreamPlayer3Ds to send Audio to only one channel would be easy enough. Or maybe there is an effect which can turn off one channel?

There is an audio effect that you can use, the Panner:

the pan controls the volume for both chanels (-1 = only left, 1 = only right, 0 = stereo). If you need independent control over the volume of each channel, you might need to code this yourself, but this should not be too difficult.

1 Like

Thank you. If I had the time, I’d try it out. The deadline is very close so I am ticking your answer as solution :slight_smile: