R128Norm, A simple normalizer based on EBU R128 |
![]() ![]() |
R128Norm, A simple normalizer based on EBU R128 |
Jan 27 2011, 23:25
Post
#1
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
Welp. I went and made a normalizer DSP out of libebur128. Have fun with it. Oh, and I posted the source, which requires the libebur128 files from the R128Scan source.
It's currently hard coded to maintain a preview latency of 500ms, and uses the short-term loudness level measured from a three second window as the gain correction reference, which it updates every 100ms. I may make this configurable in the future. Change log:
|
|
|
|
Jan 28 2011, 08:23
Post
#2
|
|
![]() Group: Members Posts: 477 Joined: 22-December 03 From: Malmö, Sweden Member No.: 10615 |
Seems useful for night listening among other things. Thanks!
|
|
|
|
Jan 29 2011, 18:43
Post
#3
|
|
![]() Group: Developer (Donating) Posts: 711 Joined: 1-December 07 Member No.: 49165 |
Oh yeh, its around 2.8x faster than my port of Garf's Dynamics Compressor.
So, its quite nice, really. |
|
|
|
Jan 31 2011, 00:26
Post
#4
|
|
|
Group: Members Posts: 913 Joined: 22-October 01 From: the Netherlands Member No.: 335 |
its around 2.8x faster than my port of Garf's Dynamics Compressor. They don't do the exact same thing, as you will know. The effect of foo_r128norm is more like that of Vlevel, i.e. it seems to adjust the volume (slowly) over time as opposed to compressing the dynamics to make it sound louder. It sounds obviously radio-ish. The calculations will probably be much different (from Vlevel) though, and a fixed 3 sec. sliding window is used. It could have it's use, configurable settings are welcome. It might need something like a maximum gain or lowest (source) level to amplify (threshold). Right now start of (next) track after a couple of seconds silence and some fade-outs are handled unpleasantly. A name suggestion? foo_dsp_r128norm . This post has been edited by GeSomeone: Feb 1 2011, 23:46 -------------------- In theory, there is no difference between theory and practice.
|
|
|
|
Jan 31 2011, 01:52
Post
#5
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
When I add configuration, I will add an option to only reduce gain instead of also increasing it.
|
|
|
|
Feb 1 2011, 00:13
Post
#6
|
|
![]() Group: Members Posts: 124 Joined: 1-December 06 From: Norway Member No.: 38241 |
Thank you for making this DSP kode54, now I can finally get rid of that horrible Vlevel.
|
|
|
|
Feb 1 2011, 12:23
Post
#7
|
|
![]() Group: Members Posts: 477 Joined: 22-December 03 From: Malmö, Sweden Member No.: 10615 |
I don't mind that it raises volume of quiet parts personally but it gets extremely loud right at the start of tracks. This becomes especially annoying when listening to live recordings. I guess I'm reporting a simmilar issue as GeSomeone. Perhaps adding buffer och that's capable of looking ahead into the next track would be a solution for the issues I'm experiencing. FWIW
|
|
|
|
Feb 2 2011, 05:52
Post
#8
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
It already looks ahead, but it doesn't ask for track change notifications, so it keeps whatever amplification level was achieved by the end of the previous track.
|
|
|
|
Feb 3 2011, 00:10
Post
#9
|
|
![]() Group: Members Posts: 477 Joined: 22-December 03 From: Malmö, Sweden Member No.: 10615 |
That would explain the loud blasts during track transitions.
|
|
|
|
Feb 3 2011, 09:18
Post
#10
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
It should not be blasting, because it adjusts the gain level fairly quickly, and it looks ahead by half a second.
|
|
|
|
Feb 3 2011, 15:59
Post
#11
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
It should not be blasting, because it adjusts the gain level fairly quickly, and it looks ahead by half a second. I noticed momentary blasts also. I think it happened with Last FM with songs from different artists. I believe it also happened when playing songs on a playlist with Replaygain shut off. A great component. |
|
|
|
Feb 3 2011, 20:27
Post
#12
|
|
![]() Group: Members Posts: 477 Joined: 22-December 03 From: Malmö, Sweden Member No.: 10615 |
Here's an excerpt where output clips at a track transition: http://www.box.net/shared/0qpuv6r21f
From 0:18 I start the second track directly and gain is more reasonable. |
|
|
|
Feb 4 2011, 14:51
Post
#13
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
Hopefully, locking the gain scale to 1.0 or less will fix that problem. I can't make the component request track change marks because it could cause gaplessness issues when using resampling DSPs and such.
|
|
|
|
Feb 4 2011, 18:11
Post
#14
|
|
|
Group: Members Posts: 913 Joined: 22-October 01 From: the Netherlands Member No.: 335 |
Hopefully, locking the gain scale to 1.0 or less will fix that problem. Version 1.8 highlights: Disabled the gain from increasing above 1.0, for now Yes, it does ... but now it is just a limiter instead of a normalizer. Wouldn't the correct solution be to make it work "gated", meaning ignore the silence (and probably also near silence like tape noise etc)? Somewhat like you did in the R128scanner. Another possible approach could be looking ahead just as much as looking back. e.g. look back 1.5s and look ahead 1.5, still a 3s sliding window :-) Just adding suggestions to the pile. -------------------- In theory, there is no difference between theory and practice.
|
|
|
|
Feb 5 2011, 00:11
Post
#15
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
That change certainly made School from Crime of the Century by Supertramp much better. With version 1.7, it would get almost deafening in parts as it is a very dynamic song. It did not seem to change anything with the flac file previously posted though. Might that be because the quiet part is so long?
Thanks for working on this. |
|
|
|
Feb 5 2011, 00:39
Post
#16
|
|
![]() Group: Members Posts: 477 Joined: 22-December 03 From: Malmö, Sweden Member No.: 10615 |
I agree with GeSomeone. With the lastetst update R128Norm loses functionality that makes it a gem of a volume leveler for me. Please consider making it selectable. And if convenient please add track change awareness, also selectable.
This post has been edited by markanini: Feb 5 2011, 00:40 |
|
|
|
Feb 5 2011, 07:20
Post
#17
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
Try now. Although I had to make some ugly additions to the library so I could use EBUR128_MODE_I indefinitely without allocating more and more memory.
|
|
|
|
Feb 5 2011, 08:08
Post
#18
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
I installed 1.9 and tried it. At around the 12 second mark the song School i mentioned before blasts pretty strongly. That part of the song was recorded to go from near silence to quite loud instantly. I did not try the blast flac that was posted before. Thanks.
|
|
|
|
Feb 5 2011, 16:21
Post
#19
|
|
![]() Group: Members Posts: 477 Joined: 22-December 03 From: Malmö, Sweden Member No.: 10615 |
It's better, blasts are reduced even though they're not avoided completely. Volume leveling sounds more natural than before. Thanks for your great work so far!
|
|
|
|
Feb 6 2011, 16:48
Post
#20
|
|
|
Group: Members Posts: 913 Joined: 22-October 01 From: the Netherlands Member No.: 335 |
Thanks very much for your work, I'm sorry it made the code ugly.
What you changed, did help, but unfortunately, not a lot. If a track ends really abrupt the next track may start at a reasonable volume. However when a track fades out a bit slower, R128norm is cranked up at the start of the next track (the "blast" effect). Is the look ahead you mentioned is working as intended? This happens not only at track changes. I uploaded a sample of the intro of Monkey Wrench by Foo Fighters from their Greatest Hits. There is a 1.15s break at 0:11.5 that triggers the "blast" effect. At least when played from the beginning, the strange thing is when I start it and skip to 0:10 immediately it won't happen. In this same sample after seeking (with the seekbar) to 0:09 the volume becomes instantly very high as well. When doing so to 0:08 or 0:10 this doesn't happen. Another example I will just mention is the intro of Echoes by Pink Floyd. R128norm (used as only DSP) introduces severe clipping there. That can't be right. used foobar 1.1.2 with track gain applied and only active DSP "EBU R128 compressor" (1.9) -------------------- In theory, there is no difference between theory and practice.
|
|
|
|
Feb 7 2011, 15:26
Post
#21
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
Updated.
This DSP is not guaranteed to prevent clipping. Use the Advanced Limiter if you also need that. |
|
|
|
Feb 7 2011, 20:12
Post
#22
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
Installed 1.10 and I think it blasted louder than the previous versions. So far, version 1.8 has been the only one that has not done it. ReplayGain on and Advanced Limiter on. Thanks.
This post has been edited by amalone: Feb 7 2011, 20:13 |
|
|
|
Feb 7 2011, 20:37
Post
#23
|
|
![]() Group: Admin Posts: 4218 Joined: 15-December 02 Member No.: 4082 |
1.8 didn't increase the gain at all, so it was only a limiter.
|
|
|
|
Feb 7 2011, 20:58
Post
#24
|
|
|
Group: Members Posts: 29 Joined: 22-February 10 Member No.: 78388 |
I understand. Well, the song "School" really blasted with version 1.10. It was louder than with 1.9. I think I heard it on streaming radio also. Thanks.
|
|
|
|
Feb 7 2011, 22:26
Post
#25
|
|
|
Group: Members Posts: 913 Joined: 22-October 01 From: the Netherlands Member No.: 335 |
This DSP is not guaranteed to prevent clipping. Ah, it's just that every other dynamics compressor I've come accross (by far not all that exist) did have a mechanism to keep the signal (just) below 0dBFS. Maybe the term is commonly used for a compressor/limiter combination. I hope you have an opportunity to play with that sample (and others) to find out what's going on. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 18:44 |