Rename padeditor to padcontroller, with the MIDI intercept as padcontroller.midi and its virtual port as padcontroller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-10-22 13:25:06 +13:00
1 parent 1e09cb3825
commit 9742121144
31 files changed
+79 -79

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from padeditor.sysex import decode # noqa: E402
from padcontroller.sysex import decode # noqa: E402
LINKTYPE_USB_LINUX_MMAPPED = 220
HEADER = struct.Struct("<QBBBBHBBqiiIIQiiII") # 64 bytes
+5 -5
View File
@@ -32,11 +32,11 @@ sys.path.insert(0, str(ROOT))
sys.path.insert(0, str(ROOT / "scripts" / "pad"))
from patch_smc_pad import PAD_COLORS # noqa: E402
from padeditor import preset # noqa: E402
from padeditor.device import PadError, read_image, save_image, transact # noqa: E402
from padeditor.device import private_port as _private_port # noqa: E402
from padeditor.preset import scale # noqa: E402
from padeditor.sysex import ( # noqa: E402
from padcontroller import preset # noqa: E402
from padcontroller.device import PadError, read_image, save_image, transact # noqa: E402
from padcontroller.device import private_port as _private_port # noqa: E402
from padcontroller.preset import scale # noqa: E402
from padcontroller.sysex import ( # noqa: E402
RAM,
decode,
encode,
+1 -1
View File
@@ -3,7 +3,7 @@
.venv/bin/python scripts/pad/pad_lamps.py
Needs the USB Private port. padeditor.padcontroller does this on start; run this
Needs the USB Private port. padcontroller.midi does this on start; run this
when the pad is read by Chataigne instead.
"""
+2 -2
View File
@@ -75,13 +75,13 @@ PAD_COLORS = [
def detect_midi_uid() -> str:
"""Prefer smoothed virtual port when the pad controller (padeditor.padcontroller) is running."""
"""Prefer smoothed virtual port when the pad controller (padcontroller.midi) is running."""
try:
out = subprocess.check_output(["aconnect", "-l"], text=True)
except (FileNotFoundError, subprocess.CalledProcessError):
out = ""
for name in (
"SMC-PAD Smooth",
"padcontroller",
"SMC-PAD Bluetooth",
"SINCO SMC-PAD-Private",
"SINCO SMC-PAD-Master",
+9 -9
View File
@@ -3,7 +3,7 @@
#
# Order matters:
# 1) pad present (Bluetooth or USB)
# 2) pad controller (creates "SMC-PAD Smooth")
# 2) pad controller (creates "padcontroller")
# 3) patch workspace to that port
# 4) open QLC+ last
set -euo pipefail
@@ -31,7 +31,7 @@ if ! pad_present; then
fi
# Restart the pad controller so it re-opens the pad port cleanly. Use the systemd
# user service when it is installed (padeditor/systemd/install.sh).
# user service when it is installed (padcontroller/systemd/install.sh).
SERVICE=padcontroller.service
LOG=/tmp/padcontroller.log
if systemctl --user is-enabled --quiet "$SERVICE" 2>/dev/null; then
@@ -41,18 +41,18 @@ else
# avoid pkill -f; it matches this script
while read -r pid; do
[[ -n "$pid" ]] && kill "$pid" 2>/dev/null || true
done < <(ps -eo pid,args | awk '/python.* -m padeditor[.]padcontroller/ {print $1}')
done < <(ps -eo pid,args | awk '/python.* -m padcontroller[.]midi/ {print $1}')
sleep 0.4
nohup "$PYTHON" -m padeditor.padcontroller --tau 0.055 >>"$LOG" 2>&1 &
nohup "$PYTHON" -m padcontroller.midi --tau 0.055 >>"$LOG" 2>&1 &
fi
for _ in $(seq 1 20); do
if aconnect -l 2>/dev/null | grep -q 'SMC-PAD Smooth'; then
if aconnect -l 2>/dev/null | grep -q 'padcontroller'; then
break
fi
sleep 0.25
done
if ! aconnect -l 2>/dev/null | grep -q 'SMC-PAD Smooth'; then
echo "The pad controller failed to create SMC-PAD Smooth." >&2
if ! aconnect -l 2>/dev/null | grep -q 'padcontroller'; then
echo "The pad controller failed to create padcontroller." >&2
if [[ -n "$LOG" ]]; then
tail -20 "$LOG" >&2 || true
else
@@ -69,7 +69,7 @@ nohup qlcplus --open "$ROOT/shows/midi.qxw" >/tmp/qlcplus.log 2>&1 &
sleep 1.5
echo
echo "Chain (expect pad → Smooth → qlcplus):"
aconnect -l | grep -E "SMC-PAD|SINCO|Smooth|qlcplus|smc-smooth" -A2 || aconnect -l
echo "Chain (expect pad → padcontroller → qlcplus):"
aconnect -l | grep -E "SMC-PAD|SINCO|padcontroller|qlcplus" -A2 || aconnect -l
echo
echo "OK — twist a knob / hit a pad. If silent: re-run this script (don't pick Midi Through in IO)."