Old 05-29-2014, 08:22 AM   #1
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default EBU R128 Loudness Measurement JSFX

Hi,

so finally I did it during a rainy day: the EBU R128 JSFX library (+ small test script)

You will get:

- all in one EBR128 Loudness Measurement Class
- passes all stereo sample files from "EBU Loudness test set - v03 - 15 Sep 2011" including multichannel
- including class for prefiltering according ITU Filter settings
- including class for measuring Momentary/Shortterm Loudness
- including class for measuring Integrated Loudness (currently 1 hour max)
- including class for measuring Loudness Range (currently 1 hour max)
- including class for measuring TruePeak based on BSpline Interpolation (4xOverSampling)

... and as a goody a small memory manager class, qsort and bspline functions

Of course the library is far from being perfect and highly optimized, some stuff is simply left for debugging purpose:-)

So feel free to use it and let me know what you think. (corrections are always welcome)

And finally please download EBU R128 JSFX here (Pls. scroll down)

Changelog
1.0: First public release
1.1: Changed of usage of Memory Manager, Write automation data
1.2: Added TimerClass to control update of display and automation data more precisely
1.3: Rearrangement of includes
1.4: Increased precision, Multichannel Support, reduced number of ext libraries
1.5: Improved TP Measurement
1.6: Small fixes
1.7: TP Measurement based on ITU 1770
1.8: Synced Measurement
1.9: Small fixes
2.0: TP measurement adjusted according BS 1770 beyond 44/48K
2.1: SL/ML update every 100ms according EBU R128 spec
2.2: Small adjustment of 2x FIR filter
2.3: TB-Measurement according BS.1770-4
2.4: More LRA info, LRA buffer fix
2.5: TP display fix
2.6: Automation timer set to 100ms
2.7: add. Automation data switch, off avoids undo data; fix sync mode (sync resets before start playing)
2.8: Small adjustments for tiny EBU, Tiny EBU added

regards
Thomas
__________________
www.tbproaudio.de

Last edited by TBProAudio; 08-18-2019 at 11:10 PM. Reason: New Version 2.4
TBProAudio is offline   Reply With Quote
Old 05-30-2014, 04:12 AM   #2
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Library:
V1.1: changed usage of memory manager
Sample Script:
V1.1: changed usage of memory manager, script writes now automation data



regards
Thomas
__________________
www.tbproaudio.de

Last edited by TBProAudio; 05-30-2014 at 04:32 AM.
TBProAudio is offline   Reply With Quote
Old 05-30-2014, 05:03 AM   #3
James HE
Human being with feelings
 
James HE's Avatar
 
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
Default

F yeah!

I'm going to work on a GUI for this.
James HE is offline   Reply With Quote
Old 05-30-2014, 05:04 AM   #4
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Amazing work! I'm currently in the middle of moving, but I'll give it a try when I get settled down.

Cheers!
__________________
Grey, flat and minimal theme for Reaper: Symbiosis
Seventh is offline   Reply With Quote
Old 05-30-2014, 06:11 AM   #5
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Nice one.
IXix is offline   Reply With Quote
Old 05-31-2014, 12:35 PM   #6
Halma
Human being with feelings
 
Halma's Avatar
 
Join Date: Jun 2013
Posts: 288
Default

Nice.
__________________
Underground Music Production: Sound Design, Machine Funk, High Tech Soul
Halma is offline   Reply With Quote
Old 06-01-2014, 07:08 AM   #7
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Wow, this is good, thanks Thomas!

Speaking about the GUI, a slightly related question to James; any possibility of having the slider values shown as separate meters also? Not saying they necessarily should, just fmi.
xpander is offline   Reply With Quote
Old 06-02-2014, 07:41 AM   #8
Tronic
Human being with feelings
 
Tronic's Avatar
 
Join Date: Jan 2012
Posts: 104
Default

Nice, wow
Tronic is online now   Reply With Quote
Old 06-03-2014, 03:29 PM   #9
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Thank you very much TBProAudio!
I love rainy days more now

Very useful to be able to write the automation data.
I wish Reaper could control the display of automation lanes.. min, max and linear scale.
http://forum.cockos.com/project.php?issueid=1736
heda is offline   Reply With Quote
Old 06-06-2014, 11:13 AM   #10
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

when recording the automation over a previously recorded automation there is like a point or flat automation curve gap running in front of the play cursor. I wonder if it could be reduced.
heda is offline   Reply With Quote
Old 06-06-2014, 02:17 PM   #11
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by heda View Post
when recording the automation over a previously recorded automation there is like a point or flat automation curve gap running in front of the play cursor. I wonder if it could be reduced.
hmm, just noticed it, very strange ...

regards
Thomas
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-06-2014, 07:44 PM   #12
Quest The Wordsmith
Human being with feelings
 
Quest The Wordsmith's Avatar
 
Join Date: May 2011
Location: Shaolin => NJ
Posts: 1,213
Default

Not sure how to use this that well... which envelope do I set to write if I want to see the EBU loudness over the course of the song?
__________________
freestylefam.com
Quest The Wordsmith is offline   Reply With Quote
Old 06-06-2014, 10:20 PM   #13
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

_ML Disp: Momentary Loudness, 400ms, LUFS
_ML Max Disp: Max Momentary Loudness, 400ms, LUFS
_SL Disp: Shortterm Loudness, 3000ms, LUFS
_SL Max Disp: Max Shortterm Loudness, 3000ms, LUFS
_IL Disp: Integrated Loudness, LUFS
_TP Disp: True Peak, dB
_LRA Disp: Loudness Range, LU

... of course, it could be named better, let me know :-)

regards
Thomas
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-07-2014, 12:05 PM   #14
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Since all the values for the disp automation lanes are going to be negative (mixing too loud if not) I've modified the max value of the Disp sliders to 0 instead of 6. It is never going to reach 0 either. Maybe I set it to -9. But this way I get a bit more of visual range in the automation lane instead of only in the half bottom part.

Last edited by heda; 06-07-2014 at 12:11 PM.
heda is offline   Reply With Quote
Old 06-08-2014, 02:01 AM   #15
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Good idea.
But TP could be over 0dB of course :-)

regards
Thomas
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-08-2014, 05:09 PM   #16
Quest The Wordsmith
Human being with feelings
 
Quest The Wordsmith's Avatar
 
Join Date: May 2011
Location: Shaolin => NJ
Posts: 1,213
Default

Quote:
Originally Posted by TBProAudio View Post
_ML Disp: Momentary Loudness, 400ms, LUFS
_ML Max Disp: Max Momentary Loudness, 400ms, LUFS
_SL Disp: Shortterm Loudness, 3000ms, LUFS
_SL Max Disp: Max Shortterm Loudness, 3000ms, LUFS
_IL Disp: Integrated Loudness, LUFS
_TP Disp: True Peak, dB
_LRA Disp: Loudness Range, LU

... of course, it could be named better, let me know :-)

regards
Thomas
So I'm assuming what I'm looking for is one of these 2?
_ML Max Disp: Max Momentary Loudness, 400ms, LUFS
_SL Disp: Shortterm Loudness, 3000ms, LUFS

Which one better represents a visual take on the loudness of a song as it progresses?

I'll try both...
__________________
freestylefam.com
Quest The Wordsmith is offline   Reply With Quote
Old 06-08-2014, 05:26 PM   #17
Quest The Wordsmith
Human being with feelings
 
Quest The Wordsmith's Avatar
 
Join Date: May 2011
Location: Shaolin => NJ
Posts: 1,213
Default

What I'm hoping to achieve is to visualize the loudness of the song via an envelope so I can go in and make volume changes afterwards. Not sure which one to use.
__________________
freestylefam.com
Quest The Wordsmith is offline   Reply With Quote
Old 06-08-2014, 11:48 PM   #18
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

_SL Disp: Shortterm Loudness, 3000ms, LUFS i would say.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 06-08-2014, 11:51 PM   #19
Dstruct
Human being with feelings
 
Join Date: Jul 2006
Posts: 12,480
Default

Would be cool if we could get this native on the REAPERMaster meter.
Dstruct is offline   Reply With Quote
Old 06-09-2014, 02:27 AM   #20
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Quote:
Originally Posted by Quest The Wordsmith View Post
What I'm hoping to achieve is to visualize the loudness of the song via an envelope so I can go in and make volume changes afterwards.
To this end, have you checked the SWS/BR Analyze Loudness, found under Extensions/Loudness? After you have analyzed the track, you can choose to create a short-term or momentary value graph into a selected envelope.
xpander is offline   Reply With Quote
Old 06-09-2014, 05:41 AM   #21
Quest The Wordsmith
Human being with feelings
 
Quest The Wordsmith's Avatar
 
Join Date: May 2011
Location: Shaolin => NJ
Posts: 1,213
Default

Quote:
Originally Posted by xpander View Post
To this end, have you checked the SWS/BR Analyze Loudness, found under Extensions/Loudness? After you have analyzed the track, you can choose to create a short-term or momentary value graph into a selected envelope.
I have SWS installed. Don't see Loudness in the Extensions menu. Searched in the actions list and all that came up was this:

SWS: Analyze and display item peak and RMS

I'm trying to achieve something like iZotope Insight's loudness history graph, where the envelope shows you the peaks and valleys of loudness throughout your song. You can see that in this video at 1:25:
https://www.youtube.com/watch?v=vCSjR9XVC8M&list=PL4dISychPQEt5_VP7x2p Pv2njxSe1JlJ9
__________________
freestylefam.com
Quest The Wordsmith is offline   Reply With Quote
Old 06-09-2014, 05:53 AM   #22
Quest The Wordsmith
Human being with feelings
 
Quest The Wordsmith's Avatar
 
Join Date: May 2011
Location: Shaolin => NJ
Posts: 1,213
Default

Never mind, I got it. Had to download the BETA version of SWS. I'll check it out.
__________________
freestylefam.com
Quest The Wordsmith is offline   Reply With Quote
Old 06-09-2014, 06:52 AM   #23
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Wups, sorry, I've been using SWS betas for so long I didn't manage to mention it's not yet on the official release.
xpander is offline   Reply With Quote
Old 06-17-2014, 03:37 AM   #24
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Great effort mate. I'll post links to this in the EBU R128 request.

@Cockos
No, this is what we already have. Nuendo kinda does what the request asked for. Get to it if you please, gents.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-17-2014, 06:50 AM   #25
Dannii
Human being with feelings
 
Dannii's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,598
Default

Quote:
Originally Posted by airon View Post
Great effort mate. I'll post links to this in the EBU R128 request.

@Cockos
No, this is what we already have. Nuendo kinda does what the request asked for. Get to it if you please, gents.
Airon, I have just updated my meter enhancement FR with links to your R128 FR. I also updated the original and most recent posts in my forum discussion too (link to my FR is in my signature.)

Here's the text I added to those places...

Update 2, 17th June, 2014 - CLICK HERE to vote for Airon's detailed EBU R128 meter specification request
__________________
Dannii is offline   Reply With Quote
Old 06-17-2014, 10:08 PM   #26
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,817
Default

Neat, thanks. Kinda funny when even JS FX are quicker than Cockos at bringing some feature in to Reaper.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom

Last edited by airon; 07-11-2014 at 12:12 AM.
airon is offline   Reply With Quote
Old 07-10-2014, 10:49 AM   #27
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default Final Release

V 1.4: Increased precision, Multichannel Support, reduced number of ext libraries

So, finally multichannel is now implemented and some precision issues are fixed. Now all test cases from EBU should run wo any deviation

Have fun with it
Thomas
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 07-11-2014, 02:58 AM   #28
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

You are a Hero !!
vanhaze is offline   Reply With Quote
Old 07-29-2014, 07:47 AM   #29
mim
Human being with feelings
 
Join Date: Mar 2009
Posts: 370
Default

Nice stuff !
Thank you
mim is offline   Reply With Quote
Old 07-30-2014, 02:40 AM   #30
Dannii
Human being with feelings
 
Dannii's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 5,598
Default

Nice work indeed Thomas.
__________________
Dannii is offline   Reply With Quote
Old 11-15-2014, 01:37 PM   #31
inthepipeline
Human being with feelings
 
inthepipeline's Avatar
 
Join Date: Mar 2007
Location: Bristol, UK. Slowly sinking island next to mainland Europe
Posts: 542
Default

Thanks so much for this. It works to a 't'.
__________________
10core Xeon w.128gig RAM, lots of SSD, HDSP9652, MOTU828, Tannoy System 8 NFM.
inthepipeline is offline   Reply With Quote
Old 09-12-2015, 05:00 AM   #32
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

New Version 1.9
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 04-13-2016, 07:43 AM   #33
Castanuelas
Human being with feelings
 
Join Date: Sep 2012
Posts: 74
Default

Thanks so much for sharing this code!

I see in the code BS1770 true peak filter coefficients for 44.1kHz and 48kHz only. Does this mean that R128 true peak measurements are inaccurate or not available for 88.1kHz and 96kHz? These rates would normally be upsampled by 2.
Castanuelas is offline   Reply With Quote
Old 04-13-2016, 09:00 AM   #34
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

I have not yet found any translation to 88/96k, so I would say: not available.

But I don't think that coefficients for 88/96k make really sense, because current TV play-out rate is 44k or 48k. But this may change in future.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 04-13-2016, 10:13 AM   #35
Castanuelas
Human being with feelings
 
Join Date: Sep 2012
Posts: 74
Default

Since your dpMeter VST is based on this JS, does this mean that the dpMeter VST also doesn't support 88k and 96k for true peak?

DAW users who work for the movie industry need 96k to support Dolby TrueHD on Blu-ray discs. DAW users who work for the Hi-Res music industry need to support 88k, 96k, 176k and 192k.

What I saw in the BS1770 specification is that 176k and 192k don't require any upsampling filter to measure true peak -- just measure on the raw samples. BS1770 only requires upsample by 2 for 88k and 96k. Upsampling all sample rates by 4 will comply with BS1770, but CPU is reduced for rates above 48k by upsampling by a lower factor.

Please also confirm whether your JS and VST implementations support 88k, 96k, 176k and 192k sample rates properly for integrated loudness (LUFS).

Last edited by Castanuelas; 04-13-2016 at 01:00 PM. Reason: Clarify
Castanuelas is offline   Reply With Quote
Old 04-13-2016, 10:27 AM   #36
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 2,161
Default

? does the AB_LM have the 1.9 update ?
RJHollins is offline   Reply With Quote
Old 04-14-2016, 01:01 AM   #37
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by Castanuelas View Post
Since your dpMeter VST is based on this JS, does this mean that the dpMeter VST also doesn't support 88k and 96k for true peak?

DAW users who work for the movie industry need 96k to support Dolby TrueHD on Blu-ray discs. DAW users who work for the Hi-Res music industry need to support 88k, 96k, 176k and 192k.

What I saw in the BS1770 specification is that 176k and 192k don't require any upsampling filter to measure true peak -- just measure on the raw samples. BS1770 only requires upsample by 2 for 88k and 96k. Upsampling all sample rates by 4 will comply with BS1770, but CPU is reduced for rates above 48k by upsampling by a lower factor.

Please also confirm whether your JS and VST implementations support 88k, 96k, 176k and 192k sample rates properly for integrated loudness (LUFS).
TP measurement of dpMeter supports all 44/48K "times factor" sample-rates.The signal is always 4 times up-sampled, even if this may not be necessary for 88K and higher according BS1770.
IL, ML and SL measurement works for all sample-rates.

For the JS implementation I have to check, if TP measurement above 48k complies to BS1770. If not i will fix it :-)
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 04-14-2016, 03:27 AM   #38
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,238
Default

Hi TBProAudio
One question regarding SL, in both the JS version and dpMeter.
I've noticed that SL values don't refresh as often as ML or IL. Could it be improved and be smooth as ML or IL?
Thank you for your great plugins.
heda is offline   Reply With Quote
Old 04-14-2016, 08:30 AM   #39
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 643
Default

Quote:
Originally Posted by TBProAudio View Post
For the JS implementation I have to check, if TP measurement above 48k complies to BS1770. If not i will fix it :-)
I have checked: JS has same implementation as VST.
__________________
www.tbproaudio.de
TBProAudio is offline   Reply With Quote
Old 04-14-2016, 08:34 AM   #40
Castanuelas
Human being with feelings
 
Join Date: Sep 2012
Posts: 74
Default

Quote:
Originally Posted by TBProAudio View Post
TP measurement of dpMeter supports all 44/48K "times factor" sample-rates.
I am happy dpMeter supports all the sample rates I need.

I looked at the manual and the web site for dpMeter, and I didn't see any information about which version of BS.1770 it uses. I see that BS.1770-4 is the current version: http://www.itu.int/rec/R-REC-BS.1770/en

I recall BS.1770-3 has gating on the integrated loudness, which is important for movies and classical music. I don't know what changes BS.1770-4 introduced.
Castanuelas is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.