AW: Lost Midi Packets over Wifi Network [bcc][faked-from]
AW: Lost Midi Packets over Wifi Network [bcc][faked-from]
- Subject: AW: Lost Midi Packets over Wifi Network [bcc][faked-from]
- From: Tobias Erichsen <email@hidden>
- Date: Thu, 23 Feb 2012 09:31:46 +0000
- Thread-topic: Lost Midi Packets over Wifi Network [bcc][faked-from]
Hi Paul,
> All messages are received perfectly most of the time, but occasionally
> a string of note messages just don't make it, at all.
> All packets are time-stamped at zero, and we've put the Midi messages
> on a separate thread to prevent the UI from interfering.
> I'm not aware of any way to check if messages have been received
> correctly, wondering if anyone could suggest why packets are
> occasionally lost?
the Apple network MIDI driver is based on the RTP-MIDI protocol (RFC 4695) which specifies the encapsulation of MIDI-data into RTP-packets. RTP can use both UDP & TCP as a transport.
Since 99.9% of the time RTP is send via UDP - because retransmissions make not much sense for realtime-data, there is a certain amount of probability that an RTP-packet (and thus the included MIDI-data) might get lost during transfer.
It is very seldom to catch packet-loss on wired networks (unless the switch or the endpoints are totally congested), but on Wifi this might happen due to bad reception quality or other devices interfering on the same frequency for a short span of time.
The reason that a string of notes is lost might either be that they have been sent in short succession and a Wifi burst error occured (noise in the ether that was long enough to prohibit the transfer of multiple UDP packets) or if they are sent at the same time by the app, the Apple network-MIDI driver might all place them in a single RTP-MIDI packet.
There are recovery procedures defined in RTP-MIDI in form of the "journal". This enables the receiving endpoint to reconstruct missing midi-events due to lost RTP-packets.
Unfortunately this journal is only constructed to settle "indefinite artifacts" (like a missing note-off) whereas "transient artifacts" (like a missing note-off) are not corrected.
If you have any further questions on RTP-MIDI, please don't hesitate to contact me (I have an RTP-MIDI implementation for Windows and have developed a Wireshark dissector for RTP-MIDI which is currently awaiting inclusion in the main branch)
Best regards,
Tobias
_______________________________________________
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