Files
qlcplus/README.md
T
jimmyandClaude Opus 5.5 0b06dfdccf Add a script linking the RGB scripts, fixtures and pad profile into ~/.qlcplus.
The can patterns' Steps and Swap matrices need rgbscripts/steps.js and
swap.js in ~/.qlcplus/rgbscripts. Only can_patterns.py linked them, so a
fresh checkout's patterns did nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:27:40 +13:00

146 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# qlcplus
QLC+ show files, fixture definitions, and generators for the XCHC stage
(8× beamZ BCC145 parcans + 2× Small Eye 7 movers).
## Layout
```
fixtures/ Fixture definitions (.qxf) — install into QLC+ if needed
rgbscripts/ RGB matrix scripts; scripts/install_qlcplus.sh links them into ~/.qlcplus/rgbscripts
shows/ Workspaces to open in QLC+
xchc.qxw Main show (patterns + movers, unified VC)
simple.qxw Manual board: M1/M2 pads, shared + individual RGBW
small_eye.qxw Movers-only figure-of-8 show
archive/ Older scratch workspaces
scripts/ Launchers (pattern_studio.sh, flash_luxdmx_xiao.sh)
pad/ SMC-PAD tools: lamps, MIDI patching, capture decoding
shows/ Generators / patchers for the shows and Chataigne
anim/ showfile animations to preview over Art-Net
stage/ Stage map (SVG, JSON, canvas)
tests/ Art-Net / fixture helpers used by scripts
```
## Open in QLC+
On a new machine, link the RGB scripts, fixtures and pad input profile into
`~/.qlcplus` first, then (re)start QLC+. Without `rgbscripts/steps.js` and
`swap.js` the can patterns load but do nothing.
```bash
scripts/install_qlcplus.sh
```
- Full show: `shows/xchc.qxw`
- Simple RGBW + positions: `shows/simple.qxw`
## Scripts
```bash
# Rebuild simple manual board
python3 scripts/shows/make_simple_vc.py
# Rewrite can/mover patterns from stage layout
python3 scripts/shows/integrate_u_patterns.py
# Unify Patterns + Movers into one Show frame
python3 scripts/shows/unify_vc.py
# Figure-of-8 (live Art-Net or write/merge workspace)
python3 scripts/shows/figure8_small_eye.py --write-qxw shows/small_eye.qxw
```
## Fixtures / DMX
| Fixture | Mode | Addresses |
|---------|------|-----------|
| Small Eye 7 #1–#2 | 43ch | 1–43, 45–87 |
| BCC145 #1–#8 | 8ch | 87–150 (starts 87, 95, …) |
Copy `.qxf` files from `fixtures/` into QLC+’s fixture library if the
manufacturer/model is missing.
## SMC-PAD pad controller
`padcontroller.midi` reads the SMC-PAD, smooths its knobs, applies the Play
layer, and sends the result on a virtual MIDI port named `padcontroller` for
QLC+. Run it by hand with `.venv/bin/python -m padcontroller.midi`, or install
it as a systemd user service that starts at login and waits for the pad:
```bash
padcontroller/systemd/install.sh
```
Options after the command go to the pad controller (for example `--no-lamps`).
`--no-enable` installs it without starting it at login (start it with
`systemctl --user start padcontroller`). `--uninstall` removes the service. Logs: `journalctl --user -u padcontroller -f`.
### Virtual pad
`padcontroller.virtualpad` presses pads and turns knobs without touching the
pad. It sends into the pad controller's input, so presses get the Play layer
and smoothing like the real thing. It refuses unless QLC+ last opened
`shows/test.qxw` (127.0.0.1 only); `--force` skips that.
```bash
.venv/bin/python -m padcontroller.virtualpad press 52 # Colour 1 Red
.venv/bin/python -m padcontroller.virtualpad press 52 --play # Play held: Colour 2 Red
.venv/bin/python -m padcontroller.virtualpad press --pad 1 # by pad number (shows/midi_map.json)
.venv/bin/python -m padcontroller.virtualpad cc 34 64
```
`tests/test_e2e_pad.py` uses it to press colour pads and check the simulator's
`/api/state`. It drives the live rig, so it only runs with `PAD_E2E=1`:
```bash
PAD_E2E=1 .venv/bin/python -m pytest tests/test_e2e_pad.py -v
```
The rest of the suite runs offline. Use pytest, since most tests are plain
`def test_` functions that `unittest` doesn't find (`pipenv install --dev`
installs it):
```bash
.venv/bin/python -m pytest
```
## Stage simulator
`python -m simulator` listens for Art-Net on port 6454 and draws the rig at
http://127.0.0.1:8765. The Stage drop-down on the page switches between the
stage maps in `stage/`. No QLC+ show is needed: `stage/map.json` holds every
address. `--show <file.qxw>` only fills in addresses a stage map leaves out and
shows where that workspace sends Art-Net. It can run as a systemd user service
the same way:
```bash
simulator/systemd/install.sh
```
Options after the command go to the simulator (for example `--show shows/test.qxw`).
`--no-enable` installs it without starting it at login (start it with
`systemctl --user start simulator`). `--uninstall` removes the service.
Logs: `journalctl --user -u simulator -f`.
## Chataigne
`scripts/shows/make_chataigne.py` turns a show spec into a Chataigne project, so the
SMC-PAD can drive the same colour pads and sliders without QLC+.
```bash
python3 scripts/shows/make_chataigne.py shows/test.show.json chataigne/test
```
Open `chataigne/test/test.noisette`. The **Pad** (MIDI) module reads the SMC-PAD
directly (`--pad` picks the port: USB `SINCO SMC-PAD-Master` by default, or
`SMC-PAD Bluetooth`). The script does the Play-layer shift that `padcontroller/layer.py` does for
QLC+, with no knob smoothing, so the pad controller is not needed. Set the lamps with
`scripts/pad/pad_lamps.py`. The **Lights** (DMX) module sends Art-Net to the
node in the spec. The **Preview** module sends a copy to 127.0.0.1 for the simulator (`--preview ''` leaves it out). If it comes up on the wrong output, set DMX Type to Art-Net,
the remote host, and an output universe of net 0, subnet 0, universe 0.
The project also has a dashboard with the same buttons and sliders as the
virtual console, coloured like it. Chataigne serves it on port 9999 for a
phone or browser. Pads, knobs and dashboard stay in step.
Edit `chataigne/show.template.js` for behaviour; the generated `test.js` is
overwritten.