MIDIKit: MIDI Thru Connections are not supported on this platform due to Core MIDI bugs.

Please Confirm

  • I have reviewed the MIDIKit Documentation which contains descriptive guides and extensive API reference
  • I have searched Issues and Discussions to see if the same question has already been asked

macOS Version(s) Used to Build

macOS 13 Ventura

Xcode Version(s)

Xcode 14

Description

Hello, I am trying to send a MIDI message via USB to a MIDI controller.

When I try to setup a thru connection using the midiManager.addThruConnection method, it throws the following error at runtime:

Fatal error: Error raised at top level: MIDI Thru Connections are not supported on this platform due to Core MIDI bugs.

I saw that this issue was deferred in https://github.com/orchetect/MIDIKit/issues/19 but I wasn’t sure which versions of MacOS are compatible/incompatible at runtime vs. build time. Any help would be appreciated.

Crash Logs, Screenshots or Other Attachments (if applicable)

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I’ve completed work on an implementation that allows non-persistent thrus to always work on macOS as outlined above.

Very cool!

@NaanProphet Would you like to test main branch? Make sure you pull latest of course.

Pulled the latest, and thru connections are working for me as expected on Ventura.

Note On: F3 midi2(28160) 1
Note Off: F3 midi2(32768) 1
Note On: G2 midi2(27648) 1
Note Off: G2 midi2(32768) 1
Note On: C4 midi2(28160) 1
Note Off: C4 midi2(32768) 1
Note On: B2 midi2(18432) 1
Note Off: B2 midi2(32768) 1
Note On: A3 midi2(16384) 1
Note Off: A3 midi2(32768) 1

I’ve just pushed an update to main branch that re-enables thru connections.

Now on supported systems they will work, otherwise it throws an error (try/catch) and no longer fatal errors.

I wouldn’t mind also exploring a hunch I have. I am wondering if an Obj-C target (just for internal use) was added to the package and imported by way of #if canImport(ObjCTarget) the package could remain compatible with Swift Playgrounds while also conditionally giving me access to the Obj-C workaround that would add Big Sur / Monterey support to non-persistent thru connections.