New MIDI Nodes: awgrover/midi

@dox and I created a few MIDI nodes. Use “Add Library” to get them: awgrover/midi

We’d love to see them used, get feedback, and fix any problems. They’ve only been tested lightly.

Right now, you are limited to the default MIDI serial port (Serial on most Arduino’s, Serial1 on Leonardo, Due). I’m not sure how to expose multiple serial-ports. Also, I’m pretty sure “thru” doesn’t work.

  • note starts and stops
  • control-change
  • program-change
  • bank-program-change, aka “bank-select”
  • note-button press starts, release stops

I have the code up on You can give feedback there, or here.


Hello awgrover!

After updating to 0.17.1 and updating Arduino IDE to 1.8.5 I tried to test your new MIDI-nodes.

Forty Seven Effects Library is installed via Sketch Menu --> Add Library

arduino ide

Folder is copied to XOD library folder:

kopie lib

New awgrover/midi nodes are installed.

But I got only error messages during uploading:

Unfortunately I can not copy the whole text so I made a screenshot.

Any idea what’s going wrong?

That’s because a dot terminating pin label No.. Pin labels are not escaped anyhow currently. So, I suggest to rename No.No


I tried to rename the node pin but this will not fix the problem:

Also after changing the note node:

thx for this one … !!!

control-change has in the line 37-39 (inside the node) old, not declared variables (just naming syntax) , the compiler goes wild at this point ::

37: auto channel = getValue<input_channel>(ctx); /// should be:: input_Ch
38: auto controller_number = getValue<input_controller_number>(ctx); // should be :: input_CC
39: auto control_value = getValue<input_control_value>(ctx); //// should be :: input_Val

and the debug section is recomend to comment out , it gives lot of data in the midi channel…

i edited the nodes code for myself , but you could update this one globally.

THX !!

1 Like

I finally repaired this. It was pure sloppiness on my part. It compiles now. I would appreciate feedback on whether it actually works.

awgrover/midi v1.3.2

I added a link to the installation steps, which are a bit of a pain.

Again, I was sloppy. Fixed. v1.3.3. @microsoundfield, thanks for catching that.

How do you actually hook the arduino up with a daw? I i make a midicontroller usign your nodes, hwo do i get the DAW to reckognise the arduino as a midi device etc?

Hello awgrover,

Happy new year to you and thanks for your work.
In your XOD midi library, I can’t see any way to read input midi data so I tried to create a XOD midi read node (based on the Midi.h library) but I didn’t succeed yet. It seems that Callbacks are not handled correctly by XOD. May be you had the same issue one year ago.
But may be one year later, you have new ideas to manage a midi read node for XOD. It would be really cool !! Please let me know if you have a trick to do that !!

Thanks !

It’s been a while since I worked on the midi-library. I don’t remember why I didn’t do a read node.

I haven’t tried to deal with callbacks in XOD yet. @bradzilla84 is thinking about them for the Picaso-Serial-Arduino-Library. Contact him and see what he has thought of.

I think it might be safe to have the callback cause a pulse to be emitted: as if the read node did it. Possibly including the callback function with the read function’s .cpp would give you lexical access to the correct ctx. Setting a flag and then polling for it on “every clock pulse” is another possibility. I’d be curious about @bradzilla84’s thoughts.

If you want to add to the library, I’m very glad to have you do so. Looks like the library is currently in, I’d be happy to break it out into a separate repository so you could fork/collaborate/etc.

Hello awgrover,

I realize that I didn’t thank you for your answer. Sorry for that. Must be the XOD fever :wink:

I worked on the MIDI library and I just posted this :

I will be happy to have your feedback on this and how to improve it.

I’m also working on a more complex MIDI library in order to handle multiple MIDI IN and OUT ports and stuff like merging, splitting, morphing MIDI data.


Please take whatever is useful from my library. I made the library for someone else, so the library is not based on my own use/experience. If you think you’ve covered the functionality, I can mark my library deprecated and refer them to yours.

1 Like


Thanks for your reply and for your state of mind. It’s great to see people like you !
I think my library covers the basic functionalities. I use it almost every day. I think it’s pretty much stable but may be it needs to be tested a little more (with other boards for exemple).