Midi Controller.. i am missing something.

Hi all! Having some trouble...

trying to make a midi controller out of a guitar hero guitar. i think i have the wires and everything mpped out correctly. when plugged into the synth, the notes sometimes play and when they do they continue to play for a bit after they arent pressed anymore.. and the 'octave' buttons seems to only change the sounds option on the synth, or reset it and short it somehow. im uing a microkorg to test it.

is it my code? my wiring? im at a loss.

the resitors are 10k for the inputs, and a 220 powering the midi out

//ocatva change inputs
const int octD = 6;
const int octU = 5;
//fret button inputs;
const int uno = 7; //
const int dos = 8;
const int tre = 9;
const int qua = 10;
const int cin = 11;
//midi note velocity
int noteVelocity = 127;
//set ints for button on off states
int unoOn = 0;
int  dosOn = 0;
int  treOn = 0;
int  quaOn = 0;
int cinOn = 0;
int octUon = 0;
int octDon = 0;
//aOn to add and subtract 12s from midinotes for octve shift
int aOct = 0;

void setup()
{
  pinMode( uno, INPUT ); // inputmodes for all buttons
  pinMode( dos, INPUT );
  pinMode( tre, INPUT );
  pinMode( qua, INPUT );
  pinMode( cin, INPUT );
  pinMode( octU, INPUT );
  pinMode( octD, INPUT );
 Serial.begin(31250);//midi baud
 delay(1000);
}
void loop()
{
  unoOn = digitalRead(uno);//read pin states
  dosOn = digitalRead(dos);
  treOn = digitalRead(tre);
  quaOn = digitalRead(qua);
  cinOn = digitalRead(cin);
  octUon = digitalRead(octU);
  octDon = digitalRead(octD);
  
  if (unoOn == HIGH) { //button activates in note on i usually see 0x90, but have seen 0x91 too
    
    noteOn( 0x91, 55+aOct, noteVelocity);
  } else {
   
    noteOn( 0x91, 55+aOct, 0);
  }
  if (dosOn == HIGH) {
   
    noteOn( 0x91, 57+aOct, noteVelocity);
  } else {
  
    noteOn( 0x91, 57+aOct, 0);
  }
    if (treOn == HIGH) {
   
    noteOn( 0x91, 60+aOct, noteVelocity);
  } else {
    
    noteOn( 0x91, 60+aOct, 0);
  }
  if (quaOn == HIGH) {
  
    noteOn( 0x91, 62+aOct, noteVelocity);
  } else {
   
    noteOn( 0x91, 62+aOct, 0);
  }
    if (unoOn == HIGH) {
    
    noteOn( 0x91, 64+aOct, noteVelocity);
  } else {
    
    noteOn(0x91, 64+aOct, 0);
  }
   if (octUon == HIGH) {
   
    aOct = aOct+12;
  }
  if (octDon == HIGH)  {
    
    aOct = aOct -12;
  }
}
void noteOn(int cmd, int pitch, int velocity) { //midi out
    Serial.write(cmd);
  Serial.write(pitch);
  Serial.write(velocity);
}

You test for unoOn in two different places in the loop().
Whether or not a button is pressed, your code is transmitting MIDI messages continuously. You need to detect when a button changes state - from on to off, or off to on - rather than whether it is on or off.
You don't do anything about debouncing the buttons. When a button is pressed it may glitch on and off briefly which will cause your code to rapidly toggle between sending the on and then off messages until it settles into its correct state.

Pete

You are not using your octave data at all. For example you should add 12 to the note number to shift it up an octave (12 semitones).