Fix Ableton Live detection: add root __init__.py and harden Manager init

Live scans the Remote Scripts folder for __init__.py with create_instance()
at the *root* of the script folder. Our create_instance was buried inside
the AbletonOSC/ subpackage, so Live never found it.

Also:
- Inner AbletonOSC/__init__.py: guard import with try/except for pytest compat
- Manager: use show_message() (Live status bar) instead of log_message()
- Manager: wrap OSCServer.start() in try/except OSError so a port conflict
  surfaces as a readable status message instead of a silent crash
- Manager: run handler init inside component_guard() as required by the
  Ableton ControlSurface framework
- Manager stub: add show_message, schedule_message, component_guard no-ops
  so out-of-Ableton tooling/tests don't break

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 12:46:42 +02:00
parent caaa055c8a
commit ac6a049516
3 changed files with 40 additions and 19 deletions
+9
View File
@@ -0,0 +1,9 @@
try:
from .AbletonOSC.manager import Manager
except ImportError:
# Allows pytest to import without Ableton's runtime present
pass
def create_instance(c_instance):
return Manager(c_instance)