I am wondering if there's any way to calculate harmonic series from an audio, because I want to calculate the brightness.
For example, I want the sum of (100*1 + 200*2 + 400*4...)
I am thinking of something like this.
Load audio from librosa first, then get the y
from the (y, sr) = librosa.load(audio file).
But I have no idea how to calculate harmonic series in Python.
By the way, there is some uncertainty about how to do the sum.
----- Edit
This is from a paper talking about a model called MIDI-DDSP. Here is the section I can't understand.
Brightness is defined as the spectral centroid (in bin numbers) of the harmonic distribution, where hk(i) represents the k-th bin of the harmonic distribution, h(τ) in the i-th time-step, and we use |h| to refer to the number of bins in the harmonic distribution used by the DDSP module (we use |h| = 60, see Appendix B.2).
Hope someone can help me, and give me suggestion.