Xcode send data to Max/MSP in real time?

Jamcob's icon

Please can someone help me find a way to send signals from a game source code (e.g. C + +) into Max/MSP in real time?

My intended outcome would be to make a generative music maker via the game using Xcode.

I have the Max/MSP SDK and Xcode.

Timo Rozendal's icon

Hi Jamcob, it doesn't work like that:
- with the max sdk and xcode you can extend the functionality of max msp with your own objects
- xcode itself is a tool to help you program these objects (externals)
- what you could do is try to add a network connection to the game which you can use to send data to max (but it is not clear yet to me what you would like to do)
- theoretically you might be able to adapt the game itself so that this runs as a max external inside max, but I don't think this is feasible

Jamcob's icon

Well, I am planning on creating generative music determined by a games state and/or using information from the game.

I am aware that OSC will help me here but I need someone to show me how to set up a network between something like Xcode or Unity. If you know or any good tutorial sites please let me know.

Roth's icon

If you are using Objective-C, check out CocoaAsyncSocket (you'll probably want to use AsyncUdpSocket.h/m with udpreceive in Max.

Pedro Santos's icon