# MIDI: from Processing to DAW (Linux)

**URL:** <https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [November 10, 2018, 8:17pm UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411 "2018-11-10T20:17:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![moscardo](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/moscardo/32/1742_2.png) [@moscardo](https://discourse.processing.org/u/moscardo)\
**Post date:** [November 10, 2018, 8:17pm UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411/1 "2018-11-10T20:17:33Z")

</div>

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](http://www.smallbutdigital.com/projects/themidibus/) 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](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c3ff5b946c616f188470a8f2a54495eb3b22f30a.png)

This is a screenshot of my current audio midi setup:

 ![processing_midi_2](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4a2a851f7d7df572df5936f8ac6977a309158711.png)

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!

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [November 10, 2018, 9:59pm UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411/2 "2018-11-10T21:59:09Z")

</div>

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

> **[jaudiolibs/jnajack](https://github.com/jaudiolibs/jnajack)**
>
> Java bindings to JACK Audio Connection Kit. Contribute to jaudiolibs/jnajack development by creating an account on GitHub.

> <https://github.com/jaudiolibs/examples/blob/master/src/main/java/org/jaudiolibs/examples/MidiThru.java>

---

<div class="post-metadata">

**Author:** ![mark\_orion](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mark_orion/32/7180_2.png) [@mark\_orion](https://discourse.processing.org/u/mark_orion)\
**Post date:** [November 14, 2019, 6:01pm UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411/3 "2019-11-14T18:01:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mark\_orion](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mark_orion/32/7180_2.png) [@mark\_orion](https://discourse.processing.org/u/mark_orion)\
**Post date:** [November 19, 2019, 1:03pm UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411/4 "2019-11-19T13:03:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [December 8, 2019, 10:44am UTC](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411/5 "2019-12-08T10:44:32Z")

</div>

> [@mark\_orion](#):
>
> To answer my own post here:  
> The solution was to load the snd-virmidi module

Which was the previous answer! 😄
