 
   if (!skip_setup) {
     //find if instrument selection is pressed (top string), fret selects instrument
-    for (int i = 0; i < 13; i++) {
+    for (int i = 0; i < NO_FRETS; i++) {
       if ((fret_status[i][5] == true)) {
         midiEventPacket_t special = {0x0C, 0xC0, instruments[i], 0};
         MidiUSB.sendMIDI(special);

#endif

  //check for sliding
  if (s ==0) {  //jen pro vybrnkavani
    unsigned long diff_us = micros() - fret_status_last_f_us;
    if (diff_us < FRET_SLIDING_THOLD) {
      int dir = f - fret_status_last_used; //0: no sliding, -1:sliding outward: 1: sliding inward
      send_fret_sliding_event(dir, f);
    }
    else {
      send_fret_sliding_event(0, f);  //reset pitch    
    }
    fret_status_last_used = f;
    fret_status_last_f_us = micros();
  }

  //set status

    }

    //find if capo selection is requested (bottom string), max 8th fret, 9-13 fret means remove capo
    for (int i = 0; i < NO_FRETS; i++) {
      if ((fret_status[i][0] == true)) {
        selected_capo_id = (i < 8) ? i + 1 : 0;  //frets 9 and more removes capo
      }
