sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Mikko Olkkonen <molkko@gmail.com>
To: sox-users@lists.sourceforge.net
Subject: Re: Creating files with RMS gain level instead of Peak
Date: Sun, 8 Jul 2018 18:39:15 +0300	[thread overview]
Message-ID: <CANWtmUARLUMS0z+1avJe67sKh_5gJWCu0+yjfhKrjAbg4HQ42g@mail.gmail.com> (raw)
In-Reply-To: <CAB0xix5PLnBKrX0No-suQqF_mkMuSnpmk7J_SjErS8SrTbPf0Q@mail.gmail.com>


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

1. according to sox stats effect: your sox file has peak lev db -12 and rms
lev db -16.77. Same result when I generate the file with your command.
2. according to sox stats effect your rx6 file has rms lev db -15.02 (not
-12).
That is, there are discrepancies between your screenshots and rms level
figures reported by sox.
I would abandon rx in the process and use the method I described earlier.
If you want to reach -12 rms (as reported by the rx) you should be able to
easily alter the gain in your sox command until you reach desired -12 rms
lev db.
You could be additionally able to eliminate the discrepancy described above
by altering the RMS calculation methods in the rx preferences. I guess in
your current setup it calculates RMS level in a "nonstandard way".

>As a side question, it would be nice if someone here could confirm what
flavor of white noise SoX produces.
Yes, I can confirm that your command in my environment delivers _uniform_
type of white noise.

>I want SoX, ideally natively via some appropriate command-line switch, to
output a white noise file with a specific RMS amplitude.
Yes, that could be nice feature. But I suppose you can easility generate
desired RMS level db with sox by using my magic number 4.77 (or other
number if you use your current RMS calculation standard).
br, Mikko




On Sun, Jul 8, 2018 at 5:45 PM, James Trammell <james.trammell@gmail.com>
wrote:

> Måns,
>
> Perhaps the following information will explain what I am seeing.
>
> Files
>
> 1. http://substrate.com/rms/sox,noise,white,stereo,24b,
> 96000Hz,m12dBFSpeak,tpdf,10s.wav
>
> Stereo white noise created by SoX; a 24bit 96kHz file at -12dBFS Peak and
> 10s duration, dithered with TPDF dither to 24 bits.
> SoX invocation: "sox -V -b 24 -r 96000 -n sox,noise,white,stereo,24b,
> 96000Hz,m12dBFSpeak,tpdf,10s.wav synth 10 whitenoise whitenoise gain -12
> dither"
>
>
> 2. http://substrate.com/rms/rx6,noise,whiteuniform,stereo,24b,
> 96000Hz,m12dBFSrms,tpdf,10s.wav
>
> Stereo white noise created by iZotope RX6; a 24bit 96kHz file at -12dBFS
> RMS and 10s duration, dithered with TPDF dither to 24 bits.
>
>
>
> Screenshots
>
> 3. http://substrate.com/rms/filestats_sox.png
>
> Brief RX6 analysis of the SoX file; notice the peak level is -12dBFS while
> the RMS level is -13.76dBFS.
>
>
> 4. http://substrate.com/rms/filestats_rx6.png
>
> Brief RX6 analysis of the RX6 file; notice the peak level is -10.24dBFS
> while the RMS level is -12dBFS.
>
>
> 5. http://substrate.com/rms/rx6_whiteuniform.png
>
> An FYI shot of the RX6 dialog box to point out that it only allows
> amplitude specifying as RMS; there is no way to enter a peak value.
>
>
> 6. http://substrate.com/rms/rx6_whitechoices.png
>
> An FYI shot to show that RX6 offers 4 flavors of white noise. I chose
> white uniform for this exercise because that appears to match what SoX
> produces. As a side question, it would be nice if someone here could
> confirm what flavor of white noise SoX produces.
>
>
> To recap what I am trying to do, so that my original question is not lost:
> I want SoX, ideally natively via some appropriate command-line switch, to
> output a white noise file with a specific RMS amplitude.
>
>
> Thanks.
>
>
> On Sun, Jul 8, 2018 at 8:39 AM, Måns Rullgård <mans@mansr.com> wrote:
>
>> Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk> writes:
>>
>> > On 2018-07-07 21:47, Måns Rullgård wrote:
>> >> Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>
>> writes:
>> >
>> >>> Yes.  So does that mean that the OP should use something like the
>> >>> 'stat' effect to find out the peak RMS level of the audio file,
>> >>> then work out how much gain or attenuation is needed, then use
>> >>> a 'gain' effect with that calculated value?
>> >
>> >> No, he should just use the gain effect.  It adjusts both RMS and peak
>> >> values by the same amount because that is what happens when you
>> multiply
>> >> each sample by a fixed amount, which is what the gain effect does.
>> >
>> > Yes, I understand that gain is gain, but he has to decide how much
>> > gain to apply.  If he's previously done that in terms of a pre-gain
>> > peak level, but now wants to bring RMS levels to a certain point,
>> > he surely has to find out what the file's RMS levels are first
>> > then decide how much to modify it by?
>>
>> The question posed was how to obtain an RMS gain of -12 dB.  The answer
>> is that RMS gain is equal to peak gain, so "gain -12" will perform the
>> desired function.  If the question were how much gain to apply in order
>> to obtain a specific RMS level, then of course the initial value would
>> have to be known.
>>
>> --
>> Måns Rullgård
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Sox-users mailing list
>> Sox-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sox-users
>>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>
>

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

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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- 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:[~2018-07-08 15:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-07 15:05 Creating files with RMS gain level instead of Peak James Trammell
2018-07-07 17:25 ` Jeremy Nicoll - ml sox users
2018-07-07 18:19   ` Måns Rullgård
2018-07-07 19:52     ` Jeremy Nicoll - ml sox users
2018-07-07 20:47       ` Måns Rullgård
2018-07-07 20:58         ` Jeremy Nicoll - ml sox users
2018-07-08 12:39           ` Måns Rullgård
2018-07-08 13:36             ` Mikko Olkkonen
2018-07-08 14:45             ` James Trammell
2018-07-08 15:39               ` Mikko Olkkonen [this message]
2018-07-08 16:21               ` Måns Rullgård

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=CANWtmUARLUMS0z+1avJe67sKh_5gJWCu0+yjfhKrjAbg4HQ42g@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).