mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 13:38:40 +00:00
Merge pull request #936 from Enelg52/midi-issues
fix midi issue on firefox and added quote error
This commit is contained in:
commit
325152c782
@ -167,10 +167,16 @@ let listeners = {};
|
|||||||
const refs = {};
|
const refs = {};
|
||||||
|
|
||||||
export async function midin(input) {
|
export async function midin(input) {
|
||||||
|
if (isPattern(input)) {
|
||||||
|
throw new Error(
|
||||||
|
`.midi does not accept Pattern input. Make sure to pass device name with single quotes. Example: .midi('${
|
||||||
|
WebMidi.outputs?.[0]?.name || 'IAC Driver Bus 1'
|
||||||
|
}')`,
|
||||||
|
);
|
||||||
|
}
|
||||||
const initial = await enableWebMidi(); // only returns on first init
|
const initial = await enableWebMidi(); // only returns on first init
|
||||||
const device = getDevice(input, WebMidi.inputs);
|
const device = getDevice(input, WebMidi.inputs);
|
||||||
|
if (initial || WebMidi.enabled) {
|
||||||
if (initial) {
|
|
||||||
const otherInputs = WebMidi.inputs.filter((o) => o.name !== device.name);
|
const otherInputs = WebMidi.inputs.filter((o) => o.name !== device.name);
|
||||||
logger(
|
logger(
|
||||||
`Midi enabled! Using "${device.name}". ${
|
`Midi enabled! Using "${device.name}". ${
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user