Songcrafters.org

General Discussion => General Discussion => Topic started by: 64Guitars on February 13, 2010, 11:21:19 PM

Title: Recording Levels and Clipping
Post by: 64Guitars on February 13, 2010, 11:21:19 PM
I've suspected for a long time that many people do not understand how to set levels properly and, as a result, are getting unnecessary clipping (http://en.wikipedia.org/wiki/Clipping_%28audio%29) distortion in their recordings. To illustrate the problem, I've randomly selected 10 songs from the Unplugged Fest and captured screenshots of their waveforms in Audacity.

Audacity has a very useful feature that clearly shows any clipping in your recording by marking the clipped samples in red instead of the usual blue. To enable this feature, pull down the View menu and make sure that "Show Clipping" is checked as shown below.

(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/ViewMenu.png)
View menu in Audacity 1.3.9

Now lets look at the ten songs that I randomly selected from the Unplugged Fest.

The first three we'll look at have pretty good levels. Song 1 shows a single instance of clipping in the right channel toward the end of the song. This probably isn't worth worrying about. Likewise, the two instances of clipping in the left channel of song 2 are probably not significant. And song 3 has no clipping at all.

(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/01.png)
Song 1


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/02.png)
Song 2


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/03.png)
Song 3


The next four waveforms clearly show excessive amounts of clipping which is audible in the recordings as harsh digital distortion. This is from having the Master Level too high when mastering or bouncing the final mix.

(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/04.png)
Song 4


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/05.png)
Song 5


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/06.png)
Song 6


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/07.png)
Song 7


The last three waveforms are under-recorded. While they don't suffer from clipping distortion, they will sound very low in volume compared to other songs recorded at the proper level, and they'll also have a reduced dynamic range and amplitude resolution (http://en.wikipedia.org/wiki/Audio_bit_depth). In other words, if you're recording at 16-bit resolution but you limit the levels to half of what they could be (as seen in the following images), then you're effectively only getting 15-bit resolution (half the number of possible values). You can correct for low levels using Audacity's Normalize effect. However, this won't improve the amplitude resolution and, although the dynamic range will improve, it won't be as good as it could have been if you'd set the levels properly in the first place.

(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/08.png)
Song 8


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/09.png)
Song 9


(https://songcrafters.org/64guitars/Images/Screenshots/Audacity/unplugged%20waveforms/10.png)
Song 10


Another thing we can learn by viewing these images is that many of the songs are untrimmed. In songs 2, 4, 8, 9, and 10, you can clearly see silence at the beginning and/or end of the song.

One of these days when I can find some time, I plan to create a web page that describes how to correctly set levels in the BR series recorders. Until then, I recommend that everyone load their songs into Audacity with "Show Clipping" enabled before posting. If you have excessive clipping, you should re-master in the BR with a lower Master Level. Likewise, if your levels are way too low, you should probably re-master with a slightly higher Master Level. After you've done this a few times you'll get a much better feel for where to set your Master Level according to the BR's level meter.

Many Micro BR users like the convenience of exporting to MP3 when they master their song. However, in the interest of better recordings, I'd suggest that you try the following procedure instead for finishing your song.


I hope the information and suggestions in this article helps you to make better recordings. If you have any questions, ask away.



Correction:

QuoteIn other words, if you're recording at 16-bit resolution but you limit the levels to half of what they could be (as seen in the following images), then you're effectively only getting 8-bit resolution.
Half of 16-bit resolution would be 15-bit, not 8-bit. In a 16-bit word, you can store a signed integer with a maximum value of 32,767. In 15 bits, you can store a signed integer with a maximum value of 16,383 (half the maximum value you could store in 16 bits).


Title: Re: Recording Levels and Clipping
Post by: bannybassman on February 14, 2010, 01:28:25 AM
Thanks 64, but there was 1 problem I had when recording my entry for the unplugged feast:
When recording the acoustic guitar part, I had the volume and master volume turned up fairly high, but the guitar was recording very quietly, I turned up the mic level and recording level , but I got some buzzing.
Any ideas as to why this could be and how I stop it?
By the way, the recording was done using the internal mics my BR600
Thanks,

Title: Re: Recording Levels and Clipping
Post by: IanR on February 14, 2010, 01:29:04 AM
Thanks 64,

I downloaded Audacity ages ago but I have never used it.  Your guidance has answered one of the long held but never rersolved questions I had about how to trim my MBR recordings and how to set recording levels correctly.

I really appreciate your input into this site.

Ian
Title: Re: Recording Levels and Clipping
Post by: launched on February 14, 2010, 04:17:21 AM
Thanks for bringing this up - It's been an argument/peeve of mine for a while. I've actually seen commercial albums destroyed due to this type digital clipping. Nobody is immune to it due to the "tape recording" mentality. What a shame...

That being said, I don't see the harm in keeping the recording levels and the master volume set to "too low" of a level. Better safe than sorry. Wave form viewing or not, the high level option will ultimately be a disaster - And nobody will tell you.

I think at least a copy of this thread should be in the Home Recording section (Even though nobody goes there  :D)
Title: Re: Recording Levels and Clipping
Post by: OsCKilO on February 14, 2010, 05:12:28 AM
I have found this extreamly useful!!!!!

Awesome advice 64!!
Title: Re: Recording Levels and Clipping
Post by: lg on February 14, 2010, 08:01:41 AM
Hey thanks 64.
This is an issue that I've been trying to get a handle on since I
purchased my MBR!
It seems to me that the only way that I am able to obtain a
clear recording free of clipping, is if I set input level to 80 or 90, and
put the sensitivity to -6 !!!!!

LG
Title: Re: Recording Levels and Clipping
Post by: 64Guitars on February 14, 2010, 11:04:58 AM
Quote from: bannybassman on February 14, 2010, 01:28:25 AMThanks 64, but there was 1 problem I had when recording my entry for the unplugged feast:
When recording the acoustic guitar part, I had the volume and master volume turned up fairly high, but the guitar was recording very quietly, I turned up the mic level and recording level , but I got some buzzing.
Any ideas as to why this could be and how I stop it?
By the way, the recording was done using the internal mics my BR600

Possibly you didn't set the Input Sensitivity correctly for each input source? Input Sensitivity must be readjusted each time the input signal level changes. So, if you set the Input Sensitivity low for your vocals because you're singing directly into the mic, then you record your acoustic guitar from a few feet away without readjusting the input sensitivity, you may not be able to get a very good recording level on the guitar. It's very important to readjust the Input Sensitivity whenever the input source changes. To ensure that you have the highest input signal possible without clipping, increase the sensitivity until the Peak indicator lights occasionally while you're playing loudly. The peak indicator lights at -6dB. Clipping occurs at 0dB.

When recording acoustic guitar with the BR-600's built-in mics, you need to be fairly close to the BR to get a strong enough signal. In their Recording Guidebook for Acoustic Guitar featuring BR-600 (http://lib.roland.co.jp/manual/en/dl_08-23441/BR-600_AGguide_e1.pdf), Roland recommends placing the BR-600 about 12 inches from the guitar body with the guitar's sound hole midway between the two microphones.

(https://songcrafters.org/64guitars/Images/Screenshots/Acoustic%20Guitar%20with%20BR-600.png)

Title: Re: Recording Levels and Clipping
Post by: Satchwood on February 14, 2010, 01:28:36 PM
Very helpful advice 64!  I learned a few things - thank you!
Title: Re: Recording Levels and Clipping
Post by: Oldrottenhead on February 14, 2010, 02:20:32 PM
i bet if i took ten of my songs i could get a match for each one of the examples above. i am always on the go, so sometimes master on headphones sometimes on powered speakers sometimes via the car stereo line in.
always something todistract me.

i think i might try audithingy, welll i got the real old version cool pro edit.
i usually only use it to fade in out.
Title: Re: Recording Levels and Clipping
Post by: 64Guitars on February 14, 2010, 02:53:37 PM
Quote from: launched on February 14, 2010, 04:17:21 AMThanks for bringing this up - It's been an argument/peeve of mine for a while. I've actually seen commercial albums destroyed due to this type digital clipping. Nobody is immune to it due to the "tape recording" mentality. What a shame...

Actually, analog tape recording and digital recording are not as different as some people would suggest. The same basic audio principals apply. For example, the optimum level in both mediums is between the noise floor and the distortion ceiling. Of course, digital recording has a much lower noise floor than analog tape recording, so that becomes less important (though it still exists). And digital distortion is much more objectionable than tape distortion.

Because levels are constantly changing, you can never achieve the absolute optimum recording level, so you apply a bit of a safety factor to avoid problems. The main difference between analog tape recording and digital recording is how you apply that safety factor. With analog tape recording, it's usually best to err on the high side with your recording levels because tape hiss (the noise floor) is very annoying and tape saturation (the distortion ceiling) is not nearly as objectionable as digital clipping distortion. So a recording level that's slightly higher than optimum usually sounds better than a recording level that's slightly lower than optimum (and that much closer to the noise floor). But with digital recording, it's usually best to err on the low side with your recording levels because digital clipping distortion sounds horrible and the noise floor is extremely low compared to analog tape hiss. So a digital recording that's slightly lower in level than the optimum will usually sound better than one that's slightly higher than the optimum (ie; peaks are clipped).

In both cases, you should strive for the optimum recording level. That is, as high as possible without introducing distortion. Then you should apply your safety factor. With analog tape, bump the level up ever so slightly. With digital recording, reduce the levels ever so slightly.

Quote from: launched on February 14, 2010, 04:17:21 AMThat being said, I don't see the harm in keeping the recording levels and the master volume set to "too low" of a level. Better safe than sorry. Wave form viewing or not, the high level option will ultimately be a disaster - And nobody will tell you.

As I said above, it's best to err on the low side with digital recording. However, reducing your levels too far will introduce its own problems. They're not as objectionable as digital distortion but they're still undesirable.

Take a look at the waveform for Song 3 above. The peaks never go beyond about 0.8. That means the level could have been increased slightly without introducing any clipping. However, it's close enough to the optimum level (peaks at 1.0) that the difference probably wouldn't be noticeable.

Now take a look at the waveform for Song 10. Most of the peaks don't go above 0.2, with perhaps one reaching 0.25. That's way too low. The most obvious problem this creates is that, when you're listening to Song 3 in the Unplugged Jukebox and Song 10 follows it, you'll hear a huge drop in volume and you'll have to reach for the volume control on your computer speakers or whatever to compensate. Then when the next song plays and its recording levels were set properly, it will blast you out of your chair and, again, you'll have to reach for the volume control to turn it back down. This wouldn't be necessary if everyone recorded at the proper level, and listening to the songs in the jukebox would be more enjoyable.


Another reason that you should record as high as possible without clipping is sample resolution or bit depth (http://en.wikipedia.org/wiki/Audio_bit_depth).

(http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Pcm.svg/250px-Pcm.svg.png)
(click to enlarge) (http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Pcm.svg/500px-Pcm.svg.png)

The diagram above shows a simple sine wave digitized with 4-bit samples. The number of bits determines the number of possible values for each sample. A single bit can hold only two values, 0 or 1. Two bits can hold four possible values, from 0 to 3. Three bits can hold eight values, from 0 to 7. And four bits (as in the diagram above) can hold 16 values from 0 to 15. In the diagram, a sample value of 7 would represent silence (the axis of the waveform), and 15 and 0 would represent the highest possible signal values (8 steps above the axis and 7 steps below it). The Audacity screenshots above show a scale where the axis is 0. So, 15 in the diagram above would be equivalent to +1.0 in Audacity, 7 is 0 in Audacity, and 0 in the diagram is -1.0 in Audacity.

If you look at the first sample in the diagram, you'll see that it intersects with the actual waveform exactly at 9. However, the next sample intersects with the waveform at about 10.3 or 10.4. That's a problem because the sample must be stored as an integer value from 0 to 15. So, the analog-to-digital converter will interpret that value as either 10 or 11, which is inaccurate. You'll see several more of these inaccuracies in the diagram. Clearly, 4 bits is not enough to accurately represent this simple waveform. The problem becomes even greater with complex waveforms. The more bits you use to store a sample, the more possible values it can have, so the accuracy is increased.

Now, consider what happens when you record with the levels set to half of what they could be without clipping. In the diagram above, the peaks of the waveform would be at 11 and 4 instead of 15 and 0. That means that the ADC (analog-to-digital converter) would only be using 8 of the 16 possible values available for each sample, resulting in much less accuracy.

All of the BRs record 16-bit samples. The largest value that can be stored in a 16-bit signed integer is 32,767 and the lowest is -32,767. Including 0, that's a total of 65,535 possible values. This gives a pretty accurate digital representation of any waveform. However, if you record at only half the optimal recording level, you'll only use half of the possible values per sample, so the samples will not be as accurate as they could be if you recorded at the proper level.



While I've got that diagram above, I might as well use it to explain clipping. The seven sample values at the top of the waveform are 12 - 13 - 14 - 15 - 14 - 13 - 12. When the DAC (digital-to-analog converter) converts these values back into an analog signal, you get a reasonably rounded top of the waveform similar to the original sine wave.

         15
      14    14
   13          13
12                12


Of course, with higher sample resolution and a higher bitrate, it would be even more rounded and more accurately represent the original waveform.

Now, consider what happens when you increase the recording level. The same samples might now become 13 - 15 - 17 - 18 - 17 - 15 - 13, for example.

         18
      17    17

   15          15

13                13


But a 4-bit sample can't hold values that high, so values of 15 or greater get stored as 15 and the digitization of this waveform segment becomes 13 - 15 - 15 - 15 - 15 - 15 - 13. When the DAC converts it to an analog signal, the top of the waveform will be a straight horizontal line due to the sequence of consecutive 15s. So, instead of a nice rounded sine wave, we get a square wave which looks and sounds much different than the original sine wave.

   15 15 15 15 15

13                 13


That's clipping.

Title: Re: Recording Levels and Clipping
Post by: bannybassman on February 14, 2010, 02:59:50 PM
thanks 64, that's really helpful!
I'll try changing a few settings
Title: Re: Recording Levels and Clipping
Post by: launched on February 14, 2010, 03:19:46 PM
Wow, that was a good read. I had no idea that bit depth was so affected by the recording level. Very good info to know. That being said, I would imagine that 16 bits is enough to please the human ear, and most of our rigs have 24 bit signal processing.

To me, that means if we stay in the 70-80% input level range, we would somewhat limit/eliminate distortion and be recording at a rate greater than the human ear can process. Is that right? I don't dare push it too far.
Title: Re: Recording Levels and Clipping
Post by: 64Guitars on February 14, 2010, 03:59:31 PM
Quote from: launched on February 14, 2010, 03:19:46 PMTo me, that means if we stay in the 70-80% input level range, we would somewhat limit/eliminate distortion and be recording at a rate greater than the human ear can process. Is that right? I don't dare push it too far.

Yes, the waveform in Song 3 above is probably at about 80% and that's pretty good. Although, before posting, I would recommend using Audacity's Normalize effect to raise the level so that the peaks hit 1.0. Remember, clipping only occurs when levels exceed 1.0. You'll get no clipping when the peaks merely reach 1.0 but don't exceed it.

Title: Re: Recording Levels and Clipping
Post by: Ferryman_1957 on March 02, 2010, 01:45:53 PM
This is fantastic info and great advice 64G. Many  thanks.

Nigel