New MIDI Nodes: awgrover/midi


#1

@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 https://github.com/awgrover/xod_lib. You can give feedback there, or here.


#2

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?


#3

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


#4

@nkrkv:

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

Also after changing the note node:


#5

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 !!


#6

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.


#7

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


#8

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?
Thanks:)


#9

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 !


#10

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 https://github.com/awgrover/xod_lib, I’d be happy to break it out into a separate repository so you could fork/collaborate/etc.