[Plugin] OSC for UE4

I released my OSC plugin here:

It receives and sends OSC messages in Blueprints.
It manages any number of float, integer, bool and string parameters.

Works in 4.4 and 4.5.
Tested on Windows and MacOSX.

Follows [Feature Request] OSC, MIDI, and Syphon - Feedback for Unreal Engine team - Unreal Engine Forums

2 Likes

Hi Guillaume, first of all thanks a lot for your contribution! Iā€™m more on the creative coding/generative design side of things and getting osc support into the engine is super important to have access to all sorts of data. Unfortunately i didnā€™t manage to install the plugin. Iā€™m running Engine Version 4.5.0 and copied the OSC folder into my project as described by you and the engine trys to compile it, but fails just stating that it could not be compiled. Do i miss something here? Do i need the Git-Source to compile, and how would i need to setup that?

Thanks again :slight_smile:

Hi
I ran into the same problem, it is a matter of the order on how you do it: first you need visual studio on windows or xcode on mac installedā€¦ then open your project (without the plugin installed). once it is open go to menu/file and do ā€œadd code to projectā€ this will open visual studio or x code, name your class whatever. Then copy the OSC folder in the plugins folder on the root of your project and do ā€œRefresh Visual Studio projectā€ also under file. Then build from visual studioā€¦ viola

Hi monsieurgustav !

first, thanks for your great plugin :smiley: ! Importing OSC to unreal engine is awesome, I used to play with osc using Unity, vvvv and puredata (ie here : ) and having it working also on ue4 is great !

Anyway, iā€™m here also because i got some problems making it communicate properly with the outside, and as Iā€™m new to Unreal Engine, Iā€™m a bit lost. so I installed your plugin, compiled it and everything seems to work well inside ue4 (i can access it in blueprints, open your examples and everything) but the fact is I canā€™t make it send or receive anything from another application, so in fact i didnā€™t manage to establich communication with the outside.

For the moment iā€™m trying to send a simple constant float from UE4 to VVVV. Iā€™m pretty sure the vvvv part (osc receiver part) is ok as iā€™m used to vvvv. So the problem must come from my use of your OSC plugin in UE4, and as iā€™m new to ue4, iā€™m not surprised :o.

so here is what i did (I also join a screenshot of my blueprint, and the vvvv part, if it can help).

  • iā€™m sending and receiving on the 6670 (so i changed the port in the OscSettings.cpp, and check if the host was local/ ) and saved the cpp file.
  • in UE4 i created a class blueprint with some simple elements in it (not related to the osc anyway) and made a simple sending patch as in your example.
  • iā€™m sending and receiving on the osc address ā€œ/bubuā€ so I added a string variable into the blueprint containing this value and linked it into the adress pin of the sender.

I import the blue print into my scene and I hit play obut nothing seems to arrive to VVVV.

Do u have any idea of what i did wrong ?

Hi catalejo, thanks for the hints! It eventually worked for me that way, but i had to create a new project as my old one was created in 4.4.0 and wonā€™t compile the plugin in 4.5.0. Well thats on Unrealā€™s side i guess! Anyhow, i have the same problems as crasse. I send the data out of processing, managed to find the default port 8000 in the config and canā€™t send or receive data either ā€¦ I saw that the plugin is writing some logs but couldnā€™t see them in the console inside the editor, any guess how to find the logs? Maybe that would help?

Thanks for the help so far!

Hi !

First, you can read the pluginā€™s logs in the ā€œOutput Logā€ window in the editor. They are prefixed with ā€œLogOSCā€. That may be your starting point.

Also, keep in mind that a machine cannot have several applications listening simultaneously to the same port.
So, crasse, if both UE4 and VVVV are listening to the port 6670, one of them will fail.
(also, there is no need to recompile the source to change the parameters: you can do it in the ā€œEdit/Project Settings/Oscā€ editor)

I remember I once had an issue when sending to . Then, I set the explicit address (192.168.0.10 in my own case) and it worked.
Today, works for me though. (try to get the latest sources)

Finally, try to use an OSC monitor tool to debug your OSC messages. Itā€™s useful to know if messages are received on the expected machine/port.
OSC Data Monitor ā‹† Kasper Kamperman works fine.
On MacOSX, you can also use Osculator.

I hope that helps !
Guillaume

One more thing that Iā€™ve just figured outā€¦

The plugin settings in your ā€œProject Settingsā€ window are not used when packaging the project.
ā€œDefaultā€ settings are. (have a look at DefaultEngine.ini and DefaultEditor.ini at the project root)
Then, you must put your plugin settings to the default settings. (click the ā€œSet as Defaultā€ button)

See the answer in this post for details:
https://answers.unrealengine.com/questions/28239/potential-bug-packaging-settings.html

Hi there !

Thanks for your help Guillaume :smiley: Thanks to that, I finally managed to make Unreal Engine send a list of 2 floats to vvvv and thatā€™s great !.

Now that it works in this way, i try the opposite way as I planned in the beginning of this exercise, Iā€™m trying to send floats from vvvv into Ue4, and still, i Donā€™t get it to work, I put a print string on my osc receiver chain output, and nothing come from it.

Here is what I did :

  • Iā€™m trying to send a float from vvvv, on port 8001 (vvvv listener is on port 8000 so there is no conflict), address ā€œ/b a b aā€ (with no space between letters, this forum seems to have rules that donā€™t allow to write this particular word as it should be, anyway) and IP ( works for me, as it works for sending data from unreal engine to vvvv, it should works also in the opposite way).
    I tested the vvvv part by making a OSC loop inside vvvv, and it can receive what is send, so no problem there. I also monitored it using OSC Data Monitor, i put a screenshot of it (great tool by the way ! ) and it works.

(of course I close OSC data monitor before testing the Unreal Engine listener part to prevent listening conflict)

and I set my osc settings as default settings, as you said.

So then I configured the osc listener into Ue4 but didnā€™t get it to work. I joined screenshots of my patch and OSC settings and configuration I did, I think itā€™s more clear than explaining it by words

also I got another question : what is the use of the Address output pin on the OSCreceiver component node in Unreal Engine ?

again thanks a lot for your help ! :smiley:

I think you must connect the ā€œOnOscReceivedā€ out exec pin to the ā€œPrintStringā€ exec pin.

ā€œOnOscReceivedā€ is an event, quite like the ā€œtickā€ event.
Itā€™s exec pin triggers when the event happens (a message is received).

ā€œAddressā€ pin gives you the address ("/b a b a") part of the received message.
ā€œDataā€ gives the parameters.

worked :smiley: ! thanks , in fact the problem came from the fact that I triggered the execution of the print string from the Event Begin play node and not from the OscOnReceived node, For the moment Iā€™m not quite aware of the logic behind this behavior in the blueprint (as I thought the white links where neutral triggers, but seems not to be in this case) but iā€™ll read some more documentation about it !

Thanks again for youā€™re awesome plugin and help provided here :slight_smile: !

:slight_smile:
Youā€™re welcome !
Have fun !

Hey all, just a quick note: i got it to work, too and i really like the way the blueprints work. Great job Guillaume! Thanks again. :slight_smile:

Hello. Iā€™ve installed Visual Studio in order to compile this plugin, but Visual Studio is crashing immediately after startup. Iā€™ve unistalled and installed again to no effect. The posts Iā€™ve read online about that kind of problem could only be resolved by re-installing Windows. Before I have to do that and re-install all my applications, just to compile this plugin (Iā€™ve no immediate use for Visual Studio for anything else):

Has anybody compiled it successfully for UE 4.5.1? Can you share it?

Thank you in advance!

Hi!
I have problems with packaging a project. Everything works in editor window (sometimes editor crashes after a couple of launches, it seems that some thread continues working after stopping the game), but when I launch a standalone or packaged .exe, osc receiver is just not working. I use Cinder for sending messages and Visual Studio 2013 for building C++ UE4.5.1 project. Iā€™ve tried both and explicit local network IP, as well as different ports. Saving a port in the plugin settings as default is not working for me. Iā€™ve also tried all build environments (debuggame, debuggame editor, development, etc). Has anybody similar problem solved?

Oh, Iā€™ve found what was wrong. UE4Editor process itself blocks specified port for listening.

Could not compile

I could not compile the plugin. My UE4 version is 4.5.1 How could I solve this?

ps.png

I hate necroā€™ing threads, and Iā€™m half expecting to get no replyā€¦

But Iā€™ve got the OSC plugin built and working in 4.5.1. I can create my blueprint, and use onOSCReceived. However, all the projects using the plug-in seem to spontaneously crash (or worse, not open at all) when an OSC stream is active. No error message, just instant CTD.

Sometimes, itā€™ll run the print command, then crash. Other times it just disappears without a trace - making it intensely hard to troubleshootā€¦

Any ideas?

Did you find a workaround? Iā€™m having the same issue.

Hey,

Iā€™m getting an error when I try to recompile for 4.6. The error is "error C1083: Cannot open include file: ā€˜Settings.hā€™ No such file or directoryā€™

I canā€™t find a settings.h in the OSC plugin directory. Anybody deal with this?

Edit: looks like the big change between 4.5 and 4.6 is in how settings are registered by the plugin; lines 24 - 36 in OscModule are where the plugin is breaking.

If anybody is curious, I made the changes necessary to get this working with 4.6. Iā€™m not familiar with using git, so send me a message if you want the plugin.