Apple's iPad Camera Connection Kit, providing a USB port, as connected to a first-gen iPad. (CC-BY) Håkan Dahlström Photography

Apple’s iPad Camera Connection Kit, providing a USB port, as connected to a first-gen iPad. (CC-BY) Håkan Dahlström Photography

You know the possibilities are significant, but how do you explore them? iPad, Ableton Live, MIDI, OSC, Wi-Fi, MIDI … how can you connect your iPad to other tools for music control?

We brought in an expert, Nicolas Bougaïeff, Creative Director at Liine, to explain the different routes, including not only wireless, but wired solutions, too. Liine is the maker of Lemur and popular Ableton Live control apps (LiveControl 2 being the most recent). Nicolas naturally builds on that expertise, but the lessons here apply to a range of iOS apps. This tutorial should answer some questions for beginners and fairly advanced users alike. -PK

The iPad is an amazing tool to make music and controller apps can be very powerful. Lemur, for example, enables you to control other apps running on the same iPad, apps running on another iPad, software running on a laptop such as Ableton Live, or even hardware such as synthesizers and drum machines.

But connecting apps together can be confusing. This article provides a reference to the various options for iOS connectivity, including a focus on controlling Ableton Live. Lemur will be the main example used during the article, but the information contained here is certainly relevant to any iPad control app.

What Is the Difference Between MIDI and OSC?

MIDI is a protocol invented in the early 1980s for connecting music gear. It’s not the best, or the fastest, but it is the standard. MIDI is supported by just about every piece of music hardware and software manufactured in the past 30 years, and that now includes iPads and iPhones. Starting with iOS 5, Apple has made the CoreMIDI library available, which enables MIDI transmission over network (i.e. Network MIDI) and hardware adapters (various options described later in this article). MIDI support is now a more or less standard feature in professional iOS music apps.

OSC is a protocol invented in the late 1990s that offers many improvements:

  • Higher bandwidth (more information flowing faster)
  • Transmission over ethernet. Ed.: technically, MIDI can run on any transport, Ethernet included, but OSC is built from the ground up as a networking protocol.)
  • High-resolution data types (rather than 7/14 bit supported by MIDI)
  • Open-ended URL-type addressing scheme (rather than port/channel MIDI system)

While OSC is very powerful, MIDI remains the most widely-supported standard. Some apps support MIDI, some apps support OSC and some apps, such as Lemur, support both.

[Note to LiveControl 2 users: LiveControl 2 relies exclusively on MIDI messages, so all MIDI connection options supported by Lemur are available to you.]

iConnectMIDI4+.

iConnectMIDI4+.

iConnectMIDI2+, from the rear.

iConnectMIDI2+, from the rear.

Cables and Wi-Fi Networks

Connections between your iPad apps and other physical devices (laptop, synthesizer) can be made either over a Wi-Fi network or with a cable. MIDI apps can be easily used either over a Wi-Fi network or with hardware cables. OSC apps can only easily be used over Wi-Fi.

Wi-Fi connections, while usually stable, can occasionally suffer from interference, drop-outs, or jitter. This is more likely to happen when you play in a new venue where you have little control over the networks present in the room. This is obviously an important risk to take into account when planning a public, live performance. CoreMIDI-compatible apps over hardware cables give you a 100%-guaranteed connection and the lowest possible latency between the iPad and laptop, as responsive as hardware MIDI controllers.

Ed.: Your wifi card can also die on you, which happened to me recently on my MacBook Pro, so having a backup connection strategy can be appealing!

You might also want to read this recent Synthtopia write-up of performance tests being done by a Wi-Fi MIDI adapter maker:

Can Wireless MIDI Be As Fast As Wired MIDI?

But as a commenter notes, those figures are average, not worst-case, scenarios. Reliable performance is the key here, as Nick says.

lemur_inapp

livecontrol_inaction

From top: Liine’s Lemur, in-app editing; launching in LiveControl 2. These apps can be used wirelessly or with a cable.

Wi-Fi routers and ad-hoc networks

There are two different ways to connect your iPad to your laptop over a Wi-Fi network. The first option is to connect both to the same router — for example, the router you may already have for your internet connection. The second option is to create a computer-to-computer network, otherwise known as an ad-hoc network.

Connecting through a router works just fine for many people. Depending on the sort of work you’re doing, this could work fine for you too. However, you must consider that you will experience higher latency when connecting through a router. It could take up to 200-300ms for fader movements and button taps to reach the computer. If you’re programming beats in real time, that can be quite long! On the other hand, if you’re just riding volume faders, the difference might not matter.

Connecting through an ad-hoc network is a little bit more work, but you can achieve very low latency, typically down to the 10-20 ms range. There are many good guides on how to create and manage ad-hoc networks for OS X and all versions of Windows. You can check out the many articles on http://support.liine.net or a quick Google or YouTube search will yield many results. Ed.: On Mac, this is as simple as choosing “Create Network” from the Wi-Fi menu, and Windows requires only a couple of additional steps.

Static IPs deserve a short mention. Static IPs are only necessary as a last resort, when all previous ad-hoc connection attempts have failed. While not necessary, learning about configuring static IPs may be worth the effort to you if you wish to be in total control of the network settings.

OSC over Wi-Fi

OSC was designed to work over networks and does so very well. In most cases, Wi-Fi is the only way to connect OSC-compatible iPad apps to your laptop.

OSC over Cable

There is an option for using OSC-compatible iOS apps over a hardware cable, but given that it uses the Personal Hotpost for something other than Apple’s (apparent) intention, it could be considered something of a workaround. This option is largely untested, but a quick trial at the Liine HQ seemed promising.

If you have a 3G/LTE (4G)-enabled device, unlocked, or with a carrier that allows tethering, then you will be able to use the Personal Hotspot feature to enable a network connection between your iPad and laptop through an Apple Sync Cable (USB to 30-pin or USB to Lightning). Note that Cellular Data must be turned on in order for the Personal Hotspot function to be available. If you’re abroad and want to avoid any unwanted charges, make sure to turn Data Roaming off, while keeping Cellular Data on. Once a network connection is established in this way, OSC and Network MIDI can be freely used while also charging your device at the same time. If you are a devout OSC user who performs live, this may be an avenue worth exploring. For further information, this Apple knowledge base entry may be helpful: http://support.apple.com/kb/ht4517

In addition, some users have reported successfully using OSC apps over the Apple Sync Cable by first jailbreaking the device, then using MyWi. This author strongly recommends against doing so, as you would break the Apple EULA and effectively void your warranty.

MIDI over Wi-Fi

MIDI over Wi-Fi is supported natively on OS X through a built-in tool called Network MIDI, which you can find in /Applications/Utilities/Audio MIDI Setup. On Windows, rtpMIDI emulates Apple’s Network MIDI driver. Network MIDI is a subset of CoreMIDI functions that applies to transmitting MIDI data over a network. Virtually all CoreMIDI-compatible apps support Network MIDI.

Lemur supports CoreMIDI but, exceptionally, does not support Network MIDI. Instead, Liine created Lemur Daemon, a utility that allows up to eight MIDI ports, thus circumventing Network MIDI’s limitation of a single MIDI port. Such flexibility is necessary in many professional situations.

MIDI over Cable

You have a choice between three types of iOS MIDI adapters, as well as Network MIDI over the Apple Sync Cable.

1) The first type, and most highly recommended, is devices that are both USB- and CoreMIDI-compliant. That means that the device plugs into your iPad at one end, and plugs into a USB port of your laptop at the other end. These devices provide a direct connect between your iPad and laptop.The best in this category are the iConnect MIDI line of products, such as iConnectMIDI2+ and iConnectMIDI 4+. The Alesis iO Dock unfortunately does not support SysEx messages, thus making it incompatible with many MIDI apps (including LiveControl 2) and hardware synthesizers. The Behringer iS202, although untested, appears to be a working model and its specs do specifically mention SysEx support. For any of these devices, the setup looks like this:
iPad -> iConnectMIDI2+ -> Laptop.

iConnectMIDI2+, connected to an iPad and MacBook.

iConnectMIDI2+, connected to an iPad and MacBook.

2) The second type of iOS MIDI adapter standard 5-pin MIDI cables coming from your iPad. This is very useful if you want to use your iPad to control a hardware synthesizer, but if you want to connect to your laptop then you will additionally need a soundcard with physical MIDI ports or a MIDI interface. A good example of this type of adapter is the iRig MIDI II, which plugs into the iPad at one end, and has MIDI cables at the other end. A typical setup in this case would be:
iPad -> iRig MIDI II -> Audio/MIDI Interface -> Laptop.

An iRig connection with the iPad.

An iRig connection with the iPad.

3) The third type of connection relies on Apple’s Camera Connection Kit. That is a small adapter that plugs into your iPad and simply has a female USB socket. You can then connect any Class Compliant audio/MIDI interface (Class Compliant means that you don’t need to install any drivers, it just works). If the goal is to connect the iPad to the laptop, then most elegant solution is to use a simple 1in/1out USB to MIDI adapter, such as the ESI Midi Mate II, M-Audio Uno or the iConnectMIDI1. As with type 2 above, you still need to connect the physical MIDI cables from the interface to another interface on your computer. A setup in this case could resemble the following:
iPad -> CCK -> M-Audio Uno -> Audio Interface -> Laptop.

MIDI and audio, with the Apple Camera Connection Kit.

MIDI and audio, with the Apple Camera Connection Kit.

As you can see, the first option is the simplest and involves the least amount of things, whereas the second and third option require more cables and connections. For any serious musician using an iPad and MIDI apps, this author highly recommend the iConnectMIDI2+ and iConnectMIDI4+.

Finally, if you have Personal Hotspot enabled (described in the ‘OSC over Cable’ section above), you may be able to connect with Network MIDI over the Apple Sync Cable. This one hasn’t been tested in-house, but in theory it should work for any CoreMIDI app or for apps with custom MIDI protocols such as the Lemur Daemon.

Conclusions

The iPad is a very powerful platform for music-making, and many apps support OSC, MIDI or both. Lemur supports both. You can connect the iPad to the external world over Wi-Fi or cables, but not all combinations of OSC/MIDI and Wi-Fi/cables are optimal. The most reliable type of connection is MIDI over hardware cables.

Whatever the app you’re using, here are some general rules about connections on iOS that always apply.

  • Apps that use MIDI can connect over Wi-Fi or compatible hardware adapters.
  • Apps that use OSC can connect over Wi-Fi.

There are three types of iOS MIDI adapters. The most efficient for connecting to a laptop are the iConnectMIDI2+ and iConnectMIDI4+. Other options, such as the iRig MIDI II or the Camera Connection Kit (CCK) give you the option to connect to hardware gear with MIDI cables, but involve more connections and devices to connect to a laptop.

More on Liine.

More on Nick, in the great Attack magazine, and a series called “Job Envy”:

CREATIVE DIRECTOR – NICOLAS BOUGAÏEFF

His official site:

http://nicolasbougaieff.com/

  • http://nutation.net/ rseymour

    Really surprised he didn’t at least mention bluetooth PAN networking. I’ve played around with lemur and bluetooth networking on my macbook and it would work perfectly… except that it seems to go to sleep early and often. Which means that your first note might lag, but if you are hitting controls every few seconds the latency felt like ad-hoc wifi.

    I also fear it dropped notes occasionally.

    Still worth a mention I think.

    • Sam

      I just messed around with this. if my iPad is paired via Bluetooth with my computer, I can create a network MIDI connection to the iPad. Then route Lemur through MIDIBridge and I can use it with the network connection. The latency is as good as wired! Not sure what you mean by go to sleep early and often – what was your issue? I’ll have to play around more with it.

    • http://nutation.net/ rseymour

      Awesome, finally someone tried it other than me! Well, I had it so that if I left it for say a minute it would not recognize my next keypress on an iPad midi keyboard in Lemur. Perhaps you are pairing differently? I was doing network sharing via the settings on the iPad I think? Excited to see it working for someone else though!

    • sam

      I didn’t do network sharing… In settings under Bluetooth I made sure my iPad and Mac were connected. You can also use Logic Remote this way, too. I would not let the iPad go to sleep as that might require a reconnection. Good luck!

    • Mike

      Read this comment and immediately purchased MidiBridge for iOS. I’m completely lost and cannot figure out how to route Lemur through MIDIBridge to use with the network connection. Any ideas? Thanks!

  • Eric

    Can I safely assume that doing cabled OSC with the tethering option does NOT actually use cellular data, but merely requires that you have a tether capable data plan?
    I love that as an option and do have ATT mobile share, but only 300mb of data (I’m a poor grad student)!

  • trash80

    I still use the Alesis IO Dock with a iPad extension cable and put the ugly unit under my desk with all my cables. Can’t really beat MIDI IO + USB MIDI to Computer + Audio IO + charging- Though I believe I did have to add a USB isolator device to avoid noise in complicated setups. And yeah, no sysex, but I haven’t used sysex on my iPad so it’s not a big deal yet. The other advantage with the IO dock is its like a iPad protector & charging station when I have to build a UI for someone. IE: Giving a lighting board operator custom controls for projected visuals via Lemur. (A perfect use case for holding onto my first gen iPad too. :)
    Good Breakdown though- I was recently looking into it myself for a IO dock replacement- Seems there is a missing product that does it all correctly.

  • Jakob Penca

    Nice roundup. I think that MIDI SysEx deserves a mention though, as it gives you a cable connection that can be used for arbitrary data. It’s simple, solid and can be used to talk to anything from 80s samplers to Arduino. Personally I don’t see any advantage of using OSC instead of it.

    • Nicolas

      You can use MIDI SysEx with any of the “MIDI over Cable” solutions described above (except Alesis iO Dock, which doesn’t support bi-directional SysEx).

    • Jakob Penca

      The reason why I mentioned it is because it’s the only interconnect (I know of) that can be used with a cable and doesn’t require enrolling in the MFi program.

      It also solves MIDI’s 2 biggest problems: addressing and data resolution. Which leaves limited bandwidth as the only issue.

      So while it’s not the fastest interconnect around, I haven’t encountered a single broken transfer yet (using CCK).

      I haven’t tried this, but potentially it can be used as an interface between Apps on a single device too using virtual MIDI?

  • Nick Suda

    Something I posted on the Liine wishlist; I’d love it if the dev team looked into grabbing the open source Monome/serialOSC code base in order to think about folding in the functionality of faking a network stack and creating virtual ports and IPs when you plug a USB device in, from the perspective of Lemur Daemon.

    That way, we could have our cake and eat it, too: Use the Alesis iODock to charge, get access to iPad audio I/O if we want it, use CoreMIDI, interface KB/Mouse or USB MIDI through the Daemon, and also do faked networking to just pass OSC bundles/strings through the Daemon using the same kind of interface exists for USB MIDI and KB/Mouse MIDI. Would be soooooo dope.

    • http://pkirn.com/ Peter Kirn

      Nice idea. Like that possibility.

    • Nick Suda

      Of course, the main technical detail I have not addressed is how, in this specific workflow, the iPad running Lemur is supposed to pass those strings “over USB, through the iO Dock.” I don’t know what the internal spec of Monome is, but for example Arduinome/Chronome are just 10-bit serial, since they’re Arduino-based.

      I guess I’d need to research how CoreMIDI through the Camera Connection Kit works some more, then. I have the CCK but I’ve never used it since the iO Dock is such a great solution (and a weirdly alone one in the marketplace). Based on that research, the missing link on Liine’s part would be figuring out how to pack strings as network packets over the CCK… or whatever. Hopefully you get what I mean.

    • leolodreamland

      i wish. so many nice monome emus i can’t get to work… wishing for party van control from lemur.

  • http://www.cassiel.com/ cassiel

    So… which of these will actually charge an iPad, or keep it charged?

    • Nicolas

      The iConnectMIDI2+ and/or iConnectMIDI4+ can charge your iPad, check the website.

  • Gwydion

    Nice article, Nick, thanks!

  • Derek Jones

    With WIFI – at least on a Mac / iPad combination, it’s best to set up a direct network between the two to reduce latency. The iConnectMIDI solution presents the iPad as a device you can receive audio from and send audio *to* – as well as bidirectional MIDI. Latency is around 8ms. MusicInclusive has a video in preparation of how to use the device which should be up on our blog shortly (www.musicinclusive.com/blog)

  • David Warman

    Nice article. There are a few complexities I feel need more detail, however.

    I rarely use the iPad audio jack for audio out (exept in the car). For getting both audio and one (or more) MIDI device connections – and for many hardware controllers – one needs to use a powered USB hub connected to the CCK. The iConnect series appear to handle this, but as far as audio is concerned they assume a PC to Pad connection. The 2+ then can only be used in conjunction with a PC, and one has to know how to cajole one’s DAW to see both the iConnect stream and an I/O to amp stream. In OS X one does this by constructing a compound device in the Audio/MIDI setup panel. I do not know how to do this on Windows. The 4+ has an A USB host port, and I believe it can host an external audio device, but until it is available and I get mine I won’t really know. If it does, a PC is not required to be able to get the iPad output to an amp. The compound device will still be needed to both hear and use the iPad as if it were a VST with a PC.

    A simple way to get live audio from iPad to a MacBookPro is to use the optical output from a Behringer 202/222 $30 interface, directly into the line input of the Mac with a mini-TOS adapter. That is a 44.1/16 S/PDIF connection so no D/A – A/D conversions are involved.

    Roland use Sysex for patch knob control on the Junos instead of MIDI Control messages. This can be awkward if your interface or controller program does not know how to handle this. I have discovered that TB MIDI Stuff (for one) can be configured to map touch or incoming CC messages to outgoing Sysex messages. This works with my MKS-50.

    I tried the hotspot between my iPhone and iPad. The iPhone net stack will not route Network MIDI between Apps on the iPhone and Apps on the iPad. I did however find a handy little device – the iUSBPort – that is intended as a portable NAS media server but also happens to route RTP nicely. Required MIDI Bridge at both ends to configure the net connections. It includes an internal battery and can power your hub at the same time.

    Talking of MIDI Bridge, I consider it an essential member of my toolbox. It not only provides a visual MIDI connectivity and filtering/mapping data flow interface – so you can see what is talking to what – it also will mask the (I think unnecessary) complications of three kinds of ports (with four different usages of the Virtual style) from Apps with incomplete or broken MIDI implementations. There are an unfortunate number of those.

  • jonah

    What about MIDI feedback? I can consistently bring down my OSX system if I set routing up wrong. It’s still annoyingly easy to do in Logic X…but the environment offers quick, flexible routing and translations. Alternatives?

    Is there an MIDI emulator or translator for OSC? When people say OSC is faster…well, not in terms of user setup, at least in my experience. If I want to do things with hardware that sends MIDI notes and CCs…

  • http://www.jhhl.net/ Henry Lowengard

    I recently discovered that the CCK now works with iPhones as well as iPads. well, at least the 30-pin iPhones, I’ll see when I get my lightning to 30-pin adapter whether it also works for the newer models. That means you can take that old iPhone4 , slap on iOS7, fire up some MIDI listening iPhone compatible synths or MIDI sources and away you go.

  • Shawn Standiford

    I found that TouchOSC on my iPad works nicely over a wired connection with Windows Reason 7, which is what I prefer anyway (I don’t like relying on wireless for latency and availability).
    The iPad is connected with a Camera Connection Kit to USB Midi. There’s a MIDI In/Out port on the back of my audio interface. It lights up whenever it receives a signal. Very responsive, and the ability to design pages to work with Reason is great.

  • Mister Night

    Everyone always shows the iConnectMIDI4 since about a year ago and it’s still not out… Supposedly it’s the only thing to ‘do it all’ and yet it’s never been released, never tested, doesn’t exist.. Please show only Possible, tested solutions instead of regurgitating hopeful advertisements…