Comment 21 for bug 976650

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I opted for not removing the 0.5 gain because removing it caused clipping on many of my tracks at unity gain (no gain applied at all). I haven't dug into the history but I thought this was added when we added RG. It seems to have been hiding that we are causing clipping without any gain adjustments on a track (which shouldn't be the case if we just decode a track and play it). Instead I adjusted the waveform gain to compensate for that fixed gain.

As a minor performance optimization since we are now max()'ing instead of summing squares it suffices to take the max of fabs() without the squaring and then apply the square only to the max value of the stride in scaleSignal(). Owen -- I think your pow 0.316 works nicely for the high band. For the low and mid I think 0.5 works best. Since this is just sqrt it works out to a no-op for the mid/low/all bands so that makes the analysis even faster.

I'm committing your patch w/ my changes now. I think it looks nice for now and we can always iterate on this since the analyses are now versioned (so we have the ability to update and people's versions of Mixxx will automatically generate the latest version of our waveforms).

Thanks for looking into this!