VERY Basic MIDI Controller Help

Wire up a pot and read the value. Do this once in each loop, save the reading as te last thing you do. When you read it next time round the loop compair it to the last time reading, if it is not the same send a CC message with the reading from the pot shifted to the right 4 times to put it into range. The shift operation is >> and <<