Garbage MIDI Data (MIDI FX, Logic Pro, Mac M1)

Hi,
my sequencer outputs MIDI data to Logic Pro on M1 Macs that is not generated by the plugin itself. This leads to unpredictable behavior, such as notes that hang permanently, and makes it impossible to work with. My plugin only generates Note-On and -Off messages, which are always output on MIDI channel 1. However, many other commands appear in the MIDI log that are neither generated by me nor have any relation to generated MIDI data (see Scripter Logs below).
I am aware of the problem that existed with Logic Pro and 3rd party MIDI FX on M1 Macs. I also thought it was fixed since 10.7.4. However, this problem occurs with 10.7.4.
The problem only occurs on M1 Mac.
Intel works fine.
The VST3 version works fine on both M1 and Intel Macs in other hosts.
JUCE version is 6.1.6.
The AU is compiled as MIDI FX & Universal.
Does anyone have any ideas?

Faulty output (Bold & Italic = garbage data):

[NoteOn channel:1 pitch:36 [C1] velocity:100]
[NoteOff channel:1 pitch:36 [C1] velocity:0]
[NoteOn channel:1 pitch:38 [D1] velocity:100]
[NoteOff channel:1 pitch:38 [D1] velocity:0]
Error: send() called with malformed MIDI event
[PolyAftertouch channel:4 pitch:119 [B7] value:1]
[Aftertouch channel:1 value:0]
[NoteOn channel:5 pitch:111 [D#7] velocity:1]
[NoteOff channel:5 pitch:197 [F14] velocity:0]
[NoteOff channel:2 pitch:1 [C#-2] velocity:0]
[NoteOff channel:1 pitch:0 [C-2] velocity:0]
[PolyAftertouch channel:10 pitch:52 [E2] value:1]
[PolyAftertouch channel:10 pitch:52 [E2] value:1]
[PolyAftertouch channel:10 pitch:52 [E2] value:1]
[PolyAftertouch channel:11 pitch:1 [C#-2] value:0]
Error: send() called with malformed MIDI event
[PolyAftertouch channel:4 pitch:119 [B7] value:1]
[Aftertouch channel:1 value:0]
[NoteOn channel:5 pitch:111 [D#7] velocity:1]
[NoteOff channel:5 pitch:197 [F14] velocity:0]
[NoteOff channel:2 pitch:1 [C#-2] velocity:0]
[NoteOff channel:1 pitch:0 [C-2] velocity:0]
[PolyAftertouch channel:10 pitch:52 [E2] value:1]
[PolyAftertouch channel:10 pitch:52 [E2] value:1]
[PolyAftertouch channel:10 pitch:52 [E2] value:1]
[ControlChange channel:1 number:1 [Modulation] value:0]

Correct output (e.g. Intel Mac)

[ControlChange channel:1 number:100 [Reg.Par. LSB] value:4]
[NoteOff channel:1 pitch:48 [C2] velocity:0]
[NoteOn channel:1 pitch:48 [C2] velocity:100]
[NoteOff channel:1 pitch:48 [C2] velocity:0]
[NoteOn channel:1 pitch:48 [C2] velocity:100]
[ControlChange channel:1 number:123 [All Notes Off] value:0]

Thanks for the cross reference. I’ve already read every thread here about Logic Pro/M1/MIDI FX. And after an Apple employee posted here and Apple addressed the problem as “fixed” in the release notes of 10.7.4, I assumed it was. Since then, no new reports have appeared here that there are still problems with this constellation. That’s what I’m wondering about.

I analyzed the problem over the weekend and am now sure that it is somehow related to M1/Silicon. Because when Logic Pro is launched on M1 in Rosetta mode, the problem no longer occurs.

There is a message from @adamwilson in that thread saying that there are still MIDI issues with 10.7.4.

My bad, I somehow confused this thread with another one. Really though I read everything about this topic, but oviously didn’t.
Thanks for clearing it up!

Just to confirm, I still have weird issues with my MIDI plugin Entonal Studio, in Logic Pro, including random notes being generated.

I can confirm to experience similar (if not the exact same) issues on an M2 when building for release, both VST3 and standalone: Issues with MidiBuffer in JUCE 7 on macOS in RELEASE build.

I think the issue you linked to is different from the one in this thread; I have zero issues in other hosts, this one is a Logic Pro on Apple Silicon issue AFAIK

1 Like

Okay, good to know. Thanks!

Hey - glad to find this thread, having all kinds of MIDI weirdness with M1 MIDI FX. Guessing nothing has been done about this so far then. thx

Edit: Logic 10.4.7

Interestingly enough, I’ve removed the silicon version of my plugin from the bundle and Logic unhelpfully splins up the hosting service as intel and still allows the plugin to be loaded and it still has problems.

Ideally I want people to be able to run the plugin in Rosetta, but not in Logic running M1 - is there any way to do this?

thx

So, apparently latest version of Scaler MIDI FX plugin is working fine natively on silicon with no issues. would this suggest that the problems we’re having here are JUCE related?

thx

I looked into this last week. It seems that Logic will use the newer MIDIEventList API if it is available, and fall back to the old MIDIPacketList API otherwise. MIDI FX using the EventList seem to work correctly, but the PacketList is still broken.

I’ve added the following change on develop:

This will use the MIDIEventList when it is available, which should avoid running into the MIDI FX issues that have been reported on Arm. However, this is a workaround, rather than a fix. As far as I can tell, the problems seen when using the MIDIPacketList API are caused by Logic itself. Ideally, Logic should be patched in order to maintain support for existing plug-ins using the old API, rather than forcing plug-ins to be re-built with support for the new API.

Please try updating and see whether this change resolves the issues you’re seeing with MIDI FX AU plug-ins in Logic on Arm.

1 Like

thx - will check this out over the next day or so.

Looks like this has fixed the issues - thanks!