MIDI Keyboard Encoder - Arduino Piano/Keyboard (question)

This is precisely what the Keypad library does :slight_smile: - take a look at the tutorial. The wiring diagram you posted is a keyboard matrix, which significantly reduces the number of required IO pins. To achieve step 3, you need matrix scanning code (which is what the Keypad library is). As a bonus, the way it is written eliminates the need for the diodes in your wiring diagram, hence the simpler diagram: Arduino Playground - HomePage Of course, instead of a keypad, you have a musical keyboard, but the principle is exactly the same, just with all the keys laid out in a single line instead of rows. There is plenty of info about scanning keyboard matrices on the web, but I suspect it'll just show you that using pre-built Arduino libraries will make life much easier :slight_smile:

Step 4 will be your own code to define which midi signals are sent out for which keys.

Step 5 MIDI signals themselves are dealt with by the MIDI library and whichever USB MIDI solution you choose to use. (Suggest you get it working on normal MIDI first, before getting caught up in USB MIDI stuff...)