Reads two PS2-keyboard and transmits MIDI commands. Includes arpeggiator and learn/replay mode.
The core of this project is an ATmega328 with an Arduino bootloader running at 16 MHz. It reads signals from the PS2-keyboards inside interrupt routines that listen to the CLK and DATA line from the keyboard, decodes the received bytes and places them into a first-level ringbuffer. A second stage consumes the bytes to assemble key-codes (carefully keeping track of key-up and key-down events) and fills second-level ringbuffers with key-events. These second-level ringbuffers are continuously monitored in the main loop of the program where the key-events are translated to MIDI sequences. The MIDI commands are subsequently transmitted via the serial line at 31250 baud such that MIDI devices can understand them.
The system features transposing notes and selecting MIDI channels as well as an arpeggiator that operates with two levels of complexity (chord level and harmonic sequence) and has a learn/replay mode.
Elektor Magazine has been one of the leading sources of information on electronics for engineers, designers, start-ups and companies for 65 years. Our magazine is powered by an active community of electronics engineers – from students to professionals – who are passionate about designing and sharing innovative ideas.
For them, we publish hundreds of items a year, in formats such as articles, videos, webinars, and other learning formats. Our mission is to share knowledge in every possible way and inspire readers with the latest developments within the electrical engineering sector.
Discussion (1 comment)