5ce8187c65df51ed7d50a374e125dc7771816988
- Add _cmd_create_arrangement_audio_pattern with 5-method fallback chain - Method 1: track.insert_arrangement_clip() [Live 12+] - Method 2: track.create_audio_clip() [Live 11+] - Method 3: arrangement_clips.add_new_clip() [Live 12+] - Method 4: Session->duplicate_clip_to_arrangement [Legacy] - Method 5: Session->Recording [Universal] - Add _cmd_duplicate_clip_to_arrangement for session-to-arrangement workflow - Update skills documentation - Verified: 3 clips created at positions [0, 4, 8] in Arrangement View Closes: Audio injection in Arrangement View
AbletonMCP_AI v2.0 - Clean Rewrite
MCP-based system for controlling Ableton Live 12 Suite from AI agents. Rewritten from scratch - Clean, simple, functional.
Architecture
┌─────────────────────────────────────────┐
│ OpenCode / MCP Clients │
├─────────────────────────────────────────┤
│ Layer 1: MCP Server (server.py ~300ln) │ ← FastMCP, stdio transport
│ Layer 2: Engines (engines/*.py) │ ← Music logic, sample selection
│ Layer 3: Remote Script (runtime.py) │ ← Ableton Live API, TCP socket
│ Layer 4: Ableton Live 12 Suite │
└─────────────────────────────────────────┘
Key Design Decisions
- Simple TCP socket - One connection per command, no persistent state
- No main thread queue - Uses Live's
update_display()callback directly - Clean error handling - Every command returns
{status, result/error} - Minimal code - ~300 lines for runtime, ~300 for server (vs 5400+13800 before)
- Reusable engines - Music logic isolated from communication layer
Available Tools (28)
Info
get_session_info- Project state (tempo, tracks, scenes)get_tracks- All tracks infoget_scenes- All scenesget_master_info- Master track
Transport
start_playback/stop_playback/toggle_playbackstop_all_clips
Settings
set_tempo- BPM (20-300)set_time_signature- Numerator/denominatorset_metronome- On/off
Tracks
create_midi_track/create_audio_trackset_track_name/set_track_volume/set_track_panset_track_mute/set_track_soloset_master_volume
Clips & Sessions
create_clip- MIDI clip in Session Viewadd_notes_to_clip- Add MIDI notesfire_clip/fire_sceneset_scene_name/create_scene
Arrangement View
create_arrangement_audio_pattern- Load .wav clipsload_sample_to_drum_rack- Load sample into Drum Rack
Generation
generate_track/generate_song- AI generationselect_samples_for_genre- Auto sample selection
Setup
1. Ableton Live Configuration
- Open Ableton Live 12 Suite
- Go to Preferences → Link/Tempo/MIDI
- Under Control Surfaces, add AbletonMCP_AI
- The Remote Script will start listening on port 9877
2. OpenCode Configuration
Already configured in ~/.config/opencode/opencode.json:
{
"mcp": {
"ableton-live-mcp": {
"type": "local",
"command": ["python", "C:\\ProgramData\\Ableton\\Live 12 Suite\\Resources\\MIDI Remote Scripts\\mcp_wrapper.py"],
"enabled": true,
"timeout": 300000
}
}
}
3. Sample Library
Your reggaeton library at libreria/reggaeton/ is automatically indexed (509 samples).
File Structure
AbletonMCP_AI/
├── __init__.py # Live Control Surface entry point
├── runtime.py # Remote Script (~300 lines)
└── mcp/
├── __init__.py
├── server.py # MCP FastMCP server (~300 lines)
├── engines/
│ ├── __init__.py
│ ├── sample_selector.py # Sample indexing & selection
│ └── song_generator.py # Track generation
├── tests/ # Unit tests
└── docs/ # Documentation
Commands
Compile Check
python -m py_compile "C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\AbletonMCP_AI\runtime.py"
python -m py_compile "C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\AbletonMCP_AI\mcp\server.py"
python -m py_compile "C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\mcp_wrapper.py"
Test MCP Server
python "C:\ProgramData\Ableton\Live 12 Suite\Resources\MIDI Remote Scripts\mcp_wrapper.py" --transport stdio
Troubleshooting
Connection Refused
- Ensure AbletonMCP_AI is loaded as a Control Surface in Live
- Check port 9877:
netstat -an | findstr 9877 - Restart Ableton Live after code changes
Timeout on Commands
- Commands that mutate Live state use 30s timeout by default
- Generation commands use 300s timeout
- Check Ableton log for errors
Sample Selection Returns Empty
- Verify
libreria/reggaeton/exists with .wav files - Check sample index: should show "Indexed X samples" in logs
Description
Ableton MCP AI - Remote Script + MCP server for Ableton Live 12 with Claude/Codex/opencode support