Cicks and pops can ruin a recording, not to mention causing vast amounts of annoyance and wasted time. Tracking down their causes can be far from easy – but our step-by-step troubleshooting guide is here to help.
We've published lots of fault-finding hints and tips in SOS, but quite a few PC musicians still seem to be suffering from audio clicks and pops, also known as gapping. They can be caused by a wide variety of factors, from a single unsuitable software setting to conflicts between hardware devices, so this month we're providing a logical step-by-step troubleshooting guide.
Before we start, I'll explain the fundamental cause of audio clicks and pops. No computer operating system can do everything at once, so a multitasking operating system such as Windows instead creates the illusion that it's doing everything at once, by running lots of separate smaller tasks in turn, each one consuming a share of the available CPU (processor) and I/O (peripheral) cycles. This, for instance, makes it possible to simultaneously print out a document while typing another one, listening to a WAV file and downloading a file from the Internet.
To maintain a continuous audio stream when recording or playing back a song, small chunks of system RAM (buffers) are used to temporarily store a chunk of audio at a time. For playback, the soundcard continues accessing the data within these buffers while Windows goes off to perform its other tasks, and hopefully Windows will get back soon enough to drop the next chunk of audio data into the buffers before the existing audio data has all been used up. Similarly, during audio recording, the incoming data slowly fills up a second set of buffers, and Windows comes back every so often to grab a chunk of this and save it to your hard drive.
If the buffers are too small and the data runs out before Windows can get back to top them up (playback) or empty them (recording), you'll get a gap in the audio stream — a click or pop. So if you hear even a single click in your audio recording or playback, it's due to something occupying Windows that prevents it from filling and emptying those audio buffers in time for smooth delivery to your audio interface. If those interruptions become more frequent, the isolated clicks and pops turn into occasional crackles, and eventually to almost continuous interruptions that sound like distortion as the audio starts to break up more regularly.
In complex setups, where several pieces of gear are connected digitally, sometimes clicks and pops are due to incorrect external clock settings. One device needs to provide the 'master' clock and all the others need to have their clocks set to 'external', so that they become 'slaves'. If the other devices are not locked to the master clock, you may find you hear a fairly regular ticking during normal recording and playback, while using analogue cables instead of proper S/PDIF or other digital cables may give rise to faults ranging from the occasional tick to no signal whatsoever getting through.
If you hear occasional clicks and want to rule out clocking issues, temporarily set your soundcard to internal clock. If you're digitally transferring audio from Minidisc or DAT and hear the occasional click in your recordings, try recording a 10kHz sinewave and then transfer that. This procedure will test your digital cables and settings: even a single missed sample will be fairly obvious as a tell-tale 'tick'.
If your song starts out playing back perfectly but you notice clicks and pops gradually getting worse over several minutes, a word clock issue may also be to blame. However, this isn't always the case: one SOS Forum user managed to snag his CPU fan while fitting some extra RAM, such that after a few minutes use his CPU meter rapidly climbed to 100 percent as the processor began to overheat, resulting in clicks and pops after a few minutes, and eventually a crashed PC.
Audio interface buffer size: The first-choice way of curing audio clicks and pops that are due to the audio engine not having enough processing time is to increase the audio interface buffer size. This will increase the time that Windows receives for performing all its other tasks, making audio interruptions much less likely. Unfortunately, this also increases latency.
Nevertheless, there's no point in making unrealistic demands on your PC, so if your clicks and pops only occur with an ASIO buffer size of 64 samples (resulting in an extremely low displayed latency of just 1.5ms), you have little cause for concern. It would take an extremely well set-up PC and an audio interface with excellent drivers to run with such settings. If you really need low latency, 3ms is a more suitable figure to aim for, and many musicians are perfectly happy with 6ms or even more (we explored latency in great depth in SOS January 2005 — see the 'Extra Reading' box).
During mixdown you're not likely to notice high buffer sizes at all, since their only effect is to slightly delay the start of playback once you've clicked on the Play button. Many musicians, therefore, increase latency to 12ms or even 23ms (1024 samples at 44.1kHz). These settings further reduce CPU overhead by a tiny amount that may be sufficient to let you run a few more plug-ins. However, I don't recommend increasing buffer size beyond 1024 samples. Not only is this unlikely to reduce overheads any further, but recent personal experiments have suggested that some audio interfaces may exhibit erratic timing with latencies of 50ms and above.
Windows XP audio tweaks: Follow the list I provided in last month's PC Musician feature, removing unwanted tasks and interruptions and making sure that your ASIO drivers get higher priority, to ensure that Windows has the best chance of performing well with audio software. You may find, after carrying out these tweaks, that you can run your audio interface at a significantly lower latency but still without clicks and pops occurring. Indeed, temporarily setting your interface to a lower latency is a useful way to see how well your PC has been set up for audio use, as is creating a song that runs at the limit of your CPU's capability, such as the 'DAW Bench' test I mentioned in PC Notes July 2006.
Examine your song overheads: If, like most musicians, you're running your PC near its processing limits, with lots of plug-ins and soft synths, you may only suffer clicks and pops at a particular point in a particular song. In my experience, this is most likely to be because your synths are attempting to play more notes at that point. For instance, you may only think you're probably only using four to eight simultaneous notes in a part, but if you've used the sustain pedal this can easily rise to 30 or 40 notes, while still not being particularly audible with some instruments. Some soft synths obligingly provide a readout of current polyphony, which gives the game away: if the clicks only occur when polyphony rises, you need to cap it at a suitable value, as I explained in SOS July 2006.
Hard drive settings: I keep trotting this one out, but each week it seems yet another musician posts on the SOS Forums complaining of clicks and pops as soon as they attempt to run more than about a dozen simultaneous audio tracks. As always, the vital setting is for Transfer Mode, which should read 'DMA if available' and can be found for each IDE device inside Device Manager. Sometimes the clicks and pops are synchronised with the flashes of the hard drive activity LED on the PC's front panel, which makes the hard drive even more obvious as the culprit.
If you use a separate audio drive, try temporarily moving the song data to your Windows C: drive. If the problem disappears, it's your audio drive at fault. In general, if you're having intermittent clicks and pops and suspect your hard drive, try re-seating the various power and data cables to it inside your PC, especially if it's recently been on a journey.
Install the latest drivers: Manufacturers nearly always improve performance and eradicate bugs with each new revision of their drivers, so some click/pop problems can be resolved simply by installing the latest drivers for a particular hardware device. Make sure you do so for your audio interface, graphics card and other expansion devices, as well as relevant Windows updates and Hot Fixes.
A few musicians have PCs that continue to suffer from clicks and pops which remain impervious to each and every tweak. In my experience these are sometimes caused by innocent but ill-advised choices of hardware (or combinations of hardware), but they are more often due to people's insistence on installing downloaded software from questionable sources.
If you're faced with an unreliable PC bogged down with assorted software, sometimes it's quicker (and certainly more thorough) to throw in the towel, re-format your hard drive and reinstall Windows from scratch. This approach has resolved countless problems over the years. Just ensure you make an image file of your existing partition beforehand, so you can later extricate any files you haven't backed up elsewhere.
Sometimes you can experience occasional but regular clicks and pops. Your song might be requiring more at such points, as previously described, but it may instead happen on every song at apparently random times, and this could be due to another software task cutting in and demanding its own resources.
Eliminate problematic background tasks: I've not had to do this for years, but that's largely because I run a separate stripped-down music partition that can successfully run most audio interfaces down to about 2ms latency at 44.1kHz without clicks and pops. However, those of you that install everything on one big partition may have loads of tasks running in the background, some of which may have significant system overheads.
The Windows XP Task Manager provides a very handy way to see what processes are running on your PC, and you can launch it by holding down the Ctrl, Alt and Delete keys. On its Processes page you'll see a list of processes currently running. You can then find out what each task does in the excellent Task List Programs section of the Answers That Work web site (www.answersthatwork.com/Tasklist_pages/tasklist.htm). Also here is advice on whether or not the tasks ever cause problems, and which ones are vital to Windows and should be left alone.
You can end any process in Task Manager by right-clicking on it and selecting the End Process function, but this can cause system crashes unless you really know what you're doing. Instead, I'd recommend that you find out how to disable any unwanted processes manually via the software that starts them in the first place, or use Microsoft's System Configuration Utility. Type 'msconfig' in the Windows Run box to launch the utility, choose the 'Selective Startup' option and then un-tick the required Services or Startup tasks on the appropriate pages before rebooting. Even more comprehensive is the Autoruns utility from Sysinternals (www.sysinternals.com).
Most virus and spyware checkers that scan program files, documents, and emails in the background to keep your PC safe are known to impose significant CPU and hard-drive overheads at times, which can be a hindrance when making music, so deactivate them manually before you start. Watch out also for any Scheduled Tasks (you can launch this window from the System Tools area of the Start Menu). Not all utilities tell you before installing a new task on this list and you may find things such as Defragmentation and Registry checks that are scheduled to cut in while you're busy making music.
If your clicks and pops happen at regular intervals, try to relate the intervals to a background task. You may find details on the developer's web site or on Internet forums. Over the years Hewlett Packard have used various background tasks that affect the musician, most of which periodically check their hardware in various ways. For example, DVDTray checks whether your HP DVD Writer firmware is up to date and Hpfsched pops up occasional messages to remind you to clean your ink cartridges. Most such tasks can be disabled to remove any possibility of audio conflicts.
Real Networks Realplayer has also caused many frustrations, especially as its background Scheduler has been known to slow down boot times. I've replaced it with the much better behaved Media Player Classic (http://sourceforge.net/projects/...), for playing Real Audio files. Findfast gets installed with early versions of Microsoft's Office suite and is best deleted, since it can cause 'freezes' of several seconds on some PCs. Also be careful with mouse-pointer utilities and custom drivers. However, don't be worried if you find several duplicates of the SVCHOST.EXE process running, since this runs various DLL (Dynamic Link Library) processes.
Cthelper.exe (a utility installed by various Emu and Creative Labs soundcards) has been known to cause excessive CPU overhead on some PCs, but it also auto-starts the Patchmix DSP mixer utility, so be careful. I recommend you disable processes one at a time and live with the results for a day or two in case anything unexpected happens. Then you can safely reverse the tweak before its effects are confused by others.
Investigate PCI latency timing: While the PCI Express slots in newer PCs give direct access to the PCI Express buss for whatever device you plug into them, 'vanilla' PCI expansion cards have to share the available PCI bandwidth with whatever else is attached to the PCI buss, which also includes quite a few motherboard devices. They do this via Interrupts. Whenever your CPU receives an IRQ (Interrupt ReQuest) it's forced to stop whatever task it's currently performing and attend to the requesting device. If your PCI audio interface has a typical buffer size of 256 samples, interrupts will occur about 172 times a second at 44.1kHz.
Each interrupting hardware device uses a timer to regulate how many clock cycles it can hang on to the PCI buss for, once it gets control, ranging from zero to 255. If all devices have low values, overheads increase due to greatly increased swapping from one device to another, while if every device has a high timer value some may run into problems while waiting their turn for the buss.
Most PCs specify a sensible default value of 64 clock cycles for each device (set in the BIOS), but unfortunately some devices, particularly graphic cards and network interface cards, have a nasty habit of forcing their timer to a much higher value, such as 248 or 255, which lets them hog the buss for much longer than the other devices. For musicians, this can result in audio and video glitching and stuttering problems, occasional lock-ups when playing sounds, audio distortion, and sometimes even continuous white noise instead of music coming from the output socket.
The easiest way to discover the settings of the various devices in your PC is with Mark Knutson's Dawg utility. You can download the latest version of Double Dawg from http://mark-knutson.com/t3, while regular readers who have SOS DVD002, which was supplied with the November 2005 issue of the magazine, already have the specially compiled SOS Dawg version.
Dawg will display the current latency values of all expansion devices it finds on the PCI buss. If one of the devices isn't recognised by the utility (see the screenshots on the left), open up Device Manager, select 'View device by connection', and double-click on each of the devices attached to the PCI buss until you find the one whose location matches that displayed by Dawg (for example, Device Manager declares my Echo Mia soundcard to be on 'PCI buss 2, device 10', which confirms it as the unnamed device with a latency timer of 192).
If your PC exhibits click problems and your graphics card displays a latency of 248 or 255, try reducing it to 128. Don't be tempted to alter all settings willy-nilly: this often makes the situation worse — and don't bother at all if you're not having click and pop problems. Owners of products such as the Powercore and UAD1 may end up with a particularly tricky task in trying to balance the requirements of their DSP cards and audio interface, especially since the default latency value chosen for DSP cards often changes from one driver revision to the next. Nevertheless, reducing video-card values from 255 to 128 has completely cured UAD1 issues for some musicians.
Choose expansion slots/ports carefully: Nowadays, most peripherals tend to be 'fit and forget', but occasionally you may still resolve problems by choosing a different PCI slot for your audio interface. This is a complex and often confusing subject that I covered in great detail back in SOS May 2003, but in essence each motherboard manufacturer decides how the interrupts are connected to all the hardware devices (hard drive controllers, sound chips, serial and parallel ports, USB and Firewire controllers, and so on, plus anything plugged into the various expansion slots).
Given the limited number of available interrupts, it's inevitable that some devices will end up 'sharing' an interrupt, such that when the CPU receives its Interrupt Request, as described earlier, it's left up to the associated drivers to sort out which shared device actually did the calling. Most hardware devices and their drivers are happy to 'share' interrupts in this way, simply returning control to the next in line within a few clock cycles if it wasn't them requiring attention, but a few 'fight amongst themselves', resulting in brief interruptions or, at the worst, a complete refusal to boot up after a new conflicting device has been installed.
It therefore makes sense to choose an expansion slot for your PCI soundcard that doesn't share the same interrupt with bandwidth-guzzling devices such as an AGP or other graphics card, any other device that interrupts at a rate greater than about 200 times per second (although it's often difficult to track down such information) and, if possible, with controllers in charge of active Firewire and USB ports. The secret is the motherboard's Interrupt Request Table, unique to each make and model (see SOS May 2003 for more details). Very occasionally you may also resolve problems by choosing a different Firewire or USB port for your hardware; in fact, this month's PC Notes discusses an example of an obscure USB port issue.
Eliminate rogue plug-ins and soft synths: Occasionally, you may notice clicks and pops in only one song that's otherwise not showing the usual signs of stress you expect to see, such as a high CPU-meter reading. This may be due to a rogue plug-in or soft synth causing sudden processing spikes that are over too quickly to register on a CPU meter. These occur when audio levels go down to extremely low values and the processor automatically drops into its more intensive and high-resolution 'denormal mode'.
Such problems started emerging several years ago and were particularly troublesome in the case of Intel Pentium 4 processors, although they also occurred with the Pentium II and III, the Celeron and AMD's Athlon range. Most plug-in developers modified their code to ensure that these denormal problems never arise, but there are a few suspect products still out there (particularly freeware or shareware ones whose developers may not have a wide range of PCs for test purposes). You can generally troubleshoot by disabling your plug-ins and soft synths one at a time. If the problems suddenly disappear, you've probably found the culprit.
Avoid chaining peripherals: Using USB hubs has been known to cause audio problems (particularly with buss-powered models), as has chaining several Firewire devices, so try to keep critical devices such as audio and MIDI interfaces, and dedicated Firewire/USB 2.0 audio drives, on their own dedicated port. There's more on this topic in SOS October 2005.
It will help you track down the reason for your clicks and pops if you're aware of when they happen and anything else that happens simultaneously.
- Notice whether clicks and pops coincide with your central heating, oven, microwave or freezer switching on. If so, they may be nothing to do with your PC at all, instead requiring interference suppression at source or more careful connection of your gear to the mains.
- Intermittent crackling problems are often caused by faulty audio or mains cables, so check them before blaming your PC hardware or software.
- If you've managed to get clicks and pops recorded in an audio track, zoom in on the waveform and examine them. Missing areas (horizontal lines) or vertical discontinuities are due to digital interruptions and likely to be PC-related, while, as their name suggests, mains spikes tend to rise and then fall, often with slight oscillations before and afterwards.
- If you experience clicks and pops when running a sequencer application, try running a stand-alone soft synth with a similar latency setting. If the problem's still there it rules out your sequencer, and points instead to hardware, Windows or audio driver issues.
- If clicks tend to occur in a particular place of a particular song, this could point to a song overload or rogue plug-in.
- If clicks seem even vaguely regular in nature, time the interval between them to see if it suggests a culprit such as another background task cutting in. Also try watching the appropriate LED on your PC to see if clicks coincide with its flashes. If so, they are likely to be related to hard drive activity, indicating a problem with the setting or performance of the hard drive (see main text for possible reasons).
- Do the clicks and pops only occur when you have a particular hardware item plugged in, such as an external hard drive or USB device?
- If you find clicks and pops in audio 'ripped' from a CD, this may have nothing to do with your PC. The CD itself may be dirty or scratched, or the CD lens may need cleaning.
- If you regularly hear a short burst of noise during song playback, you may have a demo plug-in version that deliberately injects the noise. Buying the full version will instantly cure this problem.
Sometimes two hardware components in a PC simply won't get on, resulting in clicks and pops that don't respond to any of the tweaks offered so far, and may be unsolvable. The continuous streaming of audio data is still a minority occupation in the computer world. Chip set manufacturers are unlikely to attempt it while developing new chips, and audio interface manufacturers can only test their wares with existing chip sets. Thus new PC chip sets may come onto the market that, for some reason, prevent the smooth flow of audio data and are best avoided — although in some cases there may be a comparatively cheap workaround.
Avoid unsuitable motherboard chip sets: The most unfortunate of all purchases is a PC whose motherboard simply refuses to run audio hardware with low latency. It really does pay to do some research before buying a PC, to avoid such issues, and I do my best to keep SOS readers informed of them. The biggest such problem to face musicians recently has been the performance of legacy PCI slots in the new PCI Express-equipped motherboards, as I discussed in SOS March 2006. Intel's 915, 925X and 925XE chip sets should be avoided for this reason. The problems that initially beset the Nforce 4 chip set are greatly reduced when it is used with the dual-core Athlon X2 processors rather than the previous single-core versions. The best advice I can offer here is not to assume that the latest motherboard chip set from any manufacturer will automatically be the greatest for the musician. To avoid expensive mistakes, never buy newly released components until at least a few people have had time to run audio tests on them!
Check your Firewire controller: Nearly all manufacturers of Firewire audio interfaces test their products on PCs featuring Texas Instruments and Lucent Firewire chip sets, and therefore recommend them, while Via and, in particular, NEC chipsets have been known to cause audio problems. You can generally find out what chip set your PC uses inside Device Manager, but if you're buying a new mainstream PC you may have to email or telephone its manufacturer to check (or ask on Internet forums among users of the same make and model), as such information is rarely included in specs. However, if you do find your motherboard ports incompatible with a particular interface, you can buy a Firewire adaptor card with a more appropriate controller chip as a PCI, PCI Express, PCMCIA or Express Card expansion device, and use its ports instead.
Check your PCMCIA or Express Card controller: Before buying a laptop PC, prospective purchasers who intend to buy an audio interface that plugs into its expansion slot should check with the interface manufacturer which controllers are recommended and which are known to exhibit problems. You can't bypass the card controller attached to your motherboard, so if yours proves troublesome you'll have to buy a Firewire or USB audio interface instead.
Replace incompatible expansion cards: It's difficult to be aware of all the devices that have proved incompatible with the smooth running of audio interfaces, but if you need to buy a NIC (Network Interface Card), try to source a model from D-Link, Intel or Realtek. Models from 3Com have proved particularly troublesome, because of buss-hogging, although you may be able to cure this using the PCI Latency timer adjustments previously described. Similarly, avoid fast 3D graphics cards, as these (and their drivers) are obviously optimised for fast graphics that the musician doesn't need, and may not scale their requirements down sufficiently when running audio tracks. Moreover, they often require cooling fans whose noise will intrude into the studio environment.
- SOS September 2006 'Windows XP Audio Tweaks' (/sos/sep06/articles/pcmusician_0906.htm)
- SOS July 2006 'PC System Overload Problems & Workarounds' (/sos/jul06/articles/pcmusician_0706.htm)
- SOS March 2006 'Making The Change To A Dual-Core PC' (/sos/mar06/articles/pcmusician.htm)
- SOS October 2005 'Hardware Safety Guidelines For The PC Musician' (/sos/oct05/articles/pcmusician.htm)
- SOS January 2005 'Optimising The Latency Of Your PC Audio Interface' (/sos/jan05/articles/pcmusician.htm)
- SOS October 2004 'Incurable Soundcard Stuttering?' (www.soundonsound.com/sos/oct04/articles/pcnotes.htm)
- SOS May 2003 'The Musician's Guide To PCI Slots & Interrupts' (/sos/may03/articles/pcmusician0503.asp)