send delta in seconds, to match tidal/superdirt (#1323)

This commit is contained in:
Alex McLean 2025-04-11 08:18:57 +01:00 committed by GitHub
parent b64daf6284
commit ab76b4424a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,7 +37,7 @@ function connect() {
export function parseControlsFromHap(hap, cps) {
hap.ensureObjectValue();
const cycle = hap.wholeOrPart().begin.valueOf();
const delta = hap.duration.valueOf();
const delta = hap.duration.valueOf() / cps;
const controls = Object.assign({}, { cps, cycle, delta }, hap.value);
// make sure n and note are numbers
controls.n && (controls.n = parseNumeral(controls.n));