Merge pull request #1172 from daslyfe/speed-cps-fix

fix sample speed when using splice and fit with superdirt
This commit is contained in:
Jade (Rose) Rowland 2024-09-02 22:37:15 -04:00 committed by GitHub
commit 4608c321bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,6 +50,9 @@ export function parseControlsFromHap(hap, cps) {
}
controls.bank && (controls.s = controls.bank + controls.s);
controls.roomsize && (controls.size = parseNumeral(controls.roomsize));
// speed adjustment for CPS is handled on the DSP side in superdirt and pattern side in Strudel,
// so we need to undo the adjustment before sending the message to superdirt.
controls.unit === 'c' && controls.speed != null && (controls.speed = controls.speed / cps);
const channels = controls.channels;
channels != undefined && (controls.channels = JSON.stringify(channels));
return controls;