You are here

Setting Up PC Operating Systems To Avoid Hard Disk Recording Glitches

Tips & Tricks By Martin Walker
Published January 1999

Any unexpected demand on your PC's resources can cause an audible glitch. Once an audio track has started playing, you need to ensure not only that there is enough CPU power still available, but also that the disk throughput is regular, and that the disk swap file doesn't suddenly decide to resize itself...Any unexpected demand on your PC's resources can cause an audible glitch. Once an audio track has started playing, you need to ensure not only that there is enough CPU power still available, but also that the disk throughput is regular, and that the disk swap file doesn't suddenly decide to resize itself...

There's nothing more irritating than having a perfect take ruined by unexpected audio glitches. Martin Walker investigates the possible causes and suggests ways to improve matters through system software settings.

In last month's PC Musician, I suggested some hard‑drive‑oriented tweaks to improve the performance of your PC‑based MIDI + Audio sequencer. This month, it's time to look at how to fine‑tune your PC's operating system itself (and in some cases the BIOS) to squeeze maximum performance from your setup. Whether you are running Windows 95 (in any of its incarnations), or Windows 98, the principles explained here remain the same. Although I have already mentioned various tweaks to aid hard disk recording (both in PC Notes and PC Musician), not all of them will work with every PC, and some of them may even slow your machine down for audio in certain situations. In addition, since the majority of these tweaks disable or change functions that are primarily designed to speed up most other applications, they may have an appreciable effect on your non‑musical activities; and some of the tips are only useful if you experience specific problems — so it is worth at least understanding the implications before blindly implementing everything suggested here.

Disturbing The Piece

The size of VCache may have already been carried out during the installation of your sequencer, but if not you will need to add lines similar to these.The size of VCache may have already been carried out during the installation of your sequencer, but if not you will need to add lines similar to these.

Most of the suggestions in this article are designed to prevent those infuriating glitches that can produce audible clicks or pops during recording or playback (or which can, more seriously, occasionally stop your audio application completely at some random point, part‑way through an otherwise perfect musical performance). This kind of audio problem is caused by data bottlenecks somewhere in the PC, which temporarily disturb the normally smooth flow of audio information to and from your hard drive. If this only happens during playback, it may be merely irritating, but any interruption during recording can leave a permanent glitch in the audio file, such that you will probably have to scrap the take and start again. You are more likely to experience glitches of this sort when attempting playback of a relatively large number of simultaneous audio tracks (large for your particular PC's spec, that is), but this is not always the case — some glitches may occur when recording or playing back a single track.

The primary reason for any audio glitch is that something in your PC — be it the processor, hard drive, soundcard driver, the PCI buss (if swamped by a sudden increase in data traffic), or indeed any component in the recording or playback chain — has been running flat out, and is then pushed too far by a sudden additional demand on it, and 'runs out of steam'. This may be caused by a number of things, but the more demands on the system you remove (or at least minimise), the more simultaneous audio tracks you will be able to use. You can increase the maximum possible number of simultaneous tracks by buying a faster hard drive, but ensuring the smooth flow of audio data within your PC will always guarantee the maximum number of tracks with a particular system.

There are some simple things to check — lots of hard drive defragmentation, for example, will certainly add some unnecessary overhead to disk reads and writes — but what if the cause of your audible problems is something fundamental in the way your PC's operating system is set up? Happily, changing even fundamental OS settings is often as simple as clicking on a software setting and then rebooting, as we shall see.

Filling The Gap

Adjusting Virtual Memory settings is easy, despite the dire warnings given by Windows. As long as you don't disable it altogether, and set suitable figures such as these for Minimum and Maximum, your audio applications should run more smoothly than before.Adjusting Virtual Memory settings is easy, despite the dire warnings given by Windows. As long as you don't disable it altogether, and set suitable figures such as these for Minimum and Maximum, your audio applications should run more smoothly than before.

Sometimes the RAM buffers created by your audio software will manage to keep the audio output going when there is a short unexpected surge in demand (wherever in your PC it might occur), and this is a valid reason to keep such buffers large. Most MIDI + Audio sequencing software allows you to select appropriate buffer sizes, and the smaller you make them, the more likely you are to suffer from occasional glitches. Also, as we saw last month, using a larger block size for each track read from the hard drive into a RAM buffer can dramatically increase the maximum possible number of simultaneous tracks. This is simply due to the hard drive having to spend a smaller proportion of its time darting about between the different files (one for each audio track).

However, the downside of large RAM buffers is often an increase in latency, which makes the application seem generally sluggish when responding to user input. One way to avoid this is to implement large buffers for reading in the data from the hard drive, but small buffers for transferring this same data through the program itself (for mixing and adding real‑time effects). This allows a large track count, while keeping latency comparatively small. This is what happens with Cubase VST, and apparently also in the latest update to Cakewalk Audio v8 — previous versions of Cakewalk sometimes suffered from a delay of several seconds before you heard the result of a change in EQ or fader position, due to the large buffers needed to run lots of multiple tracks.

Removing the causes of unexpected surges in demand, however, should smooth the flow of audio sufficiently so that you won't need huge RAM buffers, providing a tighter feel when using your sequencer. In mainstream applications, any data read from the hard drive stands a reasonable chance of being required again, so Windows tends to allocate some of your RAM as a temporary file cache for such data in case this does happen, as data can be read from this RAM cache far more quickly than from the hard drive. This disk cache is an integral part of the virtual memory mechanism to be discussed in the next section, and helps to streamline the many swaps between RAM and the hard disk swap file. However, you need to tweak this disk cache before adjusting virtual memory settings, so I'll discuss this first.

The huge files typically used for playback of each audio track are not likely to be needed again in a hurry, so this RAM is rather wasted, and would be better employed elsewhere. However, the main problem is that this disk cache tends to keep growing in size as you launch other applications, but doesn't shrink automatically when you close them. I have 64Mb of RAM in my PC, and after running various applications during the course of a couple of hours, I closed absolutely everything, and the disk cache remained at over 28Mb (still holding data just in case). I found this figure using the Microsoft System Monitor utility (you should find this in your Start Menu under the Accessories/System Tools section).

If RAM is starting to run low (as it probably will when running lot of processing plug‑ins and audio tracks), Windows can change the disk cache size whenever it feels it necessary. If you happen to be in the middle of that perfect take when it decides to do this, you stand a good chance of a glitch. The answer is to fix the maximum size of this cache at a suitable value, depending on how much RAM you have. You do this by typing in a new setting in your System.ini file — many modern MIDI + Audio installations now do this automatically. The entry should have a heading [VCache], and be followed on the next line by MaxFileCache=N, where N is chosen depending on your available RAM (see the screen shot, above right). Some sources also recommend adding another line which reads MinFileCache=N, and either setting this to the same value (so that the cache size is always fixed) or to zero, but many people suggest simply leaving it out — the important thing is to stop VCache growing beyond a certain maximum size, to ensure that you still have plenty of RAM for audio purposes.

The actual value of N will depend on how much RAM you have, but most software developers seem to agree on suitable figures. If you have 32Mb of RAM you should enter MaxFileCache=2048, with 64Mb a value of MaxFileCache=4096, and with more than this a value of MaxFileCache=8192. You will need to reboot before this change takes effect.

Virtual Reality

The Windows System Monitor utility can provide a wealth of useful information. Allocated memory is the amount used in total across your RAM and disk swap file, and is the sum of Other Memory (for example DLL files and the disk cache) and Swappable Memory (anything that can be temporarily shunted to the hard drive if required).The Windows System Monitor utility can provide a wealth of useful information. Allocated memory is the amount used in total across your RAM and disk swap file, and is the sum of Other Memory (for example DLL files and the disk cache) and Swappable Memory (anything that can be temporarily shunted to the hard drive if required).

One of the advantages of the Windows operating system is virtual memory, which allows you to run multiple applications whose total RAM requirements are way beyond the amount of physical RAM you actually have in your PC. The catch is that although the application you are currently running will be in RAM, any others that won't fit into the remaining RAM will get shunted off to virtual memory — a swap file on your hard drive.

Audio applications always work better with plenty of 'real' RAM — and with prices currently only about £60 for 64Mb, many people are now installing a total of 128Mb. However, even if you think your audio package is generally happy with the amount of RAM available, this may change if you are running a wave file, synth editor or other application alongside (see the 'Running In Tandem' box). For instance, many people use Wavelab alongside Cubase VST for audio editing. When you switch between the two applications, your PC may suddenly be called upon to swap a lot of data between swap file and RAM, and this could possibly cause an audible glitch. The simple answer to this is never to switch applications during recording.

However, the biggest problem with the Windows swap file is that it is dynamic — it can grow and shrink to suit current demands. While this is a clever bit of programming, Windows is primarily designed to take advantage of slack moments to do this resizing — and hard disk audio doesn't provide slack moments! If and when Windows decides update the swap file, there will be considerable disk activity for perhaps several seconds — the worst possible unexpected demand on your PC, and one which can easily cause audible interruptions.

The solution is to fix the size of this Virtual Memory, and then resizing will never happen. You can do this from the Performance Tab in Control Panel/System, by clicking on the Virtual Memory button. After clicking on the 'Let me specify my own virtual memory settings' box, you will need to set both Minimum and Maximum sizes to the same figure to prevent re‑sizing (see screenshot on page 126). The crucial thing here is that the figures we enter ensure that there is enough total memory available (RAM and Virtual Memory) to run every simultaneous application that we need.

Many developers recommend setting this to about double your system RAM (128Mb in the case of a 64Mb RAM system), but some still claim that a fixed value of 16Mb is suitable, however much RAM you have. However, this much lower figure has been posted on web sites since 1996, when a PC with 16Mb RAM was fairly typical, so I think you should ignore it.

If you want to be more scientific, you can measure a suitable figure for your particular combination of PC and MIDI + Audio sequencer. Once you have added the VCache settings to your System.ini file and rebooted (to fix the amount of RAM used as a disk buffer), open up System Monitor, and then add the item 'Allocated Memory' (you will find this in the Memory Manager category). There are a host of other options here, and they can be quite confusing at first (see screen shot on page 126). Allocated Memory is the total amount currently being used by Windows and any applications that you have launched, and includes real memory (RAM) and virtual memory (swap file on disk).

Remembering that Windows tends to hang on to virtual and cache files (ie. they tend to keep getting bigger), you should force a clean slate by rebooting, and then immediately opening System Monitor. Now launch your MIDI + Audio sequencer, and any other application that you may want to run in tandem, such as a wave or synth editor. Check the new Allocated Memory reading in System Monitor, subtract from this the amount of RAM you have, and this should provide a suitable size for your new fixed Virtual Memory setting. Even with a fixed 16Mb swap file, I managed to run Cubase with 32 audio channels, along with Wavelab and XGedit95 in Windows 95. Just to confirm the Allocated Memory figure, I kept launching more applications, and got a warning dialogue box when Allocated Memory reached 80Mb.

I then went a bit berserk, and loaded six or seven applications simultaneously to get the figures shown in the Memory Manager screen grab. I sincerely doubt that I will ever need to run so much at once, but decided to set my Virtual Memory to 128Mb (twice the system RAM) to allow for such occasional indulgence — the days when every megabyte of disk space was precious have long gone. It's worth defragmenting your drive before you reboot with fixed virtual memory settings, so that your swap file is in one piece, but the Norton Utilities defragmenter will deal with the swap file as well (anyone who used Windows 3.1 will remember this as the Permanent Swap file).

Reading And Writing

More general applications such as word processors, graphic packages, and even PC games are optimised for occasional bursts of activity, when the maximum amount of information must be made available as quickly as possible. Since these applications tend to spend a lot of time waiting for user input (such as key presses, and mouse movements and commands) in between frantic bursts of drive activity, it makes sense to attempt to anticipate future demands at every opportunity.

For instance, when reading a chunk of information from the hard drive, there is often a reasonable chance that the next piece of information requested will follow on from the one before. This is the origin of Read Ahead Optimisation, which always reads a bit more from the drive than strictly requested, on the grounds that once it has been placed in the VCache RAM buffer, it will be far quicker to access if the guess is correct. In theory, disabling this will downgrade performance for many applications, while improving audio recording — but this isn't always the case. By all means try it, but run a test utility such as Event's Echo Reporter (mentioned last month) before and afterwards — if you see an improvement, fine, but if not, then return the setting to Full for best performance.

Another disputed tweak can be found in Control Panel/System/Performance/File System, under the heading 'Typical role of this computer'. There are three possible choices: Desktop Computer (the default), Mobile or Docking System, and Network Server. Most people will find the default 'Desktop Computer' is the best one. The 'Mobile or Docking System' setting is more suitable if you have limited RAM and are running on batteries, but I very much doubt that many PC Musicians will be doing this.

Changing this setting to Network Server is often recommended as beneficial for PC musicians, as both Windows 95 and 98 will then be optimised for a high amount of disk access. However, I measured no change in basic hard drive benchmark tests, and on looking further into this, it seems that the bulk of the changes favour systems which need to cache a large number of directory paths, and thousands rather than hundreds of filenames — in other words, the typical role of a network server. I suspect that unless you use a huge number of small audio snippets, you may see little or no improvement from changing this setting. Try it and see.

The other option is to disable Write‑Behind caching which, as its name suggests, waits until the system is idle before writing data to the hard drive. You may have noticed this when saving data — it's sometimes several seconds before you hear the disk drive being accessed. This doesn't benefit the continuous hard drive usage characteristic of audio, so you can safely turn it off from Control Panel/System/Performance/File System/Troubleshooting.

Hogging The bus

Some often mentioned tweaks are designed to cure audio clicks caused by specific pieces of hardware, such as graphics cards. As such, there is no point in implementing the tweaks if you don't suffer from the clicks — you will simply slow your PC down for no purpose. Perhaps unsurprisingly, glitches caused by graphics cards tend to happen whenever there is a sudden large amount of graphic activity. The problem is that the PCI buss in your PC (which is used in the transfer of both audio and graphics data with many graphics cards) only has so much bandwidth. If the graphics card decides to hog the buss for a few milliseconds for a frantic burst of screen redrawing while you are moving lots of audio data around, audio transfer may stop altogether during this time. One example of this which will be familiar to most of you is the redrawing of the entire sequencer window whenever the song pointer reaches the right‑hand side. Of course, you can often switch off automatic music scrolling inside the sequencer to prevent the odd click, or simply zoom out until the entire song is visible — then the screen won't need to be redrawn at all. However, various tweaks are published for most of the popular graphics cards to prevent such clicks happening atsource, without recourse to such action in your sequencer. These usually disable buss mastering with PCI cards, which can hog the PCI buss completely on occasion.

Follow the specific recommendations for your particular graphics card, but do them one at a time, reboot and check again. There's no sense in implementing a whole raft of audio‑specific tweaks if your problem goes away with just one. The remainder may simply slow down your system with no benefits. However, if you still get glitches that are related to graphic redraws, you may be able to solve the problem by reducing Video Acceleration. Look in Control Panel/System/Performance/Graphics, and try moving the Hardware Acceleration slider to the left by a notch or two. The actual changes depend on individual display drivers, but luckily I've never had to resort to this, as it is likely to slow graphic performance significantly.

If you're thinking of buying a new graphic card, choosing one of the newer AGP (Accelerated Graphics Port) type won't cost you any more, but will place the graphics card on a completely different buss to the audio, thereby removing any potential buss‑hogging problems altogether. Secondly, if you have recently installed Windows 98, make sure that you only install video drivers compatible with this — many of these are included when you buy Windows 98, and will be installed automatically during the upgrade, but if not, go to the web site of your graphics card manufacturer, and download Windows 98‑specific drivers. Windows 95 drivers can apparently cause all sorts of potential problems in Windows 98.

Another offender where the PCI buss is concerned is any high‑speed SCSI component, again due to very high burst rates that hog the buss for a short time. SCSI host adaptor cards such as the Adaptec 2940UW can reach burst rates of 40Mb/second. Ironically, this can work against you — it is the sustained transfer rate that is important, and it can be beneficial to change the Maximum Transfer Rate settings inside the SCSI BIOS to lower values such as 20Mb/second. This is still perfectly capable of providing a huge number of simultaneous audio tracks with most sequencers, but will minimise the risk of buss blocking. You can usually access the SCSI BIOS by pressing the 'Ctrl' and 'A' keys during boot‑up.

There's no sense in implementing a whole raft of audio‑specific tweaks if your problem goes away with just one. The remainder may simply slow down your system with no benefits.

Dual Controls

The beauty of tweaks like fixed VCache and virtual memory is that they won't ruin your PC's performancewith non‑audio applications. However, you will still probably get better performance if you set up a separate PC system for music, and there are various ways to do this. Many people opt to create a second partition on their hard drive solely for music purposes, install the same (or another) operating system on it, and then use one of the multiple boot utilities to choose which to run when you boot up your PC (see the May '98 PC Musician for more details on how to do this). You can also install another hard drive, and switch between the two at bootup using the BIOS, or even use swappable drive bays, each with a different system setup that you select and plug in before switching on your machine.

You may have noticed that Windows also provides Hardware and User Profiles, but these are not really useful for our purposes. User Profiles offer a choice of desktop environments for several users, each accessed by a password if required. Each user can have a different set of colours, Start Menu, and a unique set of folders for things like Documents and Internet Favorites. However, system settings such as virtual memory and VCache are still common to them all, so you cannot use them to create, say, Music and Normal environments.

Hardware profiles also provide a choice of environments on booting, each loading a different selection of hardware drivers. This might be useful if you want to disable various non‑audio drivers when only running music applications (to provide more RAM for audio), but I expect the gains will be marginal. However, even with the single default profile (Original Configuration), you can disable any unwanted drivers under Control Panel/System, by double‑clicking on a device, and then clicking the box marked 'Disable in this Hardware Profile'. Simply deleting the driver will cause the hardware to be immediately detected again when you next boot up — disabling the driver stops this happening.


Although there are a fair number of optimisations here, they shouldn't take very long to try out. However, I would advise you to do it one at a time to see what improvements (if any) you get. If you are happy with your audio performance you don't have to use any of them, although you may squeeze more simultaneous tracks out of your PC if you do. The problem of an occasional glitch can be tricky to narrow down. However, the main offenders seem to be VCache and virtual memory, and many developers claim that changing the settings as recommended here cures the vast majority of audio problems in Windows.

If your system came from a reputable music retailer, many of these changes will have been made already, or you may have already tweaked everything in sight yourself — now you should understand why these changes work as well. You may have been put off changing aspects such as virtual memory because of the dire warnings that Windows gives if you try. Hopefully you will now have enough confidence to follow it through. Good luck!

Running In Tandem

As mentioned in the main text of this article, running another application alongside your MIDI + Audio sequencer can cause problems and disrupt audio operations. Many people open a synth editor to tweak their sounds while a sequence is playing, and in theory, as long as you have a multi‑client MIDI driver (or use a multi‑client utility such as Hubi's MIDI Cable) this should work with few problems. However, more and more real‑time synths and samplers are appearing, such as Rebirth, Reality, Generator, and Gigasampler. These all work in slightly different ways, but all will use considerably more of your resources. Real‑time synths use lots of RAM if they can, to ease their audio generation (exactly like a MIDI + Audio sequencer), and they also tend to consume lots of processor time to perform all the calculations on the sounds you create. Thankfully, most of these applications give you the option of limiting the maximum number of voices, or proportion of processor time used, to avoid glitching.

Problems can also be caused by the new soundcards which feature DLS (DownLoadable Samples). These also use some of your system RAM to hold samples, rather than having dedicated RAM on the soundcard itself. This helps to keep their cost down, and removes any technical support problems associated with user memory upgrades. However, any application that soaks up user RAM will leave less for the sequencer, and if you intend to allocate 32Mb for sample storage you would be well advised to have more than 64Mb of RAM in total.

This new breed of software‑based music generators can give wonderful results, and I'm as keen as anyone else to try them out, but nothing in life is free. Any application which uses a lot of RAM periodically, grabs some processor time, and then sends a stream of audio data over the PCI buss will obviously interrupt the smooth flow of the main MIDI + Audio application — that's the way multitasking works. The combination will probably work with no problems, but your machine will run fewer hard disk audio tracks, and the possibility of glitches will be increased.

Haaaaaaalt! Do Not Moooove!

If your recording or playback stops unexpectedly, for no apparent reason, there is a variety of possible causes. Always disable power‑management routines that will put your PC into standby mode after some minutes of inactivity. Even a humble screensaver can cause problems if it cuts in during a long audio take. You may escape audio disruption with basic screensavers, but those that draw lots of pretty pictures or involve complex 3D rendering can take considerable processor overhead when they first kick in, and this is quite likely to cause an audible glitch. If you must use a screensaver when leaving your PC, you can launch one manually — just look for files ending in '.scr' and add a shortcut to it on your Start Menu.

Another candidate is the Auto Insert Notification for your CD‑ROM drive, since this periodically checks to see if a new CD has been placed in the drive. This is handy to auto‑run new application installs, but a liability for audio recording. Check that this is disabled for each and every CD‑ROM drive in your PC (under Control Panel/System) by clicking on the Settings page of the CD‑ROM drive properties. You will need to reboot your machine after any change for it to take effect.

Many sequencers also have Auto‑Save routines, but these should be switched off during any recording, as an unexpected disk access is the last thing you want in the middle of a take.

Background Tasks

You may have far less RAM available in your PC than you think, since there are a variety of utilities that can run as background tasks, only popping up at certain times, but which can consume megabytes of your RAM in total. Most of them don't benefit audio applications, and this RAM would be better employed elsewhere. In addition, the main worry with such applications is that they will kick in unexpectedly, push the audio system over the edge, and cause a glitch.

The obvious ones are utilities like Cleansweep which monitors every hard disk access (wonderful for logging installs, but not much use during audio recording), and various virus checkers and anti‑crash utilities. There are a few unexpected ones — Findfast (part of Microsoft Office) is notorious, and should be removed straight away. Hewlett Packard also have a tiny utility named hppropty.exe which gets installed behind your back, and checks the parallel port every few minutes to see whether the printer is still connected — this can cause MIDI timing problems as well. For me, one of the biggest offenders was Adaptec's Direct CD Wizard, which turns my CD‑RW drive into a slow hard drive. This takes 3.6Mb of RAM, but is only ever used if you write a file to the CD‑RW drive!

The quickest way to see just what is running on your PC is to press the Ctrl, Alt, and Del keys (on the numeric keypad) simultaneously, to launch the Close Program window. This will show you every program currently running on your machine — including background tasks. You can close these individually on demand, but to do this permanently you need either to remove the appropriate entry in the StartUp menu, or to modify your PC's Registry in some cases. Windows 98 provides an elegant way round this with its System Configuration Utility (msconfig.exe), which allows you to selectively disable any startup item.