Ok, I see. I’ll have a read-through that post about how to roll my own Standalone class.

"Let us know why the midi handling of the default standalone target app does not work for you. Maybe we can add it to JUCE"
The app only works with certain devices and as such performs a handshake for before allowing MIDI processing - this involves checking the that input and output for a device can be opened and doing a sysex device enquiry, so it’s not general MIDI handling.

Input pretty much sorted now, thx for all the help! Not getting any output now, but this one is the same in the demo app. Tried on a couple of different synths and the same. Running demo on iPad works as expected.

I’ve connected Bluetooth MIDI to a Yamaha MD-BT01 and see the same behaviour - input ok,output nothing. Tested Bluetooth MIDI on iPad and both in/out work.

I’ve used:

to make sure the USB cables are working properly.

Be sure to restart your Android device from time to time. The MIDI backend of Android is a bit buggy. See this thread:

and this bugreport:


1 Like

hi, just restarted and still the same behaviour. The MIDI keyboard app works but no output from the JUCE app.

“Can you also try this with the MidiTest example app: JUCE/examples/MidiTest?”

Just tried this and it works - seeing what differences there are…

So in the Juce Demo app I was selecting MIDI output on the settings page, then selecting it again on the MIDI i/o page which silently causes the 2nd open to fail on Android and therefore no output. Only opening the output on the MIDI i/o page works ok. Guess I must have something similar in my code.

Yeah, just tried the BLOCKS examples in the example folder and all seems to work fine.

Heh. My app is working fine this morning after the suggested reboot. Guess things are still a bit flaky as you say!

Hi Fabian, did you have a look at this page?


Yes I did but this is only for platform implementers. In any case, it’s only supported after Android M. I quote from the site:

Beginning with the Android 6.0 (Marshmallow) release, device makers can enable optional MIDI support in the platform.

… and JUCE fully supports MIDI for Android M and higher.

ok, thx for checking. Still a bit confused as I have a number of MIDI apps that work on 19 so it must be possible. I guess this is something we’ll have to explore and implement ourselves

Hi Fabian, just getting around to looking at this (rather than the commenting out of code). So, in order to change the behaviour of timerCallback() in StandalonePluginHolder, which is what I need to not automatically open all the MIDI ins on Android, it seems as though I need to do the following:

  1. Copy juce_StandaloneApp to my own class.
  2. Derive a new class from StandalonePluginHolder to be able to override timerCallback().
  3. Derive a new class from StandaloneFilterWindow to be able to create my own version of StandalonePluginHolder
  4. create new version of the StandaloneApp from juce_CreateApplication() after setting the JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 flag.

Does that sound about right? thx

Yes, sounds about right. Are you doing all of this to only avoid JUCE opening the ports? If yes, I’m sure we can add a flag to the StandalonePluginHolder to change this behaviour.

thx for confirming, just wanted to make sure I wasn’t going off down the wrong path.

yes, this is just to avoid opening the ports, so a flag would be great if it’s no trouble to add.

OK, I’ve added a preprocessor flag JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE to avoid the standalone plug-in opening the midi devices. This is on develop with commit 0b2822f.

brill - thanks!

1 Like