Re: normalizing clipping 32bit wav files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Måns Rullgård <mans@xxxxxxxxx> [2023-05-23 15:17]:
[...]
> > If I understand it correctly, SoX is using (at least) 32bit floating
> > point numbers internally, no?
> 
> SoX uses 32-bit integers internally, although some effects use
> floating-point in their calculations.
All clear.
 
> > I think we do not need a command line option to scale the input by a
> > certain factor, we have the "norm" and "gain" effects to do that. Do
> > you know where the clipping of values outside of -1 and 1 happens for
> > 32bit input files? Does it happen when SoX reads the file, or when it
> > applies an effect, or when it writes a file?
> 
> In this case, the clipping happens when the samples are read from the
> file and converted to 32-bit integers.
I see.
 
> Changing any of this would be a lot of work only for the sake of
> "supporting" a certain type of invalid file.  What is the origin of
> your bad files?  Can't you fix the problem there?
To me, and possibly many others, the possibility to write amplitudes
outside of the range that will be clipped by the DAC is a big plus.
It can be used to compensate for errors that you'd otherwise be unable to
correct. Excess levels can take place during various offline processing
of soundfiles, for example using the CDP (Composer's Desktop Project)
programs, or digital sound synthesis. Of yourse you can say "correct the
mistakes there", but this is missing the point of making SoX even
better, and make it support features that other programs (Audacity)
handle well, eg. reading these files without clipping and allowing to
rescale amplitudes to more sane ranges then.

best, Peter


_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux