Add SoundField room planner, copy channel settings and global mute

SoundField (new tab, static/soundfield.js):
- top view of the room with stage, speakers placed by dragging and aimed with a handle,
  type presets, height, coverage, max SPL and DSP output assignment
- level map (tops by energy), sub map with phase at a chosen frequency, timing map
  for delay/fill speakers, audience statistics
- suggestions with one-click apply: aiming, main height, delay line, sub centre cluster
  (power alley), front fills, quick start layout
- delays from the speed of sound and temperature, written to the assigned DSP outputs
- plan stored by the server (shared, part of the settings backup)

Copy channel settings: level/filters/EQ/dynamics/routing to any channels of all connected DSPs.
Mute all: mutes every channel of every connected DSP and unmutes only what was open before,
also on DSPs that reconnect later; works while the app window is locked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-01 22:38:49 +01:00
1 parent ffb6c05d47
commit a7ee66d761
8 files changed
+998 -12

No files matched your search

+9
View File
@@ -36,6 +36,15 @@ pi_writer.py → pi_image.py (cloud-init SD card, installs server.py as a system
lowers every output to −50 dB, flushes the queue and only then starts the generator (`0x39`); leaving switches the
generator off first, then restores the gains. While `Device.test_active` the server only accepts the test
controls (generator, test fader, output mutes) and the UI stays locked in the audio test tab. The state field is `state["test"] = {source, freq}`.
* **SoundField** (`static/soundfield.js`, plan stored by the server as `soundfield` in `config.json`, API
`/api/soundfield`) – room plan in metres (x across, y from the stage wall, aim 0° = into the room). Free-field model:
−6 dB per distance doubling, directivity from the coverage angle (−6 dB at its edges), tops summed by energy, subs
with phase at the chosen frequency. Delays: mains/subs aligned at the reference point, delay/fill speakers at their
target point plus the precedence offset. The canvas is only redrawn while dragging (never rebuilt), the side panels
are rebuilt after a change; the local plan object stays the one being edited (a save does not replace it).
* **Copy settings / mute all** – `App.copy_settings` (`POST /api/copy`, groups level/filters/eq/dynamics/routing) and
`App.set_mute_all` (`POST /api/muteall`; remembers per device which channels were open, persisted in `config.json`
as `mute_all`, released devices that were offline are unmuted when they reconnect; allowed while the app is locked).
* **`dsp/preset.py`** – preset files (`dsp-control-preset` JSON with state + raw image), validation, and the minimal
command sequence for an import. Undo backups go to `backups/` next to `config.json` (last 20 per device).
* **`dsp/usbhid.py`** – HID via ctypes only: Windows `hid.dll`/SetupAPI, macOS IOKit, Linux `/dev/hidraw*`.