Is the dB range easily changeable?
Hi!
First: very interesting stuff, much appreciated!
I have been going through the sources to find the option/constant/hard value that defines that the meter runs from -36 or so upwards. Not yet found...
I am puzzled: so many configurable options, but no option to set the total meter range. I find -36 dB very high for a general purpose level meter. I would prefer something between -64 to -96 dB.
I hope you have some time to reply.
Vriendelijke groet, ;-)
Peter
PS: if you replace Juce's getMagnitude with an Intel IPP function (or Apple vDSP), that call gets around 4x faster. Always worthwhile within an audio callback.
Just to clarify.
The meter has a decibel scale and displays values from -inf dB up to 0.0 dB.
Due to the logarithmic nature of decibels this means the top half of the meter is -6.0 dB - 0.0 dB and the bottom half ( -inf dB - -6.0 dB).
Tickmarks can be set wherever desired, but in pixels this usually means -50.0 dB and -60.0 dB are very close (if not the same).
I do have future plans to implement a linear scale (though I usually don't find them very usueful), or possibly K-scales
.
So you are using a log transform twice?
Normally dBs form a linear scale on a meter, with same distances between 0, -6 dB, -12 dB, - 18 dB, etc., where the log compression is already contained in the decibel values.
Is this a clear choice, to step away from standards like used in Cubase and Pro Tools?
No. It's not being converted at all. You give it values in the [-1.0 - 1.0] range. Straight from the audio buffer. And that is what it will display. It will use the decibel scale for the ticks. Thus a signal of 0.5 will read halfway down the meter and have a value of -6 dB (a halfing in dB).
I personally dont agree linear scale is the standard. Most professional meters I know (izotope insight, ppmulator, TC, RTW, DK Audio, etc) don't use a linear scale as standard (or at all). That would also in most applications be pretty useless (to have the same resolution from -70 - -60 as -10 - 0 ). There are however a lot of different scales for different purposes (K system, PPM, VU, DDN, NORDIC, BBC). Maybe I will implement a few more some day (maybe even a linear one, but prolly after the others).

Here is an example of the NORDIC scale.
P.S. Pro Tools btw have many scales. Indeed also a linear one. This meter would compare to the 'Pro Tools Classic' scale. The one option there was when it was not possible to select different scales.