[linux-audio-dev] a question re: the MIDI spec
Pedro Lopez-Cabanillas
plcl at telefonica.net
Fri Sep 10 17:51:34 UTC 2004
On Friday 10 September 2004 Martijn Sipkema wrote:
> The problem here is that class compliant devices suffer bad timing
> because they use bulk transfers for MIDI data. The standard for
> MIDI over FireWire is much better.
I don't agree on the subject that USB bulk transfers cause bad MIDI timing.
Of course, you can't use the same USB host controller at a time with a MIDI
interface and some other device like a CD writer and expect both good MIDI
timing and fast CD burning. If you can reserve a host controller exclusively
for your USB MIDI device, you will get pretty good results, most of the time.
There are four USB data flow types, Control transfers and:
- Bulk transfers are used to request or send reliable data packets up to the
full bus bandwidth. Devices like scanners or scsi adapters use this transfer
type.
- Interrupt transfers are similar to bulk transfers which are polled
periodically. If an interrupt transfer was submitted the host controller
driver will automatically repeat this request in a specified interval (1ms -
255ms).
- Isochronous transfers send or receive data streams in realtime with
guaranteed bus bandwidth but without any reliability. In general these
transfer types are used for audio and video devices.
(quoted from http://wwwbode.cs.tum.edu/Par/arch/usb/usbdoc/node8.html)
MIDI streams need to be reliable (a single byte lost isn't acceptable), so
Isochronous is not an option. Interrupt or Bulk transfers are very similar:
they use only the available bandwidth at each moment, so there can be
unwanted delays and timing problems. Some manufacturers' proprietary
protocols include a timestamp with each USB MIDI packet to enhance the time
accuracy, but this can be done either in bulk or interrupt transfers.
Regards,
Pedro
More information about the Linux-audio-dev
mailing list