Let [B1, B2, B3, B4, ... BN] be powers of five adjacent bins.
Put them in rank order
[R1, R2, R3, R4, ... RN]
If N is even, the rank order mean is (R_(N/2) + R_/(N/2 +1))*0.5.
If N is odd, the rank order mean is R_(N/2 +0.5)
Here the rank-order mean *is* the median: the quantile value for #quantiles = 2.
But I still see a problem:
I suggest that in order to prevent "scalloping" of a swept tone across this algorithm or any other like it, that some "bin" in the lossy compression set of bins must ALWAYS be forced to take on the large of the power spectrum otherwise your alternative min/max/min/max might jump up and down as you sweep a tone through it. Or did I miss something?
Most surely. Why not some kind of VQ-codebook based on deltas between successive frames? Apart from the amount of the research required to build it, of course...
Neural net fans invited to take this on also! ;-)
Frank