Fix type casting issue when calculating static fader values
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user