grahamwhaley / DSPham

A Teensy based DSP audio processor
GNU General Public License v3.0
24 stars 7 forks source link

FIR: clipping: Fix FIR filters. Add clipping indicator #15

Closed grahamwhaley closed 3 years ago

grahamwhaley commented 3 years ago

When adding the 'FIR filter normalisation' for v1.2, it looks like I messed up, and made things worse. The primary 'visible' results from this were:

The core issue was some mismash of inherited code that meant we ended up with two notions of 'SAMPLE_RATE', and the wrong one (an index, not a value) ended up being used for the FIR evaluation, thus breaking it. Fix that by ensuring we now only have one idea of SAMPLE_RATE.

Whilst there, it seemed obvious that we already measured the input volume level with a peak meter, so why not use that to try and give a clear indication when we were clipping the input. Now when a clipped input is detected (too loud!), we show a '!' in the input volume slot for 0.5s to make it clear the input is too high.

Ultimately:

Mark this as release v1.2, as this is a reasonaly important 'fix' on the quality front.

Signed-off-by: Graham Whaley graham.whaley@gmail.com