diff options
| author | sbahling <sbahling@mudgum.net> | 2018-10-26 14:23:08 +0200 |
|---|---|---|
| committer | sbahling <sbahling@mudgum.net> | 2018-10-26 14:23:08 +0200 |
| commit | 1d1b23e5154e093a3e3e3e40b05946ab06c9738c (patch) | |
| tree | a57773bf632c21cecc6427619ec23fd8c88d8b5d /osc.py | |
| parent | 38c4e8310ef6bde30d3628ee93103c631caed47b (diff) | |
| download | tascam-fw-osc-1d1b23e5154e093a3e3e3e40b05946ab06c9738c.tar.gz tascam-fw-osc-1d1b23e5154e093a3e3e3e40b05946ab06c9738c.tar.xz tascam-fw-osc-1d1b23e5154e093a3e3e3e40b05946ab06c9738c.zip | |
Create initial package setup with setuptools
Diffstat (limited to 'osc.py')
| -rw-r--r-- | osc.py | 60 |
1 files changed, 0 insertions, 60 deletions
@@ -1,60 +0,0 @@ -#!/usr/bin/env python3 -""" - Open Sound Control send/recieve daemon for Tascam Firewire control surface - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright (c) 2018 Scott Bahling - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program (see the file COPYING); if not, write to the - Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - :license: GPL-2.0, see COPYING for details -""" - -from pythonosc import dispatcher -from pythonosc import osc_server -from pythonosc import udp_client - -client = None -server = None -dispatcher = dispatcher.Dispatcher() - - -def init_dispatcher(console): - dispatcher.map("/loop_toggle", console.loop_toggle_handler) - dispatcher.map("/transport_stop", console.transport_stop_handler) - dispatcher.map("/transport_play", console.transport_play_handler) - dispatcher.map("/ffwd", console.ffwd_handler) - dispatcher.map("/rewind", console.rewind_handler) - dispatcher.map("/rec_enable_toggle", console.rec_enable_toggle_handler) - dispatcher.map('/strip/fader', console.strip_fader_handler) - dispatcher.map('/strip/mute', console.strip_mute_handler) - dispatcher.map('/strip/solo', console.strip_solo_handler) - dispatcher.map('/strip/recenable', console.strip_recenable_handler) - dispatcher.map('/master/fader', console.master_fader_handler) - dispatcher.map('/strip/pan_stereo_position', - console.pan_stereo_position_handler) - dispatcher.map('/strip/name', console.strip_name_handler) - dispatcher.map('/bank_up', console.bank_up_handler) - dispatcher.map('/bank_down', console.bank_down_handler) - dispatcher.set_default_handler(console.default_handler) - - -def init_client(ip, port): - global client - client = udp_client.SimpleUDPClient(ip, port) - - -def init_server(ip, port, console): - global server - init_dispatcher(console) - server = osc_server.ThreadingOSCUDPServer((ip, port), dispatcher) |
