Arduino UNO based midicontroller via USB to Traktor

HI!

I just hooked up 16 pots via Sparkfuns multiplexer to Mr. UNO
Here's the code (from a superb turorial by BILDR)

http://codepad.org/RtmmVUSh

I have it all workin and I get response in the serial monitor.

Now I need help and guidance to understand
the midi protocol

which midi-code should i use if i want a pot to control an effect i traktor, is it Control Change, mode change, pitchbend or perhaps velocity?

An example would be superduper nice, and how do I implement this in my code?

please help me understand this or just point me in right direction..

thank you so mutch

Once you get the reading from the pot use this:

void generateCC(char CC_data, char c_num, char c_val) {

  Serial.write(CC_data);
  Serial.write(c_num);
  Serial.write(c_val);

}

So, using this:
generateCC(0xB1, 21+i, value_from_pot);

will generate CC message on channel 1 (0xB1) in which 21+i is the number of pot.