Audio Glitches with External MIDI Input on iOS

Hi JUCE Team,

I’m encountering a recurring issue on iOS when using external MIDI keyboards with my JUCE-based host. To verify the behavior, I also tested with the latest version of the Audio Plugin Host (built from the most recent official commit) and observed the same problem.

Specifically, when loading the BLEASS Voices plugin (a vocoder-style instrument), I experience noticeable audio glitches. The issue becomes more pronounced with larger audio buffer sizes and improves slightly with smaller ones, but it is never completely resolved.

Interestingly, this glitch does not occur when triggering notes from virtual keyboards, either from the host or the plugin’s internal keyboard, where everything remains stable.

Would you be willing to run some tests on your side to help identify the root of this behavior? I’m happy to collaborate and can provide more details or perform specific tests if needed.

Best regards,
Samuele

If this happens specifically with the BLEASS plugin, it sounds like this particular plugin might be at fault (e.g., it performs some blocking operation while handling incoming MIDI events in its audio callback) rather than the JUCE host.

Please can you confirm that you built and tested the host in Release mode and not Debug?

Are you testing on a physical iOS device, or on the Simulator? It might be helpful to know the model of the device you’re testing.

Do you see the same results with the internal AudioPluginDemo plugin?

Hi Reuk,

Thanks for getting back to me.

I can confirm that I tested the host in release mode on a physical iOS device. I also ran some tests on the desktop version and noticed that the issue occurs there as well.

I haven’t tried the AudioPluginDemo plugin because it’s a synth while the issue that I’m encountering involves an audio FX plugin, specifically BLEASS Voices that is an audio FX that takes both audio and MIDI input. MIDI messages modify the audio input in real time.

Let me know if you need any additional details or if there is something specific you would like me to test.

Best,
Samuele

My thinking was that this plugin may be affected in the same way as a vocoder plugin given that it is still producing audio in response to MIDI input. If the problem is present in the AudioPluginDemo, we can rule out a problem with the BLEASS plugin, and the issue will also be easier for us to reproduce locally.

Hi Reuk,

I ran some tests with the AudioPluginDemo and I can confirm that the issue doesn’t occur with it.

Please let me know if there are any other tests you would like me to do.

Best,
Samuele

I had a quick test with BLEASS Monolit AUv3 in the AudioPluginHost, and that doesn’t seem to glitch when being controlled by an external MIDI controller. I also tried out the BLEASS Voices VST3 Demo in the AudioPluginHost on macOS, and I couldn’t get that to glitch either.

  • Can you confirm that BLEASS Voices only glitches in JUCE hosts? If you use a different host (GarageBand, AUM, REAPER etc.) with the same audio block size and sample rate, does the plugin glitch?
  • Are you aware of any other plugins (preferably with a free demo) that glitch in a similar way, or do you only see the problem with BLEASS Voices?
  • Is your external controller wired or wireless? I’m using a bluetooth MIDI device to test here, but I wonder whether you’re using an external audio interface of some kind, as that might influence the behaviour of the app.

Another thing to try is running the BLEASS plugin as a standalone app with the same MIDI controller, and check whether it still glitches when there’s no host involved.

Finally, you could try running the glitchy scenario in Instruments using the Audio System Trace configuration. You can find out how to do that here:

In this way, you may be able to work out what’s causing the pauses on the audio thread, and see whether they’re coming from the host or the plugin. If you can provide a trace that shows audio-thread pauses in the host, then we can start investigating fixes for those issues.

Hi Reuk,

thanks in advance for your help.

Yes, I can confirm that BLEASS Voices only glitches in JUCE hosts. I tested it in AUM using the same audio block size and sample rate, and the glitches were not present. I’ll continue testing with other hosts that support both MIDI and audio input simultaneously, and I’ll let you know if I discover anything else.

At the moment, I haven’t found any other plugins similar to it.

I’ve tested with both wired and wireless MIDI controllers and the glitches occur in both cases.

When you tested BLEASS Voices, did you try using larger buffer sizes (e.g. 256, 512, or 1024)? I’ve noticed that the glitches become more noticeable when playing notes quickly while speaking into the audio input. It seems that the audio buffer and the MIDI messages are not properly synchronized, which may be causing the glitches.

I’ll run some tests tomorrow based on your suggestions and get back to you with the results.

In the meantime, if you get a chance to test the plugin the way I described, let me know if you’re able to reproduce the glitches on your side.

If it helps, I can also record some videos to show you exactly what’s happening.

Best regards,
Samuele

Hi Reuk,

We’ve run some additional tests over the past few days and found that to replicate the glitch in Audio Plugin Host it’s necessary to connect at least three outputs when using an external keyboard, for example, the first three output nodes (1, 2, and 3). We tested this because our host connects all available audio nodes by default and so we noticed the issue start to appear in that situation.

We also spoke with the Bleass team and they’re happy to provide you with iOS licenses so you can test the plugin directly. If that works for you, we can either ask for your email to add you to our ongoing email thread with the Bleass team or, if you prefer, we can send the license key to you via direct message here on the forum.

Let us know what works best for you.

Best regards,
Samuele

Hi, please could you email us at info [at] juce [dot] com?

It would also be helpful if you could make a screen recording showing how you’re triggering the issue - that way we can be sure that we’re carrying out the same test procedure.

Hi Reuk,

I’ve just sent to you the email.

Thanks,

Samuele