MidiConnections

This question crops up sufficiently often to justify a wiki page.

Firstly, we should all pay homage to Dave Smith (Mr Sequential Circuits/DSI) for pushing a standard protocol for Musical Instrument Digital Interface in 1982 (MIDI, see also wikipedia article ). A testament to how good his definition was? We are still using specification 1.0 today. Sure, many things could be improved today, but that is a debate for a different page.

Where can I find out more about MIDI?
A great introductory page can be found at JGGlatt's tutorial.

Essentially, instruments are connected via a common 180 degree 5 pin din male to male lead. Each instrument should provide at least one of three common interface sockets.

Either a


 * midi in (to receive incoming midi traffic),

On professional equipment you can expect to find all three. On consumer equipment, depending on the type of device, you may have both a midi in & midi out. Or if it is a control surface, you may only have midi out. If it is a sound module you may only have midi in.
 * midi out (to transmit outgoing midi traffic)
 * midi thru (to replicate incoming 'midi in' and hence to chain to 'midi in' of another device)Midi_in_out_thru.jpg

So all midi is transmitted down a 5 pin DIN cable ... got it!
Nope. You can get wireless midi (my controller keyboard has a wireless receiver/transmitter and a USB dongle simply attaches to XP or Linux, with signal being passed thru the air). You can also transmit MIDI down ethernet. And, of course, nowadays USB to MIDI converters are a more-or-less "must have" accessory. But for now, let's keep it simple ... let's assume you either have 5 pin DIN, or a USB to MIDI.



I got it ... it's a standard ... so all compliant cable behave in a standard way!
Nope. They should, but there are many debates (often heated) about more expensive cables v cheaper, inferior cables. For sure, a damaged cable is going to be unreliable. Too long a cable length, without some form of repeater, is probably likely to induce data loss. But for most home studios, a cheap (£5) USB-to-MIDI cable will work most of the time. The problems typically occur because they are not plugging in properly (wrong hole, not firmly inserted), incorrect OS driver (there is some suspicion about the Microsoft Midi Driver, but it is reasonably reliable to me), or the user hasnt experimented with their configuration to be sufficiently comfortable with it. I suspect OS is an important factor here. I have some trouble with larger SysEx data transfers on Windows, but not on Linux -- same cable. There again, to counter this --- Stretchy's idea of using Reaper EVEN with my cheap cable has not failed me yet! And in reality, a USB cable is both a cable and an interface! By all means pay for a "good" one ... you will have to consult the internet for what good means.

So you say cheap cables wont work?
Nope. For "note on/note off" data, so long as the cable/inteface is MIDI compliant, and you can plug it in properly, and you computer can understand it ... it should work. The woes start when one tries to send larger data packets, specifically System Exclusive data (SysEx). Please see Patch uploading and downloading for a MidiOx example, and the forum for a plethora of debate about this topic. If on Windows, I plead with you to use Reaper (download, use it, throw it away ... you havent broken any rules) if you are not computer savvy.



I have my cable ... how do I know if I am a grand master of midi-ing?
Here's a suggestion of (growing in complexity) you should be able to do with your MIDI-to-Ion/Micron/Miniak (IMM) if you want to feel great. NOTE: curiously, when folks can send but not receive ... it is amazing how many times the "write protect" is ON ... and since that protects writes ... no amount of sending will ever be able to be persisted on the IMM! This was the first issue I encountered. I can laugh about it now.
 * 1) Receive notes on/off from/to your synth/external app
 * 2) USB Route
 * 3) Is your cable plugged in properly? In to Out, Out to In?
 * 4) Is the USB plugged in?
 * 5) Does your computer recognise it?
 * 6) Have you ensured the interface is logically connected to your external app
 * 7) 5 Pin to 5 Pin
 * 8) If keyboard to keyboard, can you play on your master keyboard and trigger the IMM? You have got earphones connected or an external amp connected to the IMM right?
 * 9) If a sequencer to IMM, check the notes trigger on the IMM.
 * 10) In all cases .. read the manual. Get comfortable with what "LOCAL CONTROL" means
 * 11) What midi channel are you transmitting on?
 * 12) What midi channel are you receiving on?
 * 13) Ah ... I dont hear anything because these are not compatible ... changing to same channels has cured it!
 * 14) Receive a single Patch Dump from the Synth
 * 15) See other WIKI / Forum articles on this.
 * 16) Read the manual
 * 17) Expand this section if you felt the info was not clear ... go on ... I wont mind.
 * 18) Transmit and properly receive [2] ON your Synth
 * 19) This _should_ be easy but is the first source of frustration
 * 20) A patch is 434 bytes long. So please consider making your buffer at least 512 bytes long
 * 21) But, on XP at least try Reaper ... it just works.
 * 22) MIDI-OX is my tool of choice, but there again I am pretty computer literate and I like PCs.
 * 23) Once you can re-read what you can dump ... you might like to look in the FILES section of the forum to find some excellent patches other uses have made.
 * 24) Receive a complete Patch Dump from Synth
 * 25) This will be a lot bigger than 434 bytes. On a Miniak this will be typically 400k
 * 26) Transmit and properly receive [4] ON your Synth
 * 27) This is where the cheap cable arguments start to brew.
 * 28) Even experienced folks fail here ... and sometime complete novices "just do it!". So I share you pain if you are stuck here. But, it is possible to get past this, assuming there is nothing wrong with your equipment.
 * 29) For MIDI-OX, you are going to have to play with the buffer size, number of buffers, delay between buffer sends and delay after F7.
 * 30) If on XP, please ... just use Reaper if you dont know what you are doing, or are easily discourages (or should that be dos-couraged :-
 * 31) Load COMPLETE Factory Backup for your synth
 * 32) This really is a MUST if you want to consider yourself a master midi guru.
 * 33) Heaven forbid you want to sell your machine ... much nicer to say "factor presets intact".
 * 34) And you may want to restore.
 * 35) Update your OS
 * 36) This might mean reinstalling the original OS if you get the dreaded "My Os gone bad" message.
 * 37) Again ... for XP .. REAPER REAPER REAPER.
 * 38) Did I forget to mention REAPER allowed my £5 USB-To-MIDI cables to work?
 * 39) My Turtle beach cable worked with MIDI-OX, but ONLY after I re-installed the drivers. It had defaulted to the MS ones and they do seem a bit buggy.
 * 40) Check out post 23717

Dale's GEMS
Dale kindly put together some extra MIDI gems which I have collated here.

Some observations on midi from my end. A bakers dozen.

Dale
 * 1) Not all thru pass. Some pass only the midi from the in, not the out from the device too. Some only the midi from the device. And yes, some do both the device and in together. The very first thing I do with any new midi device that has a thru, see just what they call a thru is.
 * 2) Chaining midi beyond 3 often leads to stuck notes and or other problems in the signal path. Errors, timing and other hair pulling events. See #3 for one solution.
 * 3) A 3x8, like from midiman, is a great tool for routing, cleaning up the signal and making sense of a snake nest.
 * 4) Always try very hard to use the best shielded midi cables you can find. Keep them as short as possible. Excess, roll up in a loop, do not allow it to follow power lines or speaker cables.
 * 5) Wireless midi does exist, in use here. Often AX-1 to nano-synth, ION, JP-8000, MS 2000 etc.
 * 6) Not all devices follow the same rules as standard midi. Often selecting something as "arp off" will cause a bank change on another device. Default patch is always something very off key and or obnoxious.
 * 7) Know your device well, esp. in the menu area referencing midi. You might have to change channels or set something to work with another device. ARP via midi to "off" comes to mind.
 * 8) You can hook two midi cables together, use a computer keyboard adapter for that. As well as computer keyboard extender cables can be used as midi cables.
 * 9) USB can do more than one set of midi. I use a midiman 8x8, 2x2 and a Edirol 8x8 all via USB, into the same system, using the same DAW software. That makes up what I call a midi network here that ties all my synths up, xp boxes, Linux boxes and so on. Even effects are controlled by midi on those devices that allow that. How else could I use my Les Paul with it's midi adapter to the ION? (there is a Roland synth in the middle too (GR-20)) Roughly speaking, 18 port of 16 channels of midi at one time. Yes, even one USB too but I do three as to not overload, confuse me and windows 2000 hates me less. XP is different, it has no problem randomly with this due to different midi handling. Which also means, check your os tech level for midi limits.
 * 10) Using a bank select switch (looks like a guitar stomp box and in my case is) with the 3x8 allows you to use one input to 8 midi devices at once with no delay. (false there, there is always a delay but it is very little)
 * 11) Depending on how you care for a notebook, if in use, consider using a boot Linux CD/DVD with all the audio/midi items needed. Use internal drive for data and or have an external for backup. For some reason, many seem to drop, kick or toss the notebook, miss the catch and windows is dead. Why they have even put the notebook under the power amp/main speakers for safe keeping while driving a few hundred miles.
 * 12) Midi works best if you practice the cabling, use and troubleshooting a few hundred times sober, under the influence and distracted by others. As they say, practice make perfect. Color codes do work unless someone is also wearing them.
 * 13) If a midi cable has to run across the stage, use a decoy cable for the team to trip on. Tape the real one down using grafter tape. Better yet, use wireless.