-
Notifications
You must be signed in to change notification settings - Fork 10
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
Native support for PipeWire or alternatively Jack #17
Comments
Hello @szszoke ! Thanks for your feedback. However, MIDI Jar (as a standalone Electron app, use Node.JS) was mainly developed to fill the lack of Windows solution for routing MIDI (and using MIDI on multiple apps at the same time by also filling the lack from loopMIDI to route messages from hardware devices). This is not an ideal solution (JS is not the best fit for realtime) but that was my quickest solution for providing UI and MIDI for OBS. I understand that the node approach of routing seems redundant, but, i don't see the point of exposing modules to Pipewire, the current routing solution is a visual alternative to a "Select Device" dropdown that most software have (VSTi/DAW). But, it would not work fo MacOS and Windows. I have some plans to make MIDI Jar an more extensible solution by having a more advanced routing anyway, that can have multiples modules instead of only one of each (multiple Keyboard Displays, multiple Chord Displays, and a View manager). I would be interested in a standard solution like a cross-platform Pipewire though, but currently my focus is Windows. MacOS and Linux are bonuses. |
Do you know any Pipewire library for NodeJS ? I see there is @kakxem/node-pipewire but i don't see any example of MIDI, and how to consume and send anything to PW ports from a Node.JS environment. |
In an ideal world something like PipeWire would have first-class support for Windows and MacOS. I don't think that will happen any time soon unfortunately. The way it works on Linux is that PipeWire is positioned to be the audio/video/MIDI server and no userspace application would talk to hardware directly. Instead they would expose themselves to PipeWire and would have audio/video/MIDI routed to them either automatically (like the audio output of a browser to the main audio output) or manually (MIDI keyboard to a standalone synthesizer app's MIDI input, and to the input of MIDI Jar; the output of the synth app could then be routed to an audio interface for some hardware effect processing and then routed back to a recording application or DAW input) It has gotten to the point where the system stays out of your way and runs well on "auto pilot" but if you want to take the output of a browser tab where you're playing a YouTube video to the microphone input of another browser tab where you are having an online meeting, it is as simple as dragging a "cable" between two points. (Sort of like the ROUTER page)
I think that could be an approach, maybe you could reuse what you learn in your upcoming modular system. |
Ok thanks for the additional explanation. Anyway, i currently can't find a JS library to do so, and development of MIDI Jar V2 should start this summer (as soon as i can publish 1.4.0 and fix issues i currently have with ALSA by rewriting my internal MIDI routing/handling). |
I will look at the library that you linked. I think that it should be possible to use it to talk to PipeWire. My hunch is that you didn't see anything MIDI related on the project page because the project is just a bridge and then you are supposed to use it according to the PipeWire docs. Edit: looks like the library is not capable of creating nodes/ports. I don't know how much sense it makes to bring the whole PipeWire API into JavaScript. The current use-case would be to expose MIDI ports via PipeWire, and when MIDI messages arrive, send the messages to MIDI Jar. Maybe this could be a whole separate executable that would talk to MIDI Jar via some sort of IPC or sockets? Edit: MIDI Jar would need an option to disable/hide the router and support launching an additional executable. |
Hello!
I just discovered your project after screen-sharing a virtual keyboard application during my online music lesson.
I already was already using OBS to bring everything together and I think that MIDI Jar overlay with an OBS Browser Source will be a much more elegant solution going forward.
The application has a built-in MIDI router. This is useful on operating systems like Windows where the MIDI routing capabilities are limited or non-existent by default.
On Linux, with PipeWire or Jack (with some tweaking), this sort of internal routing implemented by applications becomes redundant because there already is a node-based virtual patchbay where MIDI inputs/outputs can be routed to one or many outputs/inputs.
The few graphical applications that exist to manage the virtual page look very similar to the routing page of MIDI Jar.
Each application that is aware of this PipeWire/Jack would register itself as a node, with all the necessary ports.
In the case of MIDI Jar, the application would register itself as a node with three MIDI ports, one for the chord-display in the app, one for the debugger and another for the overlay chord-display.
Routing would be handled outside of the application with whatever tool the user is already using for routing their other MIDI/audio devices/programs between each other.
By disabling the internal router and relying on the audio server MIDI Jar could better integrate with the underlying system.
Is there any interest in this?
The text was updated successfully, but these errors were encountered: