Skip to content

Potential issue with System Exclusive messages #59

Open
@dayunbao

Description

@dayunbao

I'm sending MIDI messages over USB from a Pico to code running on a USB host. The USB host is using Mido to handle all incoming and out going MIDI messages. The issue is that this is how Mido is interpreting the System Exclusive data:

sysex data=(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,125,19,3)

when I'm sending the data like this:

async def record(self):
        # A wrapper around a SysEx message to start recording.
        device_id = self.module_id
        command_id = self.RECORD_COMMAND_ID
        data = [self.MANUFACTURER_ID, device_id, command_id]
        self.midi_handler.send(
            SystemExclusive(
                manufacturer_id=self.MANUFACTURER_ID,
                data=data,
                )
        )

I had to add the manufacturer ID byte to data because otherwise it's lost completely.

Mido is seeing the bytes in data as a tuple of 128 ints. Why is this happening? Is this a bug, or something I'm doing wrong.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions