Basics of USB-MIDI

Basics of USB-MIDI
USB and MIDI

​MIDI has stayed relevant for over 30 years by adapting to the different ways that computers send information to and from external devices. MIDI can now be sent over 5 Pin DIN, Serial Ports, USB, Firewire, Ethernet, Bluetooth and more. But currently the most prevalent way to connect to computers, tablets and smartphones is USB. This article will cover the basics of USB-MIDI.

Why USB came about

In the early 1990's, there were far too many types of connectors on computers. There were separate serial ports, parallel ports, keyboard and mouse connections, and joystick ports, It was hard for people to tell whether the peripheral they were buying would actually work with their computer.  So Compaq, Intel, Microsoft and NEC ( joined later by Hewlett-Packard, Lucent and Philips) formed the USB Implementers Forum, Inc, a non-profit corporation to publish the specifications and organise further development in USB. Similar to the MIDI Manufacturers Association, the USB-IF makes sure that there is interoperability between USB devices. 

Goals of USB

The USB-IF had some clear goals when first developing the USB specification​

  • Standardize connector types: There are now several different types of USB connectors, but they are all standardized by the USB-IF
  • Hot-swappable: USB devices can be safely plugged and unplugged as needed while the computer is running. So there is no need to reboot.
  • Plug and Play: USB devices are divided into functional types (Audio, Image, Human User Interface, Mass Storage) and then operating system software can automatically identify, configure, and load the appropriate device driver when a user connects a USB device.
  • High performance: USB offers low speed (1.5 Mbit/s), full speed (12 Mbit/s) and high speed (up to 480 Mbit/s) transfer rates that can support a variety of USB peripherals. USB 3.0 (SuperSpeed USB) achieves the throughput up to 5.0 Gbit/s.
  • Expandability: Up to 127 different peripheral devices may theoretically be connected to a single bus at one time
USB System Architecture

The basic USB system architecture is actually pretty simple and consists of the following main components:

  • A Host Computer, Smartphone or Tablet
  • One or more USB Devices
  • A physical bus represented by the USB Cable that links the devices with the host​  

The Universal Serial Bus is a host controlled bus. All data transfers are initiated and controlled by the host and USB peripherals are slaves responding to host commands. So for  USB MIDI peripheral devices you need a computer, smartphone or tablet in the system to control and initiate USB communication.

USB Device Classes

USB devices are defined into specific functional classes, for example image, human interface devices (keyboard, mouse, joystick), mass storage, and audio. The operating system can then know what the devices is designed to do and automatically load what is called a class compliant driver for that type of devices. In 1999, the MIDI specification was developed by the USB-IF in cooperation with the MIDI Manufacturers Association and included in the Audio class of devices.  That is why sometimes when you connect a USB-MIDI peripheral, the OS will display a message that says USB-Audio devices connected.  As far as USB is concerned MIDI is an Audio Class Compliant device. 

Class Compliant Drivers versus Manufacturer Specfic Drivers

Class compliant drivers are convenient because you don't have to download any external software.  But often manufacturer specific drivers provide added functionality. Let's use Yamaha has an example.  Because data transfer on USb is much faster than 5 pin DIN it is possible to have multiple ports of MIDI (a port is a group of 16 MIDI channels) on a single USB cable. The dedicated Yamaha USB Driver provides for 8 ports of high speed USB, includes the names of all the devices that are compatible with the driver and has some routing capabilities. These features are only available if you download the driver from Yamaha's website.  Also many audio interfaces are also MIDI interfaces and audio and MIDI travel over the USb cable.  So if you purchase a MIDI or Audio interface you should always check the product manual and manufacturer's website to see if there is a dedicated USB driver for your product that provides added functionality. Often even if the manufacturer specific driver is available when connected to a device which don't allow driver downloads into the operating system (for example iOS devices), the product will still work as a class compliant USB device. 

Types of USB MIDI connectors

​Most desktop and laptops computers have the standard sized Type A USB connector. A standard USB cable has a Type A connector on one end to connect to the host and a Type B connector on the other end to connect to the peripheral device. 



USB Type A host connector
Type B USB peripheral connector

The Type A connector has a pin that supplies power to external peripherals so you need to be carefully about trying to connect two hosts via a Type A to Type A cable. This can cause serious damage to your gear so consult the manufacturer and manual before attempting this. 

The Type A connector is for host controllers (computers, smartphones, tablets and some digital musical instruments that act as hosts) and USB hubs. A USB hub is a device that expands a single (USB) port into several so that there are more ports available to connect devices to a host system.USB hubs are often built into equipment such as computers, computer keyboards, monitors, or printers. When a device has many USB ports, they all usually stem from one or two internal USB hubs rather than each port having independent USB circuitry. If you need more USB ports, there are also external hubs that you can buy. You need to check to see if your USB peripherals need to be powered by USB and if they do you may need a powered USB hub. 

On many digital musical instruments you find two USB connectors - one Type A connector labeled To Device and one Type B labeled To Host .  The To Host is usually used to send MIDI, Audio or both Audio and MIDI to a computer, smartphone or tablet. If your digital music product sends both MIDI and Audio over USB, you will almost certainly need a manufacturer specific driver. 

The To Device is usually used for USB Storage devices like Flash Thumb drives, but it can be used for other things depending on what the Host music product supports for device classes. 

Wearable MIDI controllers
MIDI 30th Anniversary Articles from around the wor...

Related Posts