     }
     
     /// Set the tempo of the sequencer
-    public func setBPM(bpm: Float) {
+    public func setBPM(bpm: Double) {
         if isAvSeq {
             //not applicable
         } else {

        loadMIDIFile(filename)
    }
    
    /// Set loop functionality of entire sequence
    public func loopToggle() {
        (loopEnabled ? loopOff() : loopOn())

    
    /// Get a new track
    public func newTrack() {
        if(!isAvSeq){
            var newMusicTrack = MusicTrack()
            MusicSequenceNewTrack(sequence, &newMusicTrack)
            var count: UInt32 = 0
            MusicSequenceGetTrackCount(sequence, &count)
            tracks.append(AKMusicTrack(musicTrack: newMusicTrack))
            initTracks()
        }else{
            //cannot
        }
    }
    
    public func genData()-> NSData? {
        var status = OSStatus(noErr)
        var data:Unmanaged<CFData>?
        status = MusicSequenceFileCreateData(sequence,
                                             MusicSequenceFileTypeID.MIDIType,
                                             MusicSequenceFileFlags.EraseFile,
                                             480, &data)
        if status != noErr {
            print("error creating MusicSequence Data")
            return nil
        }
        let ns:NSData = data!.takeUnretainedValue()
        data?.release()
        return ns
    }
    
    /// Print sequence to console
