feat: sequences can step on time; searchable group pickers

- Sequences: advance_mode "time" makes each step last its `seconds`
  (0.1–3600) instead of beats; editor gets a "Steps last" selector.
- UI: search box in the groups modal; searchable add pickers for zone
  groups and presets.
- Preset "try" sends only to the current zone's groups, never broadcast.
- led-driver: max_brightness ceiling from device config; follow a
  controller that restarted its beat counter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-10 12:05:31 +13:00
1 parent 38162d4b89
commit d664026ee5
10 files changed
+229 -92

No files matched your search

+2 -2
View File
@@ -168,7 +168,7 @@ A device is `{id: MAC, name, type: "led", transport: "espnow" | "wifi", address,
## Sequences — `/sequences`
A sequence is `{name, profile_id, lanes: [[step, ...], ...], lanes_group_ids: [[group ids], ...], group_ids, loop (default true), advance_mode: "beats", steps, step_duration_ms, sequence_transition}`. A step is `{preset_id, beats (default 1), group_ids?}`.
A sequence is `{name, profile_id, lanes: [[step, ...], ...], lanes_group_ids: [[group ids], ...], group_ids, loop (default true), advance_mode: "beats" | "time", steps, step_duration_ms, sequence_transition}`. A step is `{preset_id, beats (default 1), seconds (default 3, 0.1–3600), group_ids?}`. With `advance_mode` `beats` a step lasts `beats` beats; with `time` it lasts `seconds`.
| Method | Path | Description |
|--------|------|-------------|
@@ -186,7 +186,7 @@ A sequence is `{name, profile_id, lanes: [[step, ...], ...], lanes_group_ids: [[
**Playback.** One sequence plays at a time, in one zone.
- **Start.** Each lane's first preset is uploaded to the lane's groups and selected, then the lane's other presets are uploaded, and every driver in the zone gets its combined brightness with the zone slider.
- **Advancing.** On each beat a lane counts towards its step's `beats`, then moves on: the next preset is uploaded (unless already there) and selected. A lane's groups are `lanes_group_ids[lane]`, else `group_ids`, else (single lane) the step's `group_ids`, else the zone's groups.
- **Advancing.** In `time` mode a lane moves on when its step's `seconds` are up, whatever the beat; the status then has `lane0_step_elapsed_ms` and `lane0_step_duration_ms` and `beat_readout` is empty. In `beats` mode, on each beat a lane counts towards its step's `beats`, then moves on: the next preset is uploaded (unless already there) and selected. A lane's groups are `lanes_group_ids[lane]`, else `group_ids`, else (single lane) the step's `group_ids`, else the zone's groups.
- **End.** Without `loop` the sequence ends after one pass. Its presets are cleared from the zone's groups, and the readout keeps `n/n`.
- **Switching.** Starting another sequence while one plays waits for the next beat. It waits for the next downbeat only when `sequence_switch_wait` is `downbeat` and the mic is timing. The current sequence holds meanwhile.
- **Beat source.** Beats come from the mic's beat detector while audio timing is on (`/api/audio/start`) and it has a tempo lock. Otherwise they come from a clock at `audio_simulated_bpm`, whose beats also go to the drivers. Beats closer than 0.3 s (200 BPM) are dropped.