-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIDI 2.0 Universal MIDI Packet format (UMP) #535
Comments
|
A bit too early to tell, barely anything exists that supports MIDI 2.0 yet. |
|
Link ALSA
https://github.com/alsa-project/alsa-lib/issues
Link universal packet format
https://www.midi.org/articles-old/details-about-midi-2-0-midi-ci-profiles-and-property-exchange)
https://www.midi.org/articles-old/midi-2-0-scope
https://juce.com/discover/stories/introducing-midi-2-0
Link first MIDI 2.0 Ready product: Roland A-88MKII
https://www.midi.org/articles-old/roland-announces
From MIDI.ORG: MIDI 2.0 uses a Universal MIDI Packet (UMP) format for MIDI 1.0 Protocol messages and MIDI 2.0 Protocol messages. There is a Version 2 of the USB Device Class Definition for MIDI Devices in development to support the UMP format. It will require new class drivers. All of the major OS vendors are aware of the progress. I think the ALSA team is also aware.
Note: ALSA team has been made aware of this, see ALSA github repo. alsa-project/alsa-lib#24
|
|
Hello there, |
|
Is that between client created ports or with physical USB devices using the raw or sequencer setting in jack ? How would that work with Windows Win32 MIDI API that lies underneath Jack in Windows since the win32 API only supports a DWORD for MIDI events. |
|
For now, there are no "official" physical devices yet, as the standard group is still discussing about USB implementation (there is nothing officially released about USB MIDI 2.0). On my side, I am working on Ethernet based devices, which do not need system dependent drivers. |
|
Thanks. that explains it Out of curiosity just verified UMP on Jack (Linux) with client registered ports. The data messages of 4 (and 8) bytes can indeed be exchanged between the ports. However when the packet reaches the ALSA level the first byte gets removed so only a 3 byte legacy MIDI message remains and this does reach the ALSA hardware device (or software clients) correctly. |
|
Sounds logic. ALSA (like Win MME or Core MIDI) knows nothing about MIDI 2.0. That's why I am using RTP-UMP (based on RTP-MIDI) hardware interfaces. From software point of view, JACK's clients must be programmed specifically to recognize UMP. I plan to work on some Open Source synths later (especially for the Zynthian target) |
|
https://github.com/atsushieno/cmidi2 might be useful for client implementations. |
|
things are starting to move, ALSA has alsa_ump support now: https://github.com/alsa-project/alsa-lib/blob/master/include/ump.h ; CoreMIDI has it since macOS 11.0 / iOS 14 (https://developer.apple.com/documentation/coremidi/midi_services/incorporating_midi_2_into_your_apps/) and there's WIP support on windows: https://devblogs.microsoft.com/windows-music-dev/the-new-windows-midi-services-spring-2023-update/ I'm currently adding support to https://github.com/jcelerier/libremidi |
|
After further testing jack_midi_event_write does allow to send to UMP data , however jack_midi_get_event_count and jack_midi_event_get attempt to read the data as legacy as such only sending UMP seems to work with jack, not receive.. |
|
I do not use jack_midi_event_write to send UMP, I use jack_midi_event_reserve. JACK documentation says that jack_midi_event_write is a wrapper around jack_midi_event_reserve, but it may perform some extra processing which blocks messages which do not comply to MIDI 1.0 (have to check in JACK source code). With jack_midi_event_reserve, I am able to send any UMP message, as you can see on the screenshot Here is the test code I use to send UMP blocks. int jack_process (jack_nframes_t nframes, void* arg) } // jack_process |
|
Thanks a lot, this helps. I have added a Feature Request for adding UMP support in the jack_midi_event_write call. Guess this needs to be done both in jack2 as well as in the pipewire jack emulator (?). |
|
I have released the complete source code of my two UMP/JACK demo applications. I have provided the links in a discussion I created : #985 |
|
I really like the ALSA implementation allowing clients to explicitly specify legacy or UMP and taking care of transparent translation between the two according to the MIDI 2.0 spec. Wouldn't it make sense to extend the JACK API in a similar way, so legacy and MIDI 2.0 applications can interact transparently? IIUC adding a port type is not a breaking change to the ABI, or am I missing anything? |
|
ALSA sequencer API supports all the UMP features, its a great API. ALSA does a great job for all translation handling. Since jack seems to use raw MIDI, it is quite difficult to determine a port supports UMP or not and to obtain the port capabilities. So far it seems there isn't a method to identify this from the current ALSA raw port API. The other challenge is the possible complexity of non-static function blocks when port capabilities change on the fly. Not sure how far the raw API changes will impact DAWs and other future UMP apps but could likely become quite a challenge for client applications. Ofcourse, It is possible to use the ALSA sequencer without the scheduling feature |
|
jack_midi_event_write works fine. The issues is reading UMP from ports. jack_midi_get_event_count and jack_midi_event_get . I used the same calls in in that demo app, but somehow didn't work. Those may work when its between two software jack ports because there isn't ALSA in between, though my use case is reading data from an actual MIDI UMP hardware device. Need check further..~~~ if someone has a Protozoa and verify ? |
There is, check the kernel docs I linked above:
With the important note:
While it may certainly work to send UMP over an 8-bit MIDI port in JACK if both ends understand UMP, in real-world scenarios it's just not as practical as having a separate 32-bit UMP port type and make JACK handle translation between the two, e.g. when a UMP port is connected to a legacy MIDI port.
I agree, sounds to me like another reason to make JACK "aware" of UMP ;)
Off-topic but in the past I've used a RasPi Zero 2 in USB gadget mode for this, based on the kernel docs, see https://gist.github.com/cbix/97a341c2857fd4f55d0cd19ccf6c354b |
What is the assessment of the impact the MIDI 2.0 packet based protocol will have on Jack audio and MIDI ? Would this need a new ALSA driver/sequencer and a change of Jack2 related APIs ?
https://www.midi.org/articles-old/details-about-midi-2-0-midi-ci-profiles-and-property-exchange
The text was updated successfully, but these errors were encountered: