Buffer RMS range


Hi, I’m building an input meter for my plugin.
I’m using the buffer function getRMSlevel(); …
But what is the range of the value returned?
I’ve debugged its value and I’ve noticed that ha peaks of 2.7 but normally stays in about .5 1.0…
I have 5 leds:


How can i calculate the RMS value and light on the lads (via SetVisible() in a if clause to check the value of RMS)?

Now, just for approssimation I’m using .2, .4, .6, .8, 1.0…


Perhaps this: https://www.juce.com/doc/classDecibels


Thank you!! I’ll try out…
For now I’ve used a log10(rms); function to convert RMS to DB…