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.3 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 4F0591F62D for ; Sun, 8 Jul 2018 14:46:07 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fcAws-0003MS-Nr; Sun, 08 Jul 2018 14:46:02 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fcAwr-0003Lo-42 for sox-users@lists.sourceforge.net; Sun, 08 Jul 2018 14:46:01 +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=rBtLErMFURjBA1QAnpBahIFoTTPjijSMLg33inZguqY=; b=fZ/BFBfuy+kwyuoY9E6nhRoax xHgkDCdzOOvVkK17GZM3HQFU/kUE6YKtgwO1akMdLoRdGQQ1+6064obbPEYgF9/Sa9xozYBthgKZC ygMCTyr5A4zInk4UwG7e2kRDnKvE8qen4xB2eyKLqMlVEm7aT4pl2juwcAB30JUbl+bi0=; 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=rBtLErMFURjBA1QAnpBahIFoTTPjijSMLg33inZguqY=; b=MJlPIQdGNRIMaNk5D81WmAbQRY fqHdMkzQ/tNUBjA8DhaqqUJZ/2+I6SVZO4tF+FnXuJgkkMMHbMxxOCZE+AlR7LPWOEQQk9na4P6In tcAm3NLnPkM1VJ/BX2GlQDuvG9wt85sXrqOE95qYUZamqOomoJqMKnzAJnFfFsIjkUPM=; Received: from mail-ua0-f180.google.com ([209.85.217.180]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1fcAwp-00G5aq-CH for sox-users@lists.sourceforge.net; Sun, 08 Jul 2018 14:46:01 +0000 Received: by mail-ua0-f180.google.com with SMTP id r18-v6so10237560ual.13 for ; Sun, 08 Jul 2018 07:45:59 -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=rBtLErMFURjBA1QAnpBahIFoTTPjijSMLg33inZguqY=; b=CcA2unXpKX6A+8CZjEHiHLYLWJ9D+wfyRQkrmv88i/od1RwvD48PUeiDdS3ogMQLaB BTBGAAoPRKp82XJ05kGyXUGvHraEeVEUmvij9bixNAy9EALID9ab5ZKHfxgTZXPwUQfM vdQ5gPToDorL/C2BI8MEcMCHfgzSTZAJmRc0ThS23H1TQIye7FjnUtosV9ijRq8DsI7T XYJtnsuGzW68YXze9uT4M9M2p9CyPoAmza5mkOBaKJPLnDuJz43xpsm/TZL3drlwJt2q keoDm2sM5g8/hxSxuNGs0a4Ao8XXaOO7nnGBP5ikMEZQYQXwF3uDGtl9B8ka0LtH9ofq if2w== 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=rBtLErMFURjBA1QAnpBahIFoTTPjijSMLg33inZguqY=; b=s6PtTIAxPq2uVicTO+Xlm+08rTQXVnhS86eaTPntyk2I3HKybrekcSR6pYRHMqmMlR UQnL3jhk6oVcA1FX1o7i+9kjtVFOuvpH4fFxULIIIAcpivrix6GTk4wT5bzuAaBVLcj7 uw/+CclTK56FltCnM1dCAwx/PAYyMYlM7sd4nODDlPdEYWdSNW7I5UvMcFCb6QUee3Nq JmA1tUXbMG5Jnla/piNSn6xriBOp0uwg4ShvlnYnobWkJtEhhV37lSz53vEeFrJu/fVM ld8HRhOukNGXaaqF4PxmCR+zcW3Sam1e0ER0HE5J2oZ72vBJkCTc/p8fAXbnQVDjJY/M dRVQ== X-Gm-Message-State: APt69E1n4I6TR+i6vIuwCzcNTvACdDlsp8axWqrIIGvo7yN/l82nTM31 Me1plqxexRN0jUhRVnX7yB0Xg8SK9y2Z0MMGGD0Xhw== X-Google-Smtp-Source: AAOMgpfHRSaMMDBOiMZlBa+lreuuaLQ6yfYdJjkdmhK0mfk3O3i/Aa6btOK5y/NATNWm01xai62if9oKuL7bGuawvlE= X-Received: by 2002:ab0:2044:: with SMTP id g4-v6mr10683843ual.95.1531061153213; Sun, 08 Jul 2018 07:45:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:7c8b:0:0:0:0:0 with HTTP; Sun, 8 Jul 2018 07:45:52 -0700 (PDT) In-Reply-To: References: <109205cf6d76dd28724114e96149054e@wingsandbeaks.org.uk> From: James Trammell Date: Sun, 8 Jul 2018 10:45:52 -0400 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1fcAwp-00G5aq-CH 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="===============8165577630369531267==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============8165577630369531267== Content-Type: multipart/alternative; boundary="0000000000002ab16b05707df414" --0000000000002ab16b05707df414 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,tpd= f,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,m12dBFSr= ms,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=C3=A5ns Rullg=C3=A5rd wr= ote: > 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 multip= ly > >> 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 > --0000000000002ab16b05707df414 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
M=C3=A5ns,

Perhaps the follo= wing information will explain what I am seeing.

Fi= les


Stereo white noise created by SoX; a 24bit 96kHz file at = -12dBFS Peak and 10s duration, dithered with TPDF dither to 24 bits.
<= div>SoX invocation: "sox -V -b 24 -r 96000 -n sox,noise,white,stereo,2= 4b,96000Hz,m12dBFSpeak,tpdf,10s.wav synth 10 whitenoise whitenoise gain -12= dither"



Stereo white noi= se created by iZotope RX6; a 24bit 96kHz file at -12dBFS RMS and 10s durati= on, dithered with TPDF dither to 24 bits.



Screenshots


Brief RX6 analysis of the SoX fi= le; 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 le= vel is -10.24dBFS while the RMS level is -12dBFS.

=

=
An FYI shot of the RX6 dialog box to point out that it only allows amp= litude specifying as RMS; there is no way to enter a peak value.
=

=

An FYI shot to show that RX6 offers 4 flavors of white = noise. I chose white uniform for this exercise because that appears to matc= h what SoX produces. As a side question, it would be nice if someone here c= ould confirm what flavor of white noise SoX produces.

<= div>
To recap what I am trying to do, so that my original que= stion is not lost: I want SoX, ideally natively via some appropriate comman= d-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 - m= l 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.uk> writes:<= br> >
>>> 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-users@lists.sourcefo= rge.net
https://lists.sourceforge.net/lists/listi= nfo/sox-users

--0000000000002ab16b05707df414-- --===============8165577630369531267== 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 --===============8165577630369531267== 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 --===============8165577630369531267==--