Files
BetterDSPControl/static/i18n.js
T
GivouandClaude Opus 5.5 fe13f261f7 Add BetterDSPControl: web UI, desktop app and Pi writer for t.racks DSP 204/408
- Python stdlib server with SSE live updates, PIN login, remote access
- Vanilla JS web UI (English/German): mixer, channel, routing, links, limiter calculator
- Preset file export/import with undo, settings backup, lock for the desktop app
- Network (TCP 9761) and USB HID transport (Windows, macOS, Linux)
- Desktop app via pywebview, Raspberry Pi SD card writer, simulator and protocol tests
- README with import guide for Claude Code, CLAUDE.md, protocol documentation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 20:24:33 +01:00

324 lines
20 KiB
JavaScript
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.
"use strict";
// UI language. English is the default and the language of the source; DE holds the German texts.
// t("Text with {name}", { name }) translates and fills placeholders; trMsg() does the same for
// messages coming from the server or the DSP connection (some of which contain variable parts).
// Chosen per device under ⚙ → Language (stored in the browser); the desktop app also tells the server.
const LANGS = { en: "English", de: "Deutsch" };
const LANG = (() => { try { return localStorage.getItem("dsp.lang") === "de" ? "de" : "en"; } catch { return "en"; } })();
const LOCALE = LANG === "de" ? "de-AT" : "en-GB";
const DE = {
" (end of range reached)": " (Bereichsende erreicht)",
" Log out": " Abmelden",
"+ Add amplifier": "+ Verstärker hinzufügen",
"+ New amplifier…": "+ Neuer Verstärker…",
"20 Hz … 20 kHz, e.g. 1.2k": "20 Hz … 20 kHz, z. B. 1.2k",
"A backup is made automatically before every import. Last backup: {last}.": "Vor jedem Import wird automatisch gesichert. Letzte Sicherung: {last}.",
"a change on one channel applies to the whole group. Name, routing and mix levels stay per channel. ": "eine Änderung an einem Kanal gilt für die ganze Gruppe. Name, Routing und Mix-Pegel bleiben je Kanal. ",
"Access (PIN)": "Zugang (PIN)",
"Add": "Hinzufügen",
"Added": "Hinzugefügt",
"All bands flat": "Alle Bänder flach",
"All flat": "Alle flach",
"Allow phones & tablets": "Handy & Tablet erlauben",
"Amplifier": "Verstärker",
"Amplifier clips – the limiter engages {db} dB too late": "Verstärker clippt – Limiter greift {db} dB zu spät",
"Amplifier is not rated for {ohm} Ω": "Verstärker ist für {ohm} Ω nicht spezifiziert",
"Amplifier −1 dB": "Verstärker −1 dB",
"Amplifiers": "Verstärker",
"App settings": "App-Einstellungen",
"Apply": "Übernehmen",
"Assign an amplifier first": "Erst Verstärker zuordnen",
"Assumes the amplifier’s gain control turned fully up (or as entered).": "Voraussetzung: Gain-Regler am Verstärker auf Rechtsanschlag (bzw. so wie eingetragen).",
"At least one power rating is missing.": "Mindestens eine Leistungsangabe fehlt.",
"Automatic": "Automatisch",
"Back up…": "Sichern…",
"Backup": "Sicherung",
"Both DSPs can be connected at the same time – switch between them at the top. ": "Beide DSPs können gleichzeitig verbunden sein – oben zwischen ihnen umschalten. ",
"Calibration": "Kalibrierung",
"Cancel": "Abbrechen",
"Change PIN": "PIN ändern",
"Channel": "Kanal",
"Channel name": "Kanalname",
"Choose channel": "Kanal wählen",
"Close": "Schließen",
"Compressor": "Kompressor",
"Connect": "Verbinden",
"Connect automatically": "Automatisch verbinden",
"Connecting to {where}…": "Verbinde mit {where}…",
"Connecting…": "Verbinde…",
"Connection": "Verbindung",
"connection closed": "Verbindung beendet",
"Current PIN": "Aktuelle PIN",
"Current PIN is wrong": "Aktuelle PIN ist falsch",
"dBu = 20 · log₁₀(U / 0.775 V).": "dBu = 20 · log₁₀(U / 0,775 V).",
"Decrease": "Verringern",
"Delete": "Löschen",
"Delete amplifier": "Verstärker löschen",
"Delete {name}?": "{name} löschen?",
"desktop app only": "nur in der Desktop-App",
"device not loaded": "Gerät nicht geladen",
"Device reports: ": "Gerät meldet: ",
"Devices": "Geräte",
"Devices ({n}), amplifier and limiter data, PIN and remote access will be replaced by the backup from {when}. The presets inside the DSPs stay unchanged.": "Geräte ({n}), Verstärker- und Limiter-Daten, PIN und Fernzugriff werden durch die Sicherung vom {when} ersetzt. Die Presets in den DSPs bleiben unverändert.",
"Disconnect": "Trennen",
"Disconnected": "Getrennt",
"Drag a fader by its knob · snaps at 0 dB · double-tap the knob = 0 dB · tap the dB value to type one · tap the name = edit channel": "Fader am Knopf ziehen · rastet bei 0 dB ein · Doppeltipp auf den Knopf = 0 dB · dB-Wert antippen zum Eintippen · Name antippen = Kanal bearbeiten",
"Drag the points in the curve · gain snaps at 0 dB": "Punkte in der Kurve ziehen · Gain rastet bei 0 dB ein",
"DSP closed the connection": "DSP hat die Verbindung beendet",
"DSP is not connected": "DSP ist nicht verbunden",
"DSP not responding": "DSP antwortet nicht",
"e.g. 1.4": "z. B. 1.4",
"e.g. 32": "z. B. 32",
"e.g. 4.0": "z. B. 4.0",
"e.g. Crown XLS 1502": "z. B. Crown XLS 1502",
"e.g. DSP 204 stage": "z. B. DSP 204 Bühne",
"Edit": "Bearbeiten",
"Edit amplifier": "Verstärker bearbeiten",
"Edit channel": "Kanal bearbeiten",
"Enter PIN": "PIN eingeben",
"Enter value": "Wert eingeben",
"EQ curve – drag the points": "EQ-Kurve – Punkte ziehen",
"Error": "Fehler",
"Error: ": "Fehler: ",
"Export": "Exportieren",
"Export / import preset": "Preset exportieren / importieren",
"Export saves the DSP’s current state ({name}) to a file. Import loads a file into the active state – stored presets (U01 …) stay unchanged.": "Exportieren speichert den aktuellen Zustand des DSP ({name}) als Datei. Importieren lädt eine Datei in den aktiven Zustand – gespeicherte Presets (U01 …) bleiben unverändert.",
"exported": "exportiert",
"File is too large": "Datei ist zu groß",
"File…": "Datei…",
"Filter type": "Filtertyp",
"First device found": "Erstes gefundenes Gerät",
"Frequency": "Frequenz",
"Gain": "Verstärkung",
"Gain (dB)": "Verstärkung (dB)",
"Gain {v} dB": "Verstärkung {v} dB",
"Graphic EQ · 31 bands": "Grafischer EQ · 31 Bänder",
"High- / low-pass": "Hoch- / Tiefpass",
"High-pass": "Hochpass",
"Highs": "Hochton",
"If the amplifier has a gain control, the value applies with it turned fully up.": "Hat der Verstärker einen Gain-Regler, gilt der Wert bei Rechtsanschlag.",
"If the macOS firewall is on, it asks the first time – choose “Allow”.": "Ist die macOS-Firewall aktiv, fragt sie beim ersten Einschalten – dort „Erlauben“ wählen.",
"Impedance": "Impedanz",
"Import": "Importieren",
"Import incomplete": "Import unvollständig",
"Import preset": "Preset importieren",
"Importing… (a few seconds)": "Importiere… (einige Sekunden)",
"Import…": "Importieren…",
"in ms, or metres with “m” (e.g. 2.5m)": "in ms, oder Meter mit „m“ (z. B. 2.5m)",
"Increase": "Erhöhen",
"Input": "Eingang",
"Input sensitivity (V RMS)": "Eingangsempfindlichkeit (V RMS)",
"Input →": "Eingang →",
"Inputs": "Eingänge",
"into 2 Ω": "an 2 Ω",
"into 4 Ω": "an 4 Ω",
"into 8 Ω": "an 8 Ω",
"IP address": "IP-Adresse",
"IP address missing": "IP-Adresse fehlt",
"IP of this computer": "IP dieses PCs",
"Its assignments will be removed.": "Die Zuordnungen werden entfernt.",
"Language": "Sprache",
"Level": "Pegel",
"Level for {ch}": "Pegel für {ch}",
"Limit to": "Limiter auf",
"Limiter 0 dB equals at the output": "Limiter 0 dB entspricht am Ausgang",
"Limiter active": "Limiter aktiv",
"Limiter tab": "Limiter-Tab",
"Link": "Verknüpfen",
"Link channels": "Kanäle verknüpfen",
"Link {names}? They all take over the settings of {first} (names and routing stay).": "{names} verknüpfen? Alle übernehmen dabei die Einstellungen von {first} (Namen und Routing bleiben).",
"Link {names}? They all take over the settings of {first} (names stay).": "{names} verknüpfen? Alle übernehmen dabei die Einstellungen von {first} (Namen bleiben).",
"Linked channels share all settings (gain, delay, filters, EQ, dynamics, mute) – ": "Verknüpfte Kanäle teilen sich alle Einstellungen (Gain, Delay, Filter, EQ, Dynamik, Mute) – ",
"Linked with {list} – changes apply to all of them (except name, routing and mix levels).": "Verknüpft mit {list} – Änderungen gelten für alle (außer Name, Routing und Mix-Pegel).",
"Linked with {list} – changes apply to all of them (except the name).": "Verknüpft mit {list} – Änderungen gelten für alle (außer Name).",
"Linked: ": "Verknüpft: ",
"Load on channel": "Last am Kanal",
"Load {what} into the active state? The current state is backed up automatically first and can be brought back via File → “Undo import”. Stored presets stay unchanged – to keep it, store it into a memory slot with “Save” afterwards.": "{what} in den aktiven Zustand laden? Der aktuelle Zustand wird vorher automatisch gesichert und lässt sich über Datei → „Import rückgängig“ zurückholen. Gespeicherte Presets bleiben unverändert – zum Behalten danach mit „Speichern“ in einen Speicherplatz schreiben.",
"Loading configuration…": "Lade Konfiguration…",
"Loading the configuration from the DSP…": "Lade Konfiguration vom DSP…",
"Lock": "Sperren",
"Lock (view only)": "Sperren (nur noch ansehen)",
"Locked": "Gesperrt",
"Locked – click to unlock": "Gesperrt – zum Entsperren klicken",
"Locked – unlock at the top right to make changes": "Gesperrt – zum Ändern oben rechts entsperren",
"Locked – unlock with the PIN to make changes": "Gesperrt – zum Ändern mit der PIN entsperren",
"Locked – values are view-only": "Gesperrt – Werte nur noch ansehen",
"login required": "Anmeldung erforderlich",
"Low-pass": "Tiefpass",
"Lower value": "Kleinerer Wert",
"Memory slot": "Speicherplatz",
"Mids": "Mitten",
"Model": "Modell",
"Name (max. 14 characters)": "Name (max. 14 Zeichen)",
"Name is full (max. 8 characters, wide letters count more)": "Name ist voll (max. 8 Zeichen, breite Buchstaben zählen mehr)",
"Network": "Netzwerk",
"New amplifier": "Neuer Verstärker",
"New device": "Neues Gerät",
"New PIN": "Neue PIN",
"Next channel": "Nächster Kanal",
"No amplifier assigned": "Kein Verstärker zugeordnet",
"No backup available": "Keine Sicherung vorhanden",
"No channels linked.": "Keine Kanäle verknüpft.",
"no crossover": "ohne Weiche",
"No DSP found via USB": "Kein DSP per USB gefunden",
"No DSP found via USB – check the cable": "Kein DSP per USB gefunden – Kabel prüfen",
"no HP": "ohne HP",
"Not a DSP Control preset file": "Keine Preset-Datei von DSP Control",
"Not a DSP Control settings backup": "Keine Einstellungs-Sicherung von DSP Control",
"Not assigned to any output": "Keinem Ausgang zugeordnet",
"not connected": "nicht verbunden",
"Not connected.": "Nicht verbunden.",
"Off": "Aus",
"Off (bypass)": "Aus (Bypass)",
"Off – only this window has access.": "Aus – nur dieses Fenster hat Zugriff.",
"On": "Ein",
"Open channel": "Kanal öffnen",
"Open on a phone in the same Wi-Fi:": "Am Handy im selben WLAN öffnen:",
"Other devices log in with the PIN (changeable below). Only runs while this app is open. ": "Andere Geräte melden sich mit der PIN an (unten änderbar). Läuft nur, solange diese App offen ist. ",
"Output ↓": "Ausgang ↓",
"Outputs": "Ausgänge",
"Overwrites the selected memory slot in the DSP.": "Überschreibt den gewählten Speicherplatz im DSP.",
"Parametric EQ": "Parametrischer EQ",
"PIN (same as on the phone)": "PIN (wie am Handy)",
"PIN changed – other devices were logged out": "PIN geändert – andere Geräte wurden abgemeldet",
"PIN for remote access": "PIN für Fernzugriff",
"Please log in": "Bitte anmelden",
"Preset exported": "Preset exportiert",
"Preset file": "Preset-Datei",
"Preset imported": "Preset importiert",
"Preset U{n} recalled": "Preset U{n} geladen",
"Preset {name} imported": "Preset {name} importiert",
"Previous channel": "Vorheriger Kanal",
"Previous state restored": "Vorheriger Zustand wiederhergestellt",
"Rated RMS power per channel (datasheet, empty = not specified)": "Nennleistung RMS pro Kanal (Datenblatt, leer = nicht angegeben)",
"Reading the state from the DSP…": "Lese Zustand vom DSP…",
"Recall": "Laden",
"Recall preset": "Preset laden",
"Recall preset…": "Preset laden…",
"Recall {name} (U{n})? Unsaved changes will be lost.": "{name} (U{n}) laden? Nicht gespeicherte Änderungen gehen verloren.",
"Reference level in dBu": "Referenzpegel in dBu",
"Reference level · ": "Bezugspegel · ",
"release ≈ 16 × attack (shorter pumps). “Auto” picks the band preset matching this channel’s high-pass.": "Release ≈ 16 × Attack (zu kurz pumpt). „Auto“ wählt das Band-Preset passend zum Hochpass dieses Kanals.",
"Remote access": "Fernzugriff",
"Remote access (web server)": "Fernzugriff (Webserver)",
"Remove": "Entfernen",
"Remove device": "Gerät entfernen",
"Remove {name} from the list?": "{name} aus der Liste entfernen?",
"Repeat": "Wiederholen",
"Reset": "Zurücksetzen",
"Reset EQ": "EQ zurücksetzen",
"Reset GEQ": "GEQ zurücksetzen",
"Restore": "Wiederherstellen",
"Restore settings": "Einstellungen wiederherstellen",
"Restore the state from {last}?": "Den Zustand vom {last} wiederherstellen?",
"Restore…": "Wiederherstellen…",
"Restoring…": "Stelle wieder her…",
"Routing matrix": "Routing-Matrix",
"Rule of thumb: attack ≈ one period of the lowest frequency (faster distorts the bass), ": "Faustregel: Attack ≈ eine Schwingung der tiefsten Frequenz (zu schnell verzerrt Bässe), ",
"Save": "Speichern",
"Saved": "Gespeichert",
"Saved device (not plugged in)": "Gespeichertes Gerät (nicht angesteckt)",
"Saves devices, amplifiers & limiter calculator, PIN and remote access to a file. ": "Sichert Geräte, Verstärker & Limiter-Rechner, PIN und Fernzugriff in eine Datei. ",
"Search again": "Neu suchen",
"Security": "Sicherheit",
"Sensitivity": "Empfindlichkeit",
"Sensitivity = input voltage for full power (e.g. 0.775 V or 1.4 V). ": "Empfindlichkeit = Eingangsspannung für volle Leistung (z. B. 0.775 V oder 1.4 V). ",
"Sensitivity is missing.": "Empfindlichkeit fehlt.",
"Sensitivity {v} V": "Empfindlichkeit {v} V",
"Server not reachable": "Server nicht erreichbar",
"Set": "setzen",
"Set all 31 bands to 0 dB?": "Alle 31 Bänder auf 0 dB setzen?",
"Set all PEQ bands of this channel to 0 dB and clear bypass?": "Alle PEQ-Bänder dieses Kanals auf 0 dB setzen und Bypass aufheben?",
"set the threshold to 0 dB, turn up until the limiter engages and measure the output voltage with a multimeter (AC). ": "Threshold 0 dB, Pegel hochdrehen bis der Limiter greift und die Ausgangsspannung mit einem Multimeter (AC) messen. ",
"Settings": "Einstellungen",
"Settings backed up": "Einstellungen gesichert",
"Settings restored": "Einstellungen wiederhergestellt",
"Shown is the continuous sine power (RMS) once the limiter engages – music is well below that on average. ": "Angezeigt wird die Sinus-Dauerleistung (RMS), sobald der Limiter greift – Musik liegt im Mittel deutlich darunter. ",
"Snaps at 0 dB · double-tap the knob = 0 dB": "Rastet bei 0 dB ein · Doppeltipp = 0 dB",
"Sources → ": "Quellen → ",
"Speaker ": "Lautsprecher ",
"Speaker at {pct} % of its rating ({w} RMS)": "Lautsprecher zu {pct} % belastet ({w} RMS)",
"Speaker RMS": "Lautsprecher RMS",
"Speaker RMS (W)": "Lautsprecher RMS (W)",
"Store preset": "Preset speichern",
"Stored in U{n}": "In U{n} gespeichert",
"Tap a crosspoint = connect/disconnect · tap an output = level per input": "Kreuzungspunkt antippen = verbinden/trennen · Ausgang antippen = Pegel pro Eingang",
"Tap at least two channels": "Mindestens zwei Kanäle antippen",
"Target power": "Ziel-Leistung",
"The default PIN is 1234. After changing it only this device stays logged in.": "Standard-PIN ist 1234. Nach dem Ändern bleibt nur dieses Gerät angemeldet.",
"The DSP did not take these values:": "Diese Werte hat der DSP nicht übernommen:",
"The DSPs accept only one connection: close the Thomann editor first.": "Die DSPs erlauben nur eine Verbindung: den Thomann-Editor vorher schließen.",
"The first time, Windows Firewall asks – choose “Allow” for private networks.": "Beim ersten Einschalten fragt die Windows-Firewall – dort „Zulassen“ für private Netzwerke wählen.",
"The link is stored in the DSP and also applies in the Thomann editor.": "Die Verknüpfung wird im DSP gespeichert und gilt auch für den Thomann-Editor.",
"The new PIN must be 4 digits.": "Die neue PIN muss aus 4 Ziffern bestehen.",
"The new PINs do not match.": "Die neuen PINs stimmen nicht überein.",
"The PIN must be 4 digits": "Die PIN muss aus 4 Ziffern bestehen",
"The settings inside the DSPs are saved per device via “File…” at the top.": "Die Einstellungen in den DSPs sichert man pro Gerät oben über „Datei…“.",
"This app needs no PIN. The default is 1234; changing it logs out all phones.": "Diese App braucht keine PIN. Standard ist 1234; nach dem Ändern werden alle Handys abgemeldet.",
"Thomann does not specify the reference level – 0 dBu (0.775 V) is assumed. To measure: feed a 1 kHz sine, ": "Thomann gibt den Bezugspegel nicht an – angenommen sind 0 dBu (0,775 V). Nachmessen: Sinus 1 kHz einspeisen, ",
"TimeoutError": "Zeitüberschreitung",
"Too many attempts – locked for {s} s": "Zu viele Versuche – noch {s} s gesperrt",
"Too many attempts – please wait a moment": "Zu viele Versuche – bitte kurz warten",
"Type": "Typ",
"Undo import": "Import rückgängig",
"Unlink": "Trennen",
"Unlock": "Entsperren",
"Unlocked": "Entsperrt",
"USB cable": "USB-Kabel",
"USB connection lost": "USB-Verbindung getrennt",
"USB device": "USB-Gerät",
"USB device is in use by another program": "USB-Gerät ist von einem anderen Programm belegt",
"USB device not found – check the cable": "USB-Gerät nicht gefunden – Kabel prüfen",
"USB is not supported on this system": "USB wird auf diesem System nicht unterstützt",
"USB write error": "USB-Schreibfehler",
"Used by: ": "Belegt: ",
"View": "Ansicht",
"Watts": "Watt",
"Wrong PIN": "Falsche PIN",
"Wrong PIN – {n} attempts left": "Falsche PIN – noch {n} Versuche",
"{db} dB headroom to amplifier clipping": "{db} dB Reserve bis Verstärker-Clipping",
"{names} linked": "{names} verknüpft",
"{names} unlinked": "{names} getrennt",
"{n} channels selected": "{n} Kanäle gewählt",
"{pct} % of the speaker rating ({w} RMS)": "{pct} % der Lautsprecher-Belastbarkeit ({w} RMS)",
"{pct} % of {rated}": "{pct} % von {rated}",
"— empty —": "— leer —",
"— no amplifier —": "— kein Verstärker —",
"“{s}”": "„{s}“"
};
const DE_PATTERNS = [
[/^Port (\d+) is already in use – please choose another port$/, "Port $1 ist schon belegt – bitte einen anderen Port wählen"],
[/^Port (\d+) is not available \((.*)\)$/, "Port $1 ist nicht verfügbar ($2)"],
[/^Cannot open USB device \(error (.*)\)$/, "USB-Gerät lässt sich nicht öffnen (Fehler $1)"],
[/^USB write error \((.*)\)$/, "USB-Schreibfehler ($1)"],
[/^The file is for a DSP (\w+), the connected device is a (.*)$/, "Die Datei ist für den DSP $1, verbunden ist ein $2"],
[/^Unknown file format \((\d+) bytes\) – expected a DSP Control preset file or a memory image of the (.*) \((\d+) bytes\)$/,
"Unbekanntes Dateiformat ($1 Bytes) – erwartet wird eine Preset-Datei dieser App oder ein Speicherabbild des $2 ($3 Bytes)"],
[/^unknown device '(.*)' - set the model manually$/, "Unbekanntes Gerät „$1“ – Modell bitte manuell einstellen"],
[/^config chunk (\d+) not received$/, "Konfigurations-Teil $1 nicht empfangen"],
];
function t(s, vars) {
const text = LANG === "de" && DE[s] != null ? DE[s] : s;
return vars ? text.replace(/\{(\w+)\}/g, (m, k) => (k in vars ? vars[k] : m)) : text;
}
function trMsg(msg) {
msg = String(msg ?? "");
if (LANG !== "de") return msg;
if (DE[msg] != null) return DE[msg];
for (const [re, de] of DE_PATTERNS) if (re.test(msg)) return msg.replace(re, de);
return msg;
}
const q = s => t("“{s}”", { s }); // quoted name: “x” / „x“
// static texts in index.html
document.documentElement.lang = LANG;
document.querySelectorAll("[data-t]").forEach(el => (el.textContent = t(el.dataset.t)));
document.querySelectorAll("[data-t-label]").forEach(el => {
el.setAttribute("aria-label", t(el.dataset.tLabel));
if (el.title) el.title = t(el.dataset.tLabel);
});