Common mistakes

From DRC

Jump to: navigation, search

Contents

Common mistakes made while measuring the room response

Dont get your channels crossed

When measuring only one loudspeaker and one microphone is used at a time. On the output side other channels should be disconnected, either at the input of the pre-amp, or the input or output of the power amp. On the input to the soundcard the unused channel should either be shorted or looped back to the sound card input. For instance the measure script supplied with the DRC package uses the second channel as a reference to compensate for the frequency response of the sound card so in this case the second channel should be looped back from output to input.

Get to know your PC's mixer application

Find out what the controls on the mixer. This might be quite straight-forward on a Windows PC as the sound card manufacturer probably wrote the mixing application. But if you are using Linux the controls may be labeled differently. Get to know what they do before taking any measurements otherwise you may end up with no output to your speakers or recording from a channel that has very low gain or is muted.

Some advice on KMix

KMix is the mixer application for the KDE desktop on Linux. It has 3 tabs, Output, Input and Switches . Each tab has a set of sliders according to the capabilities of your sound card.

On the Output tab, the top of each slider has a green LED which, if not lit, indicates that that output is muted. You will want all outputs muted except for Master and PCM which is the signal from your CPU.

On the Input tab there are green LEDs at the top of each slider and red ones at the bottom. Normally you want the green LEDs off as these route the input to the output, although they can be handy for quickly testing that the PC is getting a signal from your mic. The red LEDs are lit when that input is unmuted. You will want all inputs muted except Capture (the equivalent of Master on the Output tab) and Line (assuming your pre amp is connected to the line input of your sound card. Alternately it may be connected to the Aux input).

The final tab is Switches (Please edit of you know what this tab does).

Beware cheap, resampling, soundcards

Most cheap game oriented soundcards often include a sample rate converter in their design, so that input streams running at different sample rates can be played together by resampling them at the maximum sample rate supported by the DAC, usually 48 Khz as defined by the AC97 standard. These sample rate converters often are of abysmal quality, causing all sort of aliasing artifacts.

Most deconvolution based impulse response measurement methods, including the log sweep method, are quite robust and noise insensitive, but goes crazy when non harmonic, but signal related, distortion is introduced, even at quite low levels. The aliasing artifacts introduced by low quality sample rate converters are exactly of this kind and are one of the most common cause of poor quality impulse response measurements and so of correction artifacts.

How to work around your cheap, resampling, soundcard

Despite this, most of the times good measurements are possible even out of cheap soundcards if the maximum sample rate supported by the DAC is used, usually 48 Khz, so that the soundcard internal sample rate converter isn't used at all. You can change the impulse response sample rate after the measurement using high quality software sample rate conversion algorithms, so preserving the impulse response quality.

To check the quality of the impulse response measurement perform a loopback measurement without using a reference channel, else any measurement problem will be washed out by the reference channel compensation. The impulse response you get must be a single clean spike much similar to that of a CD Player. A bit of ringing before and/or after the main spike is normal, but anything else is just an artifact. After you are sure that the measurement chain is working as expected, open the loopback and do the real measurement, eventually using also a reference channel to compensate for any remaining soundcard anomaly.

Avoid overload

While doing measurements for Digital Room Correction it is important that the levels being measured do not overload the sound card.

How to monitor levels

  • You can use your ears to monitor the levels produced by the speaker. You can also play back the recorded audio to determine that the levels are high enough.
  • The rec_imp application reports and aborts if it detects any overload, and reports if the measured level is too low.
  • The measure script reports the max level for both the measured and reference channels. The peak level for the reference(loopback) channel should be below 0.99 (on a scale 0-1) while the measured level should be reasonable high (say greater than 0.1). Be careful because some soundcards have input analog stages designed to clip before digital clipping, because digital clipping sound really harsh, even more than analog clipping. If you're unsure it's better to avoid levels above 0.5.
  • The output from the microphone pre-amp might be difficult to monitor unless the amp has a meter fitted.
  • The recorded signals can be viewed using an audo editor e.g. Audacity. The reference channel should be just less than full scale for the length of the test. The mesaurement channel should be large enough to be visible for at least part of the test.

How to adjust levels

If the levels are too high or too low you have three choices:

  • Reduce the levels produced by the sound card. However you only want to reduce these levels so they do not :
    • overoad the power amp or loudspeaker, or
    • overload the sound card input if you are using loopback to produce a reference channel.
  • Reduce the pre-amp gain (or increase the pre-amp attenuation), again to avoid overloading the power amplifier or to produce the wanted level from the loudspeaker.
  • Reduce the microphone amp-gain.
  • Reduce the sound card input gain.

The situation is most difficult when you use one channel for measurment and the other as a reference, because the gain in the two channels are in part common and in part different. In such a case it is best to use the common gain elements (sound card input and output gains) to set the level of the reference channel to avoid overload, and then adjust the measurement channel gain elements (pre-amp and microphone-amp gains) to give a reasonable level. If you cannot obtain the balance between these you hay have to add some additional attenuation to the reference channel.

Just as it is important to avoid overload, it is important to get the levels so they are not too small.

How to check results

  • After making your measurement, play your recording back. This will give you an indication that your levels are right, the correct channels are unmuted and there is not too much noise. For example, using the measure script provided in the DRC package, run aplay -D plughw /tmp/msrecsweep.wav to listen to your recording.
  • Look at your measured impulse response and the DRC correction filters. These can be viewed using the trial version of CoolEdit/Adobe Audition, the free program Audacity or ETF. The format to open the impulse.pcm or rps.pcm files is 32 bit float, mono. When viewed in this way rps.pcm should look like a cleaner version of your measured impulse response.
Personal tools