Metering plugin

Hello !

I am learning to code my first VST plugins using the SDK and documentation.
I am struggling to find reference material to write a basic metering plugin.
Specifically: I am computing the RMS of the signal in my process() function.
I would like to hand this value to the controller, and display it in a text box.

At first, I thought of declaring the RMS as a parameter, but it is not something the user can actually set, it’s something that is measured, and can only be looked at.

Could you please point me to a link where I can find info how to achieve this ? I have looked at the documentation and used the search feature of this forum.

Thank you very much.

Hello !
I am sorry, I just found the “Parameters and automation” page in the Technical documentation section.

It seems if I declare my RMS as a read-only parameter, I might get to where I want. I will update this page if I have succeeded or need more help.

Thank you very much

Hi again !

I stumbled upon the again plugin among the examples. I hadn’t bothered to take a look at it as I expected it to be a gain parameter, but it turned out to have a metering element on it. So looking at the code I saw that I could use Steinberg::Vst::ProcessData::outputParameterChanges and in again.cpp how I could use it.

This is nice, but I still have an issue: I would like to display the number, not have a colored meter animation. The meaningful number I’d like to display is the level in dBFS based on the RMS. In other words: 20*log10(RMS(samples)).

That would range between -infinity and 0, but the parameters in VST range between 0 and 1, if I’m not mistaken. How can I display the actual value I’d like to look at, ranging between -infinity and 0 ?

Thank you very much.

Still featured in the again example ! I’m so embarrassed.
Sorry.