Meter Level Sysex Decoding for QU-SB

Forums Forums Qu Forums Qu DAW integration Meter Level Sysex Decoding for QU-SB

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Alexandernaut Alexandernaut 4 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #92125
    Profile photo of Alexandernaut

    Hey all, I’m trying to parse meter level data from the QU via a TCP connection, but getting confusing results. I’ve successfully made the connection and receive the meter data, but am unable to parse it properly.

    I follow the specs outlined in the Get Meter Data section of this document:

    As a test, I’m first trying to get the data from CH 1, Post Preamp. If my understanding is correct, this should be first 3 response bytes after the response header.

    So to get these 3 bytes, I look at the response buffer. The first 10 bytes are the response header, so I grab the following 3 bytes:

    uint8_t extraByte = _meterBuffer[10];
    uint8_t msb = _meterBuffer[11];
    uint8_t lsb = _meterBuffer[12];

    I then perform the logic from the spec using those bytes. Here’s the log for one pass:

    extraByte: 0101 0101
    msb: 0001 0011
    lsb: 0101 1001
    msb (parsed): 1001 0011            // after prepending with the appropriate bit from extraByte
    lsb (parsed): 0101 1001            // after prepending with the appropriate bit from extraByte
    combined: 1001 0011 0101 1001      // after combining them all to make a 16 bit int
    offsetedValue: 0001 0011 0101 1001 // after subtraction of 0x8000
    dbValue: 19.347656                 // after dividing by 256.0f

    All of the logic makes sense to me and follows the midi spec, and the values do change as the mixer receives input, but… over time, the values are simply not what I expect. They don’t follow the meter ui in the Qu-pad app, and seem to jump all over the place.

    Here are some dbValues following a short impulse response from a synthesizer. All values of complete silence are -126.929688 (as you can see these values bookend the response):

    dbValue: -126.929688
    dbValue: -126.929688
    dbValue: 19.414062
    dbValue: 57.402344
    dbValue: 93.390625
    dbValue: -124.617188
    dbValue: -86.628906
    dbValue: -71.640625
    dbValue: -12.652344
    dbValue: 27.335938
    dbValue: 67.324219
    dbValue: 105.312500
    dbValue: -112.695312
    dbValue: -74.707031
    dbValue: -37.718750
    dbValue: 1.269531
    dbValue: 39.257812
    dbValue: 73.246094
    dbValue: 114.234375
    dbValue: -103.773438
    dbValue: -66.785156
    dbValue: -26.796875
    dbValue: 8.191406
    dbValue: 1.179688
    dbValue: 86.167969
    dbValue: 125.156250
    dbValue: -93.851562
    dbValue: -55.863281
    dbValue: -17.875000
    dbValue: 21.113281
    dbValue: 58.101562
    dbValue: 96.089844
    dbValue: -122.917969
    dbValue: -84.929688
    dbValue: -126.929688
    dbValue: -126.929688

    As you can see, the response data does not show a simple decaying impulse. Anyone have any idea what’s going on?

    Profile photo of Alex A&H
    Alex A&H

    Hi Alexander,

    I’ve had a chat with Keith about this and he’s suggested that when you combine the MSB and LSB you may need to swap them round:

    So instead of combined: 1001 0011 0101 1001

    Try instead combined: 0101 1001 1001 0011

    This gives a value of -38.43dB. Is that closer?

    Also, the minimum value the meters should display is -110dB, so hopefully swapping the MSB and LSB solves that too.


    Profile photo of Alexandernaut

    That did it! Thanks so much :]

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.