Merge pull request 'BUG FIX: make 'midin' initialization work with multiple controllers' (#1469) from cbabraham/strudel:fix/midi-init-bug into main

Reviewed-on: https://codeberg.org/uzu/strudel/pulls/1469
This commit is contained in:
froos 2025-08-20 12:10:00 +02:00
commit 0464845262

View file

@ -493,6 +493,9 @@ export async function midin(input) {
otherInputs?.length ? `Also available: ${getMidiDeviceNamesString(otherInputs)}` : ''
}`,
);
}
// ensure refs for this input are initialized
if (!refs[input]) {
refs[input] = {};
}
const cc = (cc) => ref(() => refs[input][cc] || 0);