monsieurgustav / UE-OSC

OSC plugin for Unreal Engine 4 Blueprints
MIT License
323 stars 95 forks source link

OSC to listen to multiple ports #60

Closed PureDenizen closed 6 years ago

PureDenizen commented 6 years ago

You can specify UE4 to listen to one port (project settings), but how do you get the engine (within a blueprint) to listen to different, specified, ports?

monsieurgustav commented 6 years ago

Hi, Listening to several ports is currently not supported.

Could you explain why you need it?

PureDenizen commented 6 years ago

Hi,

Thanks for the quick response.

I'm using OSC to receive data within Unreal Engine 4 from MaxMSP and, rather than filtering the data using a type of coding system, I wanted to send each piece of data to different ports. Just for clarity/ease of use.

The context is this: I'm researching the use of a wearable technology called the Myo armband to use within game-engines for the creation of interactive music. This Myo armband is useful because it is novelly equipped with 8 Electromyographic sensors (EMG) which detect muscle activity. I'm therefore using EMG data to map specific hand gestures and then transform those within Unreal. Thus, I want to send each gesture, from MaxMSP, to Unreal via different ports (through OSC). Rather than accumulating all the data in one port/channel.

I hope this is clear!

Best

monsieurgustav commented 6 years ago

Well, in OSC, filtering is supposed to be done using the message's address. I'm not sure to understand why it's clearer to have anonymous messages (address "/") on several ports than named messages (addresses "/gesture1", "/gesture2") on a single port.

It's not too hard to listen to several ports in the plugin, but it would not be part of the OSC message itself: you could not filter on it.

PureDenizen commented 6 years ago

Yes, I guess this is an alternative way of doing so.

Just thought it may be 'easier' and straightforward, per se, to send it via different ports, but the address filtering works just fine!

Thank you very much for your help.

monsieurgustav commented 6 years ago

Glad it makes sense for you! Also, it's more "inline" with what others do, which is always good! (unless you want to reinvent things)

arraybercov commented 5 years ago

Hey,

I am hoping there is some way to open multiple listening ports. @monsieurgustav You had asked for a use case/example/reason. I need UE4 to listen for OSC data streaming in from my phone to control assets and I also need another port to stream in OSC data from an application on the same computer. This is for a live performance. Has there been any new interest in this?

monsieurgustav commented 2 years ago

Better late than never: listen to multiple ports is implemented!

A1deNxx commented 1 year ago

迟到总比不到好:事实发现监听了多个端口!

Hello, sir! Thanks to your Plugin! It is really helpful! I have 2 questions about this😩.

Firstly, I already send six sensor data to MAXMSP from Arduino Mega using the serial port protocol communication, and then I want MAXMSP to send six-track audio data to Unreal 5 to control the game visual effect, is this currently feasible?

Secondly, does this plugin support that I send the data analyzed by MAXMSP and the music generated by MAXMSP to Unreal 5 at the same time?

Looking forward to your reply!😁

monsieurgustav commented 1 year ago

Hi! If the data is sent via OSC, then it should work. There is no limit to the number of channels or data size (you can send blobs) except the performance of the system.