The keys on the melodeon are wired to the midi switch encoder as shown below and in the circuit schematic diagram. The first 8 keys are connected to switches 0-7 via RB0-7 and D0. The next 8 keys are connected to switches 8-15 via RB0-7 and D1. The next 8 keys are connected to switches 16-23 via RB0-7 and D2. The final 5 keys are connected to switches 24-28 via RB0-7 and D3.
The key charts available are G/D keys and B/C keys. However other key charts can be implemented if required.