From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A03A21F62D for ; Sun, 8 Jul 2018 15:39:30 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fcBmX-0004UK-VO; Sun, 08 Jul 2018 15:39:25 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fcBmX-0004UE-9C for sox-users@lists.sourceforge.net; Sun, 08 Jul 2018 15:39:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=n9LrJmQJHwgIZ7S51Eo7QyrQWojA83GkJWQd32DNt4M=; b=KqtIahit2pFpGGBfK8p/BtKB6 VPMSEu/Puk/+r8HGA+XWigj0LxDFdmR2GFyw+w5MUgInJBwVyUkgZRVUs++uSli3bDRZekSTtjKKp IDTKSyagKRjtDO/eA0/0p3X8DSPtLGzJ+hk22PMgxNF1yDt7iNLdfMtKSpaCYRS+bO6vQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:References:In-Reply-To: MIME-Version:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=n9LrJmQJHwgIZ7S51Eo7QyrQWojA83GkJWQd32DNt4M=; b=myh0XKaPVzNu8+IcbUHeN8GipK sarbIky9yXqBOiW/+DIJCqF7oKZv4VdqHFDYx4O0V4cFAbwYp88xpyMqKwJTTtSPYMOVY2xoKVKa9 4xlGEzYRngUxoPYZdjfcZ9bme5h1+0Gi0LyuCVbAAH8Kl7mr27ev1DhsEBk2o2l93jcs=; Received: from mail-lj1-f182.google.com ([209.85.208.182]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1fcBmV-003RxB-55 for sox-users@lists.sourceforge.net; Sun, 08 Jul 2018 15:39:25 +0000 Received: by mail-lj1-f182.google.com with SMTP id c12-v6so12307959ljj.1 for ; Sun, 08 Jul 2018 08:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=n9LrJmQJHwgIZ7S51Eo7QyrQWojA83GkJWQd32DNt4M=; b=l1X1GSocjF9HvWVL6DHyv0WxdI4x6XcPIkdJtNcVohQKt598HQ5+ANwSghl69Pwial UE5o48akWS31tX3Vfn6wkfC925Zd5BnqiIojCvVMicav0egk92aZkmRfxP63SE7H+Can y8IZZxmzDNvDZ0M7bVTnMa0ibzXmZJE3PmpKDdAcnau/mHZs6MkKrBnAqbxkwq/P11Hn 1W2YAZJsoMFGjcj3mg3tQ2tP99hUMgfxrpExPJh62ZrNClkVnm3ftscurB76BNqLhPOV JxXsNHW0iOhWJnVB/2KRVxugGUQiVJSSzwn6HPDAPoYcotaPK2qXwdYeOYdpapxBIIZl chUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=n9LrJmQJHwgIZ7S51Eo7QyrQWojA83GkJWQd32DNt4M=; b=OcUjr8GyPwaxtzEYXkZ68RvA4yhWCD9TPiER+Q+ljMCqzW3tI/n9SifbtKWOb7YLG+ WNi6LO319S8XDiu3vEMbFRNRMafg55XDKqBXBP7jaGkB/nJrHeermvB2fGRjLEK7lpo2 ZxVpbd2ExJlO15FMZaeNFdl1SV7LogIOlJvXspjNIO/BnCT5h4pr3b1DUC107tXXeXQ0 XdXUbtLWwzt8rCC8iwMq62OYFwp11e4C/50irj58r63l/BF2WNL1Ff8ZLS+m570lwS3v R0qXoZHUCce0CaN61fWXjXB9FMMkta2VazuiKFHtpFnH3ZTp1n2Iolx4Pxbw0mUrJ1Et cV7w== X-Gm-Message-State: APt69E1uBWer1LSKhDirN9sa6+SCJm6FTgH8aKn4KDu7fk15dp7gAKye QHtBN0YxPuiA+GV10R7mvIcwCPbfWc4rDRxFIya7sQ== X-Google-Smtp-Source: AAOMgpc7/G4efr62+xD3FJmax7ltASgKMnjJVVnAyHDeYI57c1s71tJW6HtIssfcnbsiWpyJz8b5WBFzz/Uw3Y/kmyM= X-Received: by 2002:a2e:6a04:: with SMTP id f4-v6mr11102838ljc.109.1531064355953; Sun, 08 Jul 2018 08:39:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:5701:0:0:0:0:0 with HTTP; Sun, 8 Jul 2018 08:39:15 -0700 (PDT) In-Reply-To: References: <109205cf6d76dd28724114e96149054e@wingsandbeaks.org.uk> From: Mikko Olkkonen Date: Sun, 8 Jul 2018 18:39:15 +0300 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1fcBmV-003RxB-55 Subject: Re: Creating files with RMS gain level instead of Peak X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Type: multipart/mixed; boundary="===============6636193905713735991==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============6636193905713735991== Content-Type: multipart/alternative; boundary="00000000000010a3f705707eb3f0" --00000000000010a3f705707eb3f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 wrote: > M=C3=A5ns, > > 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 whil= e > 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=C3=A5ns Rullg=C3=A5rd = wrote: > >> Jeremy Nicoll - ml sox users writes: >> >> > On 2018-07-07 21:47, M=C3=A5ns Rullg=C3=A5rd wrote: >> >> Jeremy Nicoll - ml sox users >> 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=C3=A5ns Rullg=C3=A5rd >> >> ------------------------------------------------------------ >> ------------------ >> 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 > > --00000000000010a3f705707eb3f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
1. according to sox stats effect: your sox file has p= eak 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 discrepa= ncies between your screenshots and rms level figures reported by sox.
=
I would abandon rx in the process and use the method I described earli= er. 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 r= ms lev db.
You could be additionally able to eliminate the discre= pancy described above by altering the RMS calculation methods in the rx pre= ferences. I guess in your current setup it calculates RMS level in a "= nonstandard way".

>As a side qu= estion, 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 swi= tch,=20 to output a white noise file with a specific RMS amplitude.=C2=A0
=
Yes, that could be nice feature. But I suppose you can easility genera= te desired RMS level db with sox by using my magic number 4.77 (or other nu= mber if you use your current RMS calculation standard).
br, M= ikko




On Sun, Jul 8, 2018 at 5:45 PM,= James Trammell <james.trammell@gmail.com> wrote:
=
M=C3=A5ns,
<= br>
Perhaps the following information will explain what I am seei= ng.

Files


Stereo white noise created by SoX; a 24bit 96kHz file at -12dBFS Pea= k and 10s duration, dithered with TPDF dither to 24 bits.
SoX inv= ocation: "sox -V -b 24 -r 96000 -n sox,noise,white,stereo,24b,960= 00Hz,m12dBFSpeak,tpdf,10s.wav synth 10 whitenoise whitenoise gain -12 = dither"



Stereo white noise created by iZotope RX6; a 24bit 96kHz fi= le 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.






An FYI= shot to show that RX6 offers 4 flavors of white noise. I chose white unifo= rm 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 o= f white noise SoX produces.


To reca= p 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.=C2=A0

=

Thanks.


On Sun, Jul 8, 2018 at 8:39 AM, M=C3=A5ns Rullg=C3=A5rd <mans@mansr.com= > wrote:
Jeremy Nicoll - = ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk> writes:

> On 2018-07-07 21:47, M=C3=A5ns Rullg=C3=A5rd wrote:
>> Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.u= k> writes:
>
>>> Yes.=C2=A0 So does that mean that the OP should use something = like the
>>> 'stat' effect to find out the peak RMS level of the au= dio 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.=C2=A0 It adjusts both RMS = and peak
>> values by the same amount because that is what happens when you mu= ltiply
>> 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.=C2=A0 If he's previously done that in terms of a pr= e-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.=C2=A0 Th= e answer
is that RMS gain is equal to peak gain, so "gain -12" will perfor= m the
desired function.=C2=A0 If the question were how much gain to apply in orde= r
to obtain a specific RMS level, then of course the initial value would
have to be known.

--
M=C3=A5ns Rullg=C3=A5rd

-----------------------------------------------------------------= -------------
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-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listi= nfo/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.sourcefo= rge.net
https://lists.sourceforge.net/lists/listi= nfo/sox-users


--00000000000010a3f705707eb3f0-- --===============6636193905713735991== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============6636193905713735991== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============6636193905713735991==--