The Metro is used to read key presses and to output an audio square wave to the amplifier/speaker. The Metro also routes MIDI messages across the USB, so you can have a software synthesizer on a computer/laptop playing the sounds. The code also implements an accompaniment system. This consists of a drum beat, base line pattern and four-step chord progression that runs along at the user selected tempo. The control button for each of the drums/bass/chord is used to cycle through the available patterns: the player can therefore experiment and choose a combination of drums, bass pattern and chord progression that they like and then improvise a melody over the top of this using the keys. A fourth control panel button is used to switch between different pentatonic modes (at this stage either a major or minor pentatonic scale).
The main keyboard audio square wave runs on Timer 1, accompaniment square wave on Timer 2 and Timer 0 is used to run a pseudo-random noise generator a 1kHz which is used for the accompaniment drum beat.
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.