Round 12 of the clean-up. Duplicate code had grown from 33 clones
(249 lines) after round 11 to 140 clones (1263 lines), almost all of
it in the panels and faces of the sound FX devices (#379 to #401).
It is down to 57 clones (416 lines) now, and src is 816 lines
shorter.
- deviceParts.ts holds what the device panels built by hand: the
head, rows of knobs, the screen style and the row layout for
groups of knobs. Twelve panels use it. panel.knobs stays because
the debug hooks read it.
- DeviceFace is the base of the twelve faces. It finds the node and
does wired, preview, commit, set, hide, reload and audition.
compressorWired lives there as paramWired.
- TextPool replaces ten copies of "make texts as needed, hide the
rest" in the wave and video tabs, the rulers, the piano roll and
the song and composition timelines. clipStrip.ts is the clip label
strip the wave and video tabs share.
- core/util/bytes.ts has the concat that ogg, matroska and avcColour
each wrote out.
- Dead code is gone: clear on the video players (never called since
#402), posterFileOf and videoTimeAt (only tests called them) and
easeOut (the same as glide(t, 3)). Values only used in their own
file lose their export.
- Comments over 125 columns are wrapped, and comments that told the
history ("as before", "used to") say what is, in src and in the
e2e modules.
- Left alone on purpose: AnimationEditor and CompositionEditor share
only the play button, and the curve panels are built differently.
- Chip now places its boxes through put, which rounds. They were
whole numbers already. The three row layouts are byte-identical
before and after.
- README lists the video and composition assets and the Videos and
Compositions pages.
Tests:
- Gate (melektaus-atx): CHECK EXIT 0, 313 files, 4835 tests.
- e2e 25, 34, 64, 65, 66, 69 (melektaus-atx): ALL PASSED, 330 checks.
- TextPool without keeping its texts and framesToRoom without making
room both go red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Sample was the last node of an instrument that still showed rows.
It now draws the sound or clip it plays, so the loop and what plays
after the note can be seen instead of read off two numbers.
- SamplePanel, SampleFace and sampleView: a compact gold plate of
480x280 with the sound picker beside the name, a waveform screen,
the four ways of playing it as buttons two by two, the root as a
knob that reads as a note, a lever for following the note and the
loop's start above its end.
- The waveform comes from the library's peaks of the played sound,
a clip's own cut included, scaled by the sound's volume. It is
loaded on demand as the Reverb's sound is.
- Each part has its colour: played once, looped, played after the
note, never heard. The loop is held as playback holds it: an end
of 0 or past the sound is the end, a start not before it loops
all of it.
- Idle settings come from the node's own idleParams, so the device
greys out what the rows did.
- A new instrument places its Output at x 840, past the device.
At 460 it lay under the Sample.
- Hook __gm.sample.panel and a check in e2e 34 behind the first
instrument check.
Tests:
- Unit sample-view: 11 tests, new. pattern and chip-presets green.
- e2e 34 (atx): ALL PASSED, 144 checks (1 new).
- Gate (atx): 293 files, 4495 tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>