• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
optimizing midi packet processing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

optimizing midi packet processing


  • Subject: optimizing midi packet processing
  • From: Nonnus™ <email@hidden>
  • Date: Sat, 1 Nov 2008 17:41:19 +0000

hello

currently i am using this code to parse incoming midi data:

- (void)processMIDIPacketList:(const MIDIPacketList*)packetList
{
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    int i,j;
    const MIDIPacket* packet;
    uint8_t message[kBufferSize];
    int messageSize = 0;
    
    packet = packetList->packet;
    for (i = 0; i < packetList->numPackets; i++) 
{
        for (j = 0; j < packet->length; j++) 
{
            if (packet->data[j] >= 0xF8) continue;
            if ((packet->data[j] & 0x80) != 0 && messageSize > 0) 
{
[owner handleMIDIMessage:message ofSize:messageSize];
                messageSize = 0;
            }
            message[messageSize++] = packet->data[j];
        }
        packet = MIDIPacketNext(packet);
    }
    if (messageSize > 0)
[owner handleMIDIMessage:message ofSize:messageSize];
    [pool release];
}

however i feel the midi handling is not as accurate as desired

can anyone please provide a better implementation

thank you for your support

abraços

nonnus
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: ExtAudioFile and AIFF Files > 4GB
  • Next by Date: Re: ExtAudioFile and AIFF Files > 4GB
  • Previous by thread: Re: ExtAudioFile and AIFF Files > 4GB
  • Next by thread: Re: optimizing midi packet processing
  • Index(es):
    • Date
    • Thread