I have:
if (MIDI.read()) {
MIDIread = MIDI.read();
shown = false;
location_byte = MIDI.getType();
channel = MIDI.getChannel();
note = MIDI.getData1();
if (location_byte == midi_on || location_byte == midi_off) newNote = true;
if (newNote) {
if (location_byte == midi_on) {
midiNote[channel][note] = 1;
}
if (location_byte == midi_off) {
midiNote[channel][note] = 0;
}
newNote = false;
}
}
...and then at the end:
if (!MIDIread && !shown) {
FastLED.show();
shown = true;
MIDIread = false;
}