 
     /// Load a MIDI file
     public func loadMIDIFile(_ filename: String) {
-        let bundle = Bundle.main
-        guard let file = bundle.path(forResource: filename, ofType: "mid") else {
+        guard let file = Bundle.main.path(forResource: filename, ofType: "mid") else {
             return
         }
         let fileURL = URL(fileURLWithPath: file)
 
         do {
-            try sequencer.load(from: fileURL, options: AVMusicSequenceLoadOptions())
+            try sequencer.load(from: fileURL, options: [])
         } catch _ {
             AKLog("failed to load MIDI into sequencer")
         }

            tmpLength = track.lengthInBeats
            if tmpLength >= length { length = tmpLength }
        }
        return  AKDuration(beats: length, tempo: tempo)
    }

    /// Rate relative to the default tempo (BPM) of the track

    ///
    /// - 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
