endolith / waveform-analysis

Functions and scripts for analyzing waveforms, primarily audio. This is currently somewhat disorganized and unfinished.
MIT License
261 stars 83 forks source link

THD calculation #26

Closed williamszy closed 5 months ago

williamszy commented 6 months ago

THD = sum([abs(f[i*x]) for x in range(2, 15)]) / abs(f[i]) THD shall be the root-mean-square value of all harmonics?

endolith commented 6 months ago

Yes.… I don't know why it's like that. This is my most-starred repo and also the least trustworthy. 😳

ftab commented 5 months ago

@endolith this repo shows up near the top of a search for "python thd calculation", which is how I got here (feels like 95% of my job is knowing what to google on bing). Least trustworthy or not, it's apparently more useful/used than the alternatives. ;)

endolith commented 5 months ago

@ftab I know. 😑 I really need to spend some time cleaning it up.

ftab commented 5 months ago

I'm no good at math, but if you want me to do some busy work, I'd be happy to help!

endolith commented 5 months ago

I'm no good at math, but if you want me to do some busy work, I'd be happy to help!

The best thing you can do is bother me a lot so I prioritize it. 😬

Also if you see anything in the other Issues that you could fix or even comment on, that would be appreciated.