ideoforms / AbletonOSC

Control Ableton Live 11 via Open Sound Control (OSC)
MIT License
426 stars 70 forks source link

Generic track "start_listen" command #42

Closed graham-archer closed 1 year ago

graham-archer commented 1 year ago

I wondered if it would be possible to have a generic track 'start_listen' command that would allow for any property on a given track to be listened for, rather than having to be specific about the property which is currently the case.

e.g. /live/track/start_listen 0

With this you could listen for mute, volume, send level, name, color etc. etc.

ideoforms commented 1 year ago

I've now implemented this, by introducing initial support for OSC wildcards. If you want to query (or listen for) all properties of an object, use the special character *.

For example: /live/track/get/* will generate responses for every property of track 2:

/live/track/get/can_be_armed (2, True)
/live/track/get/fired_slot_index (2, -1)
/live/track/get/has_audio_input (2, True)
/live/track/get/has_audio_output (2, True)
/live/track/get/has_midi_input (2, False)
/live/track/get/has_midi_output (2, False)
...

In the same way, you can now do /live/track/start_listen/* 2, which will start listening for all property changes on track 2. To stop listening for all properties, simply do /live/track/stop_listen/* 2.

Hope that helps!