I could have sworn I made a thread asking in the past (many similar ones however), but it turns out I haven’t.
So after finding some renewed interest and efficacy in vanilla spectral moments, I was wondering if it was possible to translate the values from spectral moments into a filter that can be applied to a sound (and eventually in a similar way to the spectral compensation I’m currently doing with melbands, outlined in this thread).
Some of the moments translate quite readily and easily, notable centroid/spread, which @tremblap has a great example for in the fluid.spectralshape~
helpfile.
After experimenting with with @rolloffpercent 95
combined with @rolloffpercent 5
to capture the overall “low” and “high” range of the audio, and I can see that translating easily to a pair of highpass/lowpass filters.
Similarly, skewness could translate to a tilt filter, centered around the centroid.
Now this starts getting a bit more confusing if I try to think of how to combine those approaches (a notch filter for centroid/spread + a pair of highpass/lowpass filters to define edges + a tilt filter for skewness). I have combined the centroid/spread + skewness, and highpass/lowpass + skewness and they sound ok, though a tilt filter’s impact on the notch filter is minimal.
I did think that crest (“This is the ratio of the loudest magnitude over the RMS of the whole frame”) might be useful to determine how much a notch filter should “poke out” overtop of the spectrum, but I have no clue how it works when combining/cascading filters in this way.
Lastly, I have no clue of what to do with kurtosis/flatness, but I think I’m ok with that.
So that leaves me with this:
- Centroid - notch filter cutoff freq
- Spread - q of notch filter
- Skewness - tilt up or down (centered on centroid cutoff freq)
- Rolloffpercent(5) - highpass set to freq
- Rolloffpercent(95) - lowpass set to freq
- Crest - balance between notch (centroid/spread) and broadband (highpass/lowpass) filters(?)
///////////////////////////////////////////////////////
Any thoughts on how to turn those values into a functioning filter?