Open Sound Control (OSC)

Get help using Construct 2

Post » Sat May 12, 2012 8:43 am

Does anyone know how plausible it would be have a way to send/receive Open Sound Control data dynamically from a Construct 2 game?

e.g. Having UDP send and receives like in Max/MSP and PD -- with a user-definable port number

Cheers!
B
5
G
2
Posts: 40
Reputation: 930

Post » Sat May 12, 2012 10:49 am

@birdlantern : you need to use a bridge, because JS is only going to speak HTTP/HTTPS or Websocket. So you need a PHP/Flash/Java/whatever proxy, to send informations to, which in turn is going to send OSC packets.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Sat May 12, 2012 1:09 pm

Maybe wait and/or contribute to webRTC ?
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sun May 13, 2012 4:39 am

@pode

Thanks for that. I don't really know much about that kind of thing -- how would I set up something like that? Is it very difficult to do?

@Kyatric

Is this going to be built into Construct 2 in the future?
B
5
G
2
Posts: 40
Reputation: 930

Post » Sun May 13, 2012 8:13 pm

Well first it's going to be built in browsers.
From there, it makes it possible to be implemented in C2.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon May 14, 2012 9:49 am

@Kyatric : having dealed with WebRTC support in browser those last weeks for plugin dev, I can say that it's urgent to wait ;). Not everything is working, FF support isn't on par, etc...

@birdlantern : I have done some research for you ! You can apparently use a Flash file to speak to an OSC server. I'm finishing a plugin now for a client, and working on Spriter plugin also, so I won't be able to help you with that for the moment, but there's something there : http://benchun.net/projects/flosc. It's a Java server, bridging with a Flash client to exchange OSC messages. I don't think there's a way to send OSC message directlty from the client, because you need to forge packet that aren't websocket or HTTP, so outside of the Javascript's range (and I don't know if somebody tackled the work to forge packet with Flash's Socket lib...)
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue May 15, 2012 12:05 am

@pode

Hi there,

thanks, that's very kind of you! So are you saying that I could use Flash with flosc as an alternative to Construct 2, or that there may be a way to get Construct 2 to communicate with a Flash/flosc application?
B
5
G
2
Posts: 40
Reputation: 930

Post » Tue May 15, 2012 12:31 am

@birdlantern : you can use Construct2 to design your application. Install then flosc on a machine somewhere. Back to your Construct2 app, you can add a plugin that deals with the Flash => flosc part.
That plugin (that somebody needs to code) is going to simply do a Javascript call to the Flash applet (since by using ExternalInterface(), Flash and JS can communicate inside the same web page). That Flash applet is then going to have discussion with flosc, and is going to give that information back to the Javascript plugin. Your Construct2 app can then display that info.
The plugin I'm finishing, having no relation with yours, is doing exactly that JS<->Flash part. When it's done and uploaded here, I can explain to somebody (maybe you) how to replicate that same kind of functionnality.
If nobody can tackle it, I can do it, but I can't do it now, because of my work...
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue May 15, 2012 11:51 pm

@pode

Great! I look forward to seeing how it all works.

Perhaps this is worth posting elsewhere in the forum, but an added incentive to get this working is that Open Sound Control could be used to control a Construct 2 game with Wii remotes and Kinect sensors!!
B
5
G
2
Posts: 40
Reputation: 930

Post » Fri Jun 15, 2012 3:09 am

Hi birdlantern

I am currently working on a midi solution using a simple, small, midi web server that sends and receives raw midi from the browser. Will keep you updated.
B
16
S
4
G
1
Posts: 18
Reputation: 2,568

Next

Return to How do I....?

Who is online

Users browsing this forum: Mohicano and 24 guests