I'm currently trying to use the usbMIDI.read function for Teensy and want to convert the midi data to light up 16 leds, through 2 daisychained 595 shift registers.

The hardware is debugged and works perfectly with a running light sketch. But I can't grasp how I should think with midi feedback and shiftOut.

I would appreciate if someone could give me a hint about how to approach this in a text description rather than code. Can't seem to find any similar projects or get my mind around it.

Do I need to make an array to store the midi notes in after the reading and before the shiftOut?

ShiftOut is the "program" for how to convert the midi data to bits and bytes right? If I need an array, should it be inside the shiftOut or outside?

The "write command", should I place it in the loop or do it via an extra void? I guess it needs to be linked to the loop to actually write out the notes when they are read?

Thanks in advance!

Some reading:
https://www.pjrc.com/teensy/td_midi.html

(Cross posting with the Arduino forum > multiplexing and leds, to get as much help as possible)