eclab / edisyn

Synthesizer Patch Editor
Apache License 2.0
546 stars 51 forks source link

Cannot connect to MIDI Devices in Linux with Jack #33

Closed kxkxkxnz closed 3 years ago

kxkxkxnz commented 3 years ago

Greetings - thank you for your amazing work on this project. It looks like exactly what I need in order to make proper use of my Wavestation SR, which has sat unused for years due to its tedious interface.

I'm experiencing an issue where when I select the MIDI device to use, Edisyn returns the error "an error occurred while connecting to the incoming MIDI device", which is written as "javax.sound.midi.MidiUnavailableException: Device or resource busy" in the terminal. I tried the built-in device on my PCIe card (RME Raydat), and USB MIDI interface (M-Audio MIDISport 8x8) with the same results.

I'm running Ubuntu Studio 19.10, with Reaper, and Jack. My guess is that the JavaVM is attempting to directly access the OS-level MIDI ports, rather than accessing them via Jack like essentially all other Linux Audio/MIDI software does. Unfortunately I can't just 'not use Jack' as my whole studio is essentially wired around it.

Is there a workaround or fix possible for this?

Thanks again, Jason

eclab commented 3 years ago

I am not an expert in Jack, but it's true that Edisyn doesn't use any Jack specific libraries, but simply uses Java MIDI. I consulted someone more knowledgeable than myself, and he said: "He can try turning off the automatic alsa-midi jack bridge and seeing if he can run it manually on the selected devices he doesn't want edisyn using. That way he could still use jack for everything except the synth that edisyn is configuring. The real fix is to enable jack on Linux builds of edisyn like I've mentioned before but that's work."

kxkxkxnz commented 3 years ago

Thank you so much for your effort in finding info about this. Unfortunately I don't think the 'turning off the alsa-midi jack bridge' workaround will work for me, as the Wavestation SR is part of a daisy-chain of MIDI devices all using a single port on the interface. So it'd be impossible to only target the Wavestation without disabling jack connectivity to all of the other devices in the chain.

It sounds like I'll have to wait for a time that someone more capable than I is able to implement the 'real fix' mentioned. Maybe one day I'll have the time and ability to give it a go myself!

Thanks again.