Low pass filter with Sound

I’d like to run a low pass filter ( BiquadFilterNode) when the distance between the camera and the mesh playing is above a certain value. To start here is an example: Babylon.js Playground

Any suggestion?

Pinging @sebavan.

I guess in this case you will manually need to go in the audio context to add some more nodes dynamically between your input and output one when above the threshold.

You could use connectToSoundTrackAudioNode from the sound to add more node in between and connect the output to masterGain on the audioEngine.

1 Like

Thank you @sebavan . I am not sure I am making it right in https://playground.babylonjs.com/#FRYXXZ#9 since when I connect the sound disappear.

You need to also connect the ouput to the master gain of the audio engine:

https://playground.babylonjs.com/#FRYXXZ#11

1 Like