Skip to content
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 support #15

Open
chris-zen opened this issue Feb 19, 2022 · 2 comments
Open

MIDI 2.0 support #15

chris-zen opened this issue Feb 19, 2022 · 2 comments

Comments

@chris-zen
Copy link
Collaborator

Hi, I'm the maintainer of the coremidi crate, I was willing to update it to support MIDI 2.0, and replace all the deprecated functions. But I'd like to check with you first to see what work would be necessary in coremidi-sys. Also I saw that the MIDI-CI stuff is written in Obj-C and I'm not experienced with bindgen, and less for Obj-C.

Looking forward to hearing from you.

@jonas-k
Copy link
Owner

jonas-k commented Feb 21, 2022

Hey chris-zen,

thanks for reaching out and for even making a pull request. The update brings the changes in MIDIServices.h into the rust bindings. This is not enough though to support MIDI 2.0 CI. Bindgen supports Objective-C, but we'd have to feed it multiple headers. I wrote a short rust script that generates the bindings and allows using multiple headers.
I'm also considering to generate bindings for all of CoreMIDI to have support for all the headers.

@chris-zen
Copy link
Collaborator Author

chris-zen commented Feb 21, 2022

Hi @jonas-k , yes I agree that there is still a lot to do to have the full MIDI 2 spec covered, but for now, with this PR I'll be able to support the UMP format using the new CoreMIDI EventList abstraction.

I was thinking on the same, I personally would create a different generated module per header file for all the CoreMIDI headers, which would allow the coremidi crate to provide higher level abstractions for other aspects of CoreMIDI such as devices, networking, and so on.

As of bindgen, did you see my PR? I propose a variation of the bindgen command that is able to pick headers from multiple frameworks. Although I would personally follow the bindgen tutorial and include the generation process as part of the build.rs file, it could look for an environment variable to know the root folder for all the frameworks and skip the generation if it doesn't exist.

About MIDI-CI, this is something I would love to have support for, but I'm not very familiar with bindgen and Obj-C.

I propose we go step by step, and focus now on the PR #16 required to support EventList (see my ongoing work here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants