Wip Rpi-based Midi Sequencer & Controller

About the project

Once finished, a fully portable MIDI sequencer & controller. Use it stand-alone or connect it to any MIDI-enabled device. Program beats and use it as your loopable drum machine or program songs and have it play alongside you (or by itself). Code & schematics are open source.

Project info

Difficulty: Moderate

Platforms: Raspberry Pi

Estimated time: 3 months

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Raspberry Pi 4 Model B 1GB, 2GB, 4GB or 8GB RAM Raspberry Pi 4 Model B 1GB, 2GB, 4GB or 8GB RAM The brains. Eventually to be converted to arduino x 1
Shift Register 8-Bit - SN74HC595 Shift Register 8-Bit - SN74HC595 SIPO shift registers for driving the output LEDs and displays x 13
Shift Register PISO Shift Register PISO PISO Shift registers for input x 3

Software apps and online services

Custom Sequencer Program Custom Sequencer Program My custom sequencer program, RPiMidiSC. Built in Python. Uses Pygame's MIDI library, and Python.Rich for terminal output (switched over from ncurses).


Details on my YouTube channel.

The hardware is essentially only data input/output, everything else is handled by my sequencer program on the Pi. Sound is produced through connected MIDI devices. Essentially, the program is a big list of lists containing the music data (notes, midi channel, octave, etc) for each 'step' in the song. A step contains 10 note layers, each of which can hold and play a single note. In this sense, it has a polyphony of 10.

Steps are contained in a pattern. A pattern can be considered as a measure, and hold 16 steps. At a tempo of 120, this would give you up to 1/16th note accuracy. Of course, if you need finer resolution than that, you can double both the tempo and the timings between notes. This would turn one pattern into one half of a measure with a resolution of 1/32th notes. There's a maximum of 99 patterns per set. Patterns can be set to loop.

A set is a collection of patterns. Each set can have its own tempo. The sequencer holds 16 sets. A set can be used to hold an individual song, but a song could also be split up into multiple sets. This can be useful if you have different sections of a song with a different tempo. It's also useful for having multiple looping sections, as like patterns, a set can be looped. The set is contained by the savefile.

Finally, the sequencer holds 16 save files (as displayed by the 4-bit binary counter). Each save file holds 16 sets. Save files are currently a big ol' list of comma-separated values that get loaded in or written out on saving / loading. 16 save slots * 16 sets per save * up to 99 patterns per save * 16 steps per pattern * 10 note layers per step gives 4,055,040 lines of data (although, admittedly, 99 patterns is probably not that often used in the real world). Unsurprisingly, this takes a few seconds to load in. For this reason, I'll probably end up switching the save file format to JSON at some point.

This is a work-in-progress prototype which I got encouraged to submit here. This version uses breadboards, the final version will be designed on a PCB with a 3D-printed case, with a battery and built-in speaker included for (hopefully) top-notch portability. Oh, and did I mention this is my first electronics project ever?



The software that makes the sequencer go.


Photo of niisse


Software Development student with a passion for music technology and open source / Linux stuff. Always looking for excuses to play with LEDs.


Leave your feedback...