mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 13:48:40 +00:00
send start with accurate timing
This commit is contained in:
parent
f11462bf41
commit
4eb0a7b7c0
@ -86,9 +86,8 @@ if (typeof window !== 'undefined') {
|
||||
}
|
||||
if (e.data === 'strudel-stop') {
|
||||
WebMidi.outputs.forEach((output) => output.sendStop());
|
||||
} else if (e.data === 'strudel-start') {
|
||||
WebMidi.outputs.forEach((output) => output.sendStart());
|
||||
}
|
||||
// cannot start here, since we have no timing info, see sendStart below
|
||||
});
|
||||
}
|
||||
|
||||
@ -150,6 +149,10 @@ Pattern.prototype.midi = function (output) {
|
||||
const scaled = Math.round(ccv * 127);
|
||||
device.sendControlChange(ccn, scaled, midichan, { time: timeOffsetString });
|
||||
}
|
||||
if (hap.whole.begin + 0 === 0) {
|
||||
// we need to start here because we have the timing info
|
||||
device.sendStart({ time: timeOffsetString });
|
||||
}
|
||||
if (['clock', 'midiClock'].includes(midicmd)) {
|
||||
device.sendClock({ time: timeOffsetString });
|
||||
} else if (['start'].includes(midicmd)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user