Files
raspberry-pi-mixer/config/99-midi.rules
T
shawn 9cd8292acc
Lint & Validate / lint (push) Has been cancelled
Phase 1-4: Audio stack, mixer engine, MIDI, and network API
P2-R1: ALSA + JACK2 low-latency config (scripts, quirks, tuning)
P2-R2: Carla integration (build scripts, 8ch rack config, NAM LV2 support)
P2-R3: Plugin manager, categories, blacklist, NAM model support
P3-R1: Mixer DSP engine (channel strip, routing matrix, bus mgr, automation)
P4-R1: MIDI engine (learn mode, clock sync, HID discovery, mapping store)
P4-R2: Network API (OSC server, FastAPI REST, WebSocket, auth, rate limiter)
P5-R1: Touchscreen UI evaluation + main entry point
docs: Audio stack, Carla integration, MIDI support, UI evaluation
tests: Full test suite (292 passing)
2026-05-19 20:39:17 -04:00

68 lines
2.7 KiB
Plaintext

# /etc/udev/rules.d/99-midi.rules
# USB MIDI device hotplug rules for Raspberry Pi RT Audio Mixer
#
# These rules:
# 1. Give the 'audio' group read/write access to USB MIDI devices
# 2. Create a persistent symlink for known controllers
# 3. Trigger systemd service reload on hotplug
# 4. Set nice/rtprio for MIDI processing threads
#
# Install: sudo cp config/99-midi.rules /etc/udev/rules.d/
# Reload: sudo udevadm control --reload-rules && sudo udevadm trigger
# ── Generic USB MIDI class devices (class-compliant) ────────────────────────
# USB Audio Class MIDI Streaming (subclass 0x03)
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
GROUP="audio", MODE="0660", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="midi-hotplug@$devpath.service"
# ── Known controllers — persistent symlinks by VID:PID ──────────────────────
# Behringer X-Touch Compact
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="1397", ATTRS{idProduct}=="00b4", \
SYMLINK+="midi/xtouch-compact", \
ENV{MIDI_CONTROLLER}="Behringer X-Touch Compact"
# Behringer X-Touch (MCU mode)
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="1397", ATTRS{idProduct}=="00b5", \
SYMLINK+="midi/xtouch", \
ENV{MIDI_CONTROLLER}="Behringer X-Touch"
# FaderFox UC4
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0d27", \
SYMLINK+="midi/faderfox-uc4", \
ENV{MIDI_CONTROLLER}="FaderFox UC4"
# Akai MIDImix
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="09e8", ATTRS{idProduct}=="0031", \
SYMLINK+="midi/midimix", \
ENV{MIDI_CONTROLLER}="Akai MIDImix"
# Arturia BeatStep
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="1c75", ATTRS{idProduct}=="0208", \
SYMLINK+="midi/beatstep", \
ENV{MIDI_CONTROLLER}="Arturia BeatStep"
# Novation Launch Control XL
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="1235", ATTRS{idProduct}=="0061", \
SYMLINK+="midi/launchcontrol-xl", \
ENV{MIDI_CONTROLLER}="Novation Launch Control XL"
# Korg nanoKONTROL2
SUBSYSTEM=="sound", ACTION=="add", KERNEL=="midi*", \
ATTRS{idVendor}=="0944", ATTRS{idProduct}=="0117", \
SYMLINK+="midi/nanokontrol2", \
ENV{MIDI_CONTROLLER}="Korg nanoKONTROL2"
# ── Cleanup on removal ──────────────────────────────────────────────────────
SUBSYSTEM=="sound", ACTION=="remove", KERNEL=="midi*", \
RUN+="/usr/bin/systemctl stop midi-hotplug@$devpath.service || true"