 
     /// MIDI Note Number
     public var noteNumber: MIDINoteNumber? {
-        if status == .noteOn || status == .noteOff {
+        if status == .noteOn || status == .noteOff, internalData.count > 1 {
             return MIDINoteNumber(internalData[1])
         }
         return nil

        } else if let status = AKMIDIStatusType.from(byte: data[0]) {
            // is regular MIDI status
            let channel = data[0].lowBit
            fillData(status: status, channel: channel ?? 0, bytes: Array(data.dropFirst()))
        } else if let metaType = AKMIDIMetaEventType(rawValue: data[0]) {
            print("is meta event \(metaType.description)")
        }

    /// System Command
    public var command: AKMIDISystemCommand? {
        if let statusByte = internalData.first {
            return AKMIDISystemCommand(rawValue: statusByte)
        }
        return nil
