int status = read(is);
if (status >= 0x80 && status <= 0x8f) { // note w/o velocity
int channel = status & 0x0f;
int note = read(is);
int gateTime = readOneToFour(is);
smafMessage = new NoteMessage(duration, channel, note, gateTime);
} else if (status >= 0x90 && status <= 0x9f) { // note w/ velocity
int channel = status & 0x0f;
int note = read(is);
int velocity = read(is);
int gateTime = readOneToFour(is);
smafMessage = new NoteMessage(duration, channel, note, gateTime, velocity);
} else if (status >= 0xa0 && status <= 0xaf) { // reserved
int d1 = read(is);
int d2 = read(is);
smafMessage = null;
Debug.println("reserved: 0xa_: " + StringUtil.toHex2(d1) + StringUtil.toHex2(d2));