M4L : multiple VUmeters in one tab ?

chapelier fou's icon

Hi,
does anyone know a clever way to display a VUmeter for each track, all of them in the same mira.frame ?
thanks
louis

chapelier fou's icon
gavspav's icon

Well couldn't you observe the level in each track and then feed that to a meter in your mira device.

Or use live.remote if you need audio rate resolution

It's not clever though, it's wasteful and expensive, sorry.

chapelier fou's icon

Much more clever than me, though ! didn't know you could observe level... was trying to mess with send~ but it's not working. Thank you very much !

gavspav's icon

Ah maybe you can't! I'm doubting myself now.

chapelier fou's icon

humm, can you really observe the level ? i don't see it in the LOM.

chapelier fou's icon

The guy who made this MUST know :http://www.maxforlive.com/library/device/1626/ultimate-mixer
Trying to reach him.

gavspav's icon

Yeah you can. I started making an example device for you but live.meter~ doesnt work with mira yet and meter~ doesn't have a linear option (only db) so you need to do a bit of maths or something. Too early for that! but below is the api snippet. I'm sure you can piece it together.

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

If you didn't want to use the api you could have a m4l device in every channel and just read the audio level as it comes in and send it to your master device.

Stephane Morisse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

This.

output_meter_level is too smoothed to be usable (or maybe I did something wrong) but observing left or right channel seems to be fine.

Stephane Morisse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Gavspav beat me by a few seconds, and I had forgotten that live.meter~ doesn't work (but will in a close future of course errr... Cycling people ?). Have a look at my previous post though as you will see what I mean about observing output_meter_level...
So to make it usable in Mira, I've come with this. Don't know if this is theoretically correct, but it seems close to the levels indicated by Live... Maybe some kind of exponential scaling would be more precise, but dealing with the levels as they appear in Live GUI has always been tricky, I've spent a lot of time in Lemur trying to match them precisely and the closer solution implied using an array of values.

chapelier fou's icon

Thanks guys. Stephane your scaling is not correct as it ouputs -1 when the incoming sig is 0. im happy anyway !

Stephane Morisse's icon

I know about the scaling, that was just meant to allow the reading on meter~, as this only accepts signals in the -1. 1. range. Maybe there's another solution. You can read the amplitude value in the float box.