The plate was taller than its one knob needs, and the engraved
"GAIN" only repeated the node's title. Without it the plate is
square, and the knob sits in its middle.
- The plate is 160x160 instead of 160x220, without the "GAIN"
engraving.
- The knob is centred on what it shows: the "DB" caption and the
dial. Since #382 its number hangs inside the dial's open bottom,
so it adds no height.
- CAPTION_AIR (4) takes out the empty space above the caption's
capitals. Without it the knob sat a little too low.
Measured on a picture at zoom 0.8: 19 px of air above "DB" and
19 px below the number. The user's screenshot showed about 14
above and 35 below.
Tests:
- Unit hardware-view: 12 tests green. The layout test now asks
for the same air above and below.
- e2e 34 (melektaus-atx): ALL PASSED, 126 checks.
- Gate (melektaus-atx): CHECK EXIT 0, 283 files, 4359 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Gain node now draws a small device in the graph, as the Compressor
does since #380: the brushed plate in orange, 160x220 graph units, with
one chrome knob between its inputs and its output.
- GainPanel and GainFace join the node faces. The knob drags, resets
on a double-click and keeps the wheel for the graph (#383). Each turn
is one undo step, a linked Gain (dB) greys it.
- The knob turns with a taper of 0.26, so 0 dB stands straight up and
the range below -24 dB takes a fifth of the turn.
- drawPlate, engrave and the brushed look move out of CompressorPanel
so both devices share them. The Knob takes an arc colour, because
the orange arc vanished on the orange plate.
- No meter and no tap. Gain sits in every voice of an instrument, and
a tap would add two audio nodes to each note for a display nobody
asked for.
Found on the way:
- Knob.dialGlobal added half the dial unscaled. In a zoomed graph it
pointed beside the dial. The Compressor's e2e only hit by luck.
Tests:
- Unit: 2 new for the Gain plate and its taper.
- e2e 34 on atx: ALL PASSED, 126 checks (1 new).
- Gate on atx: CHECK EXIT 0, 283 files, 4359 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tab from #378 shows a Compressor as an editor. The user wanted it
to look like a device as well, after a brushed aluminium plug-in, with
a meter of the gain reduction instead of the pictures. The tab stays
and is switched to per node.
- Hardware look is a switch under Settings, on by default for new and
existing Compressors. Only the editor reads it.
- The panel is 820x280 px and opens straight in a window of that size.
The window has no sizing corner and no Dock. A pane says so through
`fixedSize`, and `keptSize` keeps the window's middle when it
changes to that size.
- A Compressor in this look never sits in the tab row. Opening one
floats it, and switching the look on moves its tab into the window.
- The panel has chrome knobs (threshold and makeup large), a meter
with a needle that moves like a VU's, an LCD with the name and the
reading, a lever with a lamp for auto-gain, and LEDs for the level
going out. Everything is drawn in code.
- The Knob takes a size and a chrome look, and leaves out its caption
when it has no name, so the panel engraves its own.
- `autoGainOn` is now `switchOn`, because the new switch reads the
same way.
- Where parts sit, the meter's scale, the needle's speed, the LEDs and
the plate's grain are in `hardwareView.ts`, apart from the drawing.
Decided myself:
- The meter's scale runs by the square root, so the first dB is about
as wide as the last nine. It is red from 10 dB on.
- The LEDs light one every 3 dB from -39 to 0 dB and fall by 20 dB a
second.
- Switching the look changes the graph's fingerprint, like any other
setting of a node. The sound FX is built again once.
Findings, fixed on the way:
- Pixi's `arc` goes on from the last point of the path. The meter's
scale had a line from the corner of the face until each arc got a
`moveTo` to its own start.
- A text put into a Graphics makes Pixi warn that only Containers take
children. The LCD is a Container now.
- The first browser check read the needle at one moment and missed the
short sound. The panel keeps the most its needle and LEDs showed.
Tests:
- Unit: hardware-view (10 new), documents (1 new)
- e2e 34 (melektaus-atx): ALL PASSED, 122 checks (4 new). Played,
the needle reached 20.9 dB and 5 LEDs lit.
- Gate (melektaus-atx): CHECK EXIT 0, 283 files, 4355 tests (11 new)
- Counter-checks: a window that keeps its corner instead of its
middle, and a linear meter scale, each turn exactly their test red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>