     }
 
     func willShow() {
-        // TODO Can this be more specific now?
-    //    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(midiSetupChanged:) name:NSNotification.clientSetupChanged object:[SMClient sharedClient]];
+        NotificationCenter.default.addObserver(self, selector: #selector(midiObjectListChanged(_:)), name: .midiObjectListChanged, object: midiContext)
 
         captureDestinationsAndExternalDevices()
 

                midiObject.maxSysExSpeed = newValue

                // Work around bug where CoreMIDI doesn't pay attention to the new speed
                guard let midiContext = (NSApp.delegate as? AppController)?.midiContext else { fatalError() }
                midiContext.forceCoreMIDIToUseNewSysExSpeed()
            }


    var trackingMIDIObject: MIDIObject?
    var speedOfTrackingMIDIObject: Int = 0

    var midiContext: MIDIContext {
        ((NSApp.delegate as? AppController)?.midiContext)!
    }

    func captureDestinationsAndExternalDevices() {
        let center = NotificationCenter.default

