Beta models: full function once added, only a note in the add-device form
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
86ee492ec3
commit
f7d5e22bb0
9 files changed
+28
-86
No files matched your search
@@ -110,9 +110,9 @@ and the DSP's own mirroring inside groups, limiter-active bit mask, preset impor
|
|||||||
Not verified yet – ask for a log (`python server.py -v`) from real hardware before changing protocol code here:
|
Not verified yet – ask for a log (`python server.py -v`) from real hardware before changing protocol code here:
|
||||||
|
|
||||||
* **Beta models** `206` and `408fir` – never seen on real hardware, same protocol and memory layout are only assumed
|
* **Beta models** `206` and `408fir` – never seen on real hardware, same protocol and memory layout are only assumed
|
||||||
(also the USB ID). Never auto-detected (`detect_model`, a FIR device must not pass as a 408). `Device.read_only` holds
|
(also the USB ID). Never auto-detected (`detect_model`, a FIR device must not pass as a 408); the only hint is the
|
||||||
back every write (`P.READ_COMMANDS`, `BETA_READ_ACTIONS`) until the user allows changes (`beta_write`). The FIR
|
note in the add-device form, afterwards they work like the others. The FIR filters are deliberately not implemented;
|
||||||
filters are deliberately not implemented; ask testers for a preset export (it holds the raw image) and a log first.
|
ask testers for a preset export (it holds the raw image) and a log first.
|
||||||
* **DSP 408 on real hardware** (layout and frames match published captures, limiter bits for Out 5–8 assumed)
|
* **DSP 408 on real hardware** (layout and frames match published captures, limiter bits for Out 5–8 assumed)
|
||||||
* USB on Windows and Linux against a real DSP (only tested against a fake HID device)
|
* USB on Windows and Linux against a real DSP (only tested against a fake HID device)
|
||||||
* Where the PEQ bypass flag lives in the memory image; format of the set-command acknowledgement; where the number
|
* Where the PEQ bypass flag lives in the memory image; format of the set-command acknowledgement; where the number
|
||||||
|
|||||||
@@ -80,9 +80,8 @@ Control both devices at the same time from your phone, tablet or computer – ov
|
|||||||
| t.racks DSP 206 (beta) | ✓ | ? | no – assumed to work like the others, testers wanted |
|
| t.racks DSP 206 (beta) | ✓ | ? | no – assumed to work like the others, testers wanted |
|
||||||
| t.racks FIR DSP 408 (beta) | ✓ | ? | no – as above; the FIR filters themselves are not supported |
|
| t.racks FIR DSP 408 (beta) | ✓ | ? | no – as above; the FIR filters themselves are not supported |
|
||||||
|
|
||||||
Beta models are not detected automatically: choose them by hand when adding the device. They start read-only. Compare
|
Beta models are not detected automatically: choose them by hand when adding the device (amplifiers off for the first
|
||||||
the shown values with the DSP; if they match, switch on changes in the note above the mixer (amplifiers off while
|
test). If the shown values don't match the DSP, please send the file from File… → Export.
|
||||||
testing). If they don't match, please send the file from File… → Export.
|
|
||||||
|
|
||||||
The DSPs accept only **one** connection at a time – close any other control software first.
|
The DSPs accept only **one** connection at a time – close any other control software first.
|
||||||
|
|
||||||
|
|||||||
+2
-16
@@ -22,14 +22,12 @@ class Device:
|
|||||||
def __init__(self, dev_id: str, name: str, host: str, port: int = P.PORT, model: str = "auto",
|
def __init__(self, dev_id: str, name: str, host: str, port: int = P.PORT, model: str = "auto",
|
||||||
addr: int = 1, autoconnect: bool = True, on_event=None, transport: str = "tcp", usb: str = "",
|
addr: int = 1, autoconnect: bool = True, on_event=None, transport: str = "tcp", usb: str = "",
|
||||||
lock_code: str = "", auto_unlock: bool = False, test_saved: list | None = None,
|
lock_code: str = "", auto_unlock: bool = False, test_saved: list | None = None,
|
||||||
colors: dict | None = None, maxgain: dict | None = None, linknames: dict | None = None,
|
colors: dict | None = None, maxgain: dict | None = None, linknames: dict | None = None):
|
||||||
beta_write: bool = False):
|
|
||||||
self.id = dev_id
|
self.id = dev_id
|
||||||
self.name = name
|
self.name = name
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.model_key = model # "auto" or a key of P.MODELS
|
self.model_key = model # "auto" or a key of P.MODELS
|
||||||
self.beta_write = beta_write # beta models: the user has checked the shown values and allowed changes
|
|
||||||
self.addr = addr
|
self.addr = addr
|
||||||
self.autoconnect = autoconnect
|
self.autoconnect = autoconnect
|
||||||
self.transport = "usb" if transport == "usb" else "tcp"
|
self.transport = "usb" if transport == "usb" else "tcp"
|
||||||
@@ -77,8 +75,7 @@ class Device:
|
|||||||
"model": self.model_key, "addr": self.addr, "autoconnect": self.autoconnect,
|
"model": self.model_key, "addr": self.addr, "autoconnect": self.autoconnect,
|
||||||
"transport": self.transport, "usb": self.usb,
|
"transport": self.transport, "usb": self.usb,
|
||||||
"lock_code": self.lock_code, "auto_unlock": self.auto_unlock, "test_saved": self.test_saved,
|
"lock_code": self.lock_code, "auto_unlock": self.auto_unlock, "test_saved": self.test_saved,
|
||||||
"colors": self.colors, "maxgain": self.maxgain, "linknames": self.linknames,
|
"colors": self.colors, "maxgain": self.maxgain, "linknames": self.linknames}
|
||||||
"beta_write": self.beta_write}
|
|
||||||
|
|
||||||
def snapshot(self) -> dict:
|
def snapshot(self) -> dict:
|
||||||
cfg = self.config()
|
cfg = self.config()
|
||||||
@@ -88,7 +85,6 @@ class Device:
|
|||||||
"detected_model": self.model_name or None,
|
"detected_model": self.model_name or None,
|
||||||
"n_in": self.model.n_in if self.model else 0,
|
"n_in": self.model.n_in if self.model else 0,
|
||||||
"n_out": self.model.n_out if self.model else 0,
|
"n_out": self.model.n_out if self.model else 0,
|
||||||
"beta": bool(self.model and self.model.beta), "read_only": self.read_only,
|
|
||||||
"presets": self.presets, "state": self.state}
|
"presets": self.presets, "state": self.state}
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
@@ -108,17 +104,10 @@ class Device:
|
|||||||
await self._close()
|
await self._close()
|
||||||
self._set_status("disconnected")
|
self._set_status("disconnected")
|
||||||
|
|
||||||
@property
|
|
||||||
def read_only(self) -> bool:
|
|
||||||
"""A beta model only reads until the user has compared the shown values with the DSP."""
|
|
||||||
return bool(self.model and self.model.beta and not self.beta_write)
|
|
||||||
|
|
||||||
def set_param(self, kind: str, idx: int, param: str, value):
|
def set_param(self, kind: str, idx: int, param: str, value):
|
||||||
"""Update local state and queue the command (coalesced per parameter)."""
|
"""Update local state and queue the command (coalesced per parameter)."""
|
||||||
if not self.state or not self.model:
|
if not self.state or not self.model:
|
||||||
raise RuntimeError("device not loaded")
|
raise RuntimeError("device not loaded")
|
||||||
if self.read_only:
|
|
||||||
raise RuntimeError("Beta model: changes are off")
|
|
||||||
chans = self.state["inputs" if kind == "in" else "outputs"]
|
chans = self.state["inputs" if kind == "in" else "outputs"]
|
||||||
ch = chans[idx]
|
ch = chans[idx]
|
||||||
if param == "name":
|
if param == "name":
|
||||||
@@ -343,9 +332,6 @@ class Device:
|
|||||||
"""Send one command and wait for its answer (the DSP is strictly request/response)."""
|
"""Send one command and wait for its answer (the DSP is strictly request/response)."""
|
||||||
if not self._writer:
|
if not self._writer:
|
||||||
raise ConnectionError("not connected")
|
raise ConnectionError("not connected")
|
||||||
if self.read_only and cmd not in P.READ_COMMANDS:
|
|
||||||
log.warning("%s: read-only, command 0x%02x not sent", self.name, cmd)
|
|
||||||
return None
|
|
||||||
async with self._lock:
|
async with self._lock:
|
||||||
deadline = time.monotonic() + timeout
|
deadline = time.monotonic() + timeout
|
||||||
self._writer.write(P.build_frame(cmd, payload, self.addr))
|
self._writer.write(P.build_frame(cmd, payload, self.addr))
|
||||||
|
|||||||
@@ -251,10 +251,6 @@ class Model:
|
|||||||
MODELS = {"204": Model("DSP 204", 2, 4), "408": Model("DSP 408", 4, 8),
|
MODELS = {"204": Model("DSP 204", 2, 4), "408": Model("DSP 408", 4, 8),
|
||||||
"206": Model("DSP 206", 2, 6, beta=True), "408fir": Model("FIR DSP 408", 4, 8, beta=True)}
|
"206": Model("DSP 206", 2, 6, beta=True), "408fir": Model("FIR DSP 408", 4, 8, beta=True)}
|
||||||
|
|
||||||
# what a DSP may be sent while its model is read-only (see Device.read_only): connecting and looking
|
|
||||||
READ_COMMANDS = frozenset((CMD_HANDSHAKE, CMD_LOGOUT, CMD_STATUS, CMD_DEVICE_INFO, CMD_INIT_14, CMD_INIT_22,
|
|
||||||
CMD_CONFIG_REQUEST, CMD_PRESET_NAME, CMD_PRESET_COUNT, CMD_UNLOCK, CMD_METER))
|
|
||||||
|
|
||||||
|
|
||||||
def detect_model(info: str) -> str | None:
|
def detect_model(info: str) -> str | None:
|
||||||
"""Beta models are never detected, and a FIR device must not pass as a plain DSP 408."""
|
"""Beta models are never detected, and a FIR device must not pass as a plain DSP 408."""
|
||||||
|
|||||||
@@ -154,11 +154,6 @@ def clean_colors(v) -> dict:
|
|||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
||||||
# what a beta model allows before changes are switched on: nothing here writes to the DSP
|
|
||||||
BETA_READ_ACTIONS = ("connect", "disconnect", "refresh", "export", "backups", "unlock", "colors", "maxgain",
|
|
||||||
"linknames", "betawrite")
|
|
||||||
|
|
||||||
|
|
||||||
def clean_linknames(v) -> dict:
|
def clean_linknames(v) -> dict:
|
||||||
"""Names of link groups, keyed by kind and members: {"out:0,1": "Tops"}. A changed group loses its name."""
|
"""Names of link groups, keyed by kind and members: {"out:0,1": "Tops"}. A changed group loses its name."""
|
||||||
out = {}
|
out = {}
|
||||||
@@ -342,8 +337,7 @@ class App:
|
|||||||
transport="usb" if usb else "tcp", usb=str(d.get("usb") or ""),
|
transport="usb" if usb else "tcp", usb=str(d.get("usb") or ""),
|
||||||
lock_code=str(d.get("lock_code") or ""), auto_unlock=bool(d.get("auto_unlock")),
|
lock_code=str(d.get("lock_code") or ""), auto_unlock=bool(d.get("auto_unlock")),
|
||||||
test_saved=clean_gains(d.get("test_saved")), colors=clean_colors(d.get("colors")),
|
test_saved=clean_gains(d.get("test_saved")), colors=clean_colors(d.get("colors")),
|
||||||
maxgain=clean_maxgain(d.get("maxgain")), linknames=clean_linknames(d.get("linknames")),
|
maxgain=clean_maxgain(d.get("maxgain")), linknames=clean_linknames(d.get("linknames")))
|
||||||
beta_write=bool(d.get("beta_write")))
|
|
||||||
dev.on_online = self.device_online
|
dev.on_online = self.device_online
|
||||||
self.devices[dev_id] = dev
|
self.devices[dev_id] = dev
|
||||||
if dev.autoconnect:
|
if dev.autoconnect:
|
||||||
@@ -391,8 +385,6 @@ class App:
|
|||||||
return {"ok": True}
|
return {"ok": True}
|
||||||
|
|
||||||
async def device_online(self, dev: Device):
|
async def device_online(self, dev: Device):
|
||||||
if dev.read_only:
|
|
||||||
return
|
|
||||||
await self.check_audio_test(dev)
|
await self.check_audio_test(dev)
|
||||||
if not self.mute_all["active"] and self.mute_all["restore"].get(dev.id):
|
if not self.mute_all["active"] and self.mute_all["restore"].get(dev.id):
|
||||||
self.unmute_device(dev) # released while this DSP was offline
|
self.unmute_device(dev) # released while this DSP was offline
|
||||||
@@ -411,7 +403,7 @@ class App:
|
|||||||
|
|
||||||
def set_mute_all(self, mute: bool) -> dict:
|
def set_mute_all(self, mute: bool) -> dict:
|
||||||
"""Mute every channel of every connected DSP; releasing unmutes only what was open before."""
|
"""Mute every channel of every connected DSP; releasing unmutes only what was open before."""
|
||||||
online = [d for d in self.devices.values() if d.status == "online" and d.state and not d.read_only]
|
online = [d for d in self.devices.values() if d.status == "online" and d.state]
|
||||||
if mute and not self.mute_all["active"]:
|
if mute and not self.mute_all["active"]:
|
||||||
self.mute_all["restore"] = {}
|
self.mute_all["restore"] = {}
|
||||||
for dev in online:
|
for dev in online:
|
||||||
@@ -443,7 +435,7 @@ class App:
|
|||||||
changed = 0
|
changed = 0
|
||||||
for t in body.get("targets") or []:
|
for t in body.get("targets") or []:
|
||||||
dev = self.devices.get(str(t.get("device")))
|
dev = self.devices.get(str(t.get("device")))
|
||||||
if not dev or dev.status != "online" or not dev.state or dev.read_only:
|
if not dev or dev.status != "online" or not dev.state:
|
||||||
continue
|
continue
|
||||||
if dev.test_active:
|
if dev.test_active:
|
||||||
raise RuntimeError("Audio test is on – switch it off first")
|
raise RuntimeError("Audio test is on – switch it off first")
|
||||||
@@ -802,8 +794,6 @@ class App:
|
|||||||
if dev.test_active and (action in ("preset/recall", "preset/store", "export", "import", "undo", "link")
|
if dev.test_active and (action in ("preset/recall", "preset/store", "export", "import", "undo", "link")
|
||||||
or action == "set" and body.get("param") != "mute"):
|
or action == "set" and body.get("param") != "mute"):
|
||||||
raise RuntimeError("Audio test is on – switch it off first")
|
raise RuntimeError("Audio test is on – switch it off first")
|
||||||
if dev.read_only and method == "POST" and action not in BETA_READ_ACTIONS:
|
|
||||||
raise RuntimeError("Beta model: changes are off")
|
|
||||||
if self.demo["enabled"] and not dev.demo and action == "connect":
|
if self.demo["enabled"] and not dev.demo and action == "connect":
|
||||||
raise RuntimeError("Demo mode is on – switch it off to connect the real DSPs")
|
raise RuntimeError("Demo mode is on – switch it off to connect the real DSPs")
|
||||||
if method == "DELETE" and not action:
|
if method == "DELETE" and not action:
|
||||||
@@ -815,8 +805,6 @@ class App:
|
|||||||
if method == "PUT" and not action:
|
if method == "PUT" and not action:
|
||||||
was_running = dev._want_connected
|
was_running = dev._want_connected
|
||||||
await dev.stop()
|
await dev.stop()
|
||||||
if body.get("model", dev.model_key) != dev.model_key:
|
|
||||||
dev.beta_write = False # another model: check the values again
|
|
||||||
for k in ("name", "host", "model", "usb"):
|
for k in ("name", "host", "model", "usb"):
|
||||||
if k in body:
|
if k in body:
|
||||||
setattr(dev, "model_key" if k == "model" else k, str(body[k]))
|
setattr(dev, "model_key" if k == "model" else k, str(body[k]))
|
||||||
@@ -884,11 +872,6 @@ class App:
|
|||||||
self.save()
|
self.save()
|
||||||
self.broadcast({"type": "device", "device": dev.id, "data": dev.snapshot()})
|
self.broadcast({"type": "device", "device": dev.id, "data": dev.snapshot()})
|
||||||
return {"ok": True, "colors": dev.colors}
|
return {"ok": True, "colors": dev.colors}
|
||||||
if action == "betawrite": # beta model: the user compared the shown values with the DSP
|
|
||||||
dev.beta_write = bool(body.get("enabled"))
|
|
||||||
self.save()
|
|
||||||
self.broadcast({"type": "device", "device": dev.id, "data": dev.snapshot()})
|
|
||||||
return {"ok": True, "read_only": dev.read_only}
|
|
||||||
if action == "linknames": # display only, like the colours
|
if action == "linknames": # display only, like the colours
|
||||||
dev.linknames = clean_linknames(body.get("linknames"))
|
dev.linknames = clean_linknames(body.get("linknames"))
|
||||||
self.save()
|
self.save()
|
||||||
|
|||||||
+13
-25
@@ -139,6 +139,7 @@ const chTitle = (d, kind, i) => { const n = chans(d, kind)[i].name; return n ? `
|
|||||||
// group holds all members' bits, the others 0. The DSP mirrors changes within a group itself.
|
// group holds all members' bits, the others 0. The DSP mirrors changes within a group itself.
|
||||||
const MODEL_LABEL = { "204": "DSP 204", "408": "DSP 408", "206": "DSP 206", "408fir": "FIR DSP 408" };
|
const MODEL_LABEL = { "204": "DSP 204", "408": "DSP 408", "206": "DSP 206", "408fir": "FIR DSP 408" };
|
||||||
const MODEL_CH = { "204": [2, 4], "408": [4, 8], "206": [2, 6], "408fir": [4, 8] }; // inputs, outputs (before a DSP has connected)
|
const MODEL_CH = { "204": [2, 4], "408": [4, 8], "206": [2, 6], "408fir": [4, 8] }; // inputs, outputs (before a DSP has connected)
|
||||||
|
const BETA_MODELS = ["206", "408fir"];
|
||||||
const LINK_COLORS = ["#f59e0b", "#22d3ee", "#a3e635", "#f472b6"];
|
const LINK_COLORS = ["#f59e0b", "#22d3ee", "#a3e635", "#f472b6"];
|
||||||
function linkGroups(list) {
|
function linkGroups(list) {
|
||||||
const seen = new Set(), groups = [];
|
const seen = new Set(), groups = [];
|
||||||
@@ -595,7 +596,7 @@ function renderTabs() {
|
|||||||
const badge = d => {
|
const badge = d => {
|
||||||
const model = d.detected_model || (d.model !== "auto" ? d.model : "");
|
const model = d.detected_model || (d.model !== "auto" ? d.model : "");
|
||||||
return testOn(d) ? h("small", { class: "test-badge" }, "TEST") : d.demo ? h("small", { class: "demo-badge" }, "DEMO")
|
return testOn(d) ? h("small", { class: "test-badge" }, "TEST") : d.demo ? h("small", { class: "demo-badge" }, "DEMO")
|
||||||
: model ? h("small", {}, (MODEL_LABEL[model] || model).replace("DSP ", "") + (d.beta ? " β" : "")) : null;
|
: model ? h("small", {}, (MODEL_LABEL[model] || model).replace("DSP ", "")) : null;
|
||||||
};
|
};
|
||||||
const cur = S.devices[S.cur];
|
const cur = S.devices[S.cur];
|
||||||
if (!cur) {
|
if (!cur) {
|
||||||
@@ -799,8 +800,8 @@ async function presetFileDialog(d) {
|
|||||||
"active state – stored presets (U01 …) stay unchanged.", { name: q(d.state.preset_name || "—") })),
|
"active state – stored presets (U01 …) stay unchanged.", { name: q(d.state.preset_name || "—") })),
|
||||||
last ? h("p", { class: "dlg-text" }, t("A backup is made automatically before every import. Last backup: {last}.", { last })) : null),
|
last ? h("p", { class: "dlg-text" }, t("A backup is made automatically before every import. Last backup: {last}.", { last })) : null),
|
||||||
actions: [{ label: t("Close") },
|
actions: [{ label: t("Close") },
|
||||||
...(last && !viewOnly() ? [{ label: t("Undo import"), value: () => "undo" }] : []),
|
...(last && !S.locked ? [{ label: t("Undo import"), value: () => "undo" }] : []),
|
||||||
...(viewOnly() ? [] : [{ label: t("Import…"), value: () => "import" }]),
|
...(S.locked ? [] : [{ label: t("Import…"), value: () => "import" }]),
|
||||||
{ label: t("Export"), primary: true, value: () => "export" }],
|
{ label: t("Export"), primary: true, value: () => "export" }],
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
@@ -1955,6 +1956,10 @@ function deviceForm(d) {
|
|||||||
addr: h("input", { type: "number", min: 1, max: 250, value: d.addr || 1, class: "short" }),
|
addr: h("input", { type: "number", min: 1, max: 250, value: d.addr || 1, class: "short" }),
|
||||||
usb: h("select", { "aria-label": t("USB device") }),
|
usb: h("select", { "aria-label": t("USB device") }),
|
||||||
};
|
};
|
||||||
|
const betaNote = h("p", { class: "info betanote full", hidden: true },
|
||||||
|
t("Beta: this model has not been tested on a real device yet. Keep the amplifiers off for the first test."));
|
||||||
|
const showBeta = () => { betaNote.hidden = !isNew || !f.model.value || !BETA_MODELS.includes(f.model.value); };
|
||||||
|
f.model.addEventListener("change", showBeta);
|
||||||
let transport = d.transport || "tcp";
|
let transport = d.transport || "tcp";
|
||||||
// USB device list (both DSP models share one USB ID, so several are told apart by port/path)
|
// USB device list (both DSP models share one USB ID, so several are told apart by port/path)
|
||||||
const fillUsb = list => {
|
const fillUsb = list => {
|
||||||
@@ -2017,6 +2022,7 @@ function deviceForm(d) {
|
|||||||
...netRows, usbRow,
|
...netRows, usbRow,
|
||||||
h("label", {}, t("Model"), f.model),
|
h("label", {}, t("Model"), f.model),
|
||||||
h("label", { class: "chk" }, f.autoconnect, t("Connect automatically")),
|
h("label", { class: "chk" }, f.autoconnect, t("Connect automatically")),
|
||||||
|
betaNote,
|
||||||
h("details", { class: "more full" }, h("summary", {}, t("Advanced")),
|
h("details", { class: "more full" }, h("summary", {}, t("Advanced")),
|
||||||
h("label", { class: "inline idrow" }, t("Device ID"), f.addr),
|
h("label", { class: "inline idrow" }, t("Device ID"), f.addr),
|
||||||
h("p", { class: "info" }, t("Only needed if the ID was changed on the DSP (e.g. several DSPs on one RS-485 cable). Default 1."))),
|
h("p", { class: "info" }, t("Only needed if the ID was changed on the DSP (e.g. several DSPs on one RS-485 cable). Default 1."))),
|
||||||
@@ -2236,21 +2242,6 @@ function viewSettings() {
|
|||||||
// ------------------------------------------------------------------ render
|
// ------------------------------------------------------------------ render
|
||||||
|
|
||||||
const H_SCROLL = ".mixer, .bands, .geq, .routing";
|
const H_SCROLL = ".mixer, .bands, .geq, .routing";
|
||||||
// beta models (never seen on a real device): read-only until the shown values were compared with the DSP
|
|
||||||
function betaBanner(d) {
|
|
||||||
const model = MODEL_LABEL[d.detected_model] || d.detected_model;
|
|
||||||
const set = async enabled => {
|
|
||||||
if (enabled && !await askConfirm(t("Allow changes"), t("Only continue if the values shown here match the DSP (names, gains, filters, routing). If they don't, a change can send wrong values – keep the amplifiers off while testing."), t("Allow changes"), true)) return;
|
|
||||||
try { await api("POST", `/api/devices/${d.id}/betawrite`, { enabled }); }
|
|
||||||
catch (e) { toast(t("Error: ") + trMsg(e.message)); }
|
|
||||||
};
|
|
||||||
return h("div", { class: "betabar" + (d.read_only ? " ro" : "") },
|
|
||||||
h("div", { class: "grow" }, h("b", {}, t("{model} – Beta", { model })), " ",
|
|
||||||
d.read_only ? t("Not tested on a real device yet, so changes are off. Compare the shown values with the DSP. If they don't match, send the file from File… → Export to the developer.")
|
|
||||||
: t("Not tested on a real device yet. Changes are on – keep the amplifiers off while testing.")),
|
|
||||||
h("button", { class: "small" + (d.read_only ? " on" : ""), "data-view-ok": "", onclick: () => set(d.read_only) }, d.read_only ? t("Allow changes") : t("Turn changes off")));
|
|
||||||
}
|
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
if (S.busy) { S.dirty = true; return; }
|
if (S.busy) { S.dirty = true; return; }
|
||||||
if ($("#app").hidden) return;
|
if ($("#app").hidden) return;
|
||||||
@@ -2271,7 +2262,6 @@ function render() {
|
|||||||
const d = dev();
|
const d = dev();
|
||||||
const field = !S.settings && S.view === "soundfield"; // the room plan works without a connected DSP
|
const field = !S.settings && S.view === "soundfield"; // the room plan works without a connected DSP
|
||||||
document.body.dataset.view = field ? "soundfield" : S.settings || !d ? "settings" : S.view;
|
document.body.dataset.view = field ? "soundfield" : S.settings || !d ? "settings" : S.view;
|
||||||
document.body.classList.toggle("locked", viewOnly());
|
|
||||||
if (field) content = viewSoundField();
|
if (field) content = viewSoundField();
|
||||||
else if (S.settings || !d) content = viewSettings();
|
else if (S.settings || !d) content = viewSettings();
|
||||||
else if (d.status !== "online" || !d.state)
|
else if (d.status !== "online" || !d.state)
|
||||||
@@ -2282,7 +2272,7 @@ function render() {
|
|||||||
h("button", { class: "on", onclick: () => unlockDialog(d) }, t("Enter code")))
|
h("button", { class: "on", onclick: () => unlockDialog(d) }, t("Enter code")))
|
||||||
: S.demo.enabled && !d.demo ? t("Disconnected while demo mode is on") : t("Not connected."));
|
: S.demo.enabled && !d.demo ? t("Disconnected while demo mode is on") : t("Not connected."));
|
||||||
else content = ({ mixer: viewMixer, channel: viewChannel, routing: viewRouting, link: viewLink, limiter: viewLimiter, test: viewTest }[S.view] || viewMixer)(d);
|
else content = ({ mixer: viewMixer, channel: viewChannel, routing: viewRouting, link: viewLink, limiter: viewLimiter, test: viewTest }[S.view] || viewMixer)(d);
|
||||||
main.replaceChildren(...[!field && !S.settings && d && d.beta ? betaBanner(d) : null, content].flat().filter(Boolean));
|
main.replaceChildren(...[content].flat().filter(Boolean));
|
||||||
main.querySelectorAll(H_SCROLL).forEach((e, i) => { if (xs[i]) e.scrollLeft = xs[i]; });
|
main.querySelectorAll(H_SCROLL).forEach((e, i) => { if (xs[i]) e.scrollLeft = xs[i]; });
|
||||||
window.scrollTo(0, y);
|
window.scrollTo(0, y);
|
||||||
collectMeters();
|
collectMeters();
|
||||||
@@ -2322,12 +2312,10 @@ new ResizeObserver(() => document.documentElement.style.setProperty("--sb", $("#
|
|||||||
|
|
||||||
// ------------------------------------------------------------------ lock (desktop app window: look, don't touch)
|
// ------------------------------------------------------------------ lock (desktop app window: look, don't touch)
|
||||||
|
|
||||||
const viewOnly = () => !!S.locked || (!S.settings && S.view !== "soundfield" && !!(dev() && dev().read_only));
|
|
||||||
|
|
||||||
function showLock() {
|
function showLock() {
|
||||||
const b = $("#btn-lock");
|
const b = $("#btn-lock");
|
||||||
b.hidden = !S.isApp;
|
b.hidden = !S.isApp;
|
||||||
document.body.classList.toggle("locked", viewOnly());
|
document.body.classList.toggle("locked", !!S.locked);
|
||||||
b.classList.toggle("on", !!S.locked);
|
b.classList.toggle("on", !!S.locked);
|
||||||
b.title = S.locked ? t("Locked – click to unlock") : t("Lock (view only)");
|
b.title = S.locked ? t("Locked – click to unlock") : t("Lock (view only)");
|
||||||
b.setAttribute("aria-label", b.title);
|
b.setAttribute("aria-label", b.title);
|
||||||
@@ -2359,14 +2347,14 @@ $("#btn-lock").addEventListener("click", async () => {
|
|||||||
const VIEW_OK = ".chsel, .nav, .strip-head, .xout, .band, #btn-muteall, [data-view-ok]";
|
const VIEW_OK = ".chsel, .nav, .strip-head, .xout, .band, #btn-muteall, [data-view-ok]";
|
||||||
for (const type of ["pointerdown", "mousedown", "click", "dblclick", "keydown", "wheel"]) {
|
for (const type of ["pointerdown", "mousedown", "click", "dblclick", "keydown", "wheel"]) {
|
||||||
document.addEventListener(type, e => {
|
document.addEventListener(type, e => {
|
||||||
if (!viewOnly() || !(e.target instanceof Element)) return;
|
if (!S.locked || !(e.target instanceof Element)) return;
|
||||||
const tgt = e.target;
|
const tgt = e.target;
|
||||||
if (!tgt.closest("#main, #statusbar") || tgt.closest(VIEW_OK)) return;
|
if (!tgt.closest("#main, #statusbar") || tgt.closest(VIEW_OK)) return;
|
||||||
if (type === "wheel" && !tgt.closest(".fader, input, select")) return; // page scrolling stays
|
if (type === "wheel" && !tgt.closest(".fader, input, select")) return; // page scrolling stays
|
||||||
if (type === "keydown" && !tgt.closest("button, input, select, textarea, .fader, [tabindex]")) return;
|
if (type === "keydown" && !tgt.closest("button, input, select, textarea, .fader, [tabindex]")) return;
|
||||||
if (type === "pointerdown" && !tgt.closest("button, input, select, textarea, .fader, canvas, a")) return;
|
if (type === "pointerdown" && !tgt.closest("button, input, select, textarea, .fader, canvas, a")) return;
|
||||||
e.preventDefault(); e.stopPropagation();
|
e.preventDefault(); e.stopPropagation();
|
||||||
if (type === "click" && Date.now() - (S.lockToast || 0) > 1500) { S.lockToast = Date.now(); toast(S.locked ? t("Locked – unlock at the top right to make changes") : t("Beta model: changes are off")); }
|
if (type === "click" && Date.now() - (S.lockToast || 0) > 1500) { S.lockToast = Date.now(); toast(t("Locked – unlock at the top right to make changes")); }
|
||||||
}, { capture: true, passive: false });
|
}, { capture: true, passive: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-7
@@ -516,13 +516,7 @@ const DE = {
|
|||||||
"Dissolve group": "Gruppe auflösen",
|
"Dissolve group": "Gruppe auflösen",
|
||||||
"{names} joins the group and takes over its settings (name{routing} stays).": "{names} kommt in die Gruppe und übernimmt ihre Einstellungen – außer Name{routing}.",
|
"{names} joins the group and takes over its settings (name{routing} stays).": "{names} kommt in die Gruppe und übernimmt ihre Einstellungen – außer Name{routing}.",
|
||||||
"{names} leaves the group and keeps its current settings.": "{names} verlässt die Gruppe und behält seine aktuellen Einstellungen.",
|
"{names} leaves the group and keeps its current settings.": "{names} verlässt die Gruppe und behält seine aktuellen Einstellungen.",
|
||||||
"Allow changes": "Änderungen erlauben",
|
"Beta: this model has not been tested on a real device yet. Keep the amplifiers off for the first test.": "Beta: Dieses Modell wurde noch nicht an einem echten Gerät getestet. Beim ersten Test die Endstufen ausgeschaltet lassen.",
|
||||||
"Turn changes off": "Änderungen ausschalten",
|
|
||||||
"Only continue if the values shown here match the DSP (names, gains, filters, routing). If they don't, a change can send wrong values – keep the amplifiers off while testing.": "Nur weitermachen, wenn die angezeigten Werte zum DSP passen (Namen, Gains, Filter, Routing). Sonst kann eine Änderung falsche Werte senden – beim Testen die Endstufen ausgeschaltet lassen.",
|
|
||||||
"{model} – Beta": "{model} – Beta",
|
|
||||||
"Not tested on a real device yet, so changes are off. Compare the shown values with the DSP. If they don't match, send the file from File… → Export to the developer.": "Noch nicht an einem echten Gerät getestet, darum sind Änderungen aus. Vergleiche die angezeigten Werte mit dem DSP. Passen sie nicht, schick die Datei aus Datei… → Export an den Entwickler.",
|
|
||||||
"Not tested on a real device yet. Changes are on – keep the amplifiers off while testing.": "Noch nicht an einem echten Gerät getestet. Änderungen sind an – beim Testen die Endstufen ausgeschaltet lassen.",
|
|
||||||
"Beta model: changes are off": "Beta-Modell: Änderungen sind aus",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const DE_PATTERNS = [
|
const DE_PATTERNS = [
|
||||||
|
|||||||
+3
-7
@@ -744,10 +744,6 @@ input[type=range].haslim::-moz-range-track {
|
|||||||
.lkgroup.editing { background: color-mix(in srgb, var(--lc) 14%, var(--panel2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 45%, transparent); }
|
.lkgroup.editing { background: color-mix(in srgb, var(--lc) 14%, var(--panel2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 45%, transparent); }
|
||||||
.lkgroup.dim { opacity: .5; }
|
.lkgroup.dim { opacity: .5; }
|
||||||
.lkactions button + button { margin-left: 6px; }
|
.lkactions button + button { margin-left: 6px; }
|
||||||
/* ---- beta models */
|
/* ---- note on beta models in the add-device form */
|
||||||
.betabar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 9px 12px; border-radius: 9px; font-size: 13px;
|
.betanote { margin: 0; padding: 8px 10px; border-radius: 8px; color: var(--text); background: #f59e0b1f; border: 1px solid #f59e0b66; }
|
||||||
background: #f59e0b14; border: 1px solid #f59e0b55; }
|
.betanote[hidden] { display: none; }
|
||||||
.betabar b { color: var(--warn); }
|
|
||||||
.betabar.ro { background: #f59e0b24; border-color: #f59e0b99; }
|
|
||||||
.betabar button { flex: none; }
|
|
||||||
@media (max-width: 560px) { .betabar { flex-direction: column; align-items: stretch; } }
|
|
||||||
@@ -171,7 +171,7 @@ def test_beta_models():
|
|||||||
assert P.detect_model(info) is None, info
|
assert P.detect_model(info) is None, info
|
||||||
for key in ("206", "408fir"):
|
for key in ("206", "408fir"):
|
||||||
m = P.MODELS[key]
|
m = P.MODELS[key]
|
||||||
assert m.beta and not {P.CMD_GAIN, P.CMD_MUTE, P.CMD_LINK, P.CMD_PRESET_RECALL} & P.READ_COMMANDS
|
assert m.beta
|
||||||
st = P.default_state(m)
|
st = P.default_state(m)
|
||||||
st["outputs"][m.n_out - 1]["gain"] = 123
|
st["outputs"][m.n_out - 1]["gain"] = 123
|
||||||
back = P.parse_state(m, bytes(P.build_state_buffer(m, st)))
|
back = P.parse_state(m, bytes(P.build_state_buffer(m, st)))
|
||||||
|
|||||||
Reference in new issue
Block a user