Broadcast Midi In/Out
DJthefirst opened this issue · 5 comments
Is there a way to create a new virtual midi Input/Output device for other programs to use such as loop Midi? Love and Appreciate all of your hard work!
Hi! Thanks for asking!
Currently, it is possible to do on Mac and Linux, see https://www.npmjs.com/package/midi-test
In Windows it is difficult to do, but, hopefully I'll have it some day.
Thx for the help It's not too big of a deal. Another quick question and I will probably have some more as my project progresses Only about 1/2 of my midi files work. I have about 3,000 or so on hand and the half that don't work all come from the same source except for 3-4 stranglers. I am not sure what DAW they used if that is the problem but I can open and play them in my DAW just fine but in JZZ I get the following error.
DOMException: Failed to execute 'send' on 'MIDIOutput': System exclusive message is not allowed at index 0 (240).
at Object._receive (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:1187:28)
at port._receive (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:1203:20)
at F._receive (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:519:16)
at _R._exec (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:57:16)
at _R._push (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:62:28)
at _M.send (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:522:14)
at _M._emit (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:543:28)
at _R._emit (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:547:14)
at _R._exec (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:57:16)
at _R._push (http://localhost:5173/node_modules/.vite/deps/jzz.js?v=4a38d6e8:62:28)
_receive | @ | JZZ.js:989 | |
---|---|---|---|
port._receive | @ | JZZ.js:1002 | |
_receive | @ | JZZ.js:407 | |
_R._exec | @ | JZZ.js:42 | |
_R._push | @ | JZZ.js:45 | |
_M.send | @ | JZZ.js:409 | |
_M._emit | @ | JZZ.js:427 | |
_emit | @ | JZZ.js:430 | |
_R._exec | @ | JZZ.js:42 | |
_R._push | @ | JZZ.js:45 | |
_M.emit | @ | JZZ.js:432 | |
midiNode._receive | @ | Initilizations.ts:16 | |
_receive | @ | JZZ.js:407 | |
_R._exec | @ | JZZ.js:42 | |
_R._push | @ | JZZ.js:45 | |
_M.send | @ | JZZ.js:409 | |
_M._emit | @ | JZZ.js:427 | |
Player._receive | @ | JZZ.midi.SMF.js:926 | |
_filter | @ | JZZ.midi.SMF.js:913 | |
Player.tick | @ | JZZ.midi.SMF.js:935 | |
Player.play | @ | JZZ.midi.SMF.js:886 | |
updateSong | @ | MidiPlayer.svelte:74 | |
await in updateSong (async) | |||
$self.$.update | @ | MidiPlayer.svelte:63 | |
update | @ | scheduler.js:115 | |
flush | @ | scheduler.js:79 | |
Promise.then (async) | |||
schedule_update | @ | scheduler.js:20 | |
make_dirty | @ | Component.js:81 | |
(anonymous) | @ | Component.js:129 | |
setNode | @ | MidiPlayer.svelte:77 | |
click_handler | @ | MidiPlayer.svelte:166 | |
click_handler | @ | MidiPlayer.svelte:169 |
Please attach some files that cause the problems, I'll take a look...
It happens specifically when I connect the midi from my common node where the player and inputs feed into to midi out.
export let port: any;
let selected = false;
let midiNode: any;
// Generate Common Node
midiNodeStore.subscribe((prev_val) => (midiNode = prev_val));
function connectOutput(port: any) {
if (selected) {
midiNode.disconnect(port);
} else {
midiNode.connect(port);
}
selected = !selected;
}
When not connected the file plays when connected and routed to midi out only 1/2 the songs work.
I changed the file type of the midi to ,png as github will not allow other files for issues. let me know if you want the files with another method.
I would source that out, because imo thats a complex problem about crossplatform OS. https://github.com/dinchak/node-easymidi/blob/master/index.js seems to do something like this, but if you want a reliable crossplattform solution, maybe JUCE could provide something like this to talk via C++ Connection Kit?