The OSC stuff that's currently in there to support the separate Ableton Push process should be moved into the render package and turned into a general-purpose mechanism for interfacing the language with external things via OSC.
The obvious thing to do is to support an OSC listener that can update the state. Maybe something like:
!osc_listen host='127.0.0.1' port=12345
!endpoint address='/a/b/c' state=:abc
With whatever values are sent to the /a/b/c address being saved as a vector against the :abc state key. This will obviously work fine for ints, floats, bools and strings. Could consider the idea of grouping up the address path into a node/vector hierarchy, like:
!osc_listen host='127.0.0.1' port=12345
!group prefix=:a;:b
!endpoint address=:c state=:abc
This may be unnecessarily wordy though. There's probably no harm in it and in allowing addresses to be vectors that get joined using / characters.
Trickier is figuring out how to send OSC values. Perhaps something like:
!osc_send host='127.0.0.1' port=11000
!group prefix=:live
!endpoint address=:track;:set;:volume values=track_id;volume
This should presumably keep a cache of the last sent addresses/values and only send changes, with perhaps some kind of (per-endpoint) confgurable timeout to resend the current value if it doesn't change.
The OSC stuff that's currently in there to support the separate Ableton Push process should be moved into the
renderpackage and turned into a general-purpose mechanism for interfacing the language with external things via OSC.The obvious thing to do is to support an OSC listener that can update the state. Maybe something like:
With whatever values are sent to the
/a/b/caddress being saved as a vector against the:abcstate key. This will obviously work fine for ints, floats, bools and strings. Could consider the idea of grouping up the address path into a node/vector hierarchy, like:This may be unnecessarily wordy though. There's probably no harm in it and in allowing addresses to be vectors that get joined using
/characters.Trickier is figuring out how to send OSC values. Perhaps something like:
This should presumably keep a cache of the last sent addresses/values and only send changes, with perhaps some kind of (per-endpoint) confgurable timeout to resend the current value if it doesn't change.