diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c28f69 --- /dev/null +++ b/README.md @@ -0,0 +1,328 @@ +# ๐ŸŽ›๏ธ AbletonMCP_AI v3.0 - Senior Architecture + +[![Gitea](https://img.shields.io/badge/Gitea-renato97%2FAbletonMCP_AI-blue?style=flat-square&logo=gitea)](https://gitea.cbcren.online/renato97/AbletonMCP_AI) +[![Python](https://img.shields.io/badge/Python-3.7%2B-yellow?style=flat-square&logo=python)](https://python.org) +[![Ableton](https://img.shields.io/badge/Ableton%20Live-12%20Suite-black?style=flat-square&logo=ableton)](https://www.ableton.com) +[![Status](https://img.shields.io/badge/Status-Production%20Ready-green?style=flat-square)]() +[![License](https://img.shields.io/badge/License-MIT-orange?style=flat-square)]() + +> **MCP-based AI system for professional music production in Ableton Live 12 Suite** +> +> *100% prompt-based music creation. No manual steps required.* + +--- + +## โœจ What is AbletonMCP_AI? + +AbletonMCP_AI is an **AI-powered music production system** that lets you create complete professional tracks in Ableton Live using **natural language prompts only**. + +**No clicking. No dragging samples. No manual mixing.** Just describe what you want, and the AI does everything: +- ๐Ÿฅ Creates drum patterns (dembow, trap, perreo) +- ๐ŸŽน Generates basslines, chords, and melodies +- ๐ŸŽš๏ธ Applies professional mixing and mastering +- ๐Ÿ“€ Places everything in Arrangement View + +--- + +## ๐Ÿš€ Quick Example + +``` +"Reggaeton perreo intenso, 95 BPM, Am, drumloop gata como protagonista, +1 minuto 30 segundos, bass y chords acompaรฑando" +``` + +**Result:** Complete 1:38 track with 204 audio clips, 7 tracks, professionally mixed. + +--- + +## ๐Ÿ—๏ธ Architecture v3.0 (Senior) + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ AI Agent (OpenCode / Claude / Kimi) โ”‚ +โ”‚ โ†“ Natural language prompts โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ MCP Server (FastMCP, stdio) โ”‚ +โ”‚ โ†“ JSON commands โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ 50+ Production Engines โ”‚ +โ”‚ โ”œโ”€โ”€ ๐Ÿฅ Drum Layer Engine โ”‚ +โ”‚ โ”œโ”€โ”€ ๐ŸŽธ Bass/Chords/Melody Generators โ”‚ +โ”‚ โ”œโ”€โ”€ ๐ŸŽ›๏ธ Mixing & Mastering (EQ, Compression, Bus) โ”‚ +โ”‚ โ”œโ”€โ”€ ๐ŸŽฏ Coherence Validator โ”‚ +โ”‚ โ””โ”€โ”€ ๐Ÿ”ฅ Intelligent Sample Selector (375+ samples) โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ LiveBridge (TCP Socket โ†’ Ableton Live API) โ”‚ +โ”‚ โ†“ Real-time clip creation โ”‚ +โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค +โ”‚ Ableton Live 12 Suite โ†โ”€โ”€ ๐ŸŽต Arrangement View โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +--- + +## ๐Ÿ“ฆ Key Features + +### ๐ŸŽต Music Generation +| Feature | Description | +|---------|-------------| +| **Dembow Generator** | Classic reggaeton rhythm with variations | +| **Bass Engine** | Reese bass, sub-bass, melodic patterns | +| **Chord Progressions** | i-v-vi-iv and custom progressions | +| **Melody Engine** | Scale-based with motivic development | +| **Texture Layers** | Pads, ambience, FX | + +### ๐ŸŽš๏ธ Professional Mixing +| Feature | Description | +|---------|-------------| +| **Bus Architecture** | Kick, Snare, Drums, Bass, Synths, FX buses | +| **Parallel Compression** | NY-style compression for punch | +| **EQ Presets** | Extended 15+ presets (kick_sub, bass_glue, etc.) | +| **Auto Gain Staging** | Automatic level balancing | +| **Master Chain** | Professional mastering preset | + +### ๐Ÿ”ฌ Smart Selection +| Feature | Description | +|---------|-------------| +| **Coherence Scoring** | Ensures samples work together (0.90+ threshold) | +| **Metadata Store** | SQLite database of 375+ analyzed samples | +| **Spectral Analysis** | MFCC, RMS, spectral centroid matching | +| **Variation Engine** | Different samples per section | + +--- + +## ๐Ÿ› ๏ธ Installation + +### 1. Clone Repository +```bash +git clone https://gitea.cbcren.online/renato97/AbletonMCP_AI.git +cd AbletonMCP_AI +``` + +### 2. Configure Ableton Live +1. Open **Ableton Live 12 Suite** +2. Go to **Preferences โ†’ Link/Tempo/MIDI** +3. Under **Control Surfaces**, add **AbletonMCP_AI** +4. The script auto-starts on TCP port 9877 + +### 3. Configure OpenCode +Edit `~/.config/opencode/opencode.json`: +```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 + } + } +} +``` + +### 4. Sample Library +Place your samples in `libreria/reggaeton/`: +``` +libreria/ +โ””โ”€โ”€ reggaeton/ + โ”œโ”€โ”€ kick/ + โ”œโ”€โ”€ snare/ + โ”œโ”€โ”€ hihat/ + โ”œโ”€โ”€ bass/ + โ”œโ”€โ”€ chords/ + โ”œโ”€โ”€ melody/ + โ”œโ”€โ”€ fx/ + โ””โ”€โ”€ drumloops/ +``` + +--- + +## ๐ŸŽฎ Available Tools (96+) + +### Project Info +- `get_session_info` - Tempo, tracks, scenes, playback state +- `get_tracks` / `get_scenes` - List all elements +- `get_arrangement_clips` - Timeline content +- `get_master_info` - Master track settings + +### Transport & Settings +- `start_playback` / `stop_playback` / `toggle_playback` +- `set_tempo` (20-300 BPM) / `set_time_signature` / `set_metronome` + +### Tracks & Mixing +- `create_midi_track` / `create_audio_track` +- `set_track_volume` / `set_track_pan` / `set_track_mute` / `set_track_solo` +- `create_bus_track` / `route_track_to_bus` +- `configure_eq` / `configure_compressor` / `setup_sidechain` + +### Clip Creation +- `create_clip` - MIDI clips in Session View +- `add_notes_to_clip` - Add MIDI note data +- `create_arrangement_audio_pattern` - Load audio files to timeline +- `load_sample_to_clip` / `load_sample_to_drum_rack` + +### ๐ŸŽฏ **AI Generation (The Good Stuff)** +- `generate_intelligent_track` - One-prompt complete track +- `generate_expansive_track` - 12+ samples per category +- `build_song` - Full arrangement with sections +- `produce_reggaeton` - Complete reggaeton production +- `produce_from_reference` - Match reference audio style + +### Advanced +- `create_riser` / `create_downlifter` / `create_impact` - FX generation +- `automate_filter` / `generate_curve_automation` - Parameter automation +- `humanize_track` - Velocity/timing variations +- `apply_professional_mix` - Complete mix chain + +--- + +## ๐Ÿ“‚ Project Structure + +``` +AbletonMCP_AI/ +โ”œโ”€โ”€ ๐Ÿ“„ __init__.py # Remote Script entry (~6500 lines) +โ”œโ”€โ”€ ๐Ÿ“„ runtime.py # TCP server runtime +โ”œโ”€โ”€ ๐Ÿ“ mcp_server/ +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ server.py # MCP FastMCP server +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ integration.py # Senior Architecture coordinator +โ”‚ โ””โ”€โ”€ ๐Ÿ“ engines/ +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ sample_selector.py # Smart sample selection +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ song_generator.py # Track generation +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ arrangement_recorder.py # Sessionโ†’Arrangement +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ live_bridge.py # Live API execution +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ mixing_engine.py # Professional mixing +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ metadata_store.py # SQLite sample DB +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ massive_selector.py # 330+ sample selection +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ coherence_system.py # Compatibility validation +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ ... (50+ more engines) +โ”œโ”€โ”€ ๐Ÿ“ docs/ +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ skill_produccion_audio.md # Production skills +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ skill_reinicio_ableton.md # Restart procedures +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ WORKFLOW_REGGAETON.md # Reggaeton workflow +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ API_REFERENCE_PRO.md # Complete API docs +โ”œโ”€โ”€ ๐Ÿ“ examples/ +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ professional_production.py # Usage examples +โ””โ”€โ”€ ๐Ÿ“ presets/ + โ””โ”€โ”€ ๐Ÿ“„ *.json # Saved configurations + +mcp_wrapper.py # Launcher script +AGENTS.md # Agent instructions +CLAUDE.md / QWEN.md # Per-agent guides +``` + +--- + +## ๐Ÿงช Testing + +### Compile Check +```powershell +python -m py_compile "AbletonMCP_AI\__init__.py" +python -m py_compile "AbletonMCP_AI\mcp_server\server.py" +``` + +### Health Check +```python +# Run in OpenCode +ableton-live-mcp_health_check() +``` + +Expected: Score 5/5 (all systems operational) + +--- + +## ๐ŸŽต Production Workflow Example + +```python +# 1. Health check +ableton-live-mcp_health_check() + +# 2. Generate complete track +ableton-live-mcp_generate_intelligent_track( + description="reggaeton perreo intenso 95bpm Am drumloop gata", + structure_type="short", + variation_level="high", + coherence_threshold=0.90 +) + +# 3. Get arrangement status +ableton-live-mcp_get_arrangement_status() + +# 4. Apply professional mix +ableton-live-mcp_apply_professional_mix( + track_assignments='{"21": "drumloop", "22": "bass", "23": "chords"}' +) + +# 5. Export +ableton-live-mcp_render_full_mix(output_path="C:\\temp\\track.wav") +``` + +--- + +## ๐Ÿ”ง Troubleshooting + +| Problem | Solution | +|---------|----------| +| Connection refused | Check Ableton has AbletonMCP_AI loaded in Preferences | +| Port 9877 blocked | Run: `netstat -an \| findstr 9877` | +| Changes not reflecting | Restart Ableton (delete `CrashRecoveryInfo.cfg` first) | +| Sample selection empty | Verify `libreria/reggaeton/` has .wav files | +| Timeout on generation | Check Ableton log for errors | + +--- + +## ๐Ÿ“Š Project Statistics + +| Metric | Value | +|--------|-------| +| Total Files | 119 | +| Lines of Code | ~90,000 | +| Python Engines | 50+ | +| MCP Tools | 96+ | +| Documentation | 30+ pages | +| Sample Library | 375+ analyzed | +| Presets | 7 saved | + +--- + +## ๐Ÿ“ Changelog + +### v3.0 - Senior Architecture (Current) +- โœ… Arrangement-first workflow (no Session View intermediate) +- โœ… SQLite metadata store (no numpy for queries) +- โœ… 50+ production engines +- โœ… Professional mixing chains +- โœ… VST plugin support + +### v2.0 - Clean Rewrite +- โœ… Simplified architecture +- โœ… FastMCP stdio transport +- โœ… TCP socket per command + +--- + +## ๐Ÿค Credits + +- **Architecture:** Senior v3.0 (Arrangement-first) +- **AI Agents:** Kimi K2 (coding), Qwen (validation) +- **Platform:** Ableton Live 12 Suite +- **Protocol:** Model Context Protocol (MCP) + +--- + +## ๐Ÿ“œ License + +MIT License - See LICENSE file for details. + +--- + +## ๐Ÿ”— Links + +- **Repository:** https://gitea.cbcren.online/renato97/AbletonMCP_AI +- **Ableton:** https://www.ableton.com +- **MCP Docs:** https://modelcontextprotocol.io + +--- + +

+ ๐ŸŽ›๏ธ Produce music with your voice. No limits. ๐ŸŽต +