Normally I'd say chatGPT does a nice job explaining how this all works but I noticed lately the default seems to be soiled (or the C++ steered in the wrong direction, I'm not sure). I did a chat ant tried relearning:
first I tried pointing to the correct reference library:
these are the c++ code reference library pages from the Retrokits RK002:
https://duy.retrokits.com/assets/rk002codereference.txt
chatGPT received the code with much enthouisiasm but started out reciting from it's own memory anyway. After multiple insinuations it acknowledged it could be wrong. I pasted a note handler function like
#define TAPMIDICHN 1
bool RK002_onNoteOn(byte channel, byte note, byte velocity)
{
// receive any note-on on the TAP channel: tap the internal clock generator
if (channel == (TAPMIDICHN-1))
{
RK002_clockTap();
}
}
now it seemed to find more structure in the RK002 syntax, I uploaded the sketch here and all and all it now gives good tips, I exported the log, perhaps you can use it on other pieces of code to learn.
https://chatgpt.com/share/6864eb2e-efa4-800e-9660-ae9f205b4c7b