 
 
     init() {
-        midi.openMIDIIn("Session 1")
-
         bitCrusher = AKBitCrusher(core)
         bitCrusher.stop()
 

        AudioKit.output = reverbMixer
        AudioKit.start()

        let defaultCenter = NSNotificationCenter.defaultCenter()
        let mainQueue = NSOperationQueue.mainQueue()

        defaultCenter.addObserverForName(AKMIDIStatus.NoteOn.name(), object:  nil, queue: mainQueue, usingBlock: handleMIDINotification)
        defaultCenter.addObserverForName(AKMIDIStatus.NoteOff.name(), object: nil, queue: mainQueue, usingBlock: handleMIDINotification)

    }

    func handleMIDINotification(notification: NSNotification) {
        let note = Int((notification.userInfo?["note"])! as! NSNumber)
        let velocity = Int((notification.userInfo?["velocity"])! as! NSNumber)
        if notification.name == AKMIDIStatus.NoteOn.name() && velocity > 0 {
            core.playNote(note, velocity: velocity)
        } else if (notification.name == AKMIDIStatus.NoteOn.name() && velocity == 0) || notification.name == AKMIDIStatus.NoteOff.name() {
            core.stopNote(note)
        }
    }

}


import AudioKit

class Conductor: AKMIDIListener {
    /// Globally accessible singleton
    static let sharedInstance = Conductor()

    var core = CoreInstrument(voiceCount: 5)
    var bitCrusher: AKBitCrusher
