You can find the specs in the manual. (See here and this is the programmer's manual
Top row: CC 0x68,0x69,... (nonzero when pressed, zero when released)
Other rows: 0xXY where X is row number (0-based) and Y is column number.
Send to these CC's and notes to set colour. Colour values are:
bits 0..1 red amount (0 to 3)
bits 4..5 green amount (0 to 3)
everything else 0.
Quirks
The Launchpad uses running status. When powered on, status 0x90 (noteon) is assumed,
so it only sends the two data bytes without the leading 0x90. Without this, python-rtmidi
refuses to recognise the message. So you have to press one of the top buttons, which
generates a CC (that is, status 0xB0), and then when you subsequently press one of
the other buttons, it generates the leading status of 0x90. Sometimes the reverse
is the case, and you have to press a non-top button before the top buttons are usable.
Example Apps
lp-mpd
I wrote this simple controller for MPD. I have 16 instances of MPD.