     }
     
     func updateUI() {
-        if conductor.analyzer.trackedAmplitude.value > 0.1 {
-            frequencyLabel.text = String(format: "%0.1f", conductor.analyzer.trackedFrequency.value)
+        if analyzer.trackedAmplitude.value > 0.1 {
+            frequencyLabel.text = String(format: "%0.1f", analyzer.trackedFrequency.value)
             
-            var frequency = conductor.analyzer.trackedFrequency.value
+            var frequency = analyzer.trackedFrequency.value
             while (frequency > Float(noteFrequencies[noteFrequencies.count-1])) {
                 frequency = frequency / 2.0
             }

                }
            }

            var octave = Int(log2f(conductor.analyzer.trackedFrequency.value / frequency))
            var noteName = String(format: "%@%d", noteNamesWithSharps[index], octave)
            noteNameWithSharpsLabel.text = noteName
            noteName = String(format: "%@%d", noteNamesWithFlats[index], octave)
            noteNameWithFlatsLabel.text = noteName
        }
        amplitudeLabel.text = String(format: "%0.2f", conductor.analyzer.trackedAmplitude.value)
    }
}
    @IBOutlet var noteNameWithSharpsLabel: UILabel!
    @IBOutlet var noteNameWithFlatsLabel: UILabel!
    
    let analyzer: AKAudioAnalyzer
    let microphone: VocalInput

    let noteFrequencies = [16.35,17.32,18.35,19.45,20.6,21.83,23.12,24.5,25.96,27.5,29.14,30.87]
    let noteNamesWithSharps = ["C", "C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"]
    let noteNamesWithFlats = ["C", "D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"]
