Here are some photos showing the construction of the peg matrix from my School Rhythmer drum machine project: Basically, it involves micro-switches, wires and diodes arranged in columns and rows, creating an 8 x 5 matrix The columns carry the trigger signals from the step sequencer - there are only eight steps - while the rows carry the trigger signals to each of the five drum sounds. When a peg is inserted, it closes the associated micro-switch so that the particular drum sound is triggered at that step. The diodes isolate each switch from the matrix. Without these, any trigger signal would dissipate throughout the whole matrix triggering every drum sound that has a peg inserted along its row, regardless of the current step. The rest is 'mechanical'. I used micro-switches as a cost effective solution. An alternative might be 3.5mm jack plugs and sockets, such as the switching type that make/break a circuit when a plug is inserted. A further idea would be to use tact switches w...
Just an image to show how to wire ganged switches as an alternative to using a potentiometer with an Arduino, or similar. This allows the user to instantly jump to a desired setting/option with precision. Here are some ganged switches (the six blue buttons) to select patterns on a build of jan ostman's O2 Minipops drum machine: The dark grey button to the left selects between banks for a total of 12 patterns. Note: A simpler (but less speedy) option would be to use a rotary switch. As in the build below: