I'm trying to calculate the envelope of an arbitrary spectrum but I'm slightly lost as to the best way to do this.
I've looked at cepstral enveloping but its very fiddly and I can't seem to get it to give the right results. I've also tried LPC but again it eems to miss a lot of the minor peaks while enveloping the major peaks perfectly.
I'm beginning to wonder of the best way would be just to run a sliding window across each frequency bin in an FFT returned magnitude spectrum and select the maximum value within that window. This way I'd simply pull out all the peaks (at whatever granularity I'm after) and then I can simply plot a curve through the resulting points.
Is there a correct way to calculate the spectral envelope?