Hi,
With the Pic based core tested midi in with some keyboard keys:
Keyboard keys originaly are grounded , tried to make logical OR, diode is signal diode, as 1N4148. An idea using the optocouplers is from Doepfer the Solina midification pdf example. With the 60 keys will be 60 gates signals, it's paraphonic musical instrument.