Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / readme.md
Last active October 18, 2024 13:16
THD+N calculator

Unfortunately, there are 2 versions of this. The other is here: https://github.com/endolith/waveform-analyzer I intend to either completely combine them or completely separate them, eventually.

Somewhat crude THD+N calculator in Python

Measures the total harmonic distortion plus noise (THD+N) for a given input signal, by guessing the fundamental frequency (finding the peak in the FFT), and notching it out in the frequency domain. This is a THDR