             tmpLength = track.lengthInBeats
             if tmpLength >= length { length = tmpLength }
         }
-        return  AKDuration(beats: length, tempo: tempo)
+        return AKDuration(beats: length, tempo: tempo)
     }
 
     /// Rate relative to the default tempo (BPM) of the track


    /// Load a MIDI file
    public func loadMIDIFile(_ filename: String) {
        let bundle = Bundle.main
        guard let file = bundle.path(forResource: filename, ofType: "mid") else {
            return
        }
        let fileURL = URL(fileURLWithPath: file)

        do {
            try sequencer.load(from: fileURL, options: AVMusicSequenceLoadOptions())
        } catch _ {
            AKLog("failed to load MIDI into sequencer")
        }

    ///
    /// - parameter data: data to create sequence from
    ///
    public func sequence(from data: Data) {
        do {
            try sequencer.load(from: data, options: [])
        } catch {
            AKLog("cannot load from data \(error)")
            return
