Connecting a MIDI Device
Just like for USB audio, external MIDI devices can be used, either connected by USB or Bluetooth. Using a MIDI input, one could record MIDI events on a MIDI track and/or play virtual instruments. Using a MIDI output, one can drive synthesizers, drum computers, effect processors and more.
Connecting by USB
USB MIDI devices need to be 'class compliant', meaning that if you would use them on OSX for instance, no additional drivers would be required. Please check the manufacturer's website or the device's manual to see if your device is compatible with iOS. To connect a USB MIDI interface, you likely need a Lightning to USB-A adapter cable, sometimes called a Camera Connection Kit:
In contrast to Android device, iPhones and iPads only supply a very limited amount of power to a connected device, so if your USB audio interface is not wall-adapter or battery powered, then you will likely need an additional power source like a powered USB hub in between.
Once iOS has recognized the USB MIDI interface, it will be selected as default input/output device.