Re: [linux-audio-dev] a question re: the MIDI spec

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] a question re: the MIDI spec
From: Pedro Lopez-Cabanillas (plcl_AT_telefonica.net)
Date: Fri Sep 10 2004 - 20:51:34 EEST


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

 


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Sep 10 2004 - 20:57:02 EEST