Linearity of output_meter and value

Questions and discussion about building and using Max for Live devices
Post Reply
mfrederickson
Posts: 18
Joined: Mon Nov 09, 2009 1:43 am

Linearity of output_meter and value

Post by mfrederickson » Mon Jan 14, 2013 4:54 pm

I have callbacks on:

"live_set", "tracks", n (output_meter_left)

and

"live_set", "tracks", n, "mixer_device", "volume" (value)

Both these values are between 0-1.

But if I receive them in OSC and draw a tall vertical rectangle, and put a gain setting triangle like the one in Ableton's mixer at a linear position on the height of the rectangle according to the volume value, then draw proportionately linear meters according to output_meter_left -

The output_meter_left value will frequently exceed that of the volume value, when it clearly (graphically) does not in Ableton.

So - could someone who has figured it out experimentally, or someone at Ableton please tell me:

Is the output_meter_{left,right} value logarithmic, or some other function? How can I convert it to linear?

The LOM docs just say:

"Smoothed momentary peak value of left channel output meter, 0.0 to 1.0. For tracks with audio output only. This value corresponds to the meters shown in Live. Please take into account that the left/right audio meters put a significant load onto the GUI part of Live."

mfrederickson
Posts: 18
Joined: Mon Nov 09, 2009 1:43 am

Re: Linearity of output_meter and value

Post by mfrederickson » Wed Jan 16, 2013 5:26 pm

Didn't see a reply, so I installed LiveControl to see what they send out for the TouchOSC display. So for now I'm using this:

level = (math.pow(10,level)-1.0)/10.0

To match them in converting what output_meter{left,right} sends to an approximation of what Live's meters display. If anyone who has tried this, or at Ableton, has a function that better matches Live's display I'd love to hear it.

ST8
Posts: 259
Joined: Mon Jan 26, 2009 12:55 pm

Re: Linearity of output_meter and value

Post by ST8 » Thu Jan 17, 2013 10:16 pm

That was a bit of a hack in LiveControl, i implemented a better exp fn in another prog. Will try and dig it out for you.

mfrederickson
Posts: 18
Joined: Mon Nov 09, 2009 1:43 am

Re: Linearity of output_meter and value

Post by mfrederickson » Fri Jan 18, 2013 1:56 am

Fantastic. I'm really looking forward to seeing it.

But, I'd also really like to understand - what does the value Ableton is sending out for output_meter, between 0-1, actually mean? What units is it in?

Is it a linear index into a logarithmic (roughly?) lookup table of the dB range of the meter?

Either way, I'd love to have your more proper function..

mfrederickson
Posts: 18
Joined: Mon Nov 09, 2009 1:43 am

Re: Linearity of output_meter and value

Post by mfrederickson » Sat Jan 19, 2013 5:39 am

Poke! If you have a moment, I'll be working on this part of my system this weekend and it'd be of great help. Thanks.

Post Reply