AU MidiFX - Junk messages in MidiBuffer

We have encountered a weird issue with the AU MidiFX version of our plugin in Logic Pro X: The MidiBuffer we receive in the processBlock method contains a bunch of more or less random MIDI messages.

In the regular AU (instrument) version of the plugin, we receive a bunch of RPNs in the first call to processBlock after loading the plugin - but nothing like the MidiFX version (not sure what these RPNs actually are but they don’t seem to do any harm).

In the AU MidiFX version, we get the RPNs plus a handfull of random MIDI messages in the first several 100 calls to processBlock. After that the buffer is empty. The random messages include note on and off, and they cause absolute havoc:

[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Data Entry (coarse): 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Registered Parameter (fine): 4 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller Bank Select: 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Channel pressure 5 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Channel pressure 5 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Note on A7 Velocity 3 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Note off A4 Velocity 111 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Pitch wheel 13811 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Note off C#-2 Velocity 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Controller 48: 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Pitch wheel 0 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Channel pressure 5 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Channel pressure 5 Channel 1
[2023-10-21_10:10:23 290] [info] [thread 231743] [processBlock:110] - Note off A4 Velocity 111 Channel 1

This is just one example of the MidiBuffer contents. The RPNs stay the same but the random messages at the end vary for each block (in both contents and number).

In troubleshooting this I replaced all our code in the processBlock method with logging calls, so I’m positive that these messages do not come from our code. They are passed in to the processBlock method and must come from either JUCE or Logic Pro X itself.

JUCE: 7.0.5
MacOS: Ventura 16.6 (M1)
Logic Pro X: 10.7.9

1 Like

Hi, yeah, can’t remember the explanation for this, but it is documented somewhere in a similar report on this forum. They come from Logic.

Thanks for chiming in. Maybe you are referring to this post: MIDI FX for Logic Pro X: Burst of unexpected MIDI data arriving at processBlock in first buffer

This seems to be about the NPRs that are sent in the first block. I can confirm that these are also sent to our plugin, and the latest version of the Cthulhu MidiFX as well. They don’t cause any trouble.

But the poster of the above does not see the random messages after the NPRs that we see - which is the problematic part.

Edit:

Also worth noting that Cthulhu does not produce the random messages, which seems to indicate that this could be a JUCE problem.

OK, so I tried upgrading to JUCE 7.0.8 and that actually seems to solve the problem - which is a bit weird since I can’t find anything in the release notes which seems to be related to this. A bit unsettling since I don’t understand what solved the problem - but as long as it stays gone I’m happy.

The only problem that remains now is that all note on and off messages are sent twice from the AU MidiFX version (AU instrument, VST and VST3 work fine). Turns out this was also the case in the 7.0.5 build but I just didn’t notice…

Edit: The duplicate notes turned out not to be related to this issue at all, so I consider the problem solved.