How to use IxxxSender with a bitmap VU meter?

Hi,

I’m trying to get a VU meter control working.

In Examples\IPlugControls, there are the IVMeterControl and IVPeakAvgMeterControl examples.

However, I want to use a bitmap VU meter, using a multi-frame stacked bitmap.

There are no IBMeterControl / IBPeakAvgMeterControl controls that I can see, and I cannot seem to get a regular IBitmapControl to react using TransmitData().

I can use SendControlValueFromDelegate() to make the VU meter move, but how do I get a value from the IPeakSender or IPeakAvgSender object to send to it?

I am probably not understanding something.

Tl;dr: What would be the best way to get a multi-frame stacked bitmap to react to RMS levels coming from the plugin’s ProcessBlock loop?

Many thanks!

can you share the bitmap?

1 Like

Hi Oli,

I’m using this one:

Any way to share this as a zip file?

Ah, it seems to download correctly.
Looked a bit weird

It’s got 63 frames, 80x80 pixels

Do I maybe need to override IBitmapControl, and implement some receiving OnXXX() method?

We needed a new control IBMeterControl

Use like so:

Looks like:

meter

1 Like

Hi Oli,

That’s incredibly awesome, and beyond fast…
I’m seriously impressed!
Wow…

Thank you so much!

1 Like

Absolutely brilliant!

BitmapVU

One last question: If possible, to process stereo input, and to combine that to be displayed by one VU meter (as either the average of L and R channels, or the max() of them), is there a standardised way for that, or should I do that in the audio thread, or main thread somehow?

Many thanks!

looking good!

you’d have to either

  • make a custom class like IPeakAvgSender that sums the channels (on the audio thread)
  • make a custom IBMeterControl that uses a stereo IPeakAvgSender<2>, and draws two needles (or sums the channels there, on the UI thread)
  • sum the channels into a scratch buffer before processing with the mono IPeakAvgSender (on the audio thread)

I would probably just do the last option for simplicity!

1 Like

Awesome, I’ll consider those options, see what’s best.

Thanks! I’m planning this plugin to be the end goal of an iPlug2 video tutorial series I am preparing (because it’s a relatively easy distortion-type plugin, with only some basic filtering and waveshaping going on).

It will be from the very beginnings (installing all the prerequisites (Git, iPlug2 itself, Python, VS, Reaper, …), to duplicating IPlugEffect and getting it to compile & run), and then into more advanced territory, like adding parameters, adding a background bitmap, all the way up to adding oversampling etc.

I’ll keep you posted about my progress!
BitmapVU

1 Like