/thumbnails/beatmachine.png Beat Machine is a six-track desktop step sequencer built in Python for composing looping drum patterns. Six samples—hi-hat, snare, bass drum, crash, clap, and floor tom—are arranged across a step grid. Patterns are created by switching individual steps on or off as a playhead moves through the sequence. The tempo and loop length can be changed during playback, tracks can be muted, and patterns can be named, saved, and reloaded.

How it works

The program uses separate systems for live playback and audio export. Pygame triggers and overlaps the samples in real time, allowing longer sounds to continue into later steps and beyond the loop boundary. For export, pydub reconstructs the same pattern as a mono WAV limited to the duration of one loop.

Patterns are stored in a custom plain-text format containing the pattern name, tempo, loop length, and state of the grid.

Technical details

Python, Pygame, and pydub. Mouse-controlled interface with live audio playback, pattern storage, and mono WAV export.