rtMidi is "A set of C++ classes that provide a common API for realtime MIDI input/output across Linux (ALSA & JACK), Macintosh OS X (CoreMIDI) and Windows (Multimedia)". [https://github.com/thestk/rtmidi] The library amounts to 2 header files and a cpp file. I would like to implement rtMidi as a plugin in Unity, but I have no idea where to begin. My first question would be whether it is necessary to compile any of the given rtMidi code? Or can I just import the c++ files and access what I need in c# as is? Thanks!
True, but that cpp file is almost 3000 lines long. Ouch. There is good documentation on this topic: http://docs.unity3d.com/Manual/Plugins.html Have you tried following that? Is there a particular step you are stuck on? rtMidi will need to be compiled first. Then you will reference the assembly from C# using interop services. Microsoft has some more documentation on interop here: https://msdn.microsoft.com/en-us/library/sd10k43k(v=vs.90).aspx
hello did you succeed to use RtMidi with unity ? I'll certainly use a midi device for a forthcoming project ... And if no one has done it I'll certainly make my own integration for win32 and osx (and share it).
Has anyone had any further luck with this? I have been using keijiro's minis within a unity project no issues however I want the quest to recognise midi / a midi keyboard when plugged in directly. I notice rtmidi is now meant to be android compatible, so is this the best solution or is there another? if it is how best to integrate this into a unity project for a relative novice? thanks in advance!