     @objc static public let sharedClient = SMClient()
 
     private init?(_ ignore: Bool = false) {
-        let status = MIDIClientCreate(name as CFString, nil /* TODO midiNotifyProc() */, nil /* TODO UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque()) */, &midiClient)
-        if status != noErr {
+        if #available(OSX 10.11, *) {
+            let status = MIDIClientCreateWithBlock(name as CFString, &midiClient) { (notification: UnsafePointer<MIDINotification>) in
+                // Note: We can't pass `self` here since we aren't yet fully initialized.
+                Self.sharedClient?.handleMIDINotification(notification)
+            }
+
+            if status != noErr {
+                return nil
+            }
+        }
+        else {
+            // TODO For 10.9 and 10.10, implement some kind of wrapper, following the pattern of MIDIClientCreateWithBlock?
+            //      It will almost certainly need to be implemented in ObjC.
+            //        let status = MIDIClientCreate(name as CFString, nil /*  midiNotifyProc() */, nil /*  UnsafeMutableRawPointer(Unmanaged.passUnretained(self).toOpaque()) */, &midiClient)
+
             return nil
         }
 

// TODO Duplicate stuff while migrating from ObjC to Swift
@objc extension NSNotification {

    static public let clientSetupChangedInternal = Notification.Name.clientSetupChangedInternal
    static public let clientSetupChanged = Notification.Name.clientSetupChanged
    static public let clientObjectAdded = Notification.Name.clientObjectAdded
    static public let clientObjectRemoved = Notification.Name.clientObjectRemoved
    static public let clientObjectPropertyChanged = Notification.Name.clientObjectPropertyChanged
    static public let clientThruConnectionsChanged = Notification.Name.clientThruConnectionsChanged
    static public let clientSerialPortOwnerChanged = Notification.Name.clientSerialPortOwnerChanged
    static public let clientUnknownChange = Notification.Name.clientUnknownChange

}


    }

    @objc public private(set) var midiClient = MIDIClientRef()
        // Note: This is actually a typedef to an int, not a pointer like you'd expect,
        // so this initializer just makes it 0. It's overwritten later.
    @objc public let name =
        (Bundle.main.object(forInfoDictionaryKey: kCFBundleNameKey as String) as? String) ?? ProcessInfo.processInfo.processName
    @objc public var postsExternalSetupChangeNotification = true    // TODO Should this be public? Seems like an internal detail
    @objc public private(set) var isHandlingSetupChange = false

    @objc public func forceCoreMIDIToUseNewSysExSpeed() {
