Get a Guitar working with Unity

Hey guys :slight_smile:

I am working on a university project atm. Actually I’m not quite the scripter, but I got along with it - til now.
I have something, I couldn’t find out myself at the moment:
I want to connect a electric guitar to my pc for use in unity. I connect the guitar via a separate “pedal” that sends midi data per usb to the pc. At the moment I managed to find a workaround myself with glovepie, but it’s not working exactly as I want. Also using only unity without a third party program for the project would be a benefit.
So I found out that you can access midi data throught .net - but how do I actually get that information in unity? I couldn’t find a fitting answer on the net… Also is it true you can only work with that using C#? Because I only learned Java Script. However, I’m willing to look into C# if it’s the only way to do it.

Thank you in advance
Ixo

You’ll probably have to use C# to use .NET specific features AFAIK.
If you need to get started look up Catlike Coding, they have some pretty neat tutorials on C# and Unity Unity C# and Shader Tutorials

Thanks for your answer, I’ll look at this.
Anyone who has already done something like this before?

If you want to spend some money to save some time, there is a product in the asset store which can handle midi in and much more.

It works with Playmaker too. I notice that the current version says it needs unity 4 to work but I’ve been using bits of it with Unity 3.5 without any obvious problems. Requires Unity Pro though.

thanky you, I already found this one. But as the plugin is only working for the pro version it doesn’t fit my purpose (university project, so I only have access to free version)…

OK, just thought Id mention it in case you hadn’t seen it. Looks like it doesn’t work on Unity 3.5 anymore either, not sure why it still worked for me the other day, perhaps they just updated it again since.

Are you on windows or mac? Its possible I may have cause to write my own midi in stuff in he coming months, for windows, and I suppose I’ll try to make it work on the non-Pro Unity if I do. No promises though.

Working on Windows. I don’t know if it’s not to late in a few months but however please tell me anyways :slight_smile:

Well while you are waiting you could cheat by using an additional app that turns incoming midi into keypresses. It has several limitations compared to doing it properly but it may be enough to get you started.

eg MIDI Translator Classic – Bome Software

thanks for that. That’s actually indeed my workaround at the moment for that :slight_smile: Doing it with glovePie though.