Apply value offset when converting fader values for automation
This commit is contained in:
@@ -9,6 +9,7 @@ export type AbletonAutomationTarget = {
|
|||||||
soundLength?: number;
|
soundLength?: number;
|
||||||
invertValue?: boolean;
|
invertValue?: boolean;
|
||||||
staticValue?: number;
|
staticValue?: number;
|
||||||
|
valueOffset?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AbletonAutomationTargets = Partial<Record<FaderParam, AbletonAutomationTarget[]>>;
|
export type AbletonAutomationTargets = Partial<Record<FaderParam, AbletonAutomationTarget[]>>;
|
||||||
@@ -53,7 +54,7 @@ export function convertFaderValue(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FaderParam.PTC:
|
case FaderParam.PTC:
|
||||||
convertedValue = (value - 0.5) * 10;
|
convertedValue = (target?.valueOffset ?? 0) + (value - 0.5) * 10;
|
||||||
break;
|
break;
|
||||||
case FaderParam.LPF:
|
case FaderParam.LPF:
|
||||||
convertedValue = 20 + value * 0.9 * 115;
|
convertedValue = 20 + value * 0.9 * 115;
|
||||||
|
|||||||
Reference in New Issue
Block a user