Skip to content

philmerrell/claude-md-78

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude MD-78

A proof-of-concept that connects Claude to the Behringer RD-78 drum machine via MIDI. Describe a groove in plain English, and Claude generates a 16-step drum pattern that plays on real hardware.

How It Works

  1. You describe a groove (e.g., "classic 808 trap beat" or "minimal techno kick pattern")
  2. Claude interprets your description and generates a 16-step pattern as JSON
  3. The pattern is sent to the RD-78 over USB MIDI

Requirements

  • Python 3.12+
  • uv (Python package manager)
  • Behringer RD-78 connected via USB
  • An Anthropic API key

Setup

# Clone the repo
git clone https://github.com/philmerrell/claude-md-78.git
cd claude-md-78

# Install uv (if you don't have it)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install dependencies
uv sync

# Set your API key in .env
cp .env.example .env
# Edit .env and add your key

Usage

uv run python rd78_claude.py

The script will auto-detect the RD-78 if connected. Then enter groove descriptions at the prompt:

Describe a groove (or 'quit'): four on the floor house beat with open hihats on the offbeats

You'll see a visual grid of the pattern, confirm, and it plays on the RD-78.

MIDI Note Map

Sends on MIDI Channel 1. Note mapping from the RD-78 MIDI implementation:

Voice MIDI Note
Bass Drum 36
Rim Shot 37
Handclap 39
Snare 40
Hi-Hat 46
Cymbal 49
Tambourine 54
Cowbell 56
High Bongo 60
Low Bongo 61
Low Conga 64
Maracas 70
Guiro 73
Claves 75
Metallic 80

If your RD-78 responds differently (e.g., custom mappings via SynthTribe), adjust the DRUM_MAP dictionary in the script.

Troubleshooting

  • No MIDI ports found — Make sure the RD-78 is connected via USB and powered on. On macOS it should appear automatically; on Linux you may need sudo modprobe snd-usb-audio.
  • Port not auto-detected — The script looks for "RD", "Behringer", or "rd78" in the port name. If yours differs, select it manually from the numbered list.
  • JSON parse errors — Occasionally Claude's response may not be valid JSON. Just try again with a rephrased prompt.

License

MIT

About

Generates drum patterns from natural language and sends them to the Behringer RD-78.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages