 
 boolean fret_status[NO_FRETS][6];
 int fret_status_last_f = UNDEF;
-int fret_status_last_used = UNDEF;
+int frets0_when_noteon = UNDEF;
 unsigned long fret_status_last_f_us = 0;
 int fret_status_last_s = UNDEF;
 

          }
        }
      }
      #ifdef DBG
        Serial.print(diff_us);
        Serial.print(">");
        Serial.println(velocity);
      #endif
    }
    else {  //for other laser check if time difference is out of range
      if ( (diff_us < 0) || (diff_us > VEL_TIME_OUT_OF_RANGE) ) {
        velocity = DEFAULT_VELOCITY;
        #ifdef DBG
          Serial.print(diff_us);
          Serial.print("]");
          Serial.println(velocity);
        #endif
      }
    } //end of calculate velocity

    //noteOn
    uint8_t note = get_note(l_idx);
    if (note != 0) {
      played_notes[l_idx] = note;
      midiEventPacket_t packet = {0x09, 0x90 | 0, note, velocity};  //channel, pitch, velocity
      MidiUSB.sendMIDI(packet);

}

inline void send_emphasis_event(boolean emphasis_blocked) {
  if (!emphasis_blocked) { //set time stamp start to measure time between emphasis and laser 0 duration for calculation of velocity
    emphasis_last_blocked_us = micros();
  }
