You are here

Eliminating PC Audio Glitches

PC Musician
Published July 2003
By Martin Walker

Few things are more frustrating than unwanted clicks and pops in your recorded audio. But what are the main causes, and how can they be eliminated?

When transferring Minidisc or DAT recordings, glitches due to incorrect clock settings can be tracked down by recording a simple 10kHz sine wave signal, which makes hearing the tell-tale 'ticks' due to missed samples a lot easier (the 1kHz sinewave shown here makes it easier to see the missed sample, as in the lower window, but faults will be far easier to hear at 10kHz).When transferring Minidisc or DAT recordings, glitches due to incorrect clock settings can be tracked down by recording a simple 10kHz sine wave signal, which makes hearing the tell-tale 'ticks' due to missed samples a lot easier (the 1kHz sinewave shown here makes it easier to see the missed sample, as in the lower window, but faults will be far easier to hear at 10kHz).Audio clicks and pops have been the bane of some musicians' lives ever since soundcards first added digitised audio recording and playback to their arsenal of features, and it's natural to assume that it must be the soundcard's fault when any glitch is heard. However, there are plenty of other possible reasons, some of which are quite mundane, and it makes sense to eliminate these first before delving into the virtual innards of your PC. One is faulty or intermittent leads, while another possible external cause is incorrect clock settings. If you're transferring audio from Minidisc or DAT and hear the occasional click in your recordings, try recording a 10kHz sine wave, and then transfer this. Since even a single missed sample will then be fairly obvious as a tell-tale 'tick', this will test your digital cables and settings. If the recording isn't locked to an external clock you may hear a fairly regular ticking, while not using proper 75Ω (S/PDIF) or 110Ω (AES-EBU) cables to transmit electrical digital signals can produce faults ranging from the occasional tick to no signal getting through at all.

Audio clicks and pops that have nothing to do with the soundcard or Windows settings can also occur during track grabs from Red Book audio CDs. These are often characterised by missing or repeated sections (see screen shot, right), and are due to 'jitter' when joining the various data chunks together. If you have a CD drive that suffers from this problem, most modern software has special extraction settings that can overcome it. However, before you resort to these, do make sure the disc itself isn't scratched, marked, or otherwise flawed, and that the CD lens doesn't need cleaning. Anyone who has Ahead's Nero can run the DAE Quality Test of its CD Speed utility, which will detail the number of read faults for a particular CD.

Narrowing Down The Problem

Before you start delving into Windows settings and adjusting arcane parameters in the nether reaches of your soundcard's software utility to solve clicks and pops, there are certain things you should and shouldn't do. First, don't be tempted to indulge in overclocking unless you really know what you're doing, since this can exacerbate any problems, particularly if you attempt to run the PCI buss faster than 33MHz.

Try to note down details about what's happening when the clicks occur, and in particular what software you're running at the time. If your PC has been running happily for months and then pops and clicks appear, try to remember what you changed or installed just before you noticed the problem.

Don't confuse glitches like these with those caused by soundcards — I captured both of these while grabbing tracks from Red Book audio CDs, and both are caused by jitter. On the left a section of data has been repeated, while in the right window, the vertical jump in both channels indicates that a section has been missed out altogether.Don't confuse glitches like these with those caused by soundcards — I captured both of these while grabbing tracks from Red Book audio CDs, and both are caused by jitter. On the left a section of data has been repeated, while in the right window, the vertical jump in both channels indicates that a section has been missed out altogether.

However, don't assume that if your sequencer glitches on audio playback, this guarantees that it is to blame. Trying other basic audio software like Microsoft's Media Player to see if this suffers from a similar problem may help prove innocence or guilt, although a better test if possible is to run a stand-alone soft synth using the same type of audio driver, running with a similar latency. If this too exhibits clicks then your problem is more likely to be system-related rather than software-related, and even if you don't hear clicks, it doesn't necessarily mean that your sequencer is to blame — MIDI + Audio sequencers stress your hard drive, processor, and RAM in quite a comprehensive way. Remember, by the way, that sequencer CPU meters generally poll activity once every second or two before displaying the result, so a very short CPU overload may not register at all, despite causing a click and sometimes stopping your sequencer altogether.

If you actually capture some clicks and pops in your recordings, another way to narrow down the cause is to zoom right in on them in a waveform editor and examine them more closely. The classic 'digital dropout' has vertical sides and zero data throughout the interruption (see screen shot on the next page), is due to some interruption in the smooth flow of audio data, and can usually be tracked down to faults inside your PC. If, on the other hand, you find the clicks less predictable or more 'analogue' in shape, they are more likely to be due to external problems such as faulty synths, central heating boilers and the like. This sort of click can often be traced by noting when it happens, and then seeing if the heating has just switched itself on, or if the problem disappears after you've temporarily unplugged the fridge/heating/synth. It may even be arriving piggyback on the mains supply, especially if you're close to a local sub-station.

However, the simplest way to narrow down possible causes is to search the Internet for users complaining of similar problems, to see if you have any software or hardware in common. If you post your symptoms, you may even be lucky enough to get someone who recognises them and replies with some helpful suggestions. This approach can also weed out soundcard driver problems, and if enough users of a particular model have the same problem, the manufacturer almost has to take notice and do something about it.

 Preventative Measures 
 A completely separate music-only partition does take some extra effort to set up in the first place, but the chances of it developing problems in the future are far smaller when you're not browsing the Internet, playing games, and generally indulging yourself on a much bigger general-purpose Windows installation. You'll also make your life a lot easier if you regularly take images of your hard drive, so that if any audio fault does develop you can backtrack to a known state. I always make an image just before I install any major application, just in case of problems, and this is yet another reason to divide your drive into system and audio partitions, as it makes the image files much smaller. I've never had to create a partition larger than 2.5GB to hold Windows and its applications, especially with a multi-boot PC where each Windows partition only holds a subset of applications, and with the lossless compression options of suitable utilities like Powerquest's Drive Image, my image files rarely exceed 1GB.

Placing your audio files in a separate partition also reduces the likelihood of glitches, since you can regularly defragment this to ensure the smooth flow of its data during playback, and the smooth saving of data being recorded, without the read/write heads having to dart about between every available nook and cranny.

 

Fundamental System Problems

Some PC components are notorious for compatibility problems that cause audio glitches, including early Via and AMD motherboard chipsets such as the KX133, AMD 750 and AMD 751, and USB click problems with some early Intel BX motherboards with two USB ports. In some cases like these, it's almost impossible to solve the problem, however you tweak your PC. Some people now say that motherboard chipset problems are a thing of the past, but it still pays to visit your soundcard manufacturer's web site to check on compatibility with your specific chipset before buying a new card.

If your clicks and pops are due to a fundamental motherboard problem, they won't respond to Windows tweaks, so you should always make sure you have installed the latest motherboard chipset drivers. Anyone with an AMD chipset should run the latest Driver Pack, Via chipset owners should make sure they have the latest 4in1 drivers installed, and most Intel chipset users should install the Intel Application Accelerator, as discussed in SOS April 2003. Opinions are more divided about updating the motherboard BIOS, since you can prevent your PC booting up at all if anything goes wrong during the procedure. If you have a specific problem that may be solved by whatever features are updated in a newer BIOS then follow the step-by-step procedure very carefully. If not, leave well alone.

Many specialist retailers who advertise in SOS set up their PCs in Standard Mode, perhaps because various M Audio cards seem to prefer it to ACPI mode. However, I still maintain that XP is best left in ACPI mode, especially if you have a PC with an APIC chip, unless you're suffering from clicks that don't respond to other Windows tweaks.

While we're on the subject of fundamental system problems, make sure your various hard and CD drives are connected in the most appropriate way to whatever IDE channels are available on your PC, to prevent them jockeying for supremacy. I discussed the options most recently in SOS January 2003. It also pays to make some considered choices about which expansion slot to use for your soundcard and any other PCI devices, to avoid the sharing of IRQs at motherboard level. Most modern soundcards will happily share with another device, but others won't, and nor will some other PCI cards. Look no further than SOS May 2003 for a comprehensive guide to this often confusing area.

With laptops, additional factors can come into play, including BIOS and power management settings for long battery life that are unsuitable for hard disk audio recording, infra-red devices that are regularly polled for activity, and CPU fans that cut in when required, all of which can cause audio glitches (some Dell laptops are particularly bad on the last front). You may not be able to change these settings as easily as on a desktop PC, and sometimes not at all, since many laptops provide limited BIOS options. Since every laptop model can behave differently, be guided by other users before deciding which one to buy for audio work, and read my feature in SOS January 2001 for some more background information.

Last but by no means least, make sure you have no system conflicts, by having a look in Device Manager. Having an exclamation mark next to a non-audio device may or may not be relevant to your audio problems, but it pays to make sure before you tear out your remaining hair.

Unsuitable Windows Settings

Only now that you've removed any possible external causes of your clicks and pops, and confirmed that your PC doesn't contain any rogue devices, is it worth tweaking your Windows settings. I've covered general Windows tweaks in some depth in past PC Musician features: you can find extensive details about setting up Windows 98 in SOS January 1999, and for Windows XP in SOS March 2002. Moreover, you can find various web sites with all this information presented in checklist form, one of the best being www.musicxp.net. So let's see how to employ this information in tracing and eliminating the sources of audio glitches.

If your recording has a dropout with clean vertical sides as in the left window, and with zero data during the fault, this is almost certainly a PC-related fault that interrupted the recording process. The right window shows a similar PC dropout from a soft synth, but this time recorded through a soundcard's analogue input; despite the sides not being quite vertical, and having a slight overshoot, it's still likely to be a PC-related fault, since it once again has a value of zero throughout the interruption.If your recording has a dropout with clean vertical sides as in the left window, and with zero data during the fault, this is almost certainly a PC-related fault that interrupted the recording process. The right window shows a similar PC dropout from a soft synth, but this time recorded through a soundcard's analogue input; despite the sides not being quite vertical, and having a slight overshoot, it's still likely to be a PC-related fault, since it once again has a value of zero throughout the interruption.

First up, and normally easiest to deal with, are interruptions due to graphics. You may be suffering from these if your glitches occur when you do something specific such as opening a new menu dialogue, quickly moving your mouse, or particularly when the screen is either scrolling or flipping from one image to the next. If you suspect this to be the case, try to minimise such opportunities by temporarily disabling screen updates in your sequencer, and leaving the mouse untouched. If this lessens the problem, or it goes away altogether, you can implement the various related tweaks. Extra CPU power will be used every time you use unnecessary graphic frills, such as scrolling, fading, or exploding window transitions, balloon tips, and so on, so if these are the culprits it will be fairly obvious, as clicks will occur when this graphic activity is happening. Screensavers can also cause occasional clicks, and are best disabled.

If you get occasional clicks when your MIDI + Audio sequencer is already running with a high CPU overhead, try altering the Colour Quality to see if this improves matters.If you get occasional clicks when your MIDI + Audio sequencer is already running with a high CPU overhead, try altering the Colour Quality to see if this improves matters.Less obvious is the CPU overhead due to drawing or updating the main graphics. You should check that Graphic Acceleration for your graphics card is left at full, despite what some web sites tell you, since using other settings will simply increase CPU overhead as your processor has to do the work instead. In general, 16-bit colour will give the best combination of graphic excellence and low CPU overhead with modern music software, although some applications like Wavelab 4.0 specify 24-bit or higher.

If you're running a song that is already displaying a high CPU figure inside your sequencer and you start to get the occasional click or pop that doesn't respond to increasing the soundcard's buffer size, you can test whether the graphics card is at fault by changing the graphic colour quality in the Settings page of the Control Panel Display applet.

Hogging The Buss

Another cause of audio glitches gives no visual clues, and sometimes happens only very occasionally: hardware devices hanging on to the PCI buss and stopping the otherwise smooth flow of audio or MIDI data. For instance, anyone with a Promise FastTrack PCI controller may find their audio clicks and pops disappear after they open the Promise FastTrack Monitoring Utility, and in the 'PCI Bus Utilization' section on the Options page, move the slider from High to Low.

 Other PC Musician Resources In SOS 
 
  • January 1999: Setting up Windows 98.
  • January 2001: Making music with laptop PCs.
  • December 2001: Resources & background tasks.
  • March 2002: Setting up Windows XP.
  • September 2002: MIDI latency & drivers part 1.
  • October 2002: MIDI latency & drivers part 2.
  • January 2003: IDE connections.
  • April 2003: Motherboard drivers.
  • May 2003: Choosing PCI slots & interrupts.
  • June 2003: Monitoring CPU & RAM consumption.
 

Sometimes it's the graphic card that may be causing the problem, so make sure you have installed the latest drivers for it, even if you don't hear audio clicks and pops. This can make a great deal of difference, as I found in SOS October 2002, when occasional jumps in MIDI latency disappeared after I abandoned the default Windows XP drivers for my Matrox G450 card and replaced them with the latest ones downloaded from the manufacturer's web site, as well as unticking their buss mastering option. Buss hogging is sometimes still a problem, but most cards have such options to improve matters for the musician. Although most of us now use AGP graphics cards, anyone considering adding a PCI card to their PC so they can attach two monitors should think again, since this will increase the likelihood of buss hogging.

Excessive CPU activity can also be caused by incorrect Bus Master DMA settings for your hard drives, which can cause intermittent clicks even though once again the audio application doesn't display high CPU readings. Windows 98/ME users need to set their drives manually, though 2000/XP users should find this done automatically, as will any user of Intel's Application Accelerator (see SOS April 2003) or specialist IDE controller chips. Sometimes Bus Master status isn't available to check, but there's an easy way for any musician to find out — just download Dskbench from www.sesa.es and run it. CPU readings lower than about 5 percent prove that your drives are correctly set up.

USB audio devices can also be prone to occasional dropouts, partly because they consume quite a bit of the USB bandwidth, but you can minimise such problems by ensuring that you avoid hubs. Use them for other USB devices by all means, but make sure your USB audio peripheral is plugged directly into its USB port. If possible, disable all other USB devices when you're making music, and it's also recommended that you disable network or modem cards while running USB audio.

Drive Activity & Housekeeping

Another class of pops and clicks can be caused by extra and unexpected drive activity when you're already pushing your PC near its limits. If you spot the activity LED on your PC's front panel flashing in sync with clicks and pops, in addition to its normal pattern of activity, then you should investigate further. Possible causes include Auto Insert Notification for audio and data CDs, which sometimes causes a regular extra flash every few seconds, and swap or page file activity, which is likely to be visible as a sudden burst of flashes lasting several seconds. This can mean the computer is saving data that can't be fitted into system RAM — in which case a RAM upgrade may be in order — or that it is resizing the swap file. Most musicians set the swap file to a fixed size or disable it altogether if they have sufficient system RAM (512MB or greater).

Another major class of audio glitches is caused by extra tasks cutting in that are completely unrelated to your audio application. These don't always cause no extra drive or CPU activity visible from within your sequencer; they may be caught by Microsoft's System Monitor, as I explained last month, but since they often last a very short time, its regular polling of overall CPU overhead may miss them as well. The most obvious candidate is Task Scheduler, which can defragment your drive, clean up unwanted files, or indeed run any desired task at a time of your choosing. However, while amassing some housekeeping duties to be performed every Friday at midnight may initially seem like a good idea, you won't think so when you happen to be recording late one Friday evening. Make sure it's permanently disabled and run these tasks on demand.

Windows 98SE users have more settings to adjust than 2000/XP users, and most are now fairly well known. Resizing of the cache RAM can cause untimely audio interruptions, but can be prevented by setting a fixed size for the vcache, either by hand or using Cacheman (www.outertech.com). Other occasional system functions to disable are Power Management, Automatic Update, and System Restore, all of which run in the background. Permanently disabling all System Sounds is also advisable, since some of the WAV files they use may be 8-bit or of low sample rate, which may cause your soundcard or Windows to implement sample-rate-conversion algorithms.

Other tasks may get installed behind your back by applications and expansion card driver installations. Some run only once when you start up your PC, and may be benign, but you can get a list of these by using the Start menu's Run option and typing in 'Msconfig'. Others may also be lurking in wait for the perfect audio performance before they cut in and ruin it for ever with a glitch, dropout or unexpected halt. I discussed the majority of culprits in SOS December 2001, but remember that you can always get an up-to-date list of all the processes currently running on your PC by using the three-fingered salute (Ctrl, Alt and Delete keys). Even if you're not currently suffering from audio clicks and pops, the chances are that by dealing with unwanted background tasks you may be able to drop your latency to a lower value without glitching.

Soundcard & Music Application Settings

There's no point trying to tweak your soundcard or music application settings to achieve lower latency until you're happy that your PC hardware is properly installed with the latest drivers, and your particular version of Windows has been set up to suit the particular requirements of continuous audio recording and playback.

It's routinely recommended to increase the size of your soundcard buffers if you suffer from clicks and pops, as this gives your PC more time to recover from any interruption. Disk buffers don't normally cause as many click and pop problems unless you're running loads of audio tracks, in which case you can increase their size and number; applications like Cubase provide a separate meter for hard disk transfer load to help you choose the optimum setting once you've eradicated any DMA problems as described earlier.

So, only when Windows has been tweaked and the interruptions minimised is it time to carefully lower your soundcard's buffer size until you start to hear clicks and pops, and then increase it to the next available setting. You may have to increase it still further when playing back more tracks and running more plug-ins and soft synths, and when simultaneously recording, but you should soon find a setting that works for most purposes. Although you can often cure clicks and pops by whacking the buffer sizes right up, you may just be masking the real source of the problem, and by tracking it down and curing it, you could be able to run your soundcard at a much lower latency. In fact, you can sometimes tell how well 'tuned' your PC is by listening to the glitches that you get at very low latency values. If there is a regular scattering of small dropouts then this shows that you don't have any major interruptions. However, if you get one random bad one every few seconds then it's more likely that there's a single cause.

It's particularly tricky when you attempt to run two music applications simultaneously, since you can't predict when each will demand its maximum resources, particularly when both are running on different stereo output pairs on the same soundcard.

Final Thoughts

Whenever and whatever you're in the process of fault-finding, it pays to be systematic, and to make some notes, so you can backtrack if necessary. If you simply blanket-bomb the problem with every Windows tweak you will possibly make the problem worse, or degrade your overall performance. Unless you suspect an unresolved system conflict that may require a fundamental change such as a new motherboard, once you've worked through all the main contenders it's always worth trying the ultimate overhaul — starting afresh from a newly formatted partition and installing a clean version of Windows and your music applications.

Published July 2003