I am using the CDJ-101 midi controller as an input device for a piece of software I am writing for a university project. I have it recognizing different button presses, but I cannot distinguish between clockwise and anti clockwise rotation on the jog wheel. The midi note for the wheel turning is always returned as 53 regardless of direction. The same goes for the "push" rotating button next to the jog wheel.

Does anyone have any clue as to how to distinguish the direction the jog wheel is being rotated?

any help is greatly appreciated. Thank you. Lee.

The code I am using to convert the bytes..

Java Code:
public void send(MidiMessage msg, long timeStamp) {

        byte[] b = msg.getMessage ();        
        String tmp = bits ( b [0] ) ; 
        int message = convertBits ( tmp ) ;
        int note1 = convertBits ( bits ( b [ 1 ] ) ) ; 

}

public String bits(byte b){
           String bits = "";
           for(int bit=7;bit>=0;--bit){
                bits = bits + ((b >>> bit) & 1);
           }
           return bits;
      }

public int  convertBits(String bits){
          int res = 0 ; 
          int size = bits.length () ; 

          for ( int i = size-1 ; i >= 0 ; i -- ){
               if ( bits.charAt( i ) == '1' ) {
                   res +=  1 <<(size-i-1) ;  
               }
          }
          return res ; 
}
note1 is always 53 when the jog wheel is being rotated in either direction.