 
 class ViewController: UIViewController {
 
+    let mic = AKMicrophone()
     var metronome = AKSamplerMetronome()
     var mixer = AKMixer()
     var loopBackRecorder: AKClipRecorder?

        do {
            AKSettings.audioInputEnabled = true
            AKSettings.defaultToSpeaker = true
            AKSettings.sampleRate = AudioKit.engine.inputNode.inputFormat(forBus: 0).sampleRate
            try AKSettings.setSession(category: .playAndRecord)

            // Measurement mode can have an effect on latency.  But you end up having to boost everything.

        }

        // Make connections

        let muter = AKMixer()
        muter.volume = 0

        mic! >>> muter >>> mixer
        metronome >>> mixer
        player >>> mixer
        AudioKit.output = mixer

        // Set up recorders
        loopBackRecorder = AKClipRecorder(node: mic!)
        directRecorder = AKClipRecorder(node: metronome)

        do { try AudioKit.start() } catch {
