Cabbage Logo
Back to Cabbage Site

How to "Feed" Meters?

Cool. I hadn’t come across KRETS before. I must give it a shot. The reason I asked is because I’m notoriously bad at promoting Cabbage, so I’m always pleasantly surprised when people stumble across it!

btw: talking about meters … is there any VU meter .csd in the repository?

I don’t think any of the examples make use of a VU meter. When so many hosts provide vu metres for each plugin it doesn’t seem important. But you got yours to work right?

Oh, I did not ask for the right thing then:
I was looking for a VU meter for RMS visualisation.

Regarding VU meters, I found a discussion from 2016 in this forum: Switching images with slider

But that code does not seem to work with the images provided.
Is there any VU meter in the examples?

P.S.: Sure, the RMS meter with scale visualisation is working absolutely fine. :slight_smile:

I’m confused :laughing: You say:

And then:

Are you looking for something that actually looks like a VU meter?

Right, I’m looking to implement a VU meter to visualize the RMS values. :slight_smile:

P.S.:
User tuncark had posted his .csd and image files of a VU meter to play around with:

And you had posted some code in this post of the same thread:

Unfortunately, if I combine your code with the images provided, and feed it with audio … there is only the first image displayed and no image swapping takes place (see attached ZIP file).
VU_meter_test.zip (218.0 KB)

That thread is pretty old. I don’t think using different png images is the way to go here. Let me create another example…give me a sec…

Hold on a sec, have you tried the knobmanSlider example in the Misc menu examples?

1 Like

Ah, not several PNGs, ok. ^^

Hadn’t seen yet that the knobmanSlider example is hiding a VU meter inside. :slight_smile:
But it looks promising.

As is, it’s displaying random values.
And I have a hard time feeding it with inch + chnset


I mean, what to exchange this part of code for(?):

kVuMeter randi 1, 5
filmStrip “vuMeterIdent”, int(abs(kVuMeter)*30)*128, 128, 128

Still have to dive more into CSound.
Do you have any hint for me? :blush:

It’s Csound :laughing: The incorrect spelling of Csound is becoming more and more frequenct :thinking: But I won’t hold it against you :rofl:

So you want to change the randi for a inch:

kVuMeter inch 1
filmStrip “vuMeterIdent”, int(abs(kVuMeter)*30)*128, 128, 128

In this case you don’t have to worry about a chnset as it’s already wrapped up in the UDO.

Oh, oh … hey, that’s what I call a newbie … haha
Even the spelling of what he’s going to learn is wrong. LOL

Thank you for your hint on the inch 1 part.
Sadly, that doesn’t bring the VU meter to life for me.

As soon as I exchange the randi for the inch 1 it’s dead. :frowning:

:rofl::rofl:

Sorry that was my fault. Even non-noobs err! It should be:

a1 inch 1
kVuMeter rms a1
filmStrip "vuMeterIdent", int(abs(kVuMeter)*30)*128, 128, 128

That’s fantastic. Rory. It works! :slight_smile:
Thank you SO much.


Only thing strange is, that as soon as I amplify the level of a white noise test-signal above +5.5 dBFS the VU meter graphic starts flickering and fully disappears, if I exceed a gain of about +6 dBFS.

I guess, the .csd runs out of PNG image portions. ^^
A solution could be to add enough image parts at the “end” of the PNG file to match the highest RMS value to be displayed.

Or is there any way to keep the VU meter showing the last part of the PNG, no matter how high the RMS value? e.g. some possibility to “cap” the incoming RMS value for the VU meter?


P.S.:

NEVERMIND :slight_smile:
I found out how to adjust the “translation” of the RMS value into the VU meter display.

int(abs(kVuMeter)[adjust here])[height], [width], [height]

This is really fun and works absolutely nice. ^^
I only find it hard to adjust the behaviour of the meter …

OK, I was too euphoric on this one … still at very high RMS values, the VU meter graphic disappears. :frowning:

It’s definitely down to how I’m moving through the image. You’ll need to do some experimentation. This was only ever intended as a quick example. In fact, I think someone might have posted an updated version of my UDO at one point. Let me look…

Hmm, couldn’t find it. Anyhow, it’s a simple fix for this one. We just need to limit the value of the RMS signal. We can do this with a limit opcode:

filmStrip "vuMeterIdent", int(limit:k(abs(kVuMeter)*30, 0, 29))*128, 128, 128

That’s it. Just like I wished for. :slight_smile:
Thanks for all your help, so far!

My VU meter works perfect now.
In the next step I am going to adjust my graphics to a 1kHz sine tone @ -18 dBFS RMS.

I’m so curious, if it will work … ^^

1 Like

Did you mean this post regarding your UDO(?):

And one more “stupid” question, hehe:
When integrating filmstrip … what exactly do the numbers in and outside of the bracket stand for?

filmStrip “vuMeterIdent”, int(limit:k(abs(kVuMeter)*30, 0, 29))*128, 128, 128

I have tried to do research and even tried to fumble around with those numbers, but still am not 100% sure about their exact meaning and result. Would you mind giving me a short description? That would be super-nice!!! :slight_smile:

That’s the one. It might be useful.

Or course not. If I recall correctly, each frame in film strip is 128x128 pixels. The UDO simple displays a 128x128 window from the film strip PNG. As kVuMeter moves between 0 and 1, we scale it to go from 0 to 30, as there are 30 frames in the film strip. This causes the “window” to jump up or down one frame each time kVuMeter changes. Does that make things any clearer? Feel free to probe for more information. I’ll provide it if I can.

Thanks!

OK, in my case I am trying to implement my own filmstrip image.
It has 151 steps (frames), each at a size of 262x162 px.

Have tried it with this beast:

filmStrip “vuMeterIdent”, int(limit:k(abs(kVuMeter)*151, 0, 150))*162, 262, 162

Still, I’m not sure about the meaning of the values.
For the moment, let’s look at the code this way:

filmStrip “vuMeterIdent”, int(limit:k(abs(kVuMeter)* [number of steps], [lower limit of steps], [upper limit of steps?!?]))*[height], [width], [height]

Are these descriptions correct?
Especially the [lower limit of steps] and [upper limit of steps] could very well be nonsense. :wink: