What's Up With Audio Filter Defines?

When I was trying out Fett263’s new config helper I noticed the #define FILTER_CUTOFF_FREQUENCY 100 and #define FILTER_ORDER 8 as selections.

I noticed NoSloppy has those active in post regarding how he handles CONFIG_TOP. Are you all using these as a standard in your setups? Does this eliminate the need for high pass filtering (am I saying that right) through audacity to eliminate sound issues? And what is “filter order”?

Right now I’m adding these defines but don’t quite understand what’s up with them.

Read up a bit and want to check for understanding.

#define FILTER_CUTOFF_FREQUENCY 100 is an OS6 addition to allow most sounds to play clearly without needing to work on the font with Audacity, etc. It’s a highpass filter, meaning all sounds 100 Hz or above pass though and 99 or below are eliminated. In audio engineering terms those frequencies have been “attenuated” completely. Too much bass was blowing speakers and causing distortion.

The purpose is a higher filter order it to achieve more rapid attenuation.

Is that right?

Filter_order is the slop of the cutoff. I’ve never delved into how the numbers affect it though. I’d guess a higher number is a steeper cutoff.

1 Like

You both are exactly correct.
Filter order is the slope, or, rate of decline of the EQ curve below the set frequency.

“These defines enable a butterworth highpass filter with the given order and cutoff frequency. The idea is to remove frequencies that your speaker can’t reproduce anyways to put less stress on the speaker. The filter order defaults to 8. A reasonable cutoff frequency might be 100Hz. The filter does not affect I2C or S/PDIF output if enabled.”

1 Like

Have you had any issues with the filter affect sound performance? I can’t work out if it’s causing my audio to sound slightly distorted.

None. In contrast, it should alleviate distortion.

OK. Might just be the hilt struggling with venting.