Initial commit: AbletonMCP-AI complete system
- MCP Server with audio fallback, sample management - Song generator with bus routing - Reference listener and audio resampler - Vector-based sample search - Master chain with limiter and calibration - Fix: Audio fallback now works without M4L - Fix: Full song detection in sample loader Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
43
validate_script.py
Normal file
43
validate_script.py
Normal file
@@ -0,0 +1,43 @@
|
||||
import socket
|
||||
import json
|
||||
|
||||
HOST = "127.0.0.1"
|
||||
PORT = 9877
|
||||
MESSAGE_TERMINATOR = b"\n"
|
||||
|
||||
def send_cmd(cmd_type, params=None):
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((HOST, PORT))
|
||||
payload = json.dumps({"type": cmd_type, "params": params or {}}, separators=(",", ":")).encode("utf-8") + MESSAGE_TERMINATOR
|
||||
s.sendall(payload)
|
||||
data = b""
|
||||
while True:
|
||||
chunk = s.recv(8192)
|
||||
if not chunk:
|
||||
break
|
||||
if MESSAGE_TERMINATOR in chunk:
|
||||
data += chunk.replace(MESSAGE_TERMINATOR, b"")
|
||||
break
|
||||
data += chunk
|
||||
s.close()
|
||||
if data:
|
||||
return json.loads(data.decode("utf-8"))
|
||||
return None
|
||||
|
||||
# Validate
|
||||
print("=== VALIDATE SET ===")
|
||||
validate = send_cmd("validate_set", {"check_clips": True, "check_gain": True, "check_routing": True})
|
||||
print(json.dumps(validate, indent=2))
|
||||
|
||||
print("\n=== DIAGNOSE SET ===")
|
||||
diagnose = send_cmd("diagnose_generated_set")
|
||||
print(json.dumps(diagnose, indent=2))
|
||||
|
||||
print("\n=== TRACKS STATUS ===")
|
||||
tracks = send_cmd("get_tracks")
|
||||
if tracks:
|
||||
for i, track in enumerate(tracks.get('result', [])):
|
||||
name = track.get('name', 'Unknown')
|
||||
arr = track.get('arrangement_clip_count', 0)
|
||||
sess = track.get('session_clip_count', 0)
|
||||
print(f" {i}: {name} - Session: {sess}, Arrangement: {arr}")
|
||||
Reference in New Issue
Block a user