Old 04-07-2019, 01:42 PM   #1
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default Render LUFS v2.0pre3 (2020-06-26)

Released Render LUFS v1.0
It is a script for REAPER that uses nofish's API functions for Breeder's loudness analysis functions for SWS extensions, to analyze the loudness of exported file

(if you want to donate you can donate to nofish and Breeder)

The script adjusts desired parameter (normally gain in a limiter) and renders it again until the desired loudness is achieved.

Usage:
First touch the parameter on the plugin that you want to adjust to increase the volume of the rendered file. This is typically the gain or threshold parameter of a limiter on the master track. But it can be anything.
  1. Click on "Set Last Touched Parameter" button
  2. If the script doesn't have configuration for this parameter, it will ask you to configure
  3. Click the Range button, and set the range of the parameter in dB. For example if the parameter can adjust from -12db to +12db gain, then the range would be 24. You can also set the range to -24 if the plugin works differently, for example in a threshold, that goes from -30 to 0, then the range would be -30.
  4. Once you have configured the parameter, the script will let you render. You can open the render window to adjust your file name, sample rate, etc, then Click on "Save changes and close" to return to Render LUFS window.
  5. Define the desired Target Loudness in LUFS, Typically, -13 forYoutube, -14 for Spotify, -16 for ITunes, -23 for Standard, etc...
  6. click RENDER.

The script will render as many times as needed to achieve the desired Loudness by adjusting the parameter on each iteration.


I hope you find it useful. Please let me know if you have any questions about how to use it or any suggestions for improvements. Thanks

Download: https://reaper.hector-corcin.com/app...cripts-manager
Required: REAPER 5.974 currently the latest version
Required: SWS/S&M Extension: 2.9.7 or newer




---------------
v2.0 version with multiple regions support

Last edited by heda; 06-26-2020 at 05:38 AM.
heda is offline   Reply With Quote
Old 04-07-2019, 02:56 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,736
Default

Well done !


I can see that you use MGA limiter,


but note that there is an updated version, MGAZMC, with oversampling and the Zero Crossing Maximize.


https://forum.cockos.com/showthread.php?t=217451


Maybe it can worth test this FX as well :P
X-Raym is offline   Reply With Quote
Old 04-07-2019, 03:30 PM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Thank you X-Raym.. I didn't know about MGAZMC. It works great

By the way... one thing I forgot to mention in the first post. Once you define a parameter to be used, it is saved in the project, so you don't need to touch the parameter again to re-export in the future, unless you want to change to another parameter.
heda is offline   Reply With Quote
Old 09-18-2019, 10:16 AM   #4
Soundwizard
Human being with feelings
 
Soundwizard's Avatar
 
Join Date: Dec 2015
Posts: 8
Default

Pretty cool!

I tested it out and I get an error.
The plugin I used was the Waves' L1 Limiter. The last parameter I adjusted was the threshold with a -6.0
Attached Images
File Type: png ERr.PNG (3.9 KB, 125 views)
Soundwizard is offline   Reply With Quote
Old 09-18-2019, 12:35 PM   #5
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,917
Default

heda will probably chime in shortly but I can say I got this error too when testing the script with VST plugins (not with JSFX).
I think the issue is that VST parameters are in the 0 to 1 range (and can map plugin parameters like Threshold arbitrarily).

edit:
Could maybe use TrackFX_GetFormattedParamValue() for VSTs?
https://forum.cockos.com/showpost.ph...20&postcount=2

Last edited by nofish; 09-19-2019 at 04:57 AM.
nofish is offline   Reply With Quote
Old 09-25-2019, 09:11 AM   #6
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 13,091
Default

Ooh. This could be useful!

Not been doing much stuff that needs it at the moment but when I do. I'll definitely be back here!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Old 09-25-2019, 09:18 AM   #7
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

@nofish
@Soundwizard

sorry I forgot to reply

I haven't been able to test with other VSTs yet. Some plugins work in reverse, meaning increasing the parameter, reduces the overall volume, or the opposite. You can try to set the range of the threshold in negative or positive and test again.
heda is offline   Reply With Quote
Old 02-01-2020, 05:48 PM   #8
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

I am working on Render LUFS, to allow to render multiple regions and adjust the parameter for each region until it has the desired loudness. still WIP. Also trying to improve the method where sometimes it cannot adjust the parameter well and maybe make it work with automation items instead of a normal envelope.
here is a demo gif
heda is offline   Reply With Quote
Old 02-02-2020, 02:53 AM   #9
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 312
Default

Hi, this message came up when the script is analyzing the loudness of the audio file:

*** Error: Minimum value for parameter is 0.0 and it needs -0.0072874900720619
dsyrock is offline   Reply With Quote
Old 02-02-2020, 03:59 AM   #10
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Quote:
Originally Posted by dsyrock View Post
Hi, this message came up when the script is analyzing the loudness of the audio file:

*** Error: Minimum value for parameter is 0.0 and it needs -0.0072874900720619
yes this happens when no value of the parameter can result in a desired loudness render. But it is very small amount(if that is dB), so your file should already be very close to the loudness. Isn't it? I should ignore this error if the value is less than the tolerance. Adding this to the things I am improving.
heda is offline   Reply With Quote
Old 02-02-2020, 05:27 AM   #11
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 312
Default

Quote:
Originally Posted by heda View Post
yes this happens when no value of the parameter can result in a desired loudness render. But it is very small amount(if that is dB), so your file should already be very close to the loudness. Isn't it? I should ignore this error if the value is less than the tolerance. Adding this to the things I am improving.
But I set the target loudness is -23 LUFS, and the rendered file is -11.3
dsyrock is offline   Reply With Quote
Old 02-02-2020, 05:43 AM   #12
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Quote:
Originally Posted by dsyrock View Post
But I set the target loudness is -23 LUFS, and the rendered file is -11.3
what is happening here is that the parameter cannot be lower than the minimum and with the minimum the output is already much louder, so you need to start with a quieter signal before the limiter. put a plugin before with a -15dB gain for example.
heda is offline   Reply With Quote
Old 02-02-2020, 06:05 AM   #13
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 312
Default

Quote:
Originally Posted by heda View Post
what is happening here is that the parameter cannot be lower than the minimum and with the minimum the output is already much louder, so you need to start with a quieter signal before the limiter. put a plugin before with a -15dB gain for example.
Thanks. And I'm curious about what method you use to modify the loudness. In your script, it runs a DAT file. Is it the trick that finish the last step?
dsyrock is offline   Reply With Quote
Old 02-02-2020, 06:24 AM   #14
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

@dsyrock I think you don't understand how the script works. The script doesn't do anything other than adjusting a parameter of a plugin you define. It is that plugin what makes the export louder or quieter depending on the parameter. For example on a limiter, adjusting the threshold results in louder render, maintaining the ceiling. The scripts renders and analyzes the loudness of the output file using SWS extensions API function. Then it adjust the plugin parameter (usually a limiter threshold) and renders again until the desired loudness is achieved. There is no fixed amount of parameter adjustment to precalculate, because it depends also on how much are you compressing etc, so it makes a multiple iterations approximation method. You can set the maximum number of tries before giving up if something goes wrong to avoid being rendering forever.
heda is offline   Reply With Quote
Old 02-02-2020, 06:50 AM   #15
dsyrock
Human being with feelings
 
dsyrock's Avatar
 
Join Date: Sep 2018
Location: China
Posts: 312
Default

Quote:
Originally Posted by heda View Post
@dsyrock I think you don't understand how the script works. The script doesn't do anything other than adjusting a parameter of a plugin you define. It is that plugin what makes the export louder or quieter depending on the parameter. For example on a limiter, adjusting the threshold results in louder render, maintaining the ceiling. The scripts renders and analyzes the loudness of the output file using SWS extensions API function. Then it adjust the plugin parameter (usually a limiter threshold) and renders again until the desired loudness is achieved. There is no fixed amount of parameter adjustment to precalculate, because it depends also on how much are you compressing etc, so it makes a multiple iterations approximation method. You can set the maximum number of tries before giving up if something goes wrong to avoid being rendering forever.
Thanks, now I understood.
dsyrock is offline   Reply With Quote
Old 02-02-2020, 10:54 AM   #16
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Wondering .... would it be possible to have an option
of render to 'Short Term Loudness - LUF' ?

thanks
RJHollins is offline   Reply With Quote
Old 02-02-2020, 11:23 AM   #17
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Quote:
Originally Posted by RJHollins View Post
Wondering .... would it be possible to have an option
of render to 'Short Term Loudness - LUF' ?

thanks
I don't exactly understand. It could be possible I guess to render for Short Term Max, not for Short Term, since that is just for a window of 3 seconds only.
heda is offline   Reply With Quote
Old 02-03-2020, 03:23 AM   #18
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Quote:
Originally Posted by heda View Post
I don't exactly understand. It could be possible I guess to render for Short Term Max, not for Short Term, since that is just for a window of 3 seconds only.
Hi Heda ... yes, I should have been precise.

Short Term Max.

This comes from a Mastering technique from Ian Sheppard.
RJHollins is offline   Reply With Quote
Old 02-03-2020, 04:48 AM   #19
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Quote:
Originally Posted by RJHollins View Post
Hi Heda ... yes, I should have been precise.

Short Term Max.

This comes from a Mastering technique from Ian Sheppard.
It is possible, yes. There is another SWS API function that retrieves the short term max too.

How to know more about this mastering technique? It doesn't make sense to me at first but I am always interested in learning new things.
heda is offline   Reply With Quote
Old 02-03-2020, 08:21 AM   #20
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,917
Default

Here he gets into integrated vs. short term max:

Quote:
But from what’s written above you’ll have gathered by now that I’m not going to be recommending any of the LUFS numbers suggested above – or any integrated loudness.

Instead, my recommendation uses short-term loudness values, and it’s this:

Master no louder than -9 LUFS short-term at the loudest moments
(with True Peaks no higher than -1)
https://productionadvice.co.uk/how-loud/

(This is covering mastering for streaming services which have automatic loudness normalization).
nofish is offline   Reply With Quote
Old 02-03-2020, 10:33 AM   #21
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Thanks nofish .... that's the info I was referring to.
RJHollins is offline   Reply With Quote
Old 02-03-2020, 01:29 PM   #22
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Thank you nofish and RJHollins

It all makes sense now But I don't fully agree with Ian Sheppard. There will be cases where this momentary max technique won't be useful.

But I also understand and for more dynamic music I think it would be better to normalize to -14.0 LUFS for the range of the loudest part of the song, for example chorus part etc... which can be, the entire song in some genres, or maybe a minute or two minutes in other genres. It is difficult to generalize and say ok, use momentary max and you are good. No because a loud moment for 3 seconds in a song can ruin the entire master.

All this gave me an idea for the script... that would be able to analyze the LUFS of a secondary manually defined region, and then adjust the limiter parameter based on that, and then render the entire song. The result will be lower than -14 LUFS.. -16 for example.. but that is ok because we would be wanting to normalize to -14 only the chorus section for example, which I agree that is a good idea.

Last edited by heda; 02-03-2020 at 01:42 PM.
heda is offline   Reply With Quote
Old 02-03-2020, 04:37 PM   #23
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Quote:
Originally Posted by heda View Post
Thank you nofish and RJHollins

It all makes sense now But I don't fully agree with Ian Sheppard. There will be cases where this momentary max technique won't be useful.

But I also understand and for more dynamic music I think it would be better to normalize to -14.0 LUFS for the range of the loudest part of the song, for example chorus part etc... which can be, the entire song in some genres, or maybe a minute or two minutes in other genres. It is difficult to generalize and say ok, use momentary max and you are good. No because a loud moment for 3 seconds in a song can ruin the entire master.

All this gave me an idea for the script... that would be able to analyze the LUFS of a secondary manually defined region, and then adjust the limiter parameter based on that, and then render the entire song. The result will be lower than -14 LUFS.. -16 for example.. but that is ok because we would be wanting to normalize to -14 only the chorus section for example, which I agree that is a good idea.
Agreeing with Ian's -9 LUF ST is not the main goal ...

I have been using a similar concept [monitoring with YouLean].

The concept is not about hitting a specific LUF marker [say -14LUF], but:

"The integrated LUFS value tells you nothing about the dynamic variety in the song. In other words, our opinion about what integrated loudness feels musically right changes, depending on the song – and genre, and arrangement… and everything."

Mastering for a 'Single' is not the same as Mastering for an 'Album'.

Using Ian's concept over the past 10 or 12 Mastering projects, I've found to work really well .... regardless of the overall 'dynamic range' target.

2nd: Having the Short-term target in place now allows to evaluate lower level sections [like maybe Intros], that may need Level Automation adjustment to bring a better listening experience ... yet still maintain a consistent loudness throughout the project.

I had my doubts at first, so it can down to actually using this concept ... which I now know works quite well.

My 'request' was more toward an option to expedite the process as your Script suggests. That being an option for Short-term at a User defined Level. It would also be handy to also view the Integrated values from that process ... rather than always running in Real-time.

thanks
RJHollins is offline   Reply With Quote
Old 02-03-2020, 04:45 PM   #24
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Important point from Ian:

"This suggestion is based on over 20 years of my experience as a professional mastering engineer, on conversations with other mastering engineers, on analysis of my favourite-sounding albums, and on teaching an online course to over 1000 students who’ve also had great results.

The theory is simple: make all the loudest moments similar in loudness, and not too loud – and then balance everything else with them musically.

It just works ! It avoids the problem of using integrated loudness as a target, where you’ll get lower values for music with more varied dynamics even though the loudest moments are just as loud. But it still gives you a useful benchmark – something to aim for. There can be occasional louder moments, if they work musically, and of course you can go quieter if you want to – always make decisions based on musical considerations, not just the numbers – but this is the simplest and best guideline I can give you.

And in fact when I follow this rule, in most popular genres the integrated loudness often comes out in the -11 to -14 LUFS range anyway – bang in the sweet spot for all the online streaming platforms…"


Reading ... carefully .... the full article is very useful ... and has really simplified the process from Streaming to CD's.

It does work. And still leaves 'artistist' decisions relevant.
RJHollins is offline   Reply With Quote
Old 02-04-2020, 12:49 AM   #25
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 222
Default

This conversation is taking a very interesting way... I am following it with attention.

btw: lovely script. I use it very often. Thank you for it.
javiramallo is offline   Reply With Quote
Old 02-04-2020, 04:30 AM   #26
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

-11 to -14 seems like too loud for today. The problem having a -11 LUFS song, is that streaming platforms will lower the volume by 3 to 5 dB later to fit it to -14 or -16 LUFS

the trick is to find the compression and dynamic range that is good for a final -14.0 Integrated Loudness. The ShortTerm MAx trick can be a good trick. But it probably depends on the genre of music. maybe the latest 20 years of music is very compressed and it works well.

I think it would make more sense to target both the IL but also a Loudness Range, instead of the Short Term Max.

However I am going to add the Short Term Max option to the script because it doesn't hurt to have the option and then experiment and compare results.
heda is offline   Reply With Quote
Old 02-04-2020, 07:20 AM   #27
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Thanks Heda

Much appreciated !
RJHollins is offline   Reply With Quote
Old 02-04-2020, 07:28 AM   #28
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

teaser of the UI.. still not coded the functionality. Choosing IL or STMax mode.
heda is offline   Reply With Quote
Old 02-04-2020, 10:52 AM   #29
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Are the actual LUF values User editable ?
RJHollins is offline   Reply With Quote
Old 02-04-2020, 12:04 PM   #30
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Quote:
Originally Posted by RJHollins View Post
Are the actual LUF values User editable ?
yes, try to click on the -14.0 number and it should work
heda is offline   Reply With Quote
Old 02-04-2020, 09:07 PM   #31
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Quote:
Originally Posted by heda View Post
yes, try to click on the -14.0 number and it should work
OK ... I'm getting the hang of it. [v:1]

Tested with Ozone9 Limiter. Set the range to -20. Worked.

Looking forward to testing with Short-Term Max.


I do have a question or 3 ... one of which regards destination of the processed file.

Clicking on 'Render Directory' doesn't seem to allow choosing a destination.

But also ... can the final Render go to a New Track ?

Like I say ... just now tested.

Thanks Heda !


---- edit ---

Something I noticed.

Different than the Web Site info on this Script.
It seems I have to click OK for each testing render, while the Web Site shows the process
rendering through the tests until target is met.
RJHollins is offline   Reply With Quote
Old 02-05-2020, 05:28 AM   #32
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

that rendering directory is only informative... all render settings and destination are set in the normal REAPER render window, but then instead of click Render there, click Save and Close and return to the script.. then render from the RENDER button on the script.

It shouldn't ask to press OK on each render pass. It can ask to confirm overwrite if the file exists, but only the first time. If the rendered file is imported into the project then it cannot be overwritten.
heda is offline   Reply With Quote
Old 02-05-2020, 06:45 AM   #33
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 21,289
Default

HOLY FUCK THIS IS COOL

so i would say probably the most important parameter is threshold or input right?
Jae.Thomas is offline   Reply With Quote
Old 02-05-2020, 07:17 AM   #34
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 21,289
Default

the range of input gain is -3 to 24 on voxengo elephant what would that mean?
Jae.Thomas is offline   Reply With Quote
Old 02-05-2020, 07:20 AM   #35
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 21,289
Default

I set that to 27 and it worked. Awesome.

what happens to the leftover renders?

Is there a way to have presets for this? So that we can just restore settings for, say -

a js limiter, voxengo elephant, ozone, etc
Jae.Thomas is offline   Reply With Quote
Old 02-05-2020, 08:55 AM   #36
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

yes 27 should work. if not, then -27

there are no leftovers, it renders replacing the same file on each pass.

each plugin parameter is stored in your configuration. so if you set to another plugin the range should be automatically changed to work with that new parameter.
heda is offline   Reply With Quote
Old 02-05-2020, 01:43 PM   #37
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 6,014
Default

Not having too much time for coding this week... but some progress

finished the automation items insertion, added the option to insert the rendered item into the project.. and Target STLMax
still need to do the cache first pass and secondary regions thing...

first test, targeting for STLMax to -9 results in a bit louder than -14.0 but not quite good

heda is offline   Reply With Quote
Old 02-05-2020, 02:30 PM   #38
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 222
Default

Quote:
Originally Posted by heda View Post
Not having too much time for coding this week... but some progress

finished the automation items insertion, added the option to insert the rendered item into the project.. and Target STLMax
still need to do the cache first pass and secondary regions thing...

first test, targeting for STLMax to -9 results in a bit louder than -14.0 but not quite good

Looks awesome!!
javiramallo is offline   Reply With Quote
Old 02-05-2020, 11:10 PM   #39
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

Yes it is LOOKIN' GOOD Heda !

and yes, the IL will fall within a acceptable range.

If the choice is to hit IL specific target ... you have the option there.

Great.

look forward
RJHollins is offline   Reply With Quote
Old 02-12-2020, 11:30 AM   #40
RJHollins
Human being with feelings
 
Join Date: Dec 2011
Posts: 1,527
Default

just checking in on this ....

also wondering ...

Would it be possible to have the script perform its operration, but NOT write
an actual file ? [audition mode?]

reasoning: during Mastering, source audio file levels can be anywhere from
-18dB or -23LUF. I often use a Limiter to bring output Gain to a higher, general level. Not until most pre-processing do I then fine tune Limiter.

But it would be nice to auto set for a specific STLUF during the whole process
for work consistency.

Hope I explained clear enough.

Thanks for consideration !
RJHollins 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 04:06 PM.


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