Page 1 of 1

Linearity of output_meter and value

Posted: Mon Jan 14, 2013 4:54 pm
by mfrederickson
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."

Re: Linearity of output_meter and value

Posted: Wed Jan 16, 2013 5:26 pm
by mfrederickson
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.

Re: Linearity of output_meter and value

Posted: Thu Jan 17, 2013 10:16 pm
by ST8
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.

Re: Linearity of output_meter and value

Posted: Fri Jan 18, 2013 1:56 am
by mfrederickson
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..

Re: Linearity of output_meter and value

Posted: Sat Jan 19, 2013 5:39 am
by mfrederickson
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.