Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadcast Midi In/Out #82

Open
DJthefirst opened this issue Sep 11, 2023 · 5 comments
Open

Broadcast Midi In/Out #82

DJthefirst opened this issue Sep 11, 2023 · 5 comments

Comments

@DJthefirst
Copy link

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!

@jazz-soft
Copy link
Owner

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.

@DJthefirst
Copy link
Author

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

@jazz-soft
Copy link
Owner

Please attach some files that cause the problems, I'll take a look...

@DJthefirst
Copy link
Author

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.

DELTARUNE

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.

@TimSusa
Copy link

TimSusa commented Apr 20, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants