scale of the meter object

feclips's icon

Hello all,

I'm stuck on a problem that has been driving me crazy all afternoon. Hopefully someone will have come across this before, as it seems to be a rather simple issue, but I just can't figure it out!

Here is the thing: the response of the meter object doesn't align to a linear scale. That's hardly a surprise, because of the logarithmic conversion required by the dB scale. Problem is, I can't find a way to reproduce that same conversion anywhere else in Max. I want to be able to feed a slider with values in a way that corresponds to the display of the meter. Say the meter is right at the middle (6 LEDs out of 12). I want to know how to convert a linear scale (1-100 or whatever) into values that, fed into a slider exactly the same size of the meter, will drive it to exactly the same position.

That's probably a very complicated way to phrase something way simpler, but I couldn't come up with anything better. Hopefully the patcher attached will make it obvious enough!

What I've tried so far: atodb/dbtoa, scale using the 5th argument for exponential base, and more recently linedrive. This last one seemed very promising, but I couldn't find a 3rd argument value that corresponded to the way the meter behaves.

Any replies will be extremely welcome!

Max Patch
Copy patch and select New From Clipboard in Max.

Best,
Felipe

Tj Shredder's icon
Max Patch
Copy patch and select New From Clipboard in Max.

If you look into the inspector of meter~, you can see how its translated. A bit voodoo with atodb should make it work. But I would skip meter~ for live.meter~...

feclips's icon

Hello Stefan,

Thank you loads for that, how did you come up with /3 +20 ?? Pardon my rookieness...
Also, any particular advantages of live.meter~ over meter~ ?

Tj Shredder's icon

Well, the inspector tells me its 3 db per step...
The advantage of live.meter~? Look at it...
And it will also show low audio levels, and its even eats less CPU cycles.
I'd turn the question around: do you know an advantage of meter~? I guess the only one is the possible bigger size...

Stefan