DJ Brake only shows the limiter acting; presets without a look start empty

The distance to the limiter, its bar, the warn-earlier slider and the learning
are gone: the page follows the DSP's limiter bits, with one second hold. Left out
limiters stay.
A preset without colours and group names of its own no longer inherits the ones
from the preset before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GivouandClaude Opus 5.5 committed 2026-11-02 22:18:09 +01:00
1 parent 63b3c17fb7
commit 4a6eb2f513
9 files changed
+110 -304

No files matched your search

+20 -5
View File
@@ -45,6 +45,8 @@ class Device:
self.looks: dict[str, dict] = looks or {}
self.look_name = look_name
self.look_dirty = False
self.recalled = "" # the preset last loaded through the app, as listed by the DSP ...
self.recalled_image = None # ... and the name its memory image showed right after
self.maxgain: dict[str, int] = maxgain or {} # software limit of the gain fader per channel (raw), e.g. {"out0": 260}
# audio test: output gains from before the test (restored when it ends) and the test fader level
self.test_saved: list[int] | None = test_saved if isinstance(test_saved, list) else None
@@ -261,12 +263,23 @@ class Device:
self.look_dirty = True
def sync_look(self):
"""After reading the DSP: another preset brings its own look. One not seen yet starts with the current one."""
name = (self.state or {}).get("preset_name", "").strip()
if self.state is None or (name == self.look_name and name in self.looks):
"""After reading the DSP: another preset brings its own look, one that has none starts without.
Only the very first preset ever seen keeps what is there: those are the settings from before looks existed."""
if self.state is None:
return
look = self.looks.get(name)
if look:
name = self.state.get("preset_name", "").strip()
# that the memory image shows the new name after loading a preset is not verified on hardware: trust the list
if self.recalled:
if self.recalled_image is None:
self.recalled_image = name
if name == self.recalled_image:
name = self.recalled
else:
self.recalled = ""
if name == self.look_name and name in self.looks:
return
if self.looks:
look = self.looks.get(name, {"colors": {}, "linknames": {}})
self.colors, self.linknames = dict(look["colors"]), dict(look["linknames"])
self.look_name = name
self.remember_look()
@@ -274,6 +287,7 @@ class Device:
async def recall_preset(self, index: int):
await self._request(P.CMD_PRESET_RECALL, bytes([index + 1]), timeout=2.0)
await asyncio.sleep(0.3)
self.recalled, self.recalled_image = (self.presets[index].strip() if index < len(self.presets) else ""), None
await self._load_config()
self._emit_state()
@@ -286,6 +300,7 @@ class Device:
if self.state:
self.state["preset_name"] = name
self.look_name = name.strip() # also when overwriting: what is stored now is what we see now
self.recalled = ""
self.remember_look()
self._emit_state()