Reading MIDI from SD card for a digital output

I think the problem is in how my structure is called or how the pins are called inside the for loop you showed me, Marko, because I am returning the correct note values now, but the pin associated with each note is incorrect.

Code is here:

void playNote(int pitch, int velocity)
{
  int state = (velocity >10) ? HIGH : LOW;   // ternary operator
  bool found = false;   // set to true when the note has been found

  for (uint8_t n = 0; n < ARRAY_SIZE(noteData)  && !found; n++)    // step through all the noteData entries
  {
    for (uint8_t m = 0; m <= NOTE_SIZE && !found; m++)  // step through each note for each entry
    {
      if (pitch == noteData[n].note[m])
      {
        found = true;
        digitalWrite(noteData[n].pin, state);
        Serial.print(noteData[n].pin);
        Serial.print(" ");
        Serial.println(noteData[n].note[m]);
        Serial.println("YYYEEEEEESSSSSSSSSSSSSS");
      }
    }
  }
  if (!found) 
  {
    DEBUG("\nNote ");
    DEBUG(pitch);
    DEBUG(" note found.");
  }
}

and in Serial monitor I have this picture:

The two numbers between GONNAPLAYNOTEEEE and YYYESSSSSS are the pin number and note number, respectively. Note number is returned perfectly, but as you can see from my note arrays posted above, note 43 should actually be pin 6, not pin 2. I tried a test with switching the value of pin 2 to pin3 and that responded, so it seems like my "n" values are not going beyond the first pin, although that makes me question how the exact correct note value 43 was returned, as it relies on both "n" and "m" to find.