Skip to content

OSC.js RGBA type bug #198

@dtsmarin

Description

@dtsmarin

I'm getting wrong RGBA values because the library confused the ASCII code for the r type with the red value in the RGBA arg

Here the raw buffer. The last 4 bytes are the RGBA value which is 9cea32
<Buffer 2f 54 72 61 63 6b 4c 69 73 74 2f 30 2f 43 6f 6c 6f 72 2f 47 65 74 00 00 2c 72 00 00 9c ea 32 00, framePos: 0, frameLength: 32, frameEnd: true>

Here is the same packet as decoded by OSC.js
{
address: '/TrackList/0/Color/Get',
args: [ { type: 'r', value: { r: 44, g: 114, b: 0, a: 0 } } ]
}

0x2c72 is the 44 and 114 but 0x72 / 144 is also the ASCII code for the letter ‘r’ which is needed to indicate the type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions