Are there any meter-modules?

I’ve been studying the AudioDeviceManager trying to trace how the input meter is working but I can not graps where the actual graphics animation of the “leds” are drawn.

I’m planning to put a meter in my plugin so any advice on where to begin is appreciated. I’m don’t have much experience on graphical elements like this.

Check out

http://drowaudio.co.uk/tools.php

Rail

Interesting link. But last updated 5 years ago. I don’t know what version of JUCE it was written with at that time, but I’d have to believe that it is fairly well out of date…

Here’s another option. I’ve been using this for meters in my project under development:

1 Like

Excellent, that seems like a very good starting point to learn how metering works.

Drowaudio seems a little too much for the moment.

Just out of curiosity regarding the Juce input meter, is there anyone who can direct me to the relevant Juce file where the actual graphical renderings take place for the AudioDeviceManager? I have a hard time following the call chain backwards from the tutorial and was thinking I might learn better how things work if I could understand this.

It is only used in the AudioDeviceSelectorComponent.
It is kept internal, since the JUCE team seemed to consider it not generic enough.

With meters it is important to be aware, that there are several different ways to measure and to visualise. Depending on your target audience, it will be crucial to pick the right scale, ballistics, decay and even what you measure can be different (RMS or maximum).

For a software instrument usually a rough indicator is enough, but for a mastering tool there is a lot to consider.

Thanks, that made things clearer.

Actually, regarding meters, you are absolutely right. Measuring and displaying correctly is crucial. Also keeping the display and audio is sync is vital. I’ll hopefully will learn to manage that too in the long run. There’s a lot to learn.

Studying this further I still have a question, hope it doesn’t get too complicated. Anyway, here it is:

In

AudioDeviceManagerTutorial.h

the MainContent class instantiates a AudioDeviceSelectorComponent and hands over a pointer to the created AudioDeviceManager (created by the AudioAppComponent if I understand things correctly).

Then in:

juce_AudioDeviceSelectorComponent.cpp

when updateInputsComboBox() is called the AudioDeviceManager pointer is handed to the created struct SimpleDeviceManagerInputLevelMeter

This in turn creates timer callbacks to get the input level from the AudioDeviceManager. The timerCallback() calls repaint() 20 times/sec.

However, the actual graphic meter is drawn when paint() (line 61) is called.
So where are these calls made?

(by the way how do I quote code from GitHub in the forum ?)

See paint() and repaint() in Component class’ documentation.

Great, thanks a lot for clarifying.