# Sending MIDI information to my DAW

**URL:** https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461
**Category:** Electronics (Arduino, etc.)
**Created:** [November 11, 2018, 11:42pm UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461 "2018-11-11T23:42:41Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![LordCacops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lordcacops/32/2280_2.png) [@LordCacops](https://discourse.processing.org/u/LordCacops)
#### Post date: [November 11, 2018, 11:42pm UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/1 "2018-11-11T23:42:41Z")

</div>

Hello!

I want to send data from my sketch into my DAW, more specifically, Logic Pro X, using the midiBus library, but I do not know how to access the appropriate midi channel to make this happen. When I create an Aggregate or Multi Output device in the Audio Midi Setup of my Mac, it is not recognized by the MidiBus().list function on processing. Does anybody with any experience on this can help? Has anybody successfully linked up Processing with Logic Pro X, or any other DAW for that matter (assuming that the general principles translate)?

Thank you.

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [November 12, 2018, 1:25am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/2 "2018-11-12T01:25:17Z")

</div>

Hi! Funny: a similar question from yesterday but for Linux:

> [@MIDI: from Processing to DAW (Linux)](https://discourse.processing.org/t/midi-from-processing-to-daw-linux/5411):
>
> 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] This is a screenshot of my current audio midi setup:

I link it here in case some of the tips are useful on Mac too.

---

<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 12, 2018, 9:22am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/3 "2018-11-12T09:22:56Z")

</div>

Similar, but the answer I gave was quite Linux specific (although JACK does have a Mac build)

@LordCacops firstly have you set up a MIDI loopback / virtual port? Eg. [http://www.johanlooijenga.com/tools/12-virtual-ports.html](http://www.johanlooijenga.com/tools/12-virtual-ports.html) Not quite sure from your post.

Secondly, you may like the other post be finding one of the limitations of JavaSound MIDI. It used to be very limited on Mac although has improved a bit. Because of that I know there are a few alternative JavaSound MIDI implementations around. I haven’t tried it but you could have a look at [https://github.com/DerekCook/CoreMidi4J](https://github.com/DerekCook/CoreMidi4J)

---

<div class="post-metadata">

### Author: ![LordCacops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lordcacops/32/2280_2.png) [@LordCacops](https://discourse.processing.org/u/LordCacops)
#### Post date: [November 14, 2018, 5:19pm UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/4 "2018-11-14T17:19:49Z")

</div>

Wow, this looks promising.

I created a virtual port. It was not detected by the “Basic” sketch among the MidiBus’ examples. I figured thats because of the limitations of JavaSound MIDI, so I installed the CoreMidi4J. For its installation it is needed that I place the .jar file on the class path of the project with which I want to use it. Im a total beginner so I don’t even know what a class path is, or for that matter where it is. And also, by the project do they mean the sketch from which I am trying to output the MIDI messages?

---

<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 14, 2018, 5:22pm UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/5 "2018-11-14T17:22:18Z")

</div>

As this is a plain Java library rather than a Processing specific one, possibly have a read of [https://github.com/processing/processing/wiki/How-to-Install-a-Contributed-Library](https://github.com/processing/processing/wiki/How-to-Install-a-Contributed-Library)

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 14, 2018, 5:39pm UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/6 "2018-11-14T17:39:26Z")

</div>

> [@LordCacops](#):
>
> For its installation it is needed that I place the .jar file on the class path of the project with which I want to use it.

> [@Including shared pde files across projects](https://discourse.processing.org/t/including-shared-pde-files-across-projects/1701/20):
>
> Not according to the article for installing libraries in Processing: no_entry[https://GitHub.com/processing/processing/wiki/How-to-Install-a-Contributed-Library](https://GitHub.com/processing/processing/wiki/How-to-Install-a-Contributed-Library) The top folder of a library must have the same name as the .jar file located inside a library’s library folder (minus the .jar extension): Therefore, we’re free to choose whatever name to the “.jar” file, as long as we use that same name for its top folder. face_with_monocle My “.jar” file was named as: “Palette.jar”. So in o…

---

<div class="post-metadata">

### Author: ![LordCacops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lordcacops/32/2280_2.png) [@LordCacops](https://discourse.processing.org/u/LordCacops)
#### Post date: [November 16, 2018, 1:45am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/7 "2018-11-16T01:45:13Z")

</div>

I placed the file on the libraries folder, with the library containing the .jar named like the .jar minus the extension. I tried to import it into the Basic.pde example of the MidiBus library. And yet, I cannot import the CoreMidi4J.

```auto
import themidibus.*; //Import the library
import coremidi4j.*;

```

the error message says: The import coremidi4j cannot be resolved

---

<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 16, 2018, 8:31am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/8 "2018-11-16T08:31:36Z")

</div>

That’s not what import actually does, and you shouldn’t need that line at all. Just having the jar there should _hopefully_ improve what MIDI devices are available.

---

<div class="post-metadata">

### Author: ![LordCacops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lordcacops/32/2280_2.png) [@LordCacops](https://discourse.processing.org/u/LordCacops)
#### Post date: [November 25, 2018, 2:01am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/9 "2018-11-25T02:01:08Z")

</div>

This comes out at the console:

Available MIDI Devices:  
----------Input----------  
[0] “Real Time Sequencer”  
----------Output----------  
[0] “Gervill”  
[1] “Real Time Sequencer”

The MidiBus Warning: No available input MIDI devices named: “IAC Driver To Logic” were found

I set the MIDI port as prescribed in this article:  
[http://www.johanlooijenga.com/tools/12-virtual-ports.html](http://www.johanlooijenga.com/tools/12-virtual-ports.html)

as you can see from the screenshot.

 ![18%20PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bf561ca02bbed19cb29b5aa9fa910229020a9b51.jpeg)

---

<div class="post-metadata">

### Author: ![LordCacops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lordcacops/32/2280_2.png) [@LordCacops](https://discourse.processing.org/u/LordCacops)
#### Post date: [November 25, 2018, 2:13am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/10 "2018-11-25T02:13:35Z")

</div>

I read in the aforementioned thread that is similar to this one (MIDI: from Processing to Daw (Linux)) about the implementation of JACK Audio Connection Kit. I believe you developed its MIDI implementation @neilcsmith. Could you tell me about this? Is this a library, or something that could be used in tandem with MidiBus?

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 25, 2018, 2:18am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/11 "2018-11-25T02:18:25Z")

</div>

> [@LordCacops](#):
>
> I believe you developed its MIDI implementation neilcsmith. Could you tell me about this?

if you want address a other user it helps to use @neilcsmith  
as this pops up in the Notifications

---

<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 25, 2018, 11:01am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/12 "2018-11-25T11:01:23Z")

</div>

I wrote the Java binding for JACK, not JACK itself, and a lot of the MIDI support in the bindings came from someone else - JACK’s primary use is routing real time audio across applications.

You can find an example of JACK MIDI-through in the JAudioLibs examples. It’s lowlevel stuff, but not that difficult. There is no JavaSound MIDI device implementation on top of it, although you could theoretically write one, so out of the box it won’t work with MidiBus.

---

<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 25, 2018, 11:05am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/13 "2018-11-25T11:05:56Z")

</div>

I’ve not used CoreMidi4j but from the readme, if you’re not seeing extra devices with the coremidi4j prefix then I don’t think you have it installed correctly. 😕

---

<div class="post-metadata">

### Author: ![rupert](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/rupert/32/4813_2.png) [@rupert](https://discourse.processing.org/u/rupert)
#### Post date: [April 25, 2019, 10:17am UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/14 "2019-04-25T10:17:04Z")

</div>

Sharing this in case it helps… I have midi messages being successfully sent from Processing to Logic Pro X, without needing to download any extra tools. Here’s the steps I followed:

1. Ran `MidiBus.list()` and confirmed that the standard default output devices [0] Gervill and [1] Real Time Sequencer were showing up in the console
2. Went to audio midi setup on my mac -\> Window -\> show MIDI studio
3. Clicked in to the IAC driver -\> ticked box for “Device is online”
4. Renamed the port to `Processing to DAW`
5. Ran `MidiBus.list()` again in Processing, and saw the new option `Processing to DAW` in the console

That was a good checkpoint, confirming that I had created a “virtual midi cable” to send midi messages between applications.

Then I verified that the midi messages were being received in my DAW:

1. Opened Logic Pro X and changed the graphical display to custom (top middle of screen -\> gear icon -\> custom)
2. Ran some sample code in Processing that sent a midi note and a control message regularly
3. Confirmed that the midi messages were popping up in the graphical display in Logic
4. Added a software instrument track and heard my midi note from Processing being played by the instrument (without needing to do any configuration)

---

<div class="post-metadata">

### Author: ![LordCacops](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lordcacops/32/2280_2.png) [@LordCacops](https://discourse.processing.org/u/LordCacops)
#### Post date: [August 4, 2019, 11:36pm UTC](https://discourse.processing.org/t/sending-midi-information-to-my-daw/5461/15 "2019-08-04T23:36:11Z")

</div>

Yes! Logic is now beeping alright. This was quite easy. I think what I was missing was ticking “Device is Online”. Thanks a bunch for the help!
