Yeah, look up tables are on my to-do list - I'm still relatively new at coding, so I still haven't figured out how to use them yet.
Sorry, still not quite understanding the necessity of the shown boolean. As I mentioned, I want to be able to use this MIDI input setup with more complicated functions, not just turning LEDs on and off - the simple on/off code was me just trying to troubleshoot the displaying-MIDI-to-LED delay problems. For example, if I were to split the LED strip up into different subdivisions (which I'm doing for the main project I'm trying to use this whole MIDI thing for), like so:
CRGB rawleds_S1[NUM_LEDS_S];
CRGBSet leds_S1 (rawleds_S1, NUM_LEDS_S); //148
CRGBSet leds_S1_R (leds_S1(0, 36)); //37
CRGBSet leds_S1_B (leds_S1(37, 73)); //37
CRGBSet leds_S1_L (leds_S1(74, 110)); //37
CRGBSet leds_S1_T (leds_S1(111, 147)); //37
And have a bunch of if statements (hopefully one day I get the look ups figured out, but for now...) to call animation functions:
if (midiNote[0] == 1) { rainbow (leds_S1_R, NUM_LEDS_S_div); }
if (midiNote[1] == 1) { rainbow (leds_S1_B, NUM_LEDS_S_div); }
if (midiNote[2] == 1) { rainbow (leds_S1_L, NUM_LEDS_S_div); }
if (midiNote[3] == 1) { rainbow (leds_S1_T, NUM_LEDS_S_div); }
...which would be calling this:
void rainbow() {
thishue++;
fill_rainbow(leds, NUM_LEDS, thishue, deltahue);
}
Wouldn't I want the show function to be continuously running to update the LEDs?