Question

I'm using PGMidi in an iPad app to receive MIDI commands from desktop applications. I set the useNetwork flag to YES and then connect the desktop computer using the Audio MIDI Setup utility. Works like a charm.

Now I want to develop an iPad app that can send MIDI commands to the other iPad app on a separate device. I have not been able to work out how to connect the two iPads via Core MIDI.

When the useNetwork flag is set, it creates a network source and destination. I would have assumed I could just connect both devices to the network session but connecting the endpoints on both devices does not allow communication. I then setup my own virtual endpoints outside of PGMidi but these could not be seen by the other device either.

Is what I'm trying to do even possible?

Was it helpful?

Solution

Yes, what you are trying to do is possible, but it's going to take a bit more work. Basically, one iPad needs to become the client to the other iPad. In order to do that, the client iPad must browse and select the iPad you want it to connect to. This is done with Bonjour and NSNetServiceBrowser.

You can find some handy code at http://antifluke.blogspot.com/2011/05/network-midi-on-ios-part-2.html . It doesn't do everything, but you might be able to take parts of it and implement it into PGMidi.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top