# No MIDI library for Processing 3?

**URL:** https://discourse.processing.org/t/no-midi-library-for-processing-3/6079
**Category:** Libraries
**Created:** [November 29, 2018, 7:20pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079 "2018-11-29T19:20:23Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![robduarte](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/robduarte/32/2570_2.png) [@robduarte](https://discourse.processing.org/u/robduarte)
#### Post date: [November 29, 2018, 7:20pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/1 "2018-11-29T19:20:23Z")

</div>

It’s been a while since I’ve used Processing. I’m looking in the library manager and on the libraries listing on [processing.org](http://processing.org) and I’m not seeing any MIDI library. Is there no supported way of sending/receiving MIDI anymore?

Thanks,  
Rob

---

<div class="post-metadata">

### Author: ![Jumbo](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Jumbo](https://discourse.processing.org/u/Jumbo)
#### Post date: [November 29, 2018, 7:29pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/2 "2018-11-29T19:29:20Z")

</div>

Minim library works with midi sounds

---

<div class="post-metadata">

### Author: ![robduarte](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/robduarte/32/2570_2.png) [@robduarte](https://discourse.processing.org/u/robduarte)
#### Post date: [November 29, 2018, 8:22pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/3 "2018-11-29T20:22:38Z")

</div>

I’m not trying to play MIDI files (which is what I think you’re referring to). I’m looking to send MIDI messages (note messages or CC messages) that can be received by some audio software. Or receive MIDI note messages from a hardware MIDI controller, for example, and have Processing synthesize sounds. In technical terms, I want my processing sketch to act as a MIDI controller or a MIDI synthesizer.

---

<div class="post-metadata">

### Author: ![Jumbo](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Jumbo](https://discourse.processing.org/u/Jumbo)
#### Post date: [December 1, 2018, 4:19pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/4 "2018-12-01T16:19:28Z")

</div>

TheMIDIbus library???

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [December 3, 2018, 7:58pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/5 "2018-12-03T19:58:49Z")

</div>

For reference: The MIDIbus is in Contributions Manager – and also available via GitHub for non-PDE projects.

[http://www.smallbutdigital.com/projects/themidibus/](http://www.smallbutdigital.com/projects/themidibus/)

> **[sparks/themidibus](https://github.com/sparks/themidibus)**
>
> A simple MIDI Library for Processing. Contribute to sparks/themidibus development by creating an account on GitHub.

Minim methods that send or receive MIDI messages are generally focused on MIDI \<–\> frequency conversion, but in case it is relevant see specifically:

- [http://code.compartmental.net/minim/midi2hz\_class\_midi2hz.html](http://code.compartmental.net/minim/midi2hz_class_midi2hz.html)
- [http://code.compartmental.net/minim/frequency\_class\_frequency.html](http://code.compartmental.net/minim/frequency_class_frequency.html)

The oscp5 library can also pass handle MIDI notes as a data type – although they are wrapped in OSC packets.

> **[sojamo/oscp5](https://github.com/sojamo/oscp5/search?q=midi&unscoped_q=midi)**
>
> An Open Sound Control (OSC) implementation for Java and Processing - sojamo/oscp5

---

<div class="post-metadata">

### Author: ![robduarte](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/robduarte/32/2570_2.png) [@robduarte](https://discourse.processing.org/u/robduarte)
#### Post date: [December 4, 2018, 2:44am UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/6 "2018-12-04T02:44:49Z")

</div>

Why am I not seeing theMIDIBus when I filter for “midi” in Contributions Manager? That’s where my question started I guess.

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [December 4, 2018, 3:42am UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/7 "2018-12-04T03:42:44Z")

</div>

Strange. I am seeing it here:

 ![56%20PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e8cc02c53b1d3088f334f10e4b9ed7c1efb73bef.png)

---

<div class="post-metadata">

### Author: ![robduarte](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/robduarte/32/2570_2.png) [@robduarte](https://discourse.processing.org/u/robduarte)
#### Post date: [December 4, 2018, 4:33am UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/8 "2018-12-04T04:33:09Z")

</div>

Maybe it’s because the computers I’ve just installed on are Windows? I get the same results as you, without themidibus.

---

<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: [December 4, 2018, 4:57am UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/9 "2018-12-04T04:57:43Z")

</div>

same here:  
win 7  
processing 3.4 java mode

 ![snap-021](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e24ff2cedaeabc310a3b064690de5cdbb13ed2c1.png)

> <https://github.com/sparks/themidibus/blob/master/README.md>

  
there i not see any limitations or prerequisites

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [December 4, 2018, 2:48pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/10 "2018-12-04T14:48:21Z")

</div>

Not sure. I don’t see anything limiting the OS in the properties file that is used by Contributions Manager:

> <https://github.com/sparks/themidibus/blob/master/library.properties>

…although that file is from 2015, maybe a setting was added in 3.x that is missing?

Ah: When I uninstall TheMIDIbus it is no longer available for reinstall – I have to re-add it manually from the github download. Then it reappears in contributions manager.

Submitted an issue:

> <https://github.com/sparks/themidibus/issues/22>

…although I’m not sure the library is actively maintained anymore.

---

<div class="post-metadata">

### Author: ![Tanghe](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Tanghe](https://discourse.processing.org/u/Tanghe)
#### Post date: [September 29, 2020, 4:16pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/11 "2020-09-29T16:16:51Z")

</div>

Since it has been 3 years since the last update to TheMIDIbus does it still work ?

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [September 29, 2020, 5:13pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/12 "2020-09-29T17:13:10Z")

</div>

It is available in PDE Contributions Manager and is working fine on my machine.

---

<div class="post-metadata">

### Author: ![borjonx](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@borjonx](https://discourse.processing.org/u/borjonx)
#### Post date: [June 9, 2021, 5:16am UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/13 "2021-06-09T05:16:35Z")

</div>

It does still work on my Macs, but unfortunately Ableton Live stops working with the sent MIDI messages after 5 or 6 hours of continuous use. There are threads about MIDI timestamps & using MMJ lib to get around this, but those are several years old. Does theMidiBus work for you on permanent installations or all day events?

Stopping/starting Processing and/or Ableton Live does not work, nor does taking the IAC bus offline/online.

Are there simple alternatives to theMidiBus? It is SOOOOO simple to use, to control Ableton Live.

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [August 19, 2021, 11:04pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/14 "2021-08-19T23:04:06Z")

</div>

> [@borjonx](#):
>
> stops working with the sent MIDI messages after 5 or 6 hours of continuous use

That’s really odd.

> [@borjonx](#):
>
> There are threads about MIDI timestamps & using MMJ lib to get around this

@borjonx, thanks – could you point to these threads? I’m not able to find them on the forum or Google search.

Hope you were able to resolve your problems.

---

<div class="post-metadata">

### Author: ![robertesler](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@robertesler](https://discourse.processing.org/u/robertesler)
#### Post date: [August 20, 2021, 7:28pm UTC](https://discourse.processing.org/t/no-midi-library-for-processing-3/6079/15 "2021-08-20T19:28:54Z")

</div>

Hi @borjonx. Since I missed this thread a few months ago I thought I’d comment on my experience with MIDI and Java/Processing. I have always just relied on the javax.sound.midi package. It’s not terribly difficult to use and adapt. I have an example here: [Pd4P3/examples/MIDI/MIDI\_Example at main](https://github.com/robertesler/Pd4P3/tree/main/examples/MIDI/MIDI_Example)  
I just adapted Phil Burk’s code: [jsyn/src/main/java/com/jsyn/midi](https://github.com/philburk/jsyn/tree/master/src/main/java/com/jsyn/midi)  
The MidiBus developers note that Apple has a few issues: [The MidiBus - Small but Digital](http://www.smallbutdigital.com/projects/themidibus/) at the end they mention using MMJ to deal with Apple not supporting SysEx messages, but overall MidiBus looks like it is just wrapping the javax.sound.midi pacakge.  
However, I’ve never relied on MIDI as a protocol in any circumstance over long periods of time. I usually fallback to OSC or serial/network I/O for that kind of robust performance. I’ve successfully used OSC to stream data for days without error.  
Anyway, I’m happy to help with the javax.sound.midi package if anyone needs it.
