Files
ableton-mcp-ai/mcp_server/engines/musical_intelligence.py
OpenCode Agent 5ce8187c65 feat: Implement senior audio injection with 5 fallback methods
- 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
2026-04-12 14:02:32 -03:00

30 lines
1.1 KiB
Python

"""Small compatibility layer for legacy musical_intelligence imports."""
from typing import Any, Dict, List
class MusicalIntelligenceEngine:
"""Expose only the legacy methods still imported by server.py."""
def __init__(self):
self._progressions: List[Dict[str, Any]] = []
self._current_key = "Am"
def set_multiple_progressions(self, progressions_config: List[Dict[str, Any]]) -> Dict[str, Any]:
self._progressions = list(progressions_config or [])
return {
"sections": [item.get("section", "") for item in self._progressions],
"progressions": [item.get("progression", "") for item in self._progressions],
"total_chords": sum(len(str(item.get("progression", "")).split("-")) for item in self._progressions),
}
def modulate_key(self, section_index: int, new_key: str) -> Dict[str, Any]:
original_key = self._current_key
self._current_key = new_key
return {
"original_key": original_key,
"new_key": new_key,
"modulation_type": "direct",
"tracks_affected": [section_index],
}