USB-MIDI: Mojave vs Catalina
USB-MIDI: Mojave vs Catalina
- Subject: USB-MIDI: Mojave vs Catalina
- From: Andy Peters via Coreaudio-api <email@hidden>
- Date: Wed, 29 Jul 2020 21:43:07 -0700
Hola, all, perhaps someone can help. This is a USB program and a MIDI problem,
and I don’t know which list is best suited for the questions.
I’m developing a product that includes a USB MIDI device interface. I started
out by implementing support for the USB MIDI Class 1.0 over Full Speed USB 2.0
on a Silicon Labs EFM8UB2 (8-bit 8051) microcontroller. The device implemented
support for two MIDI Ports in each direction IN and OUT. The device descriptor
includes the proper Jack descriptions to make this happen.
That works. And specifically, by “works” I mean:
a. it enumerates as a USB MIDI device on Mojave and Catalina (and Windows 7)
b. in Audio MIDI Setup’s MIDI Studio on both Mojave and Catalina, the device
shows that it has two IN and two OUT ports.
c. Buttons on the micro board send MIDI messages to the host when pressed, and
a MIDI monitor program like Pocket MIDI shows the proper messages on its
incoming-message window.
d. Messages sent from Pocket MIDI or from Python (pyMidi) control LEDs on the
board and the micro has a terminal UART port and I parse the received messages
and route them out that terminal and they are what I sent.
Again, this all works on both Mojave and Catalina.
I ported the code to the Silicon Labs EFM32GG11 device (32-bit ARM Cortex-M4)
with the same descriptors and mostly the same handling code (Silicon Labs’ USB
device stacks for the ARM and 8051s is highly similar). Like the EFM8 case it
is a Full Speed USB 2.0 device and it works as detailed above.
Next, I ported the code to the TI Tiva TM4C1294 (much faster 32-bit ARM
Cortex-M4F) processor. The reason is that the Tiva can support High Speed USB
2.0 with an external PHY but it also supports Full Speed USB 2.0 over an
on-chip PHY, and I am using the latter (Full Speed). The TI USB stack is not at
all like the SiLabs’ stack, and to be honest it’s overcomplicated. It uses the
same descriptors as the previous implementations, but I had to fit it into TI’s
weird format. After more effort than I anticipated, I got to the point where it
“works.”
And by this I mean:
a. On both Mojave and Catalina, the device successfully enumerates as a USB
MIDI Class Device.
b. On both Mojave and Catalina, the device appears in Audio MIDI Setup’s MIDI
Studio.
But.
On Mojave only, the device’s two IN ports and two OUT ports show up in MIDI
Studio. I can use Pocket MIDI to send messages to the device, which responds as
expected (prints the messages to the terminal, lights LEDs). I can push buttons
and send Note On and Note Off messages back to the computer, and Pocket MIDI
displays the messages in its input monitor terminal. In other words, it behaves
as expected.
On Catalina, however, the device’s IN and OUT ports _do not_ show up in MIDI
Studio. Pocket MIDI does not recognize the ports. I can neither send messages
to nor receive messages from the device.
I’ve searched and searched and cannot find anything describing the differences
between the USB MIDI implementation on Catalina vs Mojave. Obvious something
has changed. Catalina is expecting something that was not necessary under
Mojave.
I do see that after connection and immediately after USB configuration, both
Mojave and Catalina send a two-byte SYSEX message 06 f0 f7 to the device. (06
is the cable #0 and code-index-number 6 indicating SYSEX.) I don’t respond to
it, and I cannot find any documentation explaining what this message is for.
So, please — what are the differences between Mojava and Catalina that allow a
device to work on the former and fail on the latter?
— a
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden