the ultimate vocal synthesizer - sing, speak, beatbox, and more
Rust
Contrast follow-up: drop twice-drawn canvas labels and the dead nested CSS; selected text no longer dimmer than unselected
Jameson Hodge092b16ce12b9
diff --git a/src/ui/components/CreatureTubes.tsx b/src/ui/components/CreatureTubes.tsxindex 92b9ff6..a9ffb4e 100644--- a/src/ui/components/CreatureTubes.tsx+++ b/src/ui/components/CreatureTubes.tsx@@ -25,7 +25,6 @@ export function CreatureTubes() {const data = tele.tubes[l.tube];const y = 3 + laneH * (li + 0.5);label(ctx, (l.label ?? l.tube).toUpperCase(), 14, y + 3, { size: 9, color: TEXT.secondary, ls: 0.16 });- label(ctx, (l.label ?? l.tube).toUpperCase(), 14, y + 3, { size: 9, color: TEXT.secondary, ls: 0.16 });const n = data.areas.length;const x0 = labelW, x1 = w - 14;const dx = (x1 - x0) / n;diff --git a/src/ui/components/PianoRoll.tsx b/src/ui/components/PianoRoll.tsxindex bbf8784..95bcab9 100644--- a/src/ui/components/PianoRoll.tsx+++ b/src/ui/components/PianoRoll.tsx@@ -70,7 +70,6 @@ export function PianoRoll() {if (pc === 0) {seg(ctx, left, yc + rowH / 2, w, yc + rowH / 2, V.frame, 1);label(ctx, `${NAMES[pc]}${Math.floor(m / 12) - 1}`, 6, yc + 3, { size: 9, color: TEXT.secondary, ls: 0.1 });- label(ctx, `${NAMES[pc]}${Math.floor(m / 12) - 1}`, 6, yc + 3, { size: 9, color: TEXT.secondary, ls: 0.1 });}}beam(ctx, dotted, V.frame, 1, { dash: [1, 5] });@@ -94,7 +93,6 @@ export function PianoRoll() {ctx.restore();}beam(ctx, r, V.green, live ? 1.6 : 1.2, { alpha: live ? 1 : future ? 0.38 : 0.62, hot: live });- if (n.text && n.text !== "~") label(ctx, n.text.toUpperCase(), x0 + 1, yc - barH / 2 - 4, { size: 10, color: live ? V.white : V.blueMid, ls: 0.12, alpha: future ? 0.6 : 1 });if (n.text && n.text !== "~") label(ctx, n.text.toUpperCase(), x0 + 1, yc - barH / 2 - 4, { size: 10, color: live ? V.white : TEXT.secondary, ls: 0.12, alpha: future ? 0.6 : 1 });}diff --git a/src/ui/components/ScoreView.tsx b/src/ui/components/ScoreView.tsxindex 4b7a315..e32de32 100644--- a/src/ui/components/ScoreView.tsx+++ b/src/ui/components/ScoreView.tsx@@ -50,7 +50,6 @@ export function ScoreView() {ctx.fillStyle = "#000";ctx.fillRect(left, cy - bh / 2, right - left, bh);labelBlock(ctx, msg, left + 8, cy, right - left - 16, { size: 10, color: TEXT.secondary, ls: 0.12 });- labelBlock(ctx, msg, left + 8, cy, right - left - 16, { size: 10, color: TEXT.secondary, ls: 0.12 });return;}const plan = sp.plan;@@ -99,7 +98,6 @@ export function ScoreView() {lastRight = x + 6;const on = now >= s.t0 && now < s.t1;seg(ctx, X(s.t0), bottom + 2, X(s.t0), bottom + 6, V.blueDim, 1);- label(ctx, s.ipa, x, h - 8, { size: 12, color: on ? V.white : V.blue, align: "center", ls: 0 });label(ctx, s.ipa, x, h - 8, { size: 12, color: on ? V.white : TEXT.primary, align: "center", ls: 0 });}// playheaddiff --git a/src/ui/components/TubeView.tsx b/src/ui/components/TubeView.tsxindex 8cae28e..bf84cb0 100644--- a/src/ui/components/TubeView.tsx+++ b/src/ui/components/TubeView.tsx@@ -60,8 +60,8 @@ export function TubeView() {p.lineTo(jx + nLen, nTop + off);beam(ctx, p, nc, 1, { dash });}- label(ctx, "NOSE", jx + nLen + 6, nTop + 3, { size: 9, color: nc, ls: 0.16 });- label(ctx, open ? `VELUM OPEN ${velum.toFixed(2)} CM²` : "VELUM SHUT", jx, nTop - 12, { size: 9, color: nc, ls: 0.16, align: "center" });+ label(ctx, "NOSE", jx + nLen + 6, nTop + 3, { size: 9, color: TEXT.secondary, ls: 0.16 });+ label(ctx, open ? `VELUM OPEN ${velum.toFixed(2)} CM²` : "VELUM SHUT", jx, nTop - 12, { size: 9, color: TEXT.secondary, ls: 0.16, align: "center" });// silhouette and ringsconst top: Pt[] = [[x0, axisY - 3], ...secs.map((q) => [q.x, axisY - q.r] as Pt), [x1, axisY - secs[secs.length - 1].r]];diff --git a/src/ui/render/readouts.ts b/src/ui/render/readouts.tsindex 84cc9cc..ce8ae7b 100644--- a/src/ui/render/readouts.ts+++ b/src/ui/render/readouts.ts@@ -2,7 +2,7 @@* The face screen's readouts: formants and info lines in one corner, and four OP-1 style slots* (big numerals in each control's colour). Shared by the 2D and 3D anatomy views.*/-import { V } from "../colors.ts";+import { TEXT, V } from "../colors.ts";import { dot, ipaGlyph, label } from "./vector.ts";/** an OP-1 style readout in the space under the chin */@@ -40,7 +40,7 @@ export function drawReadouts(ctx: CanvasRenderingContext2D, layout: ReadoutLayouy += 110;}for (const s of info) {- label(ctx, s, fx, y, { size: 10, color: V.blueMid, align: "right", ls: 0.14 });+ label(ctx, s, fx, y, { size: 10, color: TEXT.secondary, align: "right", ls: 0.14 });y += 16;}if (!slots.length) return;@@ -69,8 +69,8 @@ function drawReadoutsCompact(ctx: CanvasRenderingContext2D, layout: ReadoutLayoulabel(ctx, String(Math.round(formants[i])), 12 + i * cw + 26, 18, { size: 13, color: V.amber, ls: 0.06 });});}- label(ctx, info.slice(0, 2).join(" "), 12, 36, { size: 9, color: V.blueMid, ls: 0.12 });- if (info.length > 2) label(ctx, info.slice(2).join(" "), 12, 50, { size: 9, color: V.blueMid, ls: 0.12 });+ label(ctx, info.slice(0, 2).join(" "), 12, 36, { size: 9, color: TEXT.secondary, ls: 0.12 });+ if (info.length > 2) label(ctx, info.slice(2).join(" "), 12, 50, { size: 9, color: TEXT.secondary, ls: 0.12 });const four = slots.slice(0, 4);if (!four.length) return;const cw = (w - 24) / four.length, y0 = h - 82;diff --git a/src/ui/styles.css b/src/ui/styles.cssindex de3dedc..5281d10 100644--- a/src/ui/styles.css+++ b/src/ui/styles.css@@ -41,9 +41,9 @@--amber: #ffb340;--glow-blue: 0 0 1.5px rgba(79, 182, 242, 0.9), 0 0 6px rgba(79, 182, 242, 0.4);/* older names, remapped so screens not yet redrawn sit on black in blue and amber */- --black: #020406;- --console: #0d171f;- --inset: #182833;+ --black: #000000;+ --console: #000000;+ --inset: #000000;--line: var(--frame);--text: var(--blue);--text-dim: var(--blue-mid);@@ -252,15 +252,6 @@ button.primary.large {gap: 4px;font-size: 13px;font-stretch: 87%;--/* Keep UI copy brighter without recolouring vector strokes or borders. */-.text-colors :is(button:not(.primary), p, h1, h2, h3, h4, label, output, a, .screen-title) {- color: var(--text);-}--.text-colors :is(.tagline, .load, .volume, .screen-sub, .dim, .midi-status, .seq-label, .creature-blurb, .duet-time, .duet-msg) {- color: var(--text-dim);-}color: var(--text-dim);}@@ -1246,11 +1237,12 @@ body {.segmented button:hover {color: var(--text);+ text-shadow: var(--glow-blue);}.segmented button.on {background: transparent;- color: var(--blue);+ color: var(--text);border-color: var(--blue);box-shadow: 0 0 5px rgba(79, 182, 242, 0.35), inset 0 0 4px rgba(79, 182, 242, 0.15);text-shadow: var(--glow-blue);@@ -1315,7 +1307,7 @@ body {}.repo-link:hover {- color: var(--blue);+ color: var(--text);filter: drop-shadow(0 0 3px rgba(79, 182, 242, 0.7));}@@ -1339,7 +1331,7 @@ button.ghost,}button.primary {- color: var(--blue);+ color: var(--text);border-color: var(--blue);box-shadow: 0 0 5px rgba(79, 182, 242, 0.35), inset 0 0 4px rgba(79, 182, 242, 0.15);text-shadow: var(--glow-blue);@@ -1352,13 +1344,13 @@ button.primary.large {button.ghost:hover,.chip:hover {- color: var(--blue);+ color: var(--text);border-color: var(--blue-dim);}.chip.on,.chip[aria-pressed="true"] {- color: var(--blue);+ color: var(--text);border-color: var(--blue);box-shadow: 0 0 5px rgba(79, 182, 242, 0.35), inset 0 0 4px rgba(79, 182, 242, 0.15);text-shadow: var(--glow-blue);@@ -1424,7 +1416,7 @@ button.ghost:hover,font-weight: 300;letter-spacing: 0.2em;text-transform: uppercase;- color: var(--blue);+ color: var(--text);text-shadow: var(--glow-blue);}@@ -1516,7 +1508,7 @@ button.ghost:hover,}.screen-tools .toggle input:checked + span {- color: var(--blue);+ color: var(--text);border-color: var(--blue-dim);text-shadow: var(--glow-blue);}@@ -1585,7 +1577,7 @@ button.ghost:hover,}.enc-tab.on {- color: var(--blue);+ color: var(--text);border-color: var(--blue);text-shadow: var(--glow-blue);}@@ -2192,7 +2184,7 @@ input[type="range"]::-moz-range-thumb {}.syl.sung {- color: var(--text-dim);+ color: var(--blue-mid);border-color: rgba(19, 57, 84, 0.6);}@@ -2690,7 +2682,7 @@ input[type="range"]::-moz-range-thumb {.calls-body .call:hover {border-color: var(--blue-dim);- color: var(--blue);+ color: var(--text);}.calls-body .call-name {@@ -2713,7 +2705,7 @@ input[type="range"]::-moz-range-thumb {.calls-body .call.sustain.on {border-color: var(--blue);- color: var(--blue);+ color: var(--text);background: transparent;}