diff options
| author | sbahling <sbahling@mudgum.net> | 2018-11-03 01:09:07 +0100 |
|---|---|---|
| committer | sbahling <sbahling@mudgum.net> | 2018-11-03 01:09:07 +0100 |
| commit | e9e1efefc87ce4dd942fa7c83794a7b27ec3a13c (patch) | |
| tree | 00ded9a9e5b5460b8173505795ccc7568fc0ba2d /tascam_fw_console/osc.py | |
| parent | 7d490031c54458644eb459dbb390b10ea8de3334 (diff) | |
| download | tascam-fw-osc-e9e1efefc87ce4dd942fa7c83794a7b27ec3a13c.tar.gz tascam-fw-osc-e9e1efefc87ce4dd942fa7c83794a7b27ec3a13c.tar.xz tascam-fw-osc-e9e1efefc87ce4dd942fa7c83794a7b27ec3a13c.zip | |
Serve as base OSC server for the Tascam Console Unittascam_fw_console-0.2
We remove the Ardour specific OSC mapping and create our own OSC
API that will be consumed by OSC translators that communicate to
specific applications.
We only send the state of each control and set the state of each
fader or led based on received commands.
Logic for interpreting the control state will be moved to the OSC
translator code.
Diffstat (limited to 'tascam_fw_console/osc.py')
| -rw-r--r-- | tascam_fw_console/osc.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tascam_fw_console/osc.py b/tascam_fw_console/osc.py index 2892168..46f6fc1 100644 --- a/tascam_fw_console/osc.py +++ b/tascam_fw_console/osc.py @@ -29,6 +29,19 @@ server = None dispatcher = dispatcher.Dispatcher() +class OSCClient(udp_client.SimpleUDPClient): + def __init__(self, ip, port): + super().__init__(ip, port) + + def send_message(self, addr, args): + try: + print(addr, *args) + except Exception: + print(addr, args) + + super().send_message(addr, args) + + def init_dispatcher(console): dispatcher.map("/loop_toggle", console.loop_toggle_handler) dispatcher.map("/transport_stop", console.transport_stop_handler) @@ -53,7 +66,7 @@ def init_dispatcher(console): def init_client(ip, port): global client - client = udp_client.SimpleUDPClient(ip, port) + client = OSCClient(ip, port) def init_server(ip, port, console): |
