Seeking Guidance on Creating a LUFS Meter

I’m a newbie with JUCE. I want to create a lufs meter.

In the process, I found out about LUFSmeter (GitHub - klangfreund/LUFSMeter: An implementation of the loudness measurement algorithm ITU-R BS.1770) but the details on how to execute it are not specified. I also referred to the ‘How_to_set_up_windows_7_for_juce’ document, but I couldn’t proceed in that manner.

Is there anyone who can provide updates or assistance on this?

Thank you.

Luckily all information about the protocol is public.
You can find it (at least the core, there are many other resources refining on this) at:!!PDF-E.pdf.

I’m aware that the ITU documents exist. Rather, I’m specifically looking for how to apply the content found on that GitHub to JUCE. If there’s anyone who has recently implemented this, I would appreciate your help.

Yeah, I don’t think the project file, referred to in that document, is on the main branch.
On the multiChannelLoudnessBar branch though, there seems to be a project (and a jucer file) that you could try in /projects, that could generate a project you could build.

Have you successfully built a peak meter already - if not start there?

1 Like

Roughly -

  • Start a JUCE plugin project
  • Write a function called measure(AudioBuffer&) that iterates over the block finding the maximum value(s)
  • Write those to member variables of your audio processor.
  • Start a timer in your plugin editor, use this to trigger a repaint.
  • Draw a rectangle that uses the value from your processor to determine it’s height.
  • Use Decibels class from JUCE to convert to DB so you get a sensible scale.
  • Fuck around for four hours trying to render a nice looking DB scale along side your rectangle where the dashes line up properly with the meter and the font actually looks centred next to the dash
  • Ponder whether you should write the values as negative numbers or assume the user knows that they are all negative. Also be annoyed that the - sign for the negative number aligns badly with the graph.
  • Add in all the nice stuff, peak hold, value read-outs, colours.
  • Discover it crashes in mono or 5.1, fix that.
  • Fret about repaint efficiency. Get confused by how repaint actually works. The optimal solution is to only repaint the changed area of the meter (usually a few pixels).
  • You now have a peak meter - now rewrite your measure function to support LUFS

Did autocorrect messed up with your intended verb on item #7 :joy:

Thank you everyone for your kind responses. Thanks to you, I feel like I can start off my day on a positive note on the JUCE forum. I will try everything you’ve suggested. Have a great day!

I don’t think so :slight_smile: :slight_smile:

Well, I personally love that it nicely partakes of the emotions conveyed throughout these otherwise very valuable learning suggestions, though. Definitely makes the journey more appealing and realistic :smiley:

Well, I’ve done it a few times now, and it’s always the same trip :slight_smile:


GitHub - unusual-audio/loudness-meter: Loudness Meter is a juce project using the klangfreund lufs meter