Each midi note on and off always sends both pitch and velocity.
The first byte tells you it is a note on or note off and the MIDI channel, the second byte tells you the pitch and the third byte tells you the velocity.
The first byte tells you it is a note on or note off and the MIDI channel, the second byte tells you the pitch and the third byte tells you the velocity.