Skip to main content

The USB-MIDI 2.0 device class in Zephyr

H.1302 (Depage) | Day 1 | 18:00 - 18:25 | Speakers: iTitou

The USB-MIDI 2.0 device class in Zephyr
A picture of a devroom at FOSDEM 2024
Open in browser
Get involved in the conversation!Join the chat

Notes

Abstract

A few years ago, a musician friend of mine reached out, hoping to build a custom controller for a live act performance. Together, we decided on a USB-MIDI device, which soon became a hands-on learning journey into Zephyr, USB development, and the MIDI protocol.

MIDI (Musical Instrument Digital Interface) has been the leading standard for connecting digital instruments and controllers since the 1980s. Although USB includes MIDIStreaming (a subclass of the Audio device class), Zephyr had no support for it. So, I decided to build one.

In this talk, I’ll walk you through my adventures implementing (and eventually upstreaming) this new device class. We’ll start by revisiting the original MIDI 1 protocol from the eighties, the original USB-MIDI1.0 from the 2000s and the updated USB-MIDI2.0 specification from 2020. After a brief refresher on USB devices, I’ll introduce the USB MIDIStreaming interface and the various supported topologies. Finally, we’ll see how to bring it all together using Zephyr USB device_next, and how it is used from your application's code. In the end, we should be able to make any kind of MIDI speaking device using our favorite kite-stamped RTOS.

Alongside this technical content, I may relate my experience as an occasional hobbyist contributor since Zephyr 1.14, and how I navigated spec updates (Device tree changes, USB-MIDI 1.0 to 2.0, Zephyr USB device next).

Attachments

Speakers

iTitou

Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.