There is an older thread on a similar topic here...
Might get you started on the right track.
Also... If you are working with any kind of MIDI controller, you want to grab a copy of MIDI Monitor from here. snoize: MIDI Monitor. That will let you easily identify the specific CC message and channel that your device is outputting on.