Arduino UNO based midicontroller via USB to Traktor

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.