         let tempSequencer = AKSequencer(fromURL: url)
         addMusicTrackNoteData(from: tempSequencer, useExistingSequencerLength: useExistingSequencerLength)
     }
-
+    
     /// Creates new AKMusicTrack with copied note event data from another AKSequencer
     func addMusicTrackNoteData(from tempSequencer: AKSequencer, useExistingSequencerLength: Bool) {
         guard !isPlaying else {
             AKLog("Can't add tracks during playback")
             return }
-
+        
         let oldLength = self.length
         for track in tempSequencer.tracks {
             let noteData = track.getMIDINoteData()
-
+            
             if noteData.isEmpty { continue }
             let addedTrack = newTrack()
-
+            
             addedTrack?.replaceMIDINoteData(with: noteData)
-
+            
             if useExistingSequencerLength {
                 addedTrack?.setLength(oldLength)
             }
         }
-
+        
         if loopEnabled {
             enableLooping()
         }
     }
-
+    
     /// Initialize all tracks
     ///
     /// Rebuilds tracks based on actual contents of music sequence

        let nextSpot = AKDuration(beats: modTime(lastSpot.beats + quantizationInBeats))
        return [lastSpot, nextSpot]
    }

    /// Time modulus
    func modTime(_ time: Double) -> Double {
        return time.truncatingRemainder(dividingBy: length.beats)

            MusicTrackNewExtendedTempoEvent(existingTempoTrack, position.beats, constrainedTempo)
        }
    }
    
    /// Tempo retrieved from the sequencer. Defaults to 120
    /// NB: It looks at the currentPosition back in time for the last tempo event.
    /// If the sequence is not started, it returns default 120
    /// A sequence may contain several tempo events.
    open var tempo: Double {
        var tempoOut: Double = 120.0
        
        var tempoTrack: MusicTrack?
        if let existingSequence = sequence {
            MusicSequenceGetTempoTrack(existingSequence, &tempoTrack)
        }
        
        var tempIterator: MusicEventIterator?
        if let existingTempoTrack = tempoTrack {
            NewMusicEventIterator(existingTempoTrack, &tempIterator)
