First post, by mkarcher
Since I had an original Creative Labs (at least that's what the plastic bag said) MIDI-to-gameport cable, originally used on an SB32 PnP, later on a SoundBlaster 128 PCI, I always got an annoying hum if I connect analog audio from the sound card to an electronic piano (into the AUX in on the piano), and MIDI from the piano's MIDI OUT to the SoundBlaster MIDI IN at the same time. As MIDI IN is supposed to be opto-isolated (and in the cable I have, it actually is), it should be impossible to create a ground loop from connecting anything to MIDI in, right?
Wrong! While the opto-isolation part is correctly implemented in the Creative Labs MIDI adapter cable, MIDI cables actually have three pins: Not only "data source" and "data sink" for the 5mA current loop interface, put also a "shield" pin. The MIDI specification seems to be quite clear on how to connect the shield pin: The male-to-male MIDI cable should have shield connected to pin 2 (the central pin) on the DIN connector on both sides. The transmitting device should connect pin 2 to the ground level of the transmitting device. The receiving device should leave pin 2 open in its jack. This ensures that the cable shield is always connected to ground on one side, but never creates a ground loop.
In case of the MIDI IN (to the computer) part of my MIDI adapter cable, the cable shield is connected to game port ground (pins 4 and 5) as well as to pin 2 in the MIDI IN DIN connector. This clearly violates the spec that the shield must not be connected on the receivers side, and creates a plain old ground loop if I plug the MIDI IN cable as well as an unbalanced analog audio cable. The work-around is quite easy, though. As the cable shield is grounded by the PC (although it shouldn't be), there is no need to have the shield grounded by the transmitting device, so I took my needle-nose pliers and bent the shield pin in the MIDI IN connector back and forth until it broke off. This removed the ground loop, whereas MIDI in both directions and analog audio still worked fine.