General:

All communication goes over MIDI on channel 1 of the "Steinberg CC121" MIDI
port.

Cubase sends a sysex string to the controller once a second to signal a working
connection. This seems to work as a kind of running status or AI identification
too:

F0 43 10 3E 15 00 01 F7

Buttons:

The controller sends a note-on event with full velocity (0x7F) every time a
button has been pressed on the device and a note-off event when the button has
been released. Cubase responds with note-on/note-off pairs where the current
state of the lights are encoded in the velocity of the note-on event
(0x00 = off, 0x7F = on).

Note Number   Button
-------------------------------------------------------------------------------
0x00  C-1     Record Arm
0x08  G#1     Solo
0x10  E0      Mute
0x30  C3      Channel Select Left
0x31  C#3     Channel Select Right
0x33  Eb3     'e' Button
0x36  F#3     Function 1
0x37  G3      Function 2
0x38  G#3     Function 3
0x39  A3      Function 4
0x3A  F3      Value Encoder Button
0x3B  B3      Foot Switch
0x4A  D5      Automation Read
0x4B  Eb5     Automation Write
0x56  D6      Loop
0x58  E6      To Start
0x5A  F#6     To End
0x5B  G6      Rewind
0x5C  G#6     Forward
0x5D  A6      Stop
0x5E  Bb6     Play
0x5F  B6      Record
0x70  E8      EQ 1 Enable
0x71  F8      EQ 2 Enable
0x72  F#8     EQ 3 Enable
0x73  G8      EQ 4 Enable
0x74  G#8     EQ Type
0x75  A8      All Bypass
0x76  Bb8     Jog
0x77  B8      Lock
0x78  C9      Input Monitor
0x79  C#9     Open VSTi

Encoder:

The encoders send plain CC values, the vlaue indicates something like 'clicks
per second'. The values in clockwise direction start at 0x01 (one click) and at
0x41 in counter clockwise direction. The maximum value for very seems to be
somewhere around 0x0F or 0x4F respectivly.

CC Number     Encoder
-------------------------------------------------------------------------------
0x10          Pan
0x20          EQ 1 Q
0x21          EQ 2 Q
0x22          EQ 3 Q
0x23          EQ 4 Q
0x30          EQ 1 Frequency
0x31          EQ 2 Frequency
0x32          EQ 3 Frequency
0x33          EQ 4 Frequency
0x40          EQ 1 Gain
0x41          EQ 2 Gain
0x42          EQ 3 Gain
0x43          EQ 4 Gain
0x50          Value
0x3C          AI Knob

Fader:

The fader sends a note-on event with note number 0x68/G#7 and velocity 0x7F when
it has been touched and another note-on message with the same note but a
velocity of 0x00 when it has been released (no explicit note off event).

The fader value is encoded as linear pitch bend message where the position at
the bottom is 0x00 0x00 and the top position is 0x7F 0x7F. The 0dB mark is
located at 0x00 0x64.

Channel Switching:

Whenever the channel number has been switched cubase sends out a status update
to the fader (pitch bend) and the channel buttons that have lights
(note-on/note-off pair). I don't know if the order is important but here it is
anyway:

 1 Fader value      (See above)
 2 Mute             (0x10 / E0)
 3 Solo             (0x08 / G#-1)
 4 Automation Read  (0x4A / D5)
 5 Automation Write (0x4B / Eb5)
 6 Input Monitor    (0x78 / C9)
 8 Record Arm       (0x00 / C-1)
 9 'e' Button       (0x33 / Eb3)
10 Open VSTi        (0x79 / C#9)
11 EQ 1 Enable      (0x70 / E8)
12 EQ 2 Enable      (0x71 / F8)
13 EQ 3 Enable      (0x72 / F#8)
14 EQ 4 Enable      (0x73 / G8)
15 All Bypass       (0x75 / A8)
