The original instructable for that project was based on connecting to the existing cable inside the keyboard. No switches needed. It just does the scans across the matrix (after figuring out which wires on the cable correspond to each key press). Does your keyboard have something similar, or are you going to try to put a push button switch under each key, where it will be activated when a key is pressed?
Done correctly, the matrix scan can be polyphonic. A normal computer keyboard sends “scan codes” to indicate each key press and key release (implementation details different for ps2, usb, high speed usb keyboards). That is effectively what you want to create. The “driver” for the keyboard, that detects switch open and close events, and outputs scan codes. Where the scan codes are the midi on and off commands for the corresponding note.
So (after hardware working), the code needs to set up (and remember) a “state” (on or off) for each key. That can be done as an array. Or more compactly as bits. Then the scan process compares the current state of a key with the previous in memory. If it changed, send the appropriate note on or off command, and update the state in memory.
For initial development and testing of the scan portion, you can just write “key up” and “key down” messages to Serial, with (first) matrix row and column for the key. When that is working, replace the row and column values with actual note and octave. With that working, change to sending the actual midi notes.
The midi portion of the code can similarly be tested separately. Starting with a simple scale that covers the range of the keyboard, then advancing to some cords. With both the keyboard scanning and midi playing working, it (just) needs a lookup from matrix address to midi note. Technically that is a 2 dimensional (row and column) lookup, but that can be reduced to a 1 dimensional lookup by combining the 5 octaves with 12 notes each, into a single integer. Multiply the note key number (from 0 to 11) by the octave number (1 to 5) to get a number from 0 to 55. Although you said 61 keys. I do not know where the other 6 are coming from with your description.
Reminder to check what “key bounce” means. You probably do not want multiple key up, key down sequences sent for each press and release.