Inter-App Midi

180 views
Skip to first unread message

Molly

unread,
Dec 7, 2018, 12:55:07 PM12/7/18
to android-midi

How do I broadcast inter-app MIDI messages so that I can select my app as an input from any other third party app that takes MIDI input?

I have been developing an app using the Midi-suite apps as a basis but am quite new to Midi processing in general so would appreciate some help. My app connects to a specific Midi Device that has its own unique hardware and midi messages, this means that the app then needs to decode these messages into regular note on / off messages etc. Once these messages are decoded the app allows me to send MIDI messages out to another app selected by the user. This is done by getting a list of MidiReceivers in my app using a spinner and selecting one of them. Messages are then sent out to the selected receiver using MidiReceiver.send(buffer, offset, count, timestamp).

What I want is instead to broadcast my MIDI messages out so that instead of selecting an output from my application, my application can be selected as a MIDI input from some other third party DAW or synth app.

How would I achieve this?

Thanks in advance!

Phil Burk

unread,
Dec 7, 2018, 1:06:16 PM12/7/18
to android-midi
Hello Molly,

You can create a Midi Service that has an output port.
Other apps can then find and connect to your service.

But in the AndroidManifest.xml you should declare an output port.

Then in your service call getOutputPortReceivers() to get the output port.

You can send() data to that port. Any app connected to that port should receive the data. Your service should look like a keyboard to another app.

More docs here:
Look for "Creating a MIDI Virtual Device Service". Oddly I cannot link to that header.

Please let us know how it works out.

Phil Burk



--
You received this message because you are subscribed to the Google Groups "android-midi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-midi...@googlegroups.com.
To post to this group, send email to androi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-midi/ae5e05b8-5263-4e1f-a83f-43f3b338c9bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages