Problem with MIDI Interface

For the Roland I have not installed any drivers because for linux not avaiable. But plugged in and working out of the box with no problems. Psound Midi was my first try from yesterday evening and after the problems I connected today the Roland and everything is working fine. Maybe something stucks inside the driver of pisound smmall buffer or overflow or whatever. So there are going a lot of Sysex data between Nord Modular G1 and the Computer.

The Nord has 2 Midi ins and outs. One is just only for the Editor (Computer) because a lot of data is sended and received and the other in/out is the normal every other Synth has for Midi on off, velocity, midi volume…

Lets give a break to the discussion and sleep one night and have a beer or whatever. The problem has not to be solved next 10 minutes. But when the people are buying this Lithuanian Audio Midi Army Knife it should work also in extreme conditions.

Looks like there is an issue with sending high amount of data to the MIDI OUT port, we’ll get that fixed. :wink:

Hey, a quick progress update - we have made a fix for the MIDI in the kernel module, it’s already merged to Raspberry Pi’s Linux tree, but we still have to wait a bit until a new minor kernel version gets released by RPi developers. After it is out, we’ll post the instructions to get the update.

2 Likes

The new kernel version got released, the fix for MIDI is available since version 4.9.67.

@Ziggy, please run sudo rpi-update, reboot and try the Nord modular editor again, let us know how it goes.

You can check your kernel version by running uname -a.

Running perfect and everything is ok now. Only problem for me is this “ulimit -c unlimited” -enable core dumping- when starting java.
What about putting this into an autofunction or the carddriver as default? Does it do any problems to other processes when running different software without java? Sorry I`m new to all this Linux stuff.

1 Like

Hi, where did you get this command from? It seems related to ‘core dumps’ which are useful only for developers or creating bug reports… Are you sure it’s necessary for you? :slight_smile:

A post was split to a new topic: Pure Data MIDI ports issue

Hello I am getting the same error with the same issue as the head of this topic I am using the PatchBox OS used for ORAC. Additionally I have installed the latest version of JAVA. Everything looks like is installed correctly but am constantly getting a similar error with all versions of NOMAD. as well as executing file under sudo and root. I have tried several midi interfaces including the PISound din interface but to no avail I am getting a similar java error message at the head of this topic using the same JAVA application NOMAD used for the Nord Modular synth. I have ruled out the synth and interface being the issue by trying on a Nord Micro Modular, and Nord Modular Keyboard. The error is referencing device is busy or not available.

Hi, you may have to first stop the Jack background service to free up the audio card for use by Nomad or other software which wants exclusive access to audio I/O, this depends on the way the application itself is implemented.

Jack can be stopped by closing all audio applications and executing:

sudo systemctl stop jack

and confirmed by:

sudo systemctl status jack

Then try reconfiguring Nomad to use the MIDI ports you want and running it.

I did the above commands for starting and stopping jack but to no avail I still get the same error :confused:unfortunately
Here is a screenshot and the exact error message I am getting in Nord Modular Nomad. Thank you for the reply I hope you can help me. Originally it worked under Resbian straight from desktop no problem. I even got it to work with exagear desktop along with original Nord editor. But since Patchbox it hasn’t worked.


`

`

net.sf.nmedit.jsynth.SynthException: javax.sound.midi.MidiUnavailableException:
Device or resource busy
at
net.sf.nmedit.jsynth.clavia.nordmodular.NordModular.connect(NordModular.java:324
)
at
net.sf.nmedit.jsynth.clavia.nordmodular.NordModular.setConnected(NordModular.jav
a:881)
at
net.sf.nmedit.jsynth.nomad.forms.SynthObjectForm.trySetConnectedState(SynthObjec
tForm.java:958)
at
net.sf.nmedit.jsynth.nomad.forms.SynthObjectForm$1$1.run(SynthObjectForm.java:59
9)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Pr
otectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205
)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105
)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: javax.sound.midi.MidiUnavailableException: Device or resource busy
at com.sun.media.sound.MidiInDevice.nOpen(Native Method)
at com.sun.media.sound.MidiInDevice.implOpen(MidiInDevice.java:59)
at
com.sun.media.sound.AbstractMidiDevice.doOpen(AbstractMidiDevice.java:154)
at
com.sun.media.sound.AbstractMidiDevice.open(AbstractMidiDevice.java:118)
at net.sf.nmedit.jnmprotocol2.MidiDriver.connect(MidiDriver.java:79)
at
net.sf.nmedit.jsynth.clavia.nordmodular.NordModular.connect(NordModular.java:320
)
… 17 more

Looks like this error is produced whenever an ALSA sequencer MIDI connection is active on the selected MIDI input or output ports. These connections are set up automatically by amidiauto, so it has to be disabled too, and all sequencer connections disconnected. So to get Nomad working, you have to first run:

sudo systemctl stop jack
sudo systemctl stop amidiauto
aconnect -x

then Nomad and possibly other software you’ve listed will work.

This has to be done, because Nomad wants to have exclusive access to the MIDI ports, probably using ALSA rawmidi API, most other software uses alsaseq APIs and they can share the MIDI ports in a nicer way.

Just in case, the JRE I installed was oracle-java8-jdk.

awesome :pray: thanks I’m going to try tonight to see if it works :grinning: thanks for getting back to me.
:pray::grinning::smiley::face_with_monocle:Paul

Here is the new error message I’m getting and is closer to the error at the beginning of this topic.

net.sf.nmedit.jsynth.SynthException: net.sf.nmedit.jnmprotocol2.MidiException: timeout: 10000ms (net.sf.nmedit.jnmprotocol2.SynthSettingsMessage) [error=-1001]
at net.sf.nmedit.jsynth.clavia.nordmodular.NordModular.connect(NordModular.java:411)
at net.sf.nmedit.jsynth.clavia.nordmodular.NordModular.setConnected(NordModular.java:881)
at net.sf.nmedit.jsynth.nomad.forms.SynthObjectForm.trySetConnectedState(SynthObjectForm.java:958)
at net.sf.nmedit.jsynth.nomad.forms.SynthObjectForm$1$1.run(SynthObjectForm.java:599)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: net.sf.nmedit.jnmprotocol2.MidiException: timeout: 10000ms (net.sf.nmedit.jnmprotocol2.SynthSettingsMessage) [error=-1001]
at net.sf.nmedit.jnmprotocol2.NmMessageAcceptor.waitForReply(NmMessageAcceptor.java:111)
at net.sf.nmedit.jsynth.clavia.nordmodular.NordModular.connect(NordModular.java:400)
… 17 more

Thank you for the help, hopefully we can get this resolved.
:pray::pray:Thank you,
Paul

Hey, previously this error was caused by an issue in Pisound’s MIDI driver, and it was fixed. I have just re-verified if the issue didn’t regress on the kernel version that’s shipped with the Patchbox OS image (Linux patchbox 4.14.91-rt49-v7+ #1 SMP PREEMPT RT Tue Feb 19 15:51:26 EET 2019 armv7l GNU/Linux), and everything is OK.

What is the output of uname -a on your system?

This error basically means that communication establishment with Nord Modular via the MIDI ports did not succeed, most likely it either received no response, or the response was incorrect. In that case you should check whether the MIDI cables are connected the right way round (sometimes I connect IN to IN and OUT to OUT by mistake :slight_smile: ) and whether the cables are not faulty themselves.

Do Pisound’s MIDI activity LEDs indicate activity in both directions when establishing connection?

If you think everything is right from physical connections point, and the software configuration, I’d be useful if you could check again with Raspbian OS image whether this software still works OK, then we can try and dissect what’s the difference between the OS that causes this not to work.

Unfortunately I don’t have the Nord hardware to test this out myself, so your input is necessary to move forward. :slight_smile:

I think I might have missed something. Do I have to startup jack and MIDI after Nomad is configured? For example when the below item is executed. If so do I start it or stop it when the software is still open?

    sudo systemctl stop jack
sudo systemctl stop amidiauto
aconnect -x

You have to keep jack and amidiauto stopped while using Nomad, so they don’t attempt to access the MIDI ports you’re using with Nomad. Once you are done with Nomad, you may start the services back up again for use with other audio software.

Ok I’m doing it correctly, just wanted to make sure/verify that it wasn’t something else I was doing wrong.