My goal is to make a 16 step sequencer for controlling a synthesizer with a 0-5 volt control voltage input. The physical device will have 16 potentiometers (to meter down the 5v digital output of each individual step in the sequence). There will also be 16 momentary pushbuttons, one with each potentiometer.
For example: If I push buttons 1 and 16 (corresponding to steps 1 and 16), the sequence will loop from 1 to 16 and repeat indefinitely until another random 2-button combination is pressed. Note: this needs to work with momentary pushbuttons.
I'm somewhat inexperienced with coding, so I'm just looking for advice to approach this so that the final code isn't 10 miles long, considering there are 136 sequence possibilities. Planning on using an Arduino Mega because of the need for 16 digital ouputs (ouput voltages from individual steps) and 16 digital inputs (pushbuttons)... plus a few analog inputs to control the tempo.