Show a Compressor's panel in its node, its tab on a double-click (#380)
The panel of #379 opened in a window of its own and replaced the tab. The user wanted the device in the graph instead, and the tab of #378 back on a double-click. The switch Hardware look goes again. - A node can show a face instead of its rows (`NodeFace`). Its inputs sit on the left of it and its outputs on the right, in the middle of the height. Each side is as wide as its longest port name. - A Compressor node shows the panel at full size, 820x280 graph units. Its settings and numbers are not listed as rows, the panel has them. - The knobs and the lever work in the node. A drag, a notch of the wheel and a double-click are one undo step each. A press on them neither picks nor moves the node, and the wheel does not zoom the graph. The number below a knob is only shown, typing stays in the tab and the inspector. - The meter and the LEDs run while the node is in the picture of a sound FX or instrument graph that is seen. Out of the picture, folded or hidden, the node lets go of its taps. - The window of one size, `fixedSize`, `refit`, `keptSize` and the rule that kept a Compressor out of the tab row are gone again. - A knob's drag as one undo step lives in `nodeParamDrag.ts` now, for the tab and the node. The numbers of a node and what auto-gain says moved to `compressorView.ts`. Found and fixed on the way: - The tab and the node listen to the same taps. The tab let go of them on every frame it was not seen, so the node's meter stood still while the tab was open. Now the tab lets go once, and in a frame everything unseen lets go before anything seen listens. Tests: - Unit: compressor-view (2 new), documents (the test of `keptSize` is gone with it) - e2e 34 (stein2, melektaus-atx was off): ALL PASSED, 122 checks. The four checks of #379 are now four of the node: ports beside the panel, knobs and lever in the node, the needle when played (21.7 dB with the tab open), and the double-click opening the tab. - Gate (stein2): CHECK EXIT 0, 283 files, 4356 tests - Counter-checks: an old auto-gain number read as off turns exactly its unit test red. A tab that lets go on every frame leaves the node's needle at 0 dB and no LED lit (probe on stein2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9917253751
commit
1f2b64fb4c
18 files changed
+490
-285
No files matched your search
@@ -1021,14 +1021,6 @@ export function switchOn(settings: PropertyBag, row: { key: string; default: boo
|
||||
return value === undefined ? row.default : booleanOf(value);
|
||||
}
|
||||
|
||||
/** Whether a Compressor's editor is the hardware panel (#379) or the tab of #378. Only its editor reads it. */
|
||||
export const COMPRESS_HARDWARE_LOOK = {
|
||||
key: 'hardwareLook',
|
||||
label: 'Hardware look',
|
||||
kind: 'boolean' as const,
|
||||
default: true,
|
||||
};
|
||||
|
||||
/** The numbers of a Compressor, in the order its tab shows them as knobs (#378). */
|
||||
export const COMPRESS_ROWS = {
|
||||
threshold: COMPRESS_THRESHOLD,
|
||||
@@ -1046,11 +1038,11 @@ export const SoundFxCompressor: SoundFxNodeDef = effect(
|
||||
category: 'sound',
|
||||
tapped: true,
|
||||
description:
|
||||
'Squeezes the loudness of the sound together: what goes above "threshold" (dB) comes out only 1/"ratio" as much louder, so 4 makes 8 dB over it 2 dB. "knee" (dB) eases into that from the threshold on instead of at once. "attack" is how fast it turns down once the sound is over the threshold, "release" how fast it lets go, both in seconds. "makeup" (dB) raises it again afterwards. "Auto-gain" on gives back what it takes from a sound at -18 dB, so that one comes out as loud as it went in; the makeup is added on top. It is 6 ms late, which a voice, a Mix and a bus make up for. All of it can change while the sound plays. Double-click the node to open its editor: with "Hardware look" on, a panel of a fixed size in a window, with a meter of what it takes away; off, a tab with a knob for each number, its curve with threshold and ratio to drag, and the level coming in and going out over the last seconds.' +
|
||||
'Squeezes the loudness of the sound together: what goes above "threshold" (dB) comes out only 1/"ratio" as much louder, so 4 makes 8 dB over it 2 dB. "knee" (dB) eases into that from the threshold on instead of at once. "attack" is how fast it turns down once the sound is over the threshold, "release" how fast it lets go, both in seconds. "makeup" (dB) raises it again afterwards. "Auto-gain" on gives back what it takes from a sound at -18 dB, so that one comes out as loud as it went in; the makeup is added on top. It is 6 ms late, which a voice, a Mix and a bus make up for. All of it can change while the sound plays. The node is drawn as a device: a knob for each number, a meter of what it takes away and LEDs for the level going out. Double-click it to open its tab: its curve with threshold and ratio to drag, and the level coming in and going out over the last seconds.' +
|
||||
BLENDS,
|
||||
inputs: [audioIn, ...Object.values(COMPRESS_ROWS).map(numberIn)],
|
||||
outputs: [audioOut],
|
||||
params: [COMPRESS_AUTO_GAIN, COMPRESS_HARDWARE_LOOK],
|
||||
params: [COMPRESS_AUTO_GAIN],
|
||||
emit: (sounds, amounts, settings) =>
|
||||
withStages(arriving(sounds), [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user