The project is done (Old 49 keys casio) to midi using Arduino MEGA

In reply #17 that code gave differents keys number but IDK where is the problem to be found at the moment, I just felt we had this thing nearly working and now I'm in a different maze.