A Python-based MIDI controller for the Arturia Drumbrute synthesizer with Raspberry Pi embedded support.
This project provides a Python application to control the Arturia Drumbrute drum machine via MIDI. It runs on Linux systems and can be embedded directly on a Raspberry Pi using a Buildroot-based custom image. The application connects to MIDI input and output devices to manage drum patterns, BPM, and playback control through a SINCO foot pedal or similar MIDI controller.
- MIDI Control: Full MIDI in/out support for real-time drum machine control
- Pattern Management: Switch between drum patterns seamlessly
- BPM Control: Adjust tempo in real-time with MIDI synchronization
- Persistent State: Saves the last used pattern and BPM settings
- Foot Pedal Support: Control via SINCO pedals or other MIDI input devices
- Quiet Mode: Run without interactive prompts for automated setups
- Embedded Support: Pre-built Raspberry Pi images for plug-and-play deployment
- Python 3.13 or later
- MIDI hardware devices (input and output)
- Dependencies:
fire>=0.7.1- CLI frameworkpython-rtmidi>=1.5.8- MIDI I/Osimple-term-menu>=1.6.6- Terminal UIsqlitedict>=2.1.0- State persistence
Install dependencies and run:
make setup
make runuv sync
uv run python src/main.py --helpThe application manages MIDI connections through an interactive menu or automated port selection.
- Port Discovery: The application detects all available MIDI input and output ports on your system
- Port Selection: When running in interactive mode, you'll see a menu to select:
- MIDI Input Port: Usually your controller/pedal (searches for "SINCO" by default)
- MIDI Output Port: Usually your drum machine (searches for "Arturia" by default)
- State Persistence: Selected ports are saved in a SQLite database (
~/.mvave_drumbrute.db) for next run - Connection Establishment: Once ports are selected, the application opens bidirectional MIDI connections
The application communicates with devices using standard MIDI messages:
- Control Changes (CC): Adjust parameters like tempo and mode
- Program Changes (PC): Switch between drum patterns
- MIDI Clock: Synchronizes tempo with connected devices
- Note Messages: Trigger drum sounds
Automatically detect and connect to devices by name:
uv run python src/main.py \
--auto-select \
--input-query="SINCO" \
--output-query="Arturia"The quiet mode bypasses interactive prompts and uses saved settings or auto-selection, ideal for embedded systems and automation.
make run-quietOr directly:
uv run python src/main.py \
--quiet \
--db-file-path=$HOME/.mvave_drumbrute.db- Skips Interactive Menus: No terminal prompts for port selection
- Uses Saved State: Loads previously selected MIDI ports from the database
- Fallback to Auto-Selection: If ports aren't saved, automatically searches using
--input-queryand--output-query - Direct Startup: Application starts immediately with MIDI listening active
uv run python src/main.py \
--quiet \
--input-port=0 \
--output-port=1The project includes a complete embedded Buildroot configuration for creating a standalone Raspberry Pi image.
make build-imageThis command:
- Downloads Buildroot (version 2026.02.2)
- Copies the Python application source
- Exports Python dependencies
- Configures a custom Raspberry Pi distribution
- Compiles the complete SD card image
make flash-imageThe flash target:
- Detects available devices: Shows USB drives and SD cards
- Prompts for device selection: Select your SD card number
- Confirms before writing: Prevents accidental data loss
- Flashes the image: Writes the compiled image with progress indication
- Syncs and verifies: Ensures data integrity
- Minimal Raspberry Pi distribution based on Buildroot
- Pre-installed Python 3.13 runtime
- All application dependencies included
- Boot directly into the MVave Drumbrute Controller
- Automatic MIDI port detection on startup
- Persistent storage for configuration
After flashing and booting the Raspberry Pi:
- Connect MIDI input device (pedal) to Raspberry Pi
- Connect MIDI output to Drumbrute
- System auto-starts the controller in quiet mode
- Settings are saved for subsequent boots
For building embedded images on Linux:
wget- Download Buildroottar- Extract archives- Build tools:
gcc,make,cmake - 4GB+ free disk space
- 30+ minutes build time (first build)
Start with menu-based port selection:
make runConnect to devices automatically:
uv run python src/main.py \
--auto-select \
--input-query="SINCO" \
--output-query="Arturia"Connect to specific MIDI ports directly:
uv run python src/main.py \
--input-port=0 \
--output-port=1Enable detailed logging:
LOG_LEVEL=DEBUG make runmake run DB_FILE_PATH=/path/to/custom.dbThe application uses a multi-process design:
- Main Process: Orchestrates startup and monitoring
- MIDI Listener: Monitors foot pedal input in a subprocess
- MIDI Clock: Synchronizes timing in another subprocess
- State Store: Persistent configuration in SQLite
.
├── src/
│ ├── main.py # Entry point and CLI
│ ├── app/
│ │ ├── mvave_drumbrute.py # Main app orchestration
│ │ ├── actions.py # Behavior handlers
│ │ └── data.py # State persistence
│ └── devices/
│ ├── midi_connector.py # MIDI I/O abstraction
│ ├── midi_clock.py # Tempo synchronization
│ ├── drumbrute.py # Drumbrute-specific control
│ └── mvave_pedal.py # Pedal event handling
├── embedded/ # Buildroot configuration
│ └── Makefile # Build and flash commands
└── Makefile # Development targets
make setup # Install dependencies
make run # Run in interactive mode
make run-quiet # Run in quiet mode
make build-image # Build Raspberry Pi image
make flash-image # Flash image to SD card- Verify devices are connected and powered on
- Check system MIDI devices:
aconnect -l(Linux) - Run with debug logging:
LOG_LEVEL=DEBUG make run
- Try specifying ports manually:
--input-port=0 --output-port=1 - Check device names match query strings
- Ensure no other applications are using the MIDI ports
- Ensure sufficient disk space and build time
- Check internet connection for downloading Buildroot
- Verify build tools are installed:
gcc,make,cmake
See the repository for license information.
Created for controlling Arturia Drumbrute synthesizer via MIDI-enabled foot pedals.