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

//Keep track of the note durations and range for later use in mapping

public class AKMIDINoteDuration {
    
    public var noteBeginningTime = 0.0
    public var noteEndTime = 0.0
    public var noteDuration = 0.0
    public var noteNum = 0
    public var noteNumMap = 0
    public var noteRange = 0
    
    public init(noteOnPosition: Double, noteOffPosition: Double, noteNum: Int) {
        self.noteBeginningTime = noteOnPosition
        self.noteEndTime = noteOffPosition

                    noteNum = Int(data[1])
                    if let prevPosValue = notesInProgress[noteNum]?.0 {
                        notesInProgress[noteNum] = (prevPosValue, eventPosition)
                        let noteTracker = AKMIDINoteDuration(noteOnPosition: notesInProgress[noteNum]!.0,
                                                             noteOffPosition: notesInProgress[noteNum]!.1, 
                                                             noteNum: noteNum)
                        notesInProgress.removeValue(forKey: noteNum)
