         loadMIDIFile(filename)
     }
     
+    /// Initialize the sequence with an empty sequence and audioengine
+    ///
+    /// - parameter engine: reference to the AV Audio Engine
+    /// - on hold while technology is still unstable
+    ///
+    public convenience init(engine: AVAudioEngine) {
+        self.init()
+        isAvSeq = true
+        avSeq = AVAudioSequencer(audioEngine: engine)
+    }
+    
+    public func sequenceFromData(data: NSData){
+        let options = AVMusicSequenceLoadOptions.SMF_PreserveTracks
+        
+        do {
+//            avSeq = AVAudioSequencer()
+            try avSeq.loadFromData(data, options: options)
+            print("should have loaded new seq data")
+        } catch {
+            print("cannot load from data \(error)")
+            return
+        }
+    }
+    
     /// Set loop functionality of entire sequence
     public func loopToggle() {
         (loopEnabled ? loopOff() : loopOn())

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

    
    /// 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
