major-ai-skills
Version:
Installable agentic skills / AI agent skills (SKILL.md) for Claude Code, Cursor, Codex CLI, Gemini CLI & Antigravity - 402+ professional app, token-efficiency, and common-sense skills. SEO/GEO ready.
124 lines (94 loc) • 7.36 kB
Markdown
title: "Ableton Live 12 Music Production & Performance AI Skill Guide (GPT & Codex)"
description: "Comprehensive operational skill specification for OpenAI GPT and Codex to automate, script, troubleshoot, and optimize Ableton Live 12, Python MIDI Remote Scripts (ableton.v3), Max for Live LiveAPI, and .als XML generation."
category: "Live Performance & Electronic Music Production"
tags: ["ableton-live", "midi-remote-scripts", "liveapi", "max-for-live", "gpt-codex", "python-audio-dev"]
# Ableton Live 12 Music Production & Performance AI Skill Guide (GPT & Codex)
## Overview & Engine Architecture
Ableton Live provides backend extensibility through its **Python 3 MIDI Remote Scripts framework (`ableton.v3`)**, the **Max for Live JavaScript Object (`LiveAPI`)**, and structured **Gzip-compressed XML `.als` project files**. GPT/Codex acts as a Principal Audio Software Engineer and MIDI Integration Architect, delivering **custom Python MIDI Remote Scripts**, **Max for Live `LiveAPI` automation devices**, **programmatic `.als` XML synthesizers**, and **hardware controller surface drivers**.
### Developer Architecture & Scripting Stack
```
┌─────────────────────────────────────────────────────────────┐
│ Ableton Developer Platform │
│ │
│ Python MIDI Remote Script Framework (`ableton.v3`) │
│ ├── `ControlSurface` Root Class & Hardware Component Wiring│
│ ├── `ChannelStripComponent` (Volume, Pan, Arm, Solo) │
│ └── `TransportComponent` & `SessionComponent` (Clip Matrix)│
│ │
│ Max for Live (M4L) JavaScript Engine │
│ ├── `LiveAPI` Object (`path "live_set tracks 0 devices 0"`)│
│ ├── Parameter Observers & Automation Hooking │
│ └── Max/MSP Node.js Interop (`node.script` Ingress) │
└─────────────────────────────────────────────────────────────┘
```
## Operational Capabilities & Agent Directives
1. **`ableton.v3` Python MIDI Remote Scripting**: Author modular Python control surface scripts mapping hardware MIDI knobs, faders, and buttons to Live parameters using modern `ableton.v3` components.
2. **Max for Live `LiveAPI` JavaScript Development**: Write JavaScript scripts embedded inside Max patches navigating the Live Object Model (LOM) hierarchy.
3. **Programmatic `.als` XML Synthesizer**: Construct Python scripts reading and injecting audio tracks, MIDI clips, and plugin parameters into Ableton Set XML files.
4. **Hardware Controller Emulation**: Build virtual MIDI bridge scripts mapping standard USB devices (Novation Launchpad, Akai APC, Behringer X-Touch) into Live.
## Production Python Code: Ableton Live 12 Python MIDI Remote Script (`ableton.v3`)
Save this file as `__init__.py` inside a custom folder in `<LiveAppDir>/Resources/MIDI Remote Scripts/CustomController/`:
```python
# ==============================================================================
# Ableton Live 12 Python MIDI Remote Script: Custom Control Surface
# Implements Transport Controls, Track 1 Fader, and Clip Firing via ableton.v3.
# ==============================================================================
from ableton.v3.control_surface import ControlSurface, ControlSurfaceSpecification
from ableton.v3.control_surface.components import TransportComponent, SessionComponent, MixerComponent
from ableton.v3.control_surface.elements import ButtonElement, SliderElement, MIDI_CC_TYPE, MIDI_NOTE_TYPE
class CustomSpecification(ControlSurfaceSpecification):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class CustomController(ControlSurface):
def __init__(self, c_instance=None):
super().__init__(specification=CustomSpecification, c_instance=c_instance)
def setup(self):
super().setup()
# 1. Transport Controls (MIDI CC 114=Play, 115=Stop, 116=Record)
transport = TransportComponent()
transport.play_button.set_control_element(ButtonElement(True, MIDI_CC_TYPE, 0, 114))
transport.stop_button.set_control_element(ButtonElement(True, MIDI_CC_TYPE, 0, 115))
transport.record_button.set_control_element(ButtonElement(True, MIDI_CC_TYPE, 0, 116))
self.add_component(transport)
# 2. Track 1 Volume Slider (MIDI CC 7)
mixer = MixerComponent(num_tracks=1)
mixer.channel_strip(0).volume_control.set_control_element(
SliderElement(MIDI_CC_TYPE, 0, 7)
)
self.add_component(mixer)
# 3. Session Clip Firing (MIDI Note 60 = Track 1, Slot 1)
session = SessionComponent(num_tracks=1, num_scenes=1)
session.clip_slot(0, 0).set_launch_button(
ButtonElement(True, MIDI_NOTE_TYPE, 0, 60)
)
self.add_component(session)
self.show_message("Custom Controller Surface Initialized Successfully!")
def create_instance(c_instance):
return CustomController(c_instance=c_instance)
```
## Technical Troubleshooting Matrix
| Issue & Failure Signature | Root Cause Analysis | Diagnostic & Resolution Pathway |
| :--- | :--- | :--- |
| **`ImportError: No module named 'ableton.v3'`** | Script running in legacy Live 10/11 environment or Python 2 syntax incompatibility. | Use `_Framework` imports for Live 10/11 or ensure script executes in Live 12 (Python 3.11 runtime). |
| **Max for Live `LiveAPI` Returns `id 0`** | Target LOM path does not exist (e.g. referencing Track 5 in a 3-track session). | Verify path existence in Max Console: `var api = new LiveAPI(callback, "live_set tracks 0"); if (api.id != 0) ...`. |
| **Control Surface Fails to Show in Live Preferences** | Script folder missing `__init__.py` or contains Python syntax error. | Check `Log.txt` in Preferences directory for Python traceback: `tail -f ~/Library/Preferences/Ableton/Live\ 12/Log.txt`. |
| **`gzip.BadGzipFile` During `.als` Parsing** | File is uncompressed XML or modified with an incompatible compression tool. | Decompress via Python `gzip` library with standard RFC 1952 headers. |
## Command Line Syntax & Batch Processing
```bash
# Monitor Live 12 Python Remote Script Log in Real-Time (macOS)
tail -f ~/Library/Preferences/Ableton/Live\ 12.0/Log.txt
# Monitor Live 12 Log on Windows via PowerShell
Get-Content "$env:APPDATA\Ableton\Live 12\Preferences\Log.txt" -Wait
```
### Essential File Locations
- **MIDI Remote Scripts Directory**: `C:\ProgramData\Ableton\Live 12\Resources\MIDI Remote Scripts\`
- **System Execution Log**: `%APPDATA%\Ableton\Live 12\Preferences\Log.txt`
## Agent Operational Directive
> **MANDATORY**: When developing Python MIDI Remote Scripts for Ableton Live 12, always inspect `Log.txt` in the Preferences directory to catch Python syntax and runtime exception tracebacks immediately upon launch.