3

I have written a VST/AU/RTAS synthesiser plugin for OSX and Windows that also has an iPhone equivalent. I would like to allow the two to communicate with each other over a local area network so that the iPhone app can be used to send MIDI controller data to the plugin. I plan to create a MIDI source on the iPhone and publish it as a Bonjour service so that the plugin running on OSX or Windows can find it and receive midi from it.

I have a couple of questions to ask about this:

1) Do I actually have to publish the MIDI source as a Bonjour service or does a coremidi host (running on iPhone) automatically publish itself?

2) Are there any code examples available that show how to do this sort of thing?

I have seen the following post but the answer to this only covers the client side, finding a Bonjour service but not the publishing side, and it transmits MIDI via OSC, and it only covers OSX but not Windows (I know, I'm not asking much! ;) )

How to send MIDI or OSC signals to a Mac application from my iOS application?

Cheers,

John.

Community
  • 1
  • 1

1 Answers1

2

AFAIK you'll have to publish the service yourself. NSNetService and NSNetServiceBrowser are the classes you need. Check out the companion guide. I found this article on Cocoa for Scientists particularly helpful in getting started. Both have some decent code samples. The Bonjour Browser is useful for testing.

The list of bonjour service types already has

apple-midi

and

imidi

But I think it's best to make up your own application-specific type name unless your app is plug-compatible with one of these services.

Chris Mowforth
  • 6,689
  • 2
  • 26
  • 36