Re: normalizing clipping 32bit wav files?

Måns Rullgård <[email protected]> Wed, 24 May 2023 20:20:39 +0100
Newsgroups gmane.comp.audio.sox
Message-ID <[email protected]>
"Peter P." <[email protected]> writes:

> Hi Thomas, Måns, list,
>
> * Dr. Thomas Tensi <[email protected]> [2023-05-23 17:10]:
> [...]
>> I understand that this does not directly help Peter with his
>> problem.  But it means that at least for the effects
>> allpass, band, bandpass, bandreject, bass, biquad, compand,
>> equalizer, gain, highpass, lowpass, mcompand, overdrive,
>> phaser, reverb, treble and tremolo there is a reference
>> floating point implementation available as open-source.
> Thank you Thomas, this is amazing work!
>
>> And this implementation reproduces the command-line SoX
>> "bit-exactly" (with a residual noise of -150dBFS, as shown
>> in the documentation and the test cases), so you can be sure
>> that command-line processing and floating point VST
>> processing produce almost (!) the same audio.
>> 
>> So if somebody volunteered, a step towards a floating-point
>> SoX implementation would be not too complicated...
> For the issue I have brought up I would it be sufficient to only
> have the software part that reads in the file to not clip the values and
> apply the "gain" and/or "normalize" effects before converting to 32-bin
> integers for all the other effects. Not super elegant, but possibly
> more easier than changing all effects?

Unfortunately, that's much more easily said than done.  The conversion
happens as part of reading the file, before any effects have a chance to
touch the data, and different format handlers do it differently.  If it
were easy, I would have done it already.

-- 
Måns Rullgård