                     }
                 }
             }
-        } else {
+    } else {
             //Get tempo for MIDI file format 0 which includes the tempo in the track chunks
             let midiTrack = midiFile.tracks[trackNum]
             let tempoEvent = 81

            return 0
        }
    }
    
    public var hiNote: Int {
        if noteList.count >= 2 {
            return (noteList.max(by: {$0.noteNum < $1.noteNum})?.noteNum)!

        self.noteNum = noteNum
    }
}
//Get the MIDI events which occur inside a MIDI track in a MIDI file
public class AKMIDIFileTrackNoteMap {
    public let midiTrack: AKMIDIFileTrack!
    public let midiFile: AKMIDIFile!
    public let trackNum: Int!
    //AudioKit midi object reference for later implementation with the AKMIDITempoListener
    let midi = AudioKit.midi
    public let tempoListener = AKMIDITempoListener(smoothing: 0.98, bpmHistoryLimit: 1)
    public var loNote: Int {
        if noteList.count >= 2 {
            return (noteList.min(by: {$0.noteNum < $1.noteNum})?.noteNum)!
