You will have to figure out and tell us how the 61st key is wired. The basic matrix is 12 keys per octave by 5 octaves, or 60 keys. Is that last key on another octave? A 13th key on one of the existing octaves? Completely separate (needing 2 more wires to connect)? None of the information so far provides any way to tell. We do not have your keyboard, or any documentation for it.
This is not really ready for coding yet. You still need to define the hardware (electronics) that will allow polyphonic sensing of the key presses. I do not think the simple shift register plus individual octave pins is enough. Definitely not with the way the resistors are shown so far. You need to define how the hardware (driven by the code) will be able to detect when “key c” is pressed in 2 different octaves, as well as 2 keys in the same octave. Or 2 in one octave and 2 in another. What will the signals (voltages) be, and where will the sense line(s) be? A schematic can help trace the voltages/currents, but you do not need the full matrix to do that. Figure out how to do it correctly with a 2 by 2 matrix of switches, then expand to more afterwards. A 2x2 matrix has 16 unique cases to detect: no keys pressed; any 1 key pressed, one of 6 pairs of keys, 4 cases with 3 keys pressed, and one with all keys pressed. A schematic is not “required”. A description of what the control signals will do is enough. Along the lines of:
one key line is pulled high with all others pulled low and one octave drive line pulled low with all others in high impedance state (input mode instead of output) will leave the sense pin for the octave either high or low depending on the state of (only) the single key in that octave.
With details to match the circuit you are using. Note that my description implies 10 pins for the octaves. 5 to “drive” them, 5 more to “sense” them. Potentially, the “drive” could be from shift registers, but also note that my description has the “other” drive lines as high impedance (off, not high). So far, that is the “best” configuration I can think of. Research on “n-key switch matrix logic” might get a better solution. I see some circuits using diodes, but have not wrapped my head around how it works. Most of what I see looks like it only works with one key at a time.