Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions ClaudeMCP_Remote/liveapi_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3061,14 +3061,18 @@ def get_crossfader_position(self):
# ========================================================================

def create_group_track(self, name=None):
"""Create a new group track"""
"""Create a group track from the selected tracks, if the LOM supports it.

Track grouping is GUI-only in most Live versions (Cmd+G); returns an honest
error where unsupported instead of a cryptic AttributeError.
"""
try:
if not hasattr(self.song, 'create_group_track'):
return {"ok": False, "error": "Track grouping is not exposed by the Live Object Model in this version (GUI-only: select tracks and press Cmd+G)."}
track_index = len(self.song.tracks)
self.song.create_group_track(track_index)

if name and track_index < len(self.song.tracks):
self.song.tracks[track_index].name = str(name)

return {
"ok": True,
"message": "Group track created",
Expand All @@ -3079,17 +3083,19 @@ def create_group_track(self, name=None):
return {"ok": False, "error": str(e)}

def group_tracks(self, start_index, end_index):
"""Group tracks from start_index to end_index (inclusive)"""
"""Group a contiguous range of tracks, if the LOM supports it.

Track grouping is GUI-only in most Live versions; returns an honest error
where unsupported rather than faking success.
"""
try:
if start_index < 0 or start_index >= len(self.song.tracks):
return {"ok": False, "error": "Invalid start index"}
if end_index < start_index or end_index >= len(self.song.tracks):
return {"ok": False, "error": "Invalid end index"}

# Group the tracks
if not hasattr(self.song, 'create_group_track'):
return {"ok": False, "error": "Track grouping is not exposed by the Live Object Model in this version (GUI-only: select the tracks and press Cmd+G)."}
self.song.create_group_track(end_index + 1)

# Move tracks into the group (this is simplified - actual implementation may vary)
return {
"ok": True,
"message": "Tracks grouped",
Expand Down
Loading