Encoder help - MIDI content

so i have this sketch ive been messing with to get an encoder to send midi program changes (ideally it will move up or down one program at a time).
in the sketch i had it set to go from program 70-60, and it worked fine when i was doing it with a switch in a different sketch.

now when i move the rotary encoder 1 click this is the midi data sent out:
Program Change, Channel: 1, Number: 66
Program Change, Channel: 1, Number: 87
Program Change, Channel: 1, Number: 68
Program Change, Channel: 1, Number: 13
Program Change, Channel: 1, Number: 10
Program Change, Channel: 1, Number: 66
Program Change, Channel: 1, Number: 87
Program Change, Channel: 1, Number: 68
Program Change, Channel: 1, Number: 13
Program Change, Channel: 1, Number: 10

could anyone tell me why one click of the encoder spams out that much? to top it off all the numbers are random rather than in order.

here is the sketch ive butchered:

#include <MIDI.h>
// Digital pin definitions
enum enDigitalPins
{
  // Rotary encoder input lines
  dpInEncoderA=8,
  dpInEncoderB=10,
  dpInEncoderPress=12,
};
int blackButton = 8;
int redButton = 10;
int blackButtonState = 0;
int redButtonState = 0;

static void _ResetPins()
{
  // Rotary encoder input lines
  // Configure as input, turn on pullup resistors
  pinMode(dpInEncoderA, INPUT);
  digitalWrite(dpInEncoderA, HIGH);
  pinMode(dpInEncoderB, INPUT);
  digitalWrite(dpInEncoderB, HIGH);
  pinMode(dpInEncoderPress, INPUT);
  digitalWrite(dpInEncoderPress, HIGH);
}


void _lowlevel_ReadEncoder(int &rotate, int& press)
{
  rotate = (digitalRead(dpInEncoderB) * 2) + digitalRead(dpInEncoderA);
  press = digitalRead(dpInEncoderPress);
}


void ReadEncoder()
{
  int Position, Press;
  int isForward = 0;
  
  _ResetPins();
  Serial.println("Reading the encoder... press a key to abort.");
  _lowlevel_ReadEncoder(Position, Press);
  while (!Serial.available())
  {
    int Position2, Press2;
    do
    {
      _lowlevel_ReadEncoder(Position2, Press2);
    } while ((Position2 == Position) && (Press2 == Press));
    if (Position2 != Position)
    {
      // "Forward" is shown by the position going from (0 to 1) or (1 to 3)
      // or (3 to 2) or (2 to 0).  Anything else indicates that the user is
      // turning the device the other way.  Remember: this is Gray code, not
      // binary.
      int isFwd = ((Position == 0) && (Position2 == 1)) ||
                  ((Position == 1) && (Position2 == 3)) ||
                  ((Position == 3) && (Position2 == 2)) ||
                  ((Position == 2) && (Position2 == 0));
      Serial.println(isFwd ? "FWD" : "BWD");
    }
    if (Press2 != Press)
    {
      Serial.println(Press ? "Press" : "Release");
    }
    Position = Position2;
    Press = Press2;
  }
}


void setup()
{
Serial.begin(31250);
  pinMode(blackButton, INPUT);
  pinMode(redButton, INPUT);
  Serial.println("Ready to begin");
  // configure the pins
  _ResetPins();

 
  
}


void loop()
{
  ReadEncoder();
  
    int tempBlackState = digitalRead(blackButton);
  if(blackButtonState != tempBlackState){
    blackButtonState = tempBlackState;
    if (blackButtonState == HIGH) {       
      MIDI.send(NoteOn,64,127,1); 
          } else {
        MIDI.send(NoteOff,64,0,1); 
    }
  }

  int tempRedState = digitalRead(redButton);
  if(redButtonState != tempRedState){
    redButtonState = tempRedState;
    if (redButtonState == HIGH) {         
      MIDI.send(PC,69,127,1); 
    } else {
      MIDI.send(PC,70,0,1); 
    }
    
  }
}

why one click of the encoder spams out that much?

Contact bounce, get some capacitors on the inputs:-

Feed it directly into the arduino rather than the 74LS74

numbers are random rather than in order.

Doesn't look too random to me:-
Program Change, Channel: 1, Number: 66
Program Change, Channel: 1, Number: 87
Program Change, Channel: 1, Number: 68
Program Change, Channel: 1, Number: 13
Program Change, Channel: 1, Number: 10
Program Change, Channel: 1, Number: 66
Program Change, Channel: 1, Number: 87
Program Change, Channel: 1, Number: 68
Program Change, Channel: 1, Number: 13
Program Change, Channel: 1, Number: 10

Doesn't look too random to me:-
Program Change, Channel: 1, Number: 66
Program Change, Channel: 1, Number: 87
Program Change, Channel: 1, Number: 68
Program Change, Channel: 1, Number: 13
Program Change, Channel: 1, Number: 10
Program Change, Channel: 1, Number: 66
Program Change, Channel: 1, Number: 87
Program Change, Channel: 1, Number: 68
Program Change, Channel: 1, Number: 13
Program Change, Channel: 1, Number: 10

thats true, not quite random but not 1,2,3,4,5,6...
i'll check out some caps on the encoder, thanks!

My point being is that if it is a repeating sequence then there must be something systematic rather than just random noise. Is the sequence the same irrespective of the speed you turn the sensor.
The other thing is that the dead time you create sending the serial print message is going to contribute to the missing counts. This could be an explanation of why you are seeing the same sequence.

the sequence repeats itself but when i turn it slow it will do anywhere between 2 - 6 cycles of the sequence.

I'm going to take a chance and suggest a visual aide might help. Assuming this sequence ran 6 times, it would produce a "bouncy" signal like this:

Uploaded with plasq's Skitch

So, Grumpy Mike's suggestion for a "debounce" mechanism might help.