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:
1 parent
1e09cb3825
commit
9742121144
31 files changed
+79
-79
No files matched your search
@@ -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)."
|
||||
Reference in new issue
Block a user