             let bytes = [packet.data.0, packet.data.1, packet.data.2]
             internalData = bytes
         }
+    }
+
+    init(fileEvent event: AKMIDIFileChunkEvent) {
+        if let typeByte = event.typeByte {
+            if typeByte == AKMIDISystemCommand.sysex.rawValue ||
+                typeByte == AKMIDISystemCommand.sysexEnd.rawValue {
+                print(AKMIDISystemCommand.sysex.description)
+                let data = [AKMIDISystemCommand.sysex.rawValue] + event.eventData
+                self = AKMIDIEvent(data: data)
+            } else if let statusType = AKMIDIStatusType.from(byte: typeByte) {
+                print(statusType.description)
+                self = AKMIDIEvent(data: event.eventData)
+            } else if let metaType = AKMIDIMetaEventType.init(rawValue: typeByte){
+                print(metaType.description)
+            } else {
+                dump(event)
+                fatalError("bad AKMIDIFile chunk - no type for \(event.typeByte)")
+            }
+        }
+    }
+    
+    /// Initialize the MIDI Event from a raw MIDIByte packet (ie. from Bluetooth)
+    ///
+    /// - Parameters:
+    ///   - data:  [MIDIByte] bluetooth packet
+    ///
+    public init(data: [MIDIByte]) {
+        if AudioKit.midi.isReceivingSysex {
+            if let sysexEndIndex = data.index(of: AKMIDISystemCommand.sysexEnd.rawValue) {
+                internalData = Array(data[0...sysexEndIndex])
+            }
+        } else {
+            internalData = data
+        }
+    }
+
+    // MARK: - Utility constructors for common MIDI events
+
+    /// Create note on event
+    ///
+    /// - Parameters:
+    ///   - noteNumber: MIDI Note number
+    ///   - velocity:   MIDI Note velocity (0-127)
+    ///   - channel:    Channel on which the note appears
+    ///
+    public init(noteOn noteNumber: MIDINoteNumber,
+                velocity: MIDIVelocity,
+                channel: MIDIChannel) {
+        self.init(data: [AKMIDIStatus(statusType: .noteOn, channel: channel).byte, noteNumber, velocity])
+    }
+
+    /// Create note off event
+    ///
+    /// - Parameters:
+    ///   - noteNumber: MIDI Note number
+    ///   - velocity:   MIDI Note velocity (0-127)
+    ///   - channel:    Channel on which the note appears
+    ///
+    public init(noteOff noteNumber: MIDINoteNumber,
+                velocity: MIDIVelocity,
+                channel: MIDIChannel) {
+        self.init(data: [AKMIDIStatus(statusType: .noteOff, channel: channel).byte, noteNumber, velocity])
+    }
+
+    /// Create program change event
+    ///
+    /// - Parameters:
+    ///   - data: Program change byte
+    ///   - channel: Channel on which the program change appears
+    ///
+    public init(programChange data: MIDIByte,
+                channel: MIDIChannel) {
+        self.init(data: [AKMIDIStatus(statusType: .programChange, channel: channel).byte, data])
+    }
+
+    /// Create controller event
+    ///
+    /// - Parameters:
+    ///   - controller: Controller number
+    ///   - value:      Value of the controller
+    ///   - channel:    Channel on which the controller value has changed
+    ///
+    public init(controllerChange controller: MIDIByte,
+                value: MIDIByte,
+                channel: MIDIChannel) {
+        self.init(data: [AKMIDIStatus(statusType: .controllerChange, channel: channel).byte, controller, value])
+    }
+
+    /// Array of MIDI events from a MIDI packet list poionter
+    static public func midiEventsFrom(packetListPointer: UnsafePointer< MIDIPacketList>) -> [AKMIDIEvent] {
+        return packetListPointer.pointee.map { AKMIDIEvent(packet: $0) }
+    }
+
+    static func appendIncomingSysex(packet: MIDIPacket) -> AKMIDIEvent? {
+        if let midiBytes = AKMIDIEvent.decode(packet: packet) {
+            AudioKit.midi.incomingSysex += midiBytes
+            if midiBytes.contains(AKMIDISystemCommand.sysexEnd.rawValue) {
+                let sysexEvent = AKMIDIEvent(data: AudioKit.midi.incomingSysex)
+                AudioKit.midi.stopReceivingSysex()
+                return sysexEvent
+            }
+        }
+        return nil
     }
 
     /// Generate array of MIDI events from Bluetooth data

        }
        return outBytes
    }
}

        return midiEvents
    }

    static func decode(packet: MIDIPacket) -> [MIDIByte]? {
        var outBytes = [MIDIByte]()
        var computedLength = 0
