MIDI: from Processing to DAW (Linux)

Hi everybody,

I’ve created a MIDI control GUI in Processing that I would have liked to link to Reaper to control some automation by sending MIDI CCs (using the MidiBus library).
Unfortunately, different from what I expected, I’m unable to exchange MIDI messages between the GUI and the DAW.

I’m using Jack and a2jmidid.
This is a screenshot of the following processing code line myBus = new MidiBus(this, 1, 2);:

processing_midi

This is a screenshot of my current audio midi setup:

Is there a way to show up the “Java midi output” in Patchage (don’t know another way to explain it)?
How can I make my MIDI messages from Processing being sent to my DAW?

thank you very much for your support!

Unfortunately, JavaSound on Linux only supports hardware interfaces. I haven’t done this for a while, but you’ll probably have to look into the snd-virmidi module to create virtual hardware ports.

Another option would be to send MIDI directly through JACK using JNAJack, rather than MidiBus - see

Is there any example Processing sketch available that implements MIDI so that it works with the ALSA MIDI implementation on Linux ?
I am having the same problem as described here - ALSA MIDI not showing up in Midibus and vice versa.

1 Like

To answer my own post here:
The solution was to load the snd-virmidi module that creates virtual raw midi interfaces that can be reached by both Java MIDI (Processing) and the ALSA sequencer MIDI implementation. The default module configuration creates a whole lot of virtual MIDI devices. Create a file /etc/modprobe.d/snd-virmidi.conf containing the following single line of text to configure this:
options snd-virmidi midi_devs=2

2 Likes

Which was the previous answer! :smile: