                 if status != OSStatus(noErr) {
                     print("Error setting loopinfo on track \(status)")
                 }
-            }
-            
-            var trackLength: MusicTimeStamp = 0
-            var trackLengthSize: UInt32 = 0
-            
-            MusicSequenceGetIndTrack(sequence, i, &musicTrack)
-            MusicTrackGetProperty(musicTrack!, kSequenceTrackProperty_TrackLength, &trackLength, &trackLengthSize)
-            
-            if sequenceLength < trackLength {
-                sequenceLength = trackLength
             }
         }
         

        })
    }
    
    var enableLooping = false
    
    var musicSequence: MusicSequence?
    var musicPlayer: MusicPlayer?
    

        }
    }
    
    public init() {
        
        var result = OSStatus(noErr)
        result = NewMusicSequence(&musicSequence)
