Initial tablet POC: project restructure + WebSocket/HTTP server + JS client

- Restructured project into /app, /server, /client with run.py entry point
- WSServer (QWebSocketServer) with log_signal, start/stop, client tracking
- HTTP server serves /client on port 8080
- Vanilla JS client: faders, toggles, transport, drag-to-arrange, lock/save layout
- Start Tablet button + floating Tablet log window in app UI
- Preset broadcast on load/switch, DAW state relay, hardware sync via widget_update
- Widget colors synced from app palette, toggle state fixed (sends 0/127 correctly)
- Layout saved per preset UUID back to presets.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Lipscomb
2026-06-29 23:44:30 -04:00
parent 22e4fa770e
commit 4db7165797
23 changed files with 851 additions and 1 deletions
+45
View File
@@ -0,0 +1,45 @@
PALETTE = [
("Red", "#e53935"),
("Orange", "#fb8c00"),
("Yellow", "#fdd835"),
("Green", "#43a047"),
("Teal", "#00897b"),
("Blue", "#1e88e5"),
("Purple", "#8e24aa"),
("Pink", "#e91e63"),
("White", "#f5f5f5"),
("Gray", "#4a5568"),
]
PALETTE_NAMES = [p[0] for p in PALETTE]
PALETTE_HEX = {p[0]: p[1] for p in PALETTE}
PALETTE_VIVID = {
"Red": "#7f0000",
"Orange": "#7f3000",
"Yellow": "#7f6000",
"Green": "#1b5e20",
"Teal": "#004d40",
"Blue": "#0d2b6e",
"Purple": "#4a0072",
"Pink": "#7f004d",
"White": "#9e9e9e",
"Gray": "#263238",
}
def lighten_hex(hex_color, amount=0):
hex_color = hex_color.lstrip("#")
r, g, b = int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16)
r = min(255, r + amount)
g = min(255, g + amount)
b = min(255, b + amount)
return f"#{r:02x}{g:02x}{b:02x}"
def darken_hex(hex_color, amount=60):
hex_color = hex_color.lstrip("#")
r, g, b = int(hex_color[0:2], 16), int(hex_color[2:4], 16), int(hex_color[4:6], 16)
r = max(0, r - amount)
g = max(0, g - amount)
b = max(0, b - amount)
return f"#{r:02x}{g:02x}{b:02x}"