You're right, applying this sound filter for the first time felt like finding the final piece of the puzzle. I spent half an hour just jumping back and forth between dimensions :D
The type of filter itself is one of many that are included in the gamedev software that I use (Construct 3). Once the condition if fulfilled, the filter is applied.
My friend -- he's an amateur musician and wrote the music for this game -- told me that what I'm looking for is called a low-pass filter, and also gave me a few pointers on how to configure the parameters (frequency, detune, etc.). I fiddled about with it until I got a satisfactory result.