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

Android Support #19

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Conversation

momo-the-monster
Copy link

This fork includes support for Android 6 (Marshmallow) devices and above.

The project includes an Android Studio project for building the plugin, as well as the plugin itself. The plugin will build directly into the Assets/MidiJack/Android/Plugins folder.

I tried to make it work the same as the Windows plugin using the Dequeue system but wound up with stuck notes and incorrect buffer order issues. So I instead use a Callback system, where MidiDriver can directly register for events happening on the plugin and respond to them. It would make sense to refactor MidiDriver to have NoteOn, NoteOff, ControlChange handlers that both this callback method and the Update while() loop method could use but I didn't want to change so much of your architecture right off the bat.

This is tested and working on my Pixel, untested on any other phones but should work as I'm using OS-level MIDI functions.

@keijiro keijiro self-assigned this May 3, 2017
@Ivorforce
Copy link

Thank you for this!

This PR didn't work for me (on Oculus Quest 2), but by adding some crude changes on top of it I was able to make it work - via the bluetooth API. See here.

Anybody interested in continuing this PR, or basing some better designed API off it should probably look into state observation on bluetooth, and fix the USB MIDI connection. I had no time so far.

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

Successfully merging this pull request may close these issues.

3 participants