Wednesday, January 21, 2015

Understanding how DI or Direct Boxes Work

When you’re a musician going to a performance, the stage/audio engineers may tell you that you need to route some of your audio feeds through a DI box.  Or they may call it a Direct Box.  Or a Direct Injection box.  Or a Direct Insertion box.  They all mean the same thing.  However, there are different types of Direct Boxes:  mono vs two-channel, active vs passive, etc.  Hopefully, this blog article (and accompanying video) can make all the distinctions clear. 

Let me start off by giving an overview of three general reasons why you’d use a DI box:
1.  Primarily intended to output a signal that can be carried over a cable with XLR ends, for longer distances than a traditional instrument’s patch cord.
2.  Another common reason for a DI is to eliminate hum from what’s called a ground loop.
3.  A less common reason for a DI is for impedance output matching from an instrument.

A Direct Box processes audio signals, so it obviously must have an input area and an output section.

On the input side, it is typical for DI boxes to accept cords that use ¼" plugs.  These are often called quarter inch patch cords, but that's maybe not the best way to name them.  Call them "a patch cord with a quarter inch plug" instead.  I'll get into this more later, but the type of plug on the end of a patch cable doesn't always indicate what kind of signal the cable itself is capable of carrying.

Quarter inch plugs usually carry a mono signal if they're on an instrument patch cord.  You can tell it's a mono plug because there is only one black line around the plug itself, very close to the tip.  Stereo quarter inch plugs also exist.  They have two black lines around the plug, spaced about a centimeter apart.  You typically won't see stereo ¼" plugs on patch cords, although you'll often see such a plug on the end of your headphones, if you have good studio headphones.  Many DI boxes will therefore have a single 1/4" receptacle, to accommodate a single mono audio signal from a mono instrument.  A mono ¼" plug is sometimes called a "two pin" connection, and a single stereo ¼" plug is sometimes called a "three pin" connection.

Although a little less common, the DI box may have two input receptacles for a pair of mono ¼" plugs.  This lets you process a stereo signal.  I don't think you'll ever see a DI box that accepts a single stereo ¼" plug.  It's always two mono plugs, one for the left channel and one for the right channel.  This is good if you happen to have an instrument that has stereo outputs, such as a stereo keyboard.

Moving to the output side, you'll see an XLR connector.  This is usually a three-pin connection, which can technically carry a stereo signal.  However, we don't usually bother.  The reason, which will make more sense later, it that if you're carrying a stereo signal over a single XLR cord, you turn it from a balanced line (good) to an unbalanced line (less good).  So normally, the XLR cord will just carry a mono signal that is balanced (good).  For stereo, use two of them, OR get a special type of XLR cord that has five-pins on the connectors.  But let's not get into that right now.  And also, when I say "XLR cord" I'm referring to "a cable with an XLR plug on the end."  Remember, the cable/cord itself can be wired in different ways.

Many instruments output their sound over ¼" cables.  The obvious choices are guitars, bass guitars, and keyboards.  For guitar and bass, if you're coming directly out of the instrument, you'll always have a mono signal.

For keyboards, you typically have stereo sound coming out.  This is accomplished by having two "tip sleeve" (TS) or two-pin ¼" plugs, one on each side for left and right, rather than a single "tip ring sleeve" (TRS) or three-pin ¼" plug.  However, for various reasons, sometimes you'll want to run a single mono output from a keyboard, perhaps because you have a limited number of channels on your mixing board, or because you're running out of connection cables.  In a case like this, the left output is usually (but not always) a mono signal.

What happens in this case is that instead of giving you JUST the left side of the signal, the keyboard detects that there is nothing plugged into the right side, and chooses to output a sum of the left and right signals into a single combined mono signal out of that left port.  I don't want to get into any complicated physics here, but it's also possible that you'll sometimes get a phase cancellation issue when your left and right are combined into a mono signal.  So if you don't like the sound, try routing a mono out of the right output.  This gives you just an original right side mono.  No phase issues, although this usually means that you lose a lot of volume in the lower frequencies since they usually have most of the left side signal coming from the left or lower end of the keyboard, and the right side signal coming from the treble end of the keyboard.

Anyway, the typical setup is that you can count on your bass and guitar being separate mono signals, and for a keyboard, you'll have a pair of mono signals coming out, which gives you the equivalent of a stereo signal once they're panned left and right on the mixer.

Most decent microphones use XLR cords and don't need to go through a DI box.  I'll want to talk more about XLR vs ¼" in a minute, but for now, just accept that.  First, let's talk about recording an acoustic guitar (or any other instrument) in stereo.

A single microphone is a "point source" of sound.  It can only record in mono!  To get a stereo audio signal via microphone, you need two mics, spread apart.  Most microphone setups will only give you a mono signal.  A vocalist's singing is recorded in mono.  A lav mic attached to an acoustic guitar is mono.  A condenser mic set up beside a guitar is mono.  A dynamic mic set up in front of a guitar or bass amp is mono.

As far as stereo goes, there ARE some examples of situation where two mics will be used to make a stereo recording.  With an acoustic guitar, one might set up two mics, one on either side of the guitarist.  Of course, you could also just record the guitarist in mono, then split the signal and pan the two halves left and right to roughly emulate stereo.  This isn't really stereo though, it's just two copies of mono in different speakers.  However, if you put some stereo processing on it, like delays or reverbs, and they have slightly different settings for the left and right processing, you can get a fairly nice sound.  There's no right or wrong in the debate about recording an acoustic guitar in mono vs stereo using mics.  There are pros and cons to each method, depending on your final goals for the song, and on things like whether the guitar is the dominant instrument or just one of many instruments.  Anyway, in either of these cases, since you're using microphones, you don't need DI boxes.

An acoustic piano (ie. an upright piano or a grand piano, without electronics) will often be recorded with two mics to give a stereo sound.  Usually, the left mic will be placed in the left side (lower/bass) of the piano, and the right mic will be on the treble/upper side.  You can vary the distance or strength of each of the two microphones to give all kinds of various perspectives.

With drums, each drum is usually given an individual dynamic microphone which of course gives a single mono signal for that drum.  However, this setup will often be augmented with two condenser mics set up overhead to the left and right of the kit to give a stereo "drum overhead" signal, which gives some extra ambiance when you're mixing.  Similarly, if someone is recording a full orchestra or choir, a pair of mics might be set up on either side of the stage to give a full stereo sound.

With microphones, you're not going to use a DI box to process the signal.  So enough talk of microphones, let's get back to DI boxes.  The main thing to remember is that microphone signals usually arrive at the mixer through XLR cords, and most signals coming out of instruments that aren't mic'd will come out on "patch cords" or unbalanced cables with 1/4'' plugs on the ends.  Now, I need you to make an assumption:  Let's assume that you'd prefer to have all of your signals on balanced XLR cords instead of some of them coming to you on unbalanced cables with ¼" plugs.

Why would you want this?  Well, there are some inherent advantages in balanced XLR.  These cables are called "low impedance," which is often written as low-Z.  Impedance is like resistance.  It's a measure of how much the cable resists the current.  A low impedance cable lets the electrical current flow a lot more smoothly.  The two big advantages of carrying a signal over a low impedence cable are:
1.  There is usually less noise or interference on the cable; and
2.  Related to that, you can run a clean signal a lot further without the quality of the signal being degraded.

With an unbalanced ¼" cord, ie. a guitar patch cord, I never want to use a cord longer than six meters (about 20 feet).  I'd prefer to use a shorter cable, say three meters long (10 feet).  Actually, as an audio engineer, I'd prefer an even shorter cable than that, but as a guitarist, I want some room to move around on stage.  Balanced cables are different though.  With a balanced, low impedence cable (ie. commonly called an "XLR cord") it isn't unheard of to have runs of a couple hundred meters (500+ feet) and still have an acceptable signal.  Another advantage of XLR cables is that you can daisy-chain them (hook several of them together in series) to turn them into one long cable.

I need to reiterate something which always frustrates some audio engineers.  You should always clarify the difference between cables and plugs.  XLR and ¼" TS and ¼" TRS are types of plugs, not types of cables.  A cable itself can be balanced or unbalanced.  Unbalanced cable has two wires (hot and ground) and balanced cable has three wires (positive, negative, ground).

People should realize that not all cables with ¼" plugs are the same.  Most are unbalanced, with mono plugs, but some are balanced, with stereo plugs (I mentioned this earlier).  It is also possible to have a cable with XLR ends that is unbalanced, although rare.  So a lot of people just say ¼" cord or "patch cord" or XLR cord, but technically speaking, it's nice to specific the plug type and cable type, just to make absolutely sure you understand what gear you're working with.  So with the cables that we commonly work with, this would usually mean saying ¼" unbalanced or XLR balanced.

So far, we've covered a lot of info about signals and microphones and cables.  It's good for you to understand all the details for this stuff, not just a rough overview.  But what is that rough overview so far?  It's that a DI box is used to convert a signal from an unbalanced ¼" cord, like a guitar patch cord, into a signal on a balanced low-impedence XLR cable.  If your sound board at a gig is 150 feet away from the stage, in the middle of the audience, your patch cord won't reach it.  But you can plug into a DI box and send your instrument's signal all the way out to the board with no appreciable signal loss.

Even in a studio, many engineers will want you to use the shortest guitar patch cord possible, and will then use a DI to get your signal into the console in the mixing booth.  In fact, some of the best high-end studio consoles ONLY have XLR inputs.

Let's take a close look at some DI boxes.  As I've said, most DI's have a ¼" inputs or inputs on one end, and an XLR output on the other end.  Most DI's, in my experience, are designed to process a mono signal, ie. from a guitar or bass, or from a keyboard that is only outputting a mono signal for whatever reason.  Not all DI's, however, are mono.  You can also have a "stereo" DI.  I don't like calling it a stereo DI though.  I prefer to call it a two-channel DI.  This type of DI isn't taking a stereo signal, it's just taking two separate mono signals at the same time, ie. the left and right mono signals from a keyboard.  The reason for this is that it's more convenient to process two signals through the same piece of equipment, especially if they're both coming from the same instrument.  Also, a two-channel DI usually doesn't cost twice as much as two separate mono DI's, so it's more cost-effective when you're buying gear.

I've said that a convenient use of a two-channel DI is when you're dealing with a keyboard that outputs a left and right channel.  However, you don't need to have both lines coming from the same instrument.  You could run a guitar and a bass through the two lines of a stereo DI.

A lot of DI's have attenuation switches, which can control how much the signal is cut or reduced (attenuated) as it passes through the DI.  Now why would you want to do that?  You should know that the signal coming from a microphone over a balanced XLR cable is a lot weaker than a line-out signal from an instrument.  So you may need to reduce that signal level so it isn't too hot going into your sound board.  This switch might be labeled "pad" on your DI.

Most DI's have a "thru" or "link" plug, which is another ¼" receptacle on the same side as the ¼" input for the signal coming from the instrument.  The reason for this is so that a copy of the signal coming into the DI box can be fed out somewhere else too, if you want.  For example, if you have an electric acoustic guitar during a performance, you might have the DI feeding to the soundboard (the XLR output side) so that signal can become part of the sound going to the audience, but you might also want to pass the signal through to an amplifier that is set up on stage right beside the guitarist, so the guitarist can hear their guitar more clearly.

By the way, you'll notice that the thru signal is another unbalanced ¼" cable.  Naturally, you'll want to keep this cable short, under six meters (20 feet).  Again, signal loss can be a problem with long unbalanced cables.

Some DI's have a ground/lift toggle switch, or a ground on/off switch.  It's possible that when your instrument is plugged in, you're getting some hum or noise through the system.  This is usually caused by an electrical issue.  If you try switching your ground/lift or your ground on/off switch to the opposite position, there's a good chance that you can eliminate the noise from the ground loop.  By the way, this ground hum is usually at a frequency of 50Hz or 60Hz, depending on the electricity supply where you live.

I should also point out that another way to eliminate ground hum, sometimes, is to remove the grounding prong from the power supply of one of the instruments connected to the console.  This is a terrible idea, and can be very dangerous.  Look up an old British band called Stone The Crows on Wikipedia, if you want an example of a musician who was killed on stage by improperly grounded equipment!  Use a DI box instead.

So far, we've covered the features that are found on most basic DI's.  However, there may be a few other features found on only a limited number of DI's, usually on DI's that cost a bit more.

Your DI might have a "rev" or "180" or "phase" switch.  This switch simply reverses the phase of the signal, to prevent phase cancelling.

Your DI might have a "low cut" switch.  This simply enables a low-cut filter, which removes some of the low end frequencies or rumble from your audio.

Your DI box might have an indicator light to show when phantom power is being supplied.  More on this in a few minutes.

(In the video, I demonstrate all of this stuff).

Finally, although I don't have one, there are some DI's that have an XLR on the INPUT side.  This isn't used commonly by musicians, but it could be useful to sound technicians in a case, for example, of routing the output of one mixer into another board, where impedance balancing is needed.  This is definitely not a common feature.

So now let's example the last major characteristic of DI boxes:  Active vs Passive boxes.  An active box has what's called an "active circuit" to do its thing.  An active circuit needs a source of power.  This can come from two main choices, either an internal battery, or phantom power.  Much less commonly, there are a few active DI's out there with a dedicated external power supply.  In contrast, a passive DI has something called a transformer in it, and doesn't need external power.  In general, I find that there are more passive DI's out there than active DI's, and passive DI's are generally slightly cheaper since they're less complicated (in terms of their circuitry).  However, there is a lot of variety among models of both types, so you can find a pretty large price range for either type.

So how do you tell if you have an active or passive DI?  Well, most of them say so on the unit itself.  If it doesn't, be aware that active DI's will usually have at least one of these three features:
1.  Battery compartment.
2.  Power on/off switch.
3.  LED lights.

To confuse things, an active DI doesn't necessarily have all three.  For instance, there may be no on/off switch, because the unit may only turn on when a cable end is plugged into the ¼" input receptacle.  Also, some DI's can only get power from phantom power and not from a battery.

So the big question now is:  when do you use an active box, and when do you use a passive box?  The technical answer is that an active circuit can be designed to deal with a much higher impedence than the transformer in a passive DI.  However, it is easier to distort the signal going through an active DI.  Therefore, a passive DI is better at handling high input signals from active (powered) instruments like guitars and keyboards.

This is really confusing, eh?  Let's try to put this into simpler terms.  Remember once again that an active DI or an active instrument means that it is a powered DI or instrument of some sort.  Battery power or phantom power, it doesn't matter.  Active is powered.  In contrast, passive DI's and passive instruments are not directly powered.  As long as you remember this, it gets easy.  You should try to only power ONE of your two things, either the DI or the instrument.  It doesn't matter which.  The best type of DI for an active instrument is a passive DI.  The best type of DI for a passive instrument is an active DI.  Think of it like they're magnets:  opposites attract.

(At this point in the video, I show you the difference between some active and passive instruments).

Be aware that if you have a passive guitar, ie. one that doesn't have an internal battery or battery-powered pickup, and you feed the signal into a battery-powered effect (such as a wah-wah pedal), it becomes powered.  It is therefore an active signal, and would be better off to be fed into a passive DI than an active DI.

Now, having said that, you CAN use a passive DI with a passive instrument signal feed.  And you can also use an active DI with an active signal.  It's just not quite as good.  I'll explain why.

First, let's look at the combination of an active DI with an active instrument.  You need to be careful when you set it up, because the signal level going to the mixer can be very strong!  Start with your gain or trim knob on the mixer turned all the way down, and carefully turn it up gradually so you're not sending a really distorted signal through your mixer.  A really strong signal can damage the components in some channel strips on certain mixers.

Now what about a passive DI with a passive instrument?  You'll just lose some sound quality.  In particular, your high frequencies will be especially weak.  You'll also have a much lower overall signal, so you may have to really turn up the gain, which of course can also introduce background noise.

It's possible to buy amps that have DI functions built into them.  For example, you'll run your guitar or bass into them, and you'll have a DI XLR out on the back of the amp.  I generally don't like these for a couple reasons.  First, the DI output is often after the volume in the signal chain, so if you're not careful, you can really send a hot signal to your mixer, and playing with the volume on your amp also affects the signal going to your main console.  Secondly, it's an amp, so it's not nearly as portable as a traditional small DI.  And finally, I've found that some DI's that are integrated into amps sound fairly bad compared to standalone DI's.  Admittedly though, there are advantages.  It's nice not to carry a separate DI sometimes, and it can also save you money if you don't have to purchase a separate DI.

So that's about it.  To give a sixty-second recap, here are the key take-away points:
1.  A direct box is usually used to convert an unbalanced ¼" signal to a balanced XLR that can travel over longer cables without significant signal degradation.
2.  It's also good for reducing hum from a ground loop.
3.  Make sure you know the difference between active and passive instruments and DI's.  Active equipment is always powered.
4.  Although any DI can work with either active or passive signals, your quality will be much better by matching active DI's with passive instruments, and passive DI's with active instruments.

If you want to look at a lot of different models of DI's to compare specs and prices, I recommend that you check out a website like www.sweetwater.com.

Thanks for reading!  If you want to see all of this information in a convenient video, here's a link:








 My YouTube channel has quite a few tutorial videos relating to DJ'ing, audio editing software, music production, and studio equipment. I have an organized list of those videos in the index of my "videos" page on my main website. If you're interested in any of those topics, you should bookmark this page right now:

www.djbolivia.ca/videos


Thanks for your interest in my blog and videos, and thanks for sharing this post or links to any of the videos.



Follow Jonathan Clark on other sites:
        Twitter:  twitter.com/djbolivia
        SoundCloud:  soundcloud.com/djbolivia
        YouTube:  youtube.com/djbolivia
        Facebook:  facebook.com/djbolivia
        Main Site:  www.djbolivia.ca
        About.Me:  about.me/djbolivia
        Music Blog:  djbolivia.blogspot.ca