Midi 2.0

Looking forward to getting into this code towards the end of summer. Is it going to be possible to bring this to teensy 3.2 devices?
 
Glad to hear it, @ETMoody3.
The Korg Keystage is one of the very devices that satisfy the criteria Paul set, so plugging it into
the Teensy host port is a solid test.

Tell me more about your MIDI-to-CV build. It's exactly the kind of project that gains the most from MIDI 2.0, and I'd love to
understand what you put together.

While you catch up on the reading, there are Teensy recipes to look at. midi2 (the portable C99 core) has teensy-device-midi2,
closer to the metal. midi2cpp (the C++ wrapper) has teensy41-midi2, the control surface and the host. The recipes
pass the MIDI Association's MIDI 2.0 Workbench, so they make a clean reference to start from. ;)
 
@yeahtuna,
The current work lives entirely in the Teensy 4.x USB stack (iMXRT), and the 3.2 uses a different USB peripheral (Kinetis,
Full Speed), so it isn't a recompile, it's a real port of the descriptors and the raw UMP I/O against the other stack.

A device on 3.2 is feasible: UMP can run fine at Full Speed and the descriptors already carry the 12 Mbit variant. Nobody has
written that port yet, but the descriptors are a starting point if you want to take it on. A host on 3.2 is out: it has no USB
host port. If host is what you're after, the boards that have one are the 3.6, 4.0 and 4.1, and the host recipe is validated on the
4.1 today. That said, I don't have a 3.2 on hand to say for sure on the device side.
 
Closing the validation loop on the Teensy 4.1 MIDI 2.0 device: the cores fork descriptors now pass the two references that
matter.
Windows MIDI Services (Microsoft's native stack): the Teensy enumerates as a native MIDI 2.0 endpoint over Kernel Streaming, and the MIDI Services Console decodes the whole stream natively, 32-bit Note On/Off, 32-bit CC, Pitch Bend, Per-Note Controllers, Flex Data, all with the right Group and Channel.

WMS.jpg


MIDI 2.0 Workbench (the MIDI Association's conformance tool): the recipe passes the checklist with no errors and no warnings.
WorkbenchII.png

The descriptors behind this are minimal and transport only, 625 lines in teensy4/, no application logic, in the cores style.
What this opens up: with native MIDI 2.0, the 32-bit resolution and the per-note controllers feed straight into the Audio Library, high-resolution continuous control reaching the DSP without the 7-bit steps. A synth or effect that actually uses MIDI 2.0's resolution in the sound path, on hardware you already have on the bench, is close to unheard of right now. That is the door these descriptors open.

If you want to try it, the recipes are in midi2cpp: github.com/sauloverissimo/midi2cpp. There are device, control surface and host examples for the Teensy 4.1, ready to clone and flash.

👍
 
I installed via the Library Manager, hoping for an easy install. I think it would be best if I just manually install as I have moved my portable arduino installation onto cloud storage so it can be shared between systems. Where should I put the library relative the the main arduino folder?

1786774743701.png
 
I installed via the Library Manager, hoping for an easy install. I think it would be best if I just manually install as I have moved my portable arduino installation onto cloud storage so it can be shared between systems. Where should I put the library relative the the main arduino folder?

View attachment 39693

Hi @yeahtuna! Glad you're trying it out. I think it's something simple, and this should do it:

The usb_midi2.h: No such file or directory error is from the other half of the setup, not from the library. Your midi2cpp from the Library Manager is already the right version (0.9.0), so you can leave it as is.

What's missing are the cores fork descriptors. They don't come through the Library Manager; they're an overlay onto the Teensy core. Most direct path:

1. Go to github.com/sauloverissimo/cores, switch to the feature/usb-midi2-descriptors branch, and download it as a ZIP (Code > Download ZIP).

2. From the ZIP you only need 5 files, from the teensy4/ folder. Copy them into the Teensy core, overwriting:
usb.c, usb_desc.c, usb_desc.h, usb_midi2.c, usb_midi2.h On Arduino 1.8.19 the core lives at:

<your-arduino-folder>/hardware/teensy/avr/cores/teensy4/

3. Restart Arduino and compile. The #include <usb_midi2.h> will resolve.

Since your install is portable on the cloud, that core travels with it between systems, so it's a one-time thing. 👍
 
Back
Top