Skip to content

System Common Messages & TuneRequest not sent through MidiInterface::send method #371

Description

@nativeVS

It appears System Common Messages are not sent through the very convenient method.
After a bit of diggin I ended up adding the following lines in the hpp file which easily fixes most of that:

    else if (inType >= TimeCodeQuarterFrame && inType <= SongSelect)
    {
        sendCommon(inType, inData1);
    }
    else if (inType == TuneRequest)
    {
        sendCommon(inType);
    }

**EDIT: Ignore the following, as this turned out to be a hardware(?) problem with my MIDI interface I used for testing, see details in post further below. **

However this still didn't get the TuneRequest to be recieved in MIDI-OX.
A prjc forum post did a hypothetical fix, however the only way I seemed to actually get reliable TuneRequest output without chewing on the following SysEx bytes was to add two one empty bytes to the message (or I should say, MIDI-OX thinks now it's happy, so maybe that problem is on their end).
My quick fix was to add

mTransport.write(0x00 & 0x00);

following in the inner switch statement of the ::sendCommon method, making it:

switch (inType)
            {
            case TimeCodeQuarterFrame:
                mTransport.write(inData1);
                break;
            case SongPosition:
                mTransport.write(inData1 & 0x7f);
                mTransport.write((inData1 >> 7) & 0x7f);
                break;
            case SongSelect:
                mTransport.write(inData1 & 0x7f);
                break;
            case TuneRequest:
                mTransport.write(0x00 & 0x00);
                break;
            default:
                break;

Does anyone have any ideas why it seems to be required to make a 1 byte message into 3 2 bytes for it to be received properly? Is this a bug in MIDI-OX or some historic reasoning, or should I just look more carefeully at the MIDI spec again?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions