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.
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
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!
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