UE4 and OSC Input

Hey everybody,

I am attempting to create a real-time music visualizer in Unreal and am having major difficulties hooking everything up. I currently have a MIDI keyboard plugged into some software called ChucK which is outputting OSC messages (Open Sound Control). These messages describe what notes I’m playing and how I’m playing them.

The major obstacle I’ve encountered comes from receiving OSC messages in Blueprint. Namely, there is no engine-supported way to do this. The only possible solution I’ve encountered comes from an OSC to UE4 plugin written by a “monsieurgustav”.

github: GitHub - monsieurgustav/UE4-OSC: OSC plugin for Unreal Engine 4 Blueprints
forum: [Plugin] OSC for UE4 - C++ - Unreal Engine Forums

However, I have not been able to get anything working despite poring through this forum and many others. Building the plugin’s code in VisualStudio always leads to errors, and a prebuilt version I found did not come with the one Blueprint node I need, called “OnOscReceived (OscReceiver)”. Upon inspecting the codebase, I don’t even see where that node was encoded, despite people’s claims to use it.

I am new to Unreal Engine, and am a bit daunted by the task of writing my own plugin. Does anybody more seasoned with Unreal have experience with this problem? I would like to send three floats to Unreal whenever I press or release a key on the MIDI keyboard. Thanks!

So I messaged monsieurgustav himself and he helped me out. Turns out the “OnOscReceived (OscReceiver)” node ceased to exist for a while, but upon me messaging him he very kindly and promptly modified the code so it’s back. He also described an alternate method which I managed to get working in PIE. Still trying to get this working on Standalone.

His alternate method:

1.) Drag a “BP_OscReceiver Actor” into the level.
2.) In the Details panel for this actor, click “Edit Blueprint”
3.) Just to get something up and running, try this Blueprint:

Make sure you are listening in on the right port. To do this, go to Edit -> Project Settings -> OSC -> Receive From. You may have to also click the “Set as Default” button in this same window after setting the port.