Download

Need support for Midi Device Plugin in UE4.14

Dear friends,

Unreal Engine 4.14 now supports MIDI interface. I`m sound designer and wish to prepare some midi visualisation tool with Unreal Engine (like what aleady have on the industry, but with power of Unreal Engine). I was try the Procedural Midi Plugin. This stuffs is amaizing but as I understand works only with Midi files. I have no skills in visual programming in Unreal and hope to find someone who can help me to prepare this tool based on MIDI DEVICE PLUGIN.

46afcbb32bdcbade470520f5520e9dd9a79f8bb8.png

Thank you,
Andrey

I didn’t tried this plugin yet, but there is actually another midi plugin on the marketplace Procedural Midi in Code Plugins - UE Marketplace . We did a little game for the last jam using it (well, we had to modify the plugin to have access to the array of notes in the blueprint and to fix some other little errors). It uses midi file to generate the level. November #ue4jam Submission Thread - Events - Unreal Engine Forums

Thank you, scha for your answer. I was try yesterday to see Procedural Midi plugin. Its works well with midi file, but as I understand cant works with live playing (Enabled Midi Thru). I will check link that you share. I thing it will interesting to visualise midi events from drums and keyboards, as example… but have no experience how to prepare it, so need some help. :wink:

I cannot really test that because I dont have any midi device. Is there a way to simulate one on windows? Like with a computer keyboard for example?

Yes, its possible with Bomes Midi Translator Classic. You can assign Keys and Keystrokes there but its not the aim that I need to reach. For Virtual Midi Device you can use TouchOSC. I will show it later. Here is a screenshots of this software. I hope its possible to prepare something like Virtual Concert Stage Set that interacts with musician that playing real time at midi drums or other instrument. UE4 not need to generate sounds. Its need only for visualising events from midi device. It will be awesome if you will have virtual environment that can be helpful for learning, testing and updating your perfomance and musician skills there. I actually have several inputs here and wish to assign it in Midi Device Plugin and cant found it right in “Find Midi Devices” function. Maybe I do something wrong, I don`t know. I need some help to prepare UE4 plugin see list of my devices and then assign events in Blueprint when UE4 receive it from Midi Device.

Touch OSC is a really helpful software as Virtual Midi Controller, so you not need to have Midi Keyboard, Digital Drums or some other midi controller. It`s very easy to use - http://hexler.net/software/touchosc

Here is a screenshot of Bome`s Midi Translator Classic:

Here is my Midi Interfaces Available from any software that works with Midi (DAW):
01.png

Here is example of Midi Visualisation software. Synthesia:
4cea3bdb1a66f3c81ce09fad4abc1fa3469b2d1a.png

EZDrummer:

And my Blueprint In UE4.14 (I still need to setup inputs there, becouse can`t find it)
93c298c97eb575df6e03b0a02dab83249e826aa3.png

I can not find the right way!
I was waiting for so long time midi interface for ue4 and now we have but 99% :smiley:
I got that i can find ableton puch midi controller, but i cant get values out of it.

Ableton is there, but no values when i press buttons.
HOW HOW HOW???

Actually this works, but not with all pad keys. only one at this settup. User button :smiley: and i dont need that :smiley:

It works! There we go :slight_smile: just needed to change input device to 2 fom array list.

Ok, next big thing. Im new on win and i cant figure out whay i cant use one midi device in multiple devices, like Ableton and UE4. Any ideas how to fix that?

Thanks Dabulina,

But I find your answer too late :slight_smile: I find a way… It`s very similar to your Blueprint maybe the same… only I have several Midi Devices and focus on port 5… this weekend I focus and prepare this piano as example - Virtual Upright Piano UE4 Demo - YouTube

Here I use UE4 only for Midi Visualisation and generates sound from Native Instruments Kontakt. In all ways I am using the same Midi Input.
Hope to have time for inprovements later…

For many years the MIDI support built into Windows did not allow more than one application to access the same midi device at once. This has been fixed with the Windows 10 UWP MIDI API but it’s up to developers of apps to rewrite their apps to use this relatively new MIDI API rather than the older one(s). I’ve no idea whether UE4 uses this one or not.

Certain midi interfaces/devices probably tried to avoid this situation in the past by trying to do clever fudges in their drivers but I dont know which ones. I expect the most common traditional solution was to use some kind of midi utility on windows that allows midi message routing and the creation of virtual midi devices. So the utility program would be the only one connecting directly to your midi device, and would then send the midi data to a couple of virtual interfaces. You would then use these virtual devices as the midi input device in your other apps such as Ableton and UE4. I do not use Midi on windows enough to know which utility and/or virtual midi port app to recommend. You might be able to get away with a program that just provides virtual midi devices, and do the actual midi signal routing in Ableton via a track that takes midi in from the interface and sends it out to a virtual device output that UE4 then uses the equivalent input of.

dabulina - I’m new to Unreal and how this reply system works (but have been using MIDI for 25 years and have an idea for you-- replying here to make sure you’re alerted to my reply to the thread below.

If anyone is limited by 1 midi device on Windows, you can try using a virtual midi port application LoopBe1 - A Free Virtual MIDI Driver or midi ox found here http://www.midiox.com/
You should be able to install this and choose it as an output from a channel in Ableton or any DAW. Its like a virtual midi cable that happens inside the computer. Then access that in your blueprint, just like you would a real physical midi interface… I wanted to chime in with this because I’m after the same result and am still trying to figure out how to find my MIDI device. I’m sending from my Mac to my PC so I’m not using a virtual cable but am just a NOOB to Unreal… Cant wait to get it working though. Thanks for the screen shot, gonna try what you’ve done there.

I’m almost there but can’t find the SET node used in that example.363940136d8d3b4024a3628ebf546df09300f431.jpeg

@dabulina -

It’s been awhile but hopefully you can answer this. I’ve copied your blueprint exactly and I’m getting this error message:

‘Error Blueprint Runtime Error: Accessed None trying to read property Midi Device from function: ‘ExecuteUbergraph_MIDIPROJECT’ from node: Bind Event to OnMIDIEvent in graph: EventGraph in object: MIDIPROJECT with description: Accessed None trying to read property Midi Device’.

I’ve tried a Print String off of the ‘Return Value’ pin on the ‘Create MIDIDevice Controller’ node and it’s reading as ‘None’. I’ve attached a screenshot. Any help would be greatly appreciated.

@busyframes - 

It’s been awhile but if you’re still looking for the correct SET node, all you have to do is pull a wire off of the ‘Return Value’ pin on the ‘Create MIDIDevice Controller’ node and click ‘Promote to variable’. It’ll create a variable which is a reference to the MIDIDevice. At least this is what it seems like the correct answer is.

Cool stuff!

I am also using the midi plugin but for a whole other thing Musical Range Trailer (PC/HTC Vive) - YouTube

The piano thing is very neat!

@Motanum

Would you mind taking a look at my blueprint above and seeing if you can spot any errors? Or could you perhaps mind screenshotting yours so I can see how to get this working? I’d really appreciate it. Thank you. Musical range is a super original and cool idea, by the way.

I dunno what you are trying to achieve with your blueprint. The error means that the Variable ‘Midi Device’ has nothing inside of it, so the blueprint cannot Bind Event to OnMidiEvent.

The way I read Midi, is that I attach a Midi component to my blueprint actor, and then load a file to it, either a midi UASSET, or a midi file directly from the disk in .mid format.

d65b3e98d1.png

I am using a slightly old version of the midi plugin. From 4.14, so it might differ from yours.

@Motanum

Thank you for posting your blueprint. I’m trying to find my MIDI input device and read it so I can use the notes to trigger sounds in game. I’m following the instructions from the first post in this thread (which are from Epic) and I’m stuck. The blueprint I posted above is where I’m at.

Yeah, that’s why I’m confused. My ‘Create MIDIDevice Controller’ node should be returning the value and setting that as the variable ‘MIDI Device’, so I’m not sure why it’s passing off a value of None. It seems I’ve followed all the correct steps. Any idea where it may be getting messed up? Thanks for your input.