MIDI Bug

edited November 2012 in Support
Hi, I am the developer of Genome MIDI Sequencer. I've come across a bug with the way Beatmaker 2 handles MIDI input, and I'm hoping you guys could fix it in an update. It should be a fairly easy fix. The issue is that Beatmaker is assuming that MIDI packets only contain one message - in reality a packet can contain many messages. The issue manifests itself in that chords end up not playing properly (only one note might play out of 3). I've verified that this is the issue by making my app only send one message per packet which fixes the issue (though I'd prefer not to leave it this way, since it's less than optimal).

Here's how I'm handling it -
void midiReceived(const MIDIPacketList *packetList)
{
    bool echoing = midiEcho;
    const MIDIPacket *packet = &packetList->packet[0];
 
    packet = &packetList->packet[0];
    
    for (int i = 0; i < packetList->numPackets; i++)
    {
        int byteOffset = 0;        
        while(byteOffset < packet->length)
        {
            int messageLength;                      
            
            messageLength = Event::getLengthForMidiType(packet->data[byteOffset]);  
 
            // ......
            // process the MIDI message..

            byteOffset += messageLength;
         }
    }
Thanks!

Comments

  • Hello David,

    We fixed it a few days ago after an user reported this bug, I think he was in touch with you too.
    Works great now with Genome now <!-- s:-) --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
    BTW I'll be contacting you by e-mail to send you a pre-release version of BM 2.4.

    Thanks again!
    Cheers,
    Mathieu.
  • edited 7:41AM
    Excellent news! Thanks for the quick response, I know he will be pleased. <!-- s;) --><img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Sign In or Register to comment.