- Add preview mode (p key) to toggle between send/preview behavior - Arrow keys for navigation with optional send - Enter sends current chord (only when not in preview mode) - Jump to chord by number + Enter - k/K keys for kill soft (15.0) and kill hard (0.0) commands - Display prev/current/next chords with frequencies to 2 decimals - Add OSC test receiver for debugging - Use arrow key escape sequences for left/right navigation
18 lines
444 B
Python
18 lines
444 B
Python
#!/usr/bin/env python
|
|
"""Simple OSC receiver for testing."""
|
|
|
|
import socket
|
|
from pythonosc.osc_message import OscMessage
|
|
|
|
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|
sock.bind(("0.0.0.0", 54001))
|
|
print("Listening on port 54001...")
|
|
|
|
while True:
|
|
data, addr = sock.recvfrom(4096)
|
|
msg = OscMessage(dgram=data)
|
|
print(f"From {addr}: {msg.address}", end="")
|
|
for p in msg.params:
|
|
print(f" {p}", end="")
|
|
print()
|