sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jeff Learman <jjlearman@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: Re: 32 bit float truncated to 24 bit int with no parameters
Date: Wed, 30 Nov 2022 15:03:11 -0500	[thread overview]
Message-ID: <CAGyjer6EhCq-z9eVqyiJ1Kvwf_xSUB-y1absw=E245j68Xqjgg@mail.gmail.com> (raw)
In-Reply-To: <yw1xiljhzlf5.fsf@mansr.com>


[-- Attachment #1.1: Type: text/plain, Size: 1469 bytes --]

For most practical purposes, the difference isn't very significant.
Obviously, any recorded tracks have at most 24 bits of precision and only
at the maximum levels.  (Even then, the bottom 4 of the 24 bits is just
random noise, intentionally.)

However, if the 32-bit file was the result of earlier processing (e.g.,
multi-track mixing but without normalizing), and if the file isn't
normalized and the maximum level is very low, then you'd lose precision
when doing any further processing or when sending to an audio interface
(and bringing the volume up digitally.)

For example, if you have a mix of many tracks that was saved as 32-bit
float, but with maximum level of say -24dBFS, and use SoX to discard all
but a relatively quiet passage, and then amplify that passage (e.g.,
normalize it), you'd lose detail that was in the original recording.
However, if  you'd normalized that mix before saving it, then you'd lose
very little when processing with SoX.

Another example where you'd lose some audio quality is when using a dynamic
range compressor algorithm, for the same reason as selecting a quiet
passage as mentioned above.

So, you'd not want to use SoX for normalization or substantial dynamic
range compression.

This was interesting to me to learn.  It's a minor limitation of SoX, but
one to keep in mind.  I use SoX as the last step or two, when preparing
note samples for sampled musical instruments, so this isn't significant for
my purposes.

Jeff

[-- Attachment #1.2: Type: text/html, Size: 1698 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

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

      reply	other threads:[~2022-11-30 20:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-13  3:45 32 bit float truncated to 24 bit int with no parameters Sean Hurley
2022-09-13  9:14 ` Thomas Förster
2022-09-14 18:07   ` Sean Hurley
2022-11-08 22:03 ` Jan Stary
2022-11-09 14:54 ` Måns Rullgård
2022-11-09 23:22   ` Sergei Steshenko via Sox-users
2022-11-14 13:59     ` Måns Rullgård
2022-11-30 20:03       ` Jeff Learman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGyjer6EhCq-z9eVqyiJ1Kvwf_xSUB-y1absw=E245j68Xqjgg@mail.gmail.com' \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).