I have been learning about keyboard matrices because I want to add MIDI to my Kawai SX-210. So I understand that basically there are 8 output pins and 8 input pins. The output pins cycle at a certain frequency one at a time sending out a pulse, which depending one what keys are pressed, will let that pulse travel to the input pins.
But I’m unclear on how how the input knows which group of keys the pulse is coming from. Is it synced with the frequency of the output pulses and then depending on the timing knows from which group of keys the pulse is coming from? If so, how would I sync of an arduino with the clock of the output pulses?