Hi,
So when you release the key that triggered the playing note, it loops and compare through the 127 (most of the time) np values to retrieve which one was the latest pressed key before this one.
The preenfm3 can have 5 other instruments playing many notes, a high note on/of activity on the other instruments, and a high CPU usage, so i'm not a big fan of this loop.
It should be possible to have an array of struct that simulate a linked list for better performance and limiting the number of notes in the buffer to 10 (we have 10 fingers
)
This mono change would also likely require to modify the "glide" algo to work with this new behavior.
Importing the project in STM32CubeIde should be very easy, you'll have 3 projects (firmware, bootloader, lib).
You'll find some debug config to upload the firmware and debug.
It works very well with any STLink board.
The one i used the most is a part of a nucleo board that i cut and make a nice small STLink 2.1.
4 wires to the SWD pins on the pfm mother board, and that's it.
Upload is very fast, and debugging (breakpoint and watching variables) is very easy.
You can also, create the bin (look in "scripts" folder) and upload through DFU but it's much much longer.