"Wave Stats" plug-in

Share your Audacity/Nyquist plug-ins here, or test drive the latest plug-ins submitted by Audacity users.

After testing a plug-in from this forum, please post feedback for the plug-in author.

Re: "Wave Stats" plug-in

Permanent link to this post Posted by steve » Sat Jan 22, 2011 7:51 pm

Try this:
wave-info.ny
"Wave Info" Analysis plug-in.
(2.14 KiB) Downloaded 295 times

After installing and restarting Audacity it will appear in the "Analyze" menu as "Wave Info..."

You may want to check the accuracy of the results against the "Wave Stats" plug-in.
Data from the "Debug" window can be copied and pasted into other applications.
Read all of the text in the plug-in carefully.
If you have comments/questions please post them here.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 34913
Joined: Sat Dec 01, 2007 11:43 am

Re: "Wave Stats" plug-in

Permanent link to this post Posted by orcamad » Sun Jan 23, 2011 2:27 pm

Thanks so much Steve it works perfectly!!!
orcamad
 
Posts: 11
Joined: Tue Dec 21, 2010 2:38 pm

Re: "Wave Stats" plug-in

Permanent link to this post Posted by Storer » Mon Jan 24, 2011 9:11 pm

Interesting use of the debug output, Steve. I may borrow that idea for some of the stuff I'm working on.

Dave
Storer
 
Posts: 91
Joined: Wed Mar 04, 2009 8:02 pm

Re: "Wave Stats" plug-in

Permanent link to this post Posted by vpd » Wed Apr 16, 2014 8:20 am

Just sharing my edition of the wave stats plugin that meets my criteria...
Thank you Steve for the original plugin!

Changes in this version:
1) Automatically sets the selection time and truncates it to 20 seconds if it exeeds.
2) A-weighted RMS calculation replaced with linear RMS (percentage).
3) Decimal precision set to 2 places.

File:
stats.ny
(1.88 KiB) Downloaded 45 times
vpd
 
Posts: 36
Joined: Tue Feb 26, 2013 4:28 pm

Re: "Wave Stats" plug-in

Permanent link to this post Posted by steve » Wed Apr 16, 2014 3:23 pm

Thanks vpd. Nice to see someone modifying the plug-in to suit their needs. That's one of the great things about Nyquist plug-ins :D

Your code works fine.
A couple of notes from a programming perspective that may be useful for you (or disregard if not ;))

Code: Select all
(setq selected (/ len *sound-srate*))
(setq time (min 20 (max 0 selected))) ; 0 < time < 20

(setq bignum (truncate (* time *sound-srate*)))
(setq step (truncate (min bignum LEN))) ; 'peak' requires blocksize and stepsize as integers

As there is no duration control in this version, this code can be simplified:
Code: Select all
(setq time 20)
(setq bignum (truncate (* time *sound-srate*)))
(setq step (truncate (min LEN bignum)))

In fact it could be simplified into one line, but as we need "bignum" and "time" later on for the messages they may as well all be set here.


Code: Select all
(defun s-rms (s-in)
   (linear-to-dB (sqrt (peak (snd-avg (mult s-in s-in) step step OP-AVERAGE) bignum))))

(defun x-rms (s-in)
  (* (sqrt (peak (snd-avg (mult s-in s-in) step step OP-AVERAGE) bignum)) 100))

We don't really need to calculate the rms level twice (although it really makes very little difference in this case because we are only processing a few seconds of audio).
We could just calculate the rms once as a linear value:

Code: Select all
(defun s-rms (s-in)
   (sqrt (peak (snd-avg (mult s-in s-in) step step OP-AVERAGE) bignum)))

(setq rms-lin (s-rms s-in))

Then convert to dB or % as required.
Code: Select all
(print (linear-to-db rms-lin))
(print (* rms-lin 100))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 34913
Joined: Sat Dec 01, 2007 11:43 am

Re: "Wave Stats" plug-in

Permanent link to this post Posted by NilsOstergren » Mon Jun 16, 2014 10:31 am

Hi Steve!

Thanks for Wave Info! I do voice overs and may in some cases have to deliver sound files with a specified "LKFS". From what I understand thats is almost equivalent with LUFS and average RMS power.

Please be patient with my inexperinece :) but will Wave Info give me the true average RMS when analyzing a two minute recording with both loud laughter and almost silent whispering?
NilsOstergren
 
Posts: 2
Joined: Mon Jun 16, 2014 9:26 am

Re: "Wave Stats" plug-in

Permanent link to this post Posted by steve » Mon Jun 16, 2014 3:01 pm

The "Wave Stats..." plug-in (file name "stats.ny" posted here: viewtopic.php?p=99454#p99454) is limited to analyzing 30 seconds of audio.
The "RMS" measure is true RMS (unweighted / Zero Weighted / Z-Weighted) relative to full scale (0 dB) for the entire selection OR 30 seconds, whichever is the shorter.

ITU-R BS.1770-2 (March 2011) brought LKFS in line with LUFS (as defined in EBU R128 August 2010), so that after March 2011 both units are identical.

The "EBU R 128 - 2014" specification is available here: https://tech.ebu.ch/docs/r/r128.pdf
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 34913
Joined: Sat Dec 01, 2007 11:43 am

Re: "Wave Stats" plug-in

Permanent link to this post Posted by NilsOstergren » Mon Jun 16, 2014 10:30 pm

OK, thanks! I used wave-info.ny posted here viewtopic.php?f=42&t=38134&start=20#p125928

So to get the average RMS for a two minute recording I guess I can copy the file, calculate 30 seconds, delete the 30 seconds, calculate the next 30 seconds, delete and so on until the end.

Interesting pdf! I have worked in broadcasting many years but never thought of that part of EBUs work.
NilsOstergren
 
Posts: 2
Joined: Mon Jun 16, 2014 9:26 am

Re: "Wave Stats" plug-in

Permanent link to this post Posted by ManuLM » Thu Jul 03, 2014 3:59 am

Pretty sweet pluggin, thanks.

I did run the pluggin, and there is one minor aspect that I do not understand, as well as one improvement suggestion.

- I generated a full scale sine wave (generate, tone, sine, frequency 1000, amplitude 1). I process 10s of audio samples through the wave stats pluggin.
Results reported:
peaks all at 0dBFS as expected
DC 0% also expected
RMS value at -3dBFS, okay
RMS (A-Weighted) at -6.6dBFS ???, this I do not understand.
A-Weighting is supposed to be precisely centered around 1K, so why 3.3dB less after A filtering ?
I checked the spectrum of the generated signal, it looked relatively clean.

- improvement: it would be sooooo conveninent to just be able to copy and paste the output of the analysis :P
ManuLM
 
Posts: 5
Joined: Thu Jul 03, 2014 3:34 am

Re: "Wave Stats" plug-in

Permanent link to this post Posted by ManuLM » Thu Jul 03, 2014 6:02 am

Some more on this:
- I redid the experiment sucessfully when using 44100Hz. RMS Aw reads -3dBFS sharp.
- The root cause is that I was running the previous project under 8000KHz. Reading the frequency analysis, the sine is then not so clean. I guess probably an issue with the tone generation (this has been a bug for a while on Audition also...)
ManuLM
 
Posts: 5
Joined: Thu Jul 03, 2014 3:34 am

PreviousNext

Return to New Plug-Ins



Who is online

Users browsing this forum: No registered users and 2 guests