         }
     }
     
-    //length is length of longest track in the sequence
-    public var length:Double{
+    /// Length of longest track in the sequence
+    public var length: Double {
         var length:MusicTimeStamp = 0
         var tmpLength:MusicTimeStamp = 0
 //        var size:UInt32 = 0

            print("could not start avSeq")
        }
    }
    public func stop(){
//        MusicPlayerStop(musicPlayer)
        avSeq.stop()
    }
    public func rewind(){
//        MusicPlayerSetTime(musicPlayer, 0)
        avSeq.currentPositionInBeats = 0
    }
    
    public func setGlobalMidiOutput(midiEndpoint:MIDIEndpointRef){
//        for trackInd in tracks{
//            MusicTrackSetDestMIDIEndpoint(trackInd.internalMusicTrack, midiEndpoint)
//        }

        initTracks()
    }
    
    /// Initialize all tracks
    func initTracks() {
        tracks.removeAll()
        for( var i = 0; i < self.numberOfTracks; ++i){
            var musicTrack = MusicTrack()
            MusicSequenceGetIndTrack(sequence, UInt32(i), &musicTrack)
            tracks.append(AKMusicTrack(musicTrack: musicTrack))
