Looks per preset, steadier DJ Brake, no zoom on phones, simple dashboard on touch
Colours and link group names now belong to the preset (by name, the DSP has no IDs) and travel in preset files. DJ Brake: limiters are left out instead of chosen; a slowly falling peak mark, an average bar, a warning before the limit, and it learns from real hits where the limiter sits on the meter. Pinch and double tap zoom are off. On touchscreens the dashboard only offers widget settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
99613327f8
commit
cf35a1faa1
11 files changed
+232
-48
No files matched your search
+25
-10
@@ -2,12 +2,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>DJ Brake</title>
|
||||
<style>
|
||||
html { touch-action: manipulation; }
|
||||
html, body { height: 100%; margin: 0; background: #050608; color: #fff; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden; }
|
||||
body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vmin; text-align: center; -webkit-user-select: none; user-select: none; }
|
||||
|
||||
@@ -30,6 +31,7 @@
|
||||
#track { position: relative; height: 3.6vmin; border-radius: 1.8vmin; overflow: hidden; box-shadow: 0 0 0 1px #ffffff1c;
|
||||
background: linear-gradient(90deg, #17a34a 0%, #22c55e 55%, #eab308 78%, #f97316 90%, #ef2b24 100%); }
|
||||
#cover { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: #12151a; }
|
||||
#peak { position: absolute; top: 0; bottom: 0; left: 0; width: .7vmin; margin-left: -.35vmin; border-radius: .35vmin; background: #fff; box-shadow: 0 0 1vmin #0009; opacity: 0; transition: left .5s ease-out, opacity .3s; }
|
||||
#ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 2px), #050608b0 calc(20% - 2px) 20%); }
|
||||
#scale { position: relative; height: 3vmin; margin-top: 1vmin; font-size: 2.3vmin; color: #6b7280; font-variant-numeric: tabular-nums; }
|
||||
#scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
|
||||
@@ -41,6 +43,12 @@
|
||||
#hint { position: relative; max-width: 88vw; font-size: 2.8vmin; color: #6b7280; transition: color .5s; }
|
||||
body.on #hint { color: #ffc9c4; transition: color .09s; }
|
||||
|
||||
/* nearly there: warned in time, without the alarm */
|
||||
body.near #word { color: #f59e0b; }
|
||||
body.near #sub { color: #fbbf24; }
|
||||
#glass { transition: box-shadow .5s; }
|
||||
body.near #glass { box-shadow: inset 0 0 0 1px #f59e0b99, 0 0 5vmin #f59e0b33; }
|
||||
|
||||
/* while it lasts: slow breathing, one ring on each new hit, no hard flashing */
|
||||
body.on #halo { animation: breathe 2.2s ease-in-out infinite; }
|
||||
body.on #ring { animation: ripple .9s cubic-bezier(.2, .6, .3, 1); }
|
||||
@@ -59,7 +67,7 @@
|
||||
<div id="word">—</div>
|
||||
</div>
|
||||
<div id="gauge">
|
||||
<div id="track"><div id="cover"></div><div id="ticks"></div></div>
|
||||
<div id="track"><div id="cover"></div><div id="ticks"></div><div id="peak"></div></div>
|
||||
<div id="scale"><span style="left:0">−30</span><span style="left:20%">−24</span><span style="left:40%">−18</span><span style="left:60%">−12</span><span style="left:80%">−6</span><span style="left:100%">0 dB</span></div>
|
||||
</div>
|
||||
<div id="sub"></div>
|
||||
@@ -70,9 +78,9 @@
|
||||
(function () {
|
||||
var de = /^de/i.test(navigator.language || "");
|
||||
var text = de
|
||||
? { on: "LIMITER", more: "Mehr Gas bringt nichts", lost: "Keine Verbindung", none: "Kein Limiter überwacht", quiet: "Kein Signal", left: " dB bis zum Limiter" }
|
||||
: { on: "LIMITER", more: "More gain won't help", lost: "No connection", none: "No limiter being watched", quiet: "No signal", left: " dB to the limiter" };
|
||||
var word = document.getElementById("word"), sub = document.getElementById("sub"), cover = document.getElementById("cover");
|
||||
? { on: "LIMITER", more: "Mehr Gas bringt nichts", lost: "Keine Verbindung", none: "Kein Limiter überwacht", quiet: "Kein Signal", left: " dB bis zum Limiter", close: "KNAPP" }
|
||||
: { on: "LIMITER", more: "More gain won't help", lost: "No connection", none: "No limiter being watched", quiet: "No signal", left: " dB to the limiter", close: "CLOSE" };
|
||||
var word = document.getElementById("word"), sub = document.getElementById("sub"), cover = document.getElementById("cover"), peak = document.getElementById("peak");
|
||||
var hint = document.getElementById("hint");
|
||||
var notes = { en: "The limiter is a safety net, not the target. Stay below it.", de: "Der Limiter ist die Sicherung, nicht das Ziel. Bleib darunter." };
|
||||
var RANGE = 30, gap = 100, state = null, closest = null;
|
||||
@@ -86,8 +94,14 @@
|
||||
gap = next;
|
||||
}
|
||||
|
||||
function show(on, main, small) {
|
||||
document.body.className = on ? "on" : "";
|
||||
// the white mark: the recent peaks, falling slowly. The bar: the average of the last seconds
|
||||
function mark(room) {
|
||||
peak.style.opacity = room == null ? 0 : 1;
|
||||
if (room != null) peak.style.left = 100 - Math.min(100, room / RANGE * 100) + "%";
|
||||
}
|
||||
|
||||
function show(on, main, small, near) {
|
||||
document.body.className = on ? "on" : near ? "near" : "";
|
||||
word.textContent = main;
|
||||
sub.textContent = small;
|
||||
}
|
||||
@@ -96,7 +110,7 @@
|
||||
var s = state;
|
||||
if (!s) return;
|
||||
if (s.on) show(true, text.on, text.more);
|
||||
else if (s.ready) show(false, "OK", closest == null ? text.quiet : closest.toFixed(1) + text.left);
|
||||
else if (s.ready) show(false, closest != null && closest <= 3 ? text.close : "OK", closest == null ? text.quiet : closest.toFixed(1) + text.left, closest != null && closest <= 3);
|
||||
else show(false, "—", text.none);
|
||||
closest = s.room;
|
||||
}
|
||||
@@ -105,12 +119,13 @@
|
||||
es.onmessage = function (e) {
|
||||
var s = JSON.parse(e.data), was = state && state.on;
|
||||
state = s;
|
||||
bar(s.on ? 0 : s.room);
|
||||
bar(s.avg);
|
||||
mark(s.on ? 0 : s.room);
|
||||
hint.textContent = !s.hint ? "" : s.hint === "auto" && de ? notes.de : notes.en;
|
||||
if (s.room != null && (closest == null || s.room < closest)) closest = s.room;
|
||||
if (s.on !== was || !s.ready) draw();
|
||||
};
|
||||
es.onerror = function () { state = null; bar(null); show(false, "—", text.lost); };
|
||||
es.onerror = function () { state = null; bar(null); mark(null); show(false, "—", text.lost); };
|
||||
// the number shows the closest value of the last moment: a figure jumping ten times a second can't be read
|
||||
setInterval(draw, 500);
|
||||
|
||||
|
||||
Reference in new issue
Block a user