Hi -
Unfortunately, I have ripped a substantial number of my CDs to FLAC format with volume normalization enabled. For classical music, this causes the noise floor to change noticably between tracks, which I find noisome.
So, I'd like to reverse the normalization. But, I haven't found a utility to accomplish this. If I proceed and write one, shouldn't it be possible to open the FLAC, parse the audio information into a buffer and calculate the minimum amplitude value within the buffer and use that as a scalar value to be subtracted from each sample within the buffer to effectively denormalize back to zero?
To elaborate, here's why I think it should be possible:
During the normalization process, the track is scanned in its entirety to determine the maximum amplitude present - call this Tmax. The maximum amplitude that a 16-bit Redbook track can contain is 2^16 or 65535 - call this RBmax. One only needs to add the scalar value of (RBmax-TMax) to each sample in the track to effect the normalization. Isn't this correct?
To undo this process, why couldn't I scan the track to determine the minimum amplitude present - call this Tmin. I should only need to subtract the scalar value of (Tmin) from each sample in the track to effect the denormalization.
What's wrong with this approach?
Thanks,
Jim
