Hellos, I cannot seem to figure out if Midi can be utilized in Unity 3D. Every Google search I run into seems to lead me to a 2014 thread where it was going to possibly become a thing used in Unity. I realize that is 2014 and things may be different now. My main question or thing Im looking to do is pretty much control Midi ports(?) via Unity and script them to buttons. An example would be making a Midi controller (keyboard or synth) and use the Android option of linking USB via a Midi protocol to well, be a midi controller The Unity API website doesnt show or return any results when it comes to Midi in general. Can someone assist me with this?
Unity was all ready to add MIDI. If you notice in that thread a bunch of luddites who had no use for it in their non developing of games popped up just to nix it, the Unity tech dev disappeared and we are stuck with the results of some luddite whiners whose basic interface with Unity is to post to these forums all day.
Just like they're all ready to add new terrain and input systems? The thread in question was about gauging interest in it but realistically Unity takes forever to reach a release stage so even if they have a prototype it's likely stuck in development hell with the two previously mentioned systems. If you're looking to use a physical midi device, you might have luck with this asset, but I haven't tried it myself. https://www.assetstore.unity3d.com/en/#!/content/85256
Bought the asset for version 4.x and the dev was extremely unhelpful and there was no documentation. It is basically a wrap of the open source MIDI libraries out there.
Lol thanks guys , yes that was the thread I kinda was a bit 'wow' with looking at all the comments. Unity can be used for apps, I understand its a game engine but I guess creativity can cause something it wasnt 'intended' for to be used in other designs. However I was looking for the reverse of what you said Ryiah. In a nutshell (ll figure out the rest) I want to do something like this. https://play.google.com/store/apps/details?id=com.mobileer.midikeyboard&hl=en Only with a rearrangement of buttons, I know this wasnt done in unity and was done in Java (according to his github), but curious no less. Bascailly a Usb Midi controller on the Android that can send midi commands to windows where I go from there. Overall a function or set , heck even a call method to route a clicked button into midi outputs to a PC. If not any idea where I can start?
I know for sure keijiro has done midi handling stuff with unity before somewhere in his gold mine of awesome mini projects he does with the engine.
I like Keijiros stuff and use their midi things all the time ( eg https://github.com/keijiro/MidiJack ) . But they are only for midi-in, and not for android, so they wont meet KliveOne's requirements.
I used this asset and I did get it working ok but didnt like the documentation/translation issues and I totally stopped using it due to their paid upgrade strategy when it came to supporting newer unity versions etc. However if I really needed midi out, and platform support such as Android, and quickly, then I probably wouldnt hesitate to use it again.
Well, the primary issue with Midi support is it's dependence on hardware for actual audio rendering. The hardware you use to play Midi files directly affects how those midi files will sound. It is entirely possible to improve the audio playback of midi files by acquiring better, more expensive playback tech, like more advanced audio cards. This specific hardware support makes the format a little less useful for a platform-agnostic game engine. For somewhat similar features, I recommend looking into Mod-Trackers, which are currently supported by Unity's audio system. Sadly, they are a bit less useful when it comes to dynamic music. But for music composed beforehand they should provide you with a bit more of the midi-style feature set, with much smaller file sizes and the possibility for much longer tracks.
I'm pretty sure the OP is talking about MIDI as a digital interface, not as an audio playback system.
Yes what Murgilod said. Im not trying to render any audio whatsoever. I simply had the idea when I saw the app created to use a similair setup to utilize what was 'heard' in windows. I was playing around even more and found a program that does pretty much what I was assuming. Called "HID Macros" This is literally what im trying to accomplish. To 'hear/listen' the Midi outputs from an android app into this program, which did hear them and I was able to (in this case) route a button push on the app to a windows key. IE: Push app button > press enter in pc. Love the idea and wanted to try my hand at creating a mini personal ap that controlls various things I do on the pc. Say push app button > open program , etc. The ideas can go wild with it. Just wanted to tinker around Because sadly seems doing this without (at least midi) i need a 'rooted' android and this app,program combo does it without the need to root
Unless you eventually plan to hook up an actual hardware MIDI device (eg a keyboard), you'll have a much easier time with some form of networking (eg Unity's LLAPI). You basically would have a program running on the PC waiting for commands from another program that runs off the Android device. https://docs.unity3d.com/Manual/UNetUsingTransport.html http://www.robotmonkeybrain.com/good-enough-guide-to-unitys-unet-transport-layer-llapi/
I think you'll need to write a wrapper for native midi interface, which will be different for each platform (and some platforms won't have it). For example, here's a stackoverflow thread for interfacing with MIDI in C#: https://stackoverflow.com/questions/1991159/getting-signals-from-a-midi-port-in-c-sharp However, tha'ts for windows platform. For android there are those pages: https://source.android.com/devices/audio/midi https://www.midi.org/articles/android-midi-in-marshmallow Apparently it may be tricky, because in some circumstances it needs to be enabled at kernel level. Overall, it looks like thsi is the situation which will require you to write your own native plugin - with version fo every platform.
Just stumbled upon this wrapper. Supports standalones (Windows, macOS, Linux) as well as mobile (Android, iOS, UWP) but they do mention that some of them (macOS, iOS, UWP) have yet to be tested. Fortunately none of those are needed. https://github.com/atsushieno/managed-midi
I'm going to try this library in a while, I will report back on this thread if I have any luck. I am targeting Windows and Android for this.
Any luck? I've been using midi-dot-net for Windows Midi Out until now. But with 2019.1 deprecating .Net 3.5, that's not an option anymore. Very much interested in alternatives.
Ah Midi, the good old days, my friends was on FM synthesizer cards like Adlib and Soundblaster and I had a Roland
I don't think this is how scripting api deprecation works. .Net 4x is backward compatible for the most of the part. I doubt you'll run into issues with that. If you do, its an open source project. Just open the lib and fix the issues that would come along.
As far as I understand it's only the "old days" for consumer-oriented audio playback. I believe that as an interface protocol it's still used quite a bit in professional scenarios.
Yepp, it can also be used for gaming. My software Freepie has midisupport and I know its used to control games
Hi KliveOne, did you resolve your issue. I'm having the same problem. When I'm using Unity Remote on my cell phone I can use it to send midi but when I'm building the app and then the app is on my cell and not my computer, I don't how to send midi message . I basically want to do the same thing as you ^^
I used Touch OSC on an iPad to control derivative Touch Designer on a PC successfully. You might check out this link: https://hexler.net/products/touchosc Hope this helps.
Hi, Wondering if there have been any updates on this? I would like to be able to interact with MIDI devices and handle MIDI input events in Unity on the iOS platform. Does anyone have experience with this?
Is there any good Midi asset you could recommend , which works out of the box ( no .dll issues, no installation problems ) and it should deliver the incoming midi messages of all kinds and also be able to send them to existing ports. ? And of course cross platform support, at least OSX, Windows and iOS.