     public func newTrack(name: String = "Unnamed") -> AKMusicTrack? {
         if isAVSequencer {
             print("AKSequencer ERROR ! newTrack only work if not isAVSequencer ")
-            return nil }
+            return nil
+        }
 
         var newMusicTrack: MusicTrack = nil
         MusicSequenceNewTrack(sequence, &newMusicTrack)

        }
        return outBool
    }
    
    /// Convert seconds into AKDuration
    ///
    /// - parameter seconds: time in seconds

        MusicTrackNewExtendedTempoEvent(tempoTrack, position.beats, constrainedTempo)

    }

    /// Tempo retrieved from the sequencer
    public var tempo: Double {
        var tempoOut: Double = 120.0

        var tempoTrack: MusicTrack = nil
        MusicSequenceGetTempoTrack(sequence, &tempoTrack)

        var iterator: MusicEventIterator = nil
        NewMusicEventIterator(tempoTrack, &iterator)

        var eventTime: MusicTimeStamp = 0
        var eventType: MusicEventType = kMusicEventType_ExtendedTempo
        var eventData: UnsafePointer<Void> = nil
        var eventDataSize: UInt32 = 0

        var hasPreviousEvent: DarwinBoolean = false
        MusicEventIteratorSeek(iterator, currentPosition.beats)
        MusicEventIteratorHasPreviousEvent(iterator, &hasPreviousEvent)
        if hasPreviousEvent {
            MusicEventIteratorPreviousEvent(iterator)
            MusicEventIteratorGetEventInfo(iterator, &eventTime, &eventType, &eventData, &eventDataSize)
            if eventType == kMusicEventType_ExtendedTempo {
                let tempoEventPointer: UnsafePointer<ExtendedTempoEvent> = UnsafePointer(eventData)
                tempoOut = tempoEventPointer.memory.bpm
