Old 05-29-2014, 08:22 AM   #1
TBProAudio
Human being with feelings
 
TBProAudio's Avatar
 
Join Date: May 2014
Location: Germany
Posts: 318
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 here.

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

regards
Thomas
__________________
www.tb-software.com/TBProAudio

Last edited by TBProAudio; 09-12-2015 at 04:58 AM. Reason: New Version 1.9
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: 318
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.tb-software.com/TBProAudio

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,249
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,171
Default

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

Nice.
__________________
Underground Music Production: Sound Design, Machine Funk, High Tech Funk
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: 3,756
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
 
Join Date: Jan 2012
Posts: 91
Default

Nice, wow
Tronic is offline   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: 4,078
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
__________________
HeDaScripts for REAPER | VIP Donations
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: 4,078
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.
__________________
HeDaScripts for REAPER | VIP Donations
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: 318
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.tb-software.com/TBProAudio
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: Staten Island, NY
Posts: 1,203
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 (music)
aaroncordova.xyz (personal)
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: 318
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.tb-software.com/TBProAudio
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: 4,078
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.
__________________
HeDaScripts for REAPER | VIP Donations

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: 318
Default

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

regards
Thomas
__________________
www.tb-software.com/TBProAudio
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: Staten Island, NY
Posts: 1,203
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 (music)
aaroncordova.xyz (personal)
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: Staten Island, NY
Posts: 1,203
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 (music)
aaroncordova.xyz (personal)
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: 318
Default

_SL Disp: Shortterm Loudness, 3000ms, LUFS i would say.
__________________
www.tb-software.com/TBProAudio
TBProAudio is offline   Reply With Quote
Old 06-08-2014, 11:51 PM   #19
Dstruct
Human being with feelings
 
Dstruct's Avatar
 
Join Date: Jul 2006
Location: Dresden, Germany
Posts: 11,996
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: 3,756
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: Staten Island, NY
Posts: 1,203
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 (music)
aaroncordova.xyz (personal)
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: Staten Island, NY
Posts: 1,203
Default

Never mind, I got it. Had to download the BETA version of SWS. I'll check it out.
__________________
freestylefam.com (music)
aaroncordova.xyz (personal)
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: 3,756
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: City
Posts: 9,630
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.
__________________
Dialogue/FX Editor & Re-Recording Mixer
Using Latch Preview
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 06-17-2014, 06:50 AM   #25
ReaDave
Human being with feelings
 
ReaDave's Avatar
 
Join Date: Mar 2010
Location: Adelaide, South Australia (originally from Geelong)
Posts: 4,715
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
ReaDave 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: City
Posts: 9,630
Default

Neat, thanks. Kinda funny when even JS FX are quicker than Cockos at bringing some feature in to Reaper.
__________________
Dialogue/FX Editor & Re-Recording Mixer
Using Latch Preview
"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: 318
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.tb-software.com/TBProAudio
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: 3,372
Default

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

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

Nice work indeed Thomas.
ReaDave 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: 539
Default

Thanks so much for this. It works to a 't'.
__________________
i7 950, 12gig 1600ddr3, lots of SSD, Fireface UFX, BM5a, JBL LSR6632, OctopreLE x2, Customised Soundcraft 8000, and proud, paid up Reaper user.
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: 318
Default

New Version 1.9
__________________
www.tb-software.com/TBProAudio
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: 318
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.tb-software.com/TBProAudio
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: 1,054
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: 318
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.tb-software.com/TBProAudio
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: 4,078
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.
__________________
HeDaScripts for REAPER | VIP Donations
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: 318
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.tb-software.com/TBProAudio
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:39 PM.


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