Zoom the Parametric EQ's dB with the wheel, saved on its node (#376)
Close moves of a few dB were hard to set and to see on a curve that always spans -24 to +24 dB. The wheel on free space now zooms the dB the curve shows, and the node's small curve shows the same range. - The range is one of ±3, ±6, ±12, ±24 and ±48 dB, always the same either side of 0. Up zooms in. - It is saved on the node as `range`, so it is back after loading. Like the game scale (#226) it is no undo step. EditorState gets `setNodeView` for such a setting of a node. - The lines across the curve follow the range: every 1, 2, 3, 6 or 12 dB. A handle whose gain lies beyond the range stays on the edge, in sight and in reach. - The wheel over a handle still turns the band's Q. It no longer does so anywhere while a band is picked: after opening, a band nearly always is, and the zoom would be out of reach. - `EqArea` carries the range, so the tab and the node map dB alike. The spectrum keeps its own scale. Tests: - Unit parametric-eq: 16 green, 5 new (range in compile and save, node picture, wheel steps, grid lines, handle on the edge) - Counter-check: the node's picture without the saved range turns the new picture test red - e2e 34 (melektaus-atx): ALL PASSED, 99 checks, 1 new - Gate (melektaus-atx): CHECK EXIT 0, 275 files, 4252 tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41af1a6e51
commit
3377524958
9 files changed
+181
-34
No files matched your search
@@ -571,6 +571,32 @@ export async function sound(t) {
|
||||
eqWheeled.q > 1,
|
||||
JSON.stringify({ eqDragged, eqUndone, eqWheeled }),
|
||||
);
|
||||
// #376: the wheel on free space zooms the curve to ±12 dB, so the band's handle moves out with its
|
||||
// gain. The zoom is saved on the node, the Q stays, and Ctrl+Z undoes the Q, not the zoom.
|
||||
const eqFree = await json('__gm.eq.pointAt(50, 12)');
|
||||
await t.wheel(eqFree.x, eqFree.y, -100);
|
||||
const eqZoomed = await json(`({
|
||||
range: __gm.eq.range(),
|
||||
saved: __gm.state.project.assets.find((a) => a.id === ${JSON.stringify(fxId)}).graph.nodes
|
||||
.find((n) => n.id === 'fx-eq').params.range,
|
||||
q: __gm.eq.bands()[0].q,
|
||||
handle: __gm.eq.handleAt(0),
|
||||
at: __gm.eq.pointAt(4000, -6),
|
||||
})`);
|
||||
await press('z', { ctrl: true });
|
||||
const eqZoomUndone = await json('({ range: __gm.eq.range(), q: __gm.eq.bands()[0].q })');
|
||||
await press('z', { ctrl: true, shift: true });
|
||||
check(
|
||||
'the wheel on free space zooms the curve to ±12 dB, saved on the node, and Ctrl+Z leaves the zoom',
|
||||
eqZoomed.range === 12 &&
|
||||
eqZoomed.saved === 12 &&
|
||||
eqZoomed.q === eqWheeled.q &&
|
||||
eqZoomed.handle.y > eqHandleBack.y + 10 &&
|
||||
Math.abs(eqZoomed.handle.y - eqZoomed.at.y) < 1 &&
|
||||
eqZoomUndone.range === 12 &&
|
||||
eqZoomUndone.q < eqWheeled.q,
|
||||
JSON.stringify({ eqHandleBack, eqZoomed, eqZoomUndone }),
|
||||
);
|
||||
await shot('34-parametric-eq');
|
||||
// #374: floated beside the Sound FX tab, the EQ's tab draws the spectrum of what passes the node:
|
||||
// the blip's 880 Hz is the loudest bin in front of the EQ and behind it. Once the tab is not
|
||||
|
||||
Reference in new issue
Block a user