##
interpreting VU meter values in OSC message /meters/1

So I batch subscribe to /meters/1, which returns a blob of 16 bit ints. I've found via experimentation that offset values[4-21] are the channel VU meters, but I don't really know how to interpret the values.

Specifically, how do I turn that number into a percentage of height on the VU meter?

I currently have a kludge I'm doing, developed entirely by trial and error, that gives me meters heights that... kinda look like what I see in the iPad app:

public static float XR18VUMeterToPercentage(Int16 value)

{

// this is some weird massaging of the data, but it produces VU percentages

// roughly like what I see in Behringer's apps

float halfIntRange = Int16.MaxValue / 2.0f;

float signal = Math.Max(0, value + halfIntRange);

float percentage = signal / halfIntRange;

return percentage;

}

What should I

Specifically, how do I turn that number into a percentage of height on the VU meter?

I currently have a kludge I'm doing, developed entirely by trial and error, that gives me meters heights that... kinda look like what I see in the iPad app:

public static float XR18VUMeterToPercentage(Int16 value)

{

// this is some weird massaging of the data, but it produces VU percentages

// roughly like what I see in Behringer's apps

float halfIntRange = Int16.MaxValue / 2.0f;

float signal = Math.Max(0, value + halfIntRange);

float percentage = signal / halfIntRange;

return percentage;

}

What should I

*actually*be doing here?
Brands: