Fix type casting issue when calculating static fader values

This commit is contained in:
2026-07-14 11:49:34 +02:00
parent 82a4c73295
commit ab6b318da8
2 changed files with 2 additions and 7 deletions

View File

@@ -643,10 +643,7 @@ async function buildTrack(
if (exporterParams.includeArchivedSamples) { if (exporterParams.includeArchivedSamples) {
for (const parameter of [FaderParam.LPF, FaderParam.HPF] as const) { for (const parameter of [FaderParam.LPF, FaderParam.HPF] as const) {
const staticValue = canonicalizeFilterFaderValue( const staticValue = canonicalizeFilterFaderValue(parameter, koTrack.faderParams[parameter]);
parameter,
koTrack.faderParams[parameter],
);
const defaultValue = getFaderDefaultValue(parameter); const defaultValue = getFaderDefaultValue(parameter);
const hasAutomation = automatedParameters.has(parameter); const hasAutomation = automatedParameters.has(parameter);
if (hasAutomation || (staticValue !== -1 && staticValue !== defaultValue)) { if (hasAutomation || (staticValue !== -1 && staticValue !== defaultValue)) {

View File

@@ -61,9 +61,7 @@ test('scales P07-like note velocities with static and automated VEL values', ()
...occurrence.faderParams, ...occurrence.faderParams,
[FaderParam.VEL]: 0.5325199961662292, [FaderParam.VEL]: 0.5325199961662292,
}, },
faderAutomation: [ faderAutomation: [{ parameter: FaderParam.VEL, position: 192, value: 0.25, flags: 0 }],
{ parameter: FaderParam.VEL, position: 192, value: 0.25, flags: 0 },
],
}; };
assert.deepEqual( assert.deepEqual(