Reorganize top-level directories with clearer naming convention
app -> app-desktop-macos, presets -> app-presets, server -> remote-server, daw-config-reaper -> osc-config-daw, plugin-reaper-realearn -> plugin-reaper-relearn. Updated run.py and presets.py path references accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from pythonosc import udp_client
|
||||
from osc_receiver import osc_receiver
|
||||
|
||||
|
||||
_osc_client = None
|
||||
_osc_send_port = 8000
|
||||
_osc_send_ip = "127.0.0.1"
|
||||
|
||||
|
||||
def get_osc_client():
|
||||
global _osc_client
|
||||
|
||||
if _osc_client is None:
|
||||
_osc_client = udp_client.SimpleUDPClient(_osc_send_ip, _osc_send_port)
|
||||
|
||||
return _osc_client
|
||||
|
||||
|
||||
def set_osc_target(ip=None, port=None):
|
||||
global _osc_client, _osc_send_ip, _osc_send_port
|
||||
|
||||
if ip is not None:
|
||||
_osc_send_ip = ip
|
||||
|
||||
if port is not None:
|
||||
_osc_send_port = port
|
||||
|
||||
_osc_client = None
|
||||
|
||||
|
||||
def send_osc_message(address, value=1.0):
|
||||
try:
|
||||
get_osc_client().send_message(address, float(value))
|
||||
osc_receiver.osc_out_signal.emit(address, str(value))
|
||||
print(f"[OSC] → {address} {value}")
|
||||
except Exception as e:
|
||||
print(f"[OSC send] Error: {e}")
|
||||
Reference in New Issue
Block a user