feat: use new meter format

This commit is contained in:
2026-09-13 09:04:04 +02:00
parent 1e00ca3a7c
commit 9f2ace9698
11 changed files with 131 additions and 124 deletions
@@ -15,13 +15,6 @@ const GATE_PARAMS = [
{ key: 'release', label: 'Release', min: 10, max: 3000, step: 1, unit: ' ms' },
] as const;
const INPUT_METER_INDEX: Record<InputChannel, number> = {
[InputChannel.InA]: 0,
[InputChannel.InB]: 1,
[InputChannel.InC]: 2,
[InputChannel.InD]: 3,
} as const;
type GateParamKey = (typeof GATE_PARAMS)[number]['key'];
type GateValues = {
@@ -185,9 +178,14 @@ function GateSection({ dsp, set_gate }: { dsp: DSP; set_gate: SetGateFn }) {
<div className="gate-graph__meters">
{inputs.map((input) => {
const inputState = dsp.state.current_config.input_states[input];
const idx = INPUT_METER_INDEX[input];
const meter = dsp.meters.channels[idx];
return <MeterBar key={input} label={inputState.name} meter={meter} />;
return (
<MeterBar
key={input}
label={inputState.name}
meter={dsp.input_meters.meters[input]}
/>
);
})}
</div>
</div>