﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Jose-Maria Catena</title>
    <description>Articles by Jose-Maria Catena</description>
    <link>http://www.prorec.com/Articles/tabid/109/BlogId/15/Default.aspx</link>
    <language>en-US</language>
    <webMaster>editor@prorec.com</webMaster>
    <pubDate>Sun, 07 Sep 2008 22:05:49 GMT</pubDate>
    <lastBuildDate>Sun, 07 Sep 2008 22:05:49 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.5.0.11940</generator>
    <item>
      <title>Tuning Windows 2000 for Audio</title>
      <description>
&lt;H2&gt;Virtual Memory&lt;/H2&gt;
Windows 2000 does not allow disabling virtual memory. This is not a problem. I never recommend disabling VM, and Windows 2000 manages it much better than Win9X.&lt;br&gt;
&lt;br&gt;
You can choose the disk volume where the VM file will be placed.  Usually you will want a single file. If you have several disks, do not put it in the same disk that you use for the audio files.&lt;br&gt;
&lt;br&gt;
The settings recommended by Windows 2000 are usually adequate, but some tweaking can prevent possible problems. When you are running Windows 2000, it will use the smallest swap file it needs.  But if you do something that requires more RAM, Windows will enlarge the swap file to create memory headroom.  If this happens when you're recording or playing back, you could experience real performance problems when Windows tries to enlarge the swap file.  Therefore, set the minimum virtual memory size so that the swap file should never need to grow. 256 MB should be the smallest value you should set, but 384 to 512 MB are better. The maximum size should be set at a large value, for example 1024 or even more.  There is not harm in having a large maximum value setting, just don't overfill your hard disk or the swapfile may be prone to fragmentation.  If you wish you can set both values to the same large value, say 512 or 1024 MB, and Windows will never resize your swap file.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Disabling Visual Effects&lt;/H2&gt;
Disable them! Go to Control Panel &gt; Display &gt; Effects Tab and disable "Use transition effects…".  It's also a good idea to disable "Show window contents while dragging". Or better, download and install the latest version of TweakUI from Microsoft, and disable every kind of visual effects and animations.&lt;br&gt;
&lt;br&gt;
As principle, when the CPU is busy with high priority intensive tasks (like audio processing) the "transition effects" should perform slowly, giving CPU priority to the higher-priority tasks like audio. But apparently someone at Microsoft thought that was not acceptable – that smooth visual effects were more important - so they decided to assign a higher priority to the visual effects task. Consequence: displaying a menu or a tooltip can steal time from more critical tasks.  Disabling those effects helps ensure that a pretty drop-down menu doesn't cause a frustrating dropout.&lt;br&gt;
&lt;br&gt;
Another thing I always disable are the system sounds.  Go to Control Panel &gt; Sounds And Multimedia and select "No Sounds".  I also disable web contents in folders Control Panel &gt; Display &gt; Web.  Another good idea is to avoid desktop background and themes and screen savers.  Use the power saving options instead.  If you do not need 24/32 bit color, use 16 bit color. Screen redraws and updates take usually less CPU time in this mode and your applications should look just fine with 16 bit color.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Bus Mastering ATA Controller Drivers&lt;/H2&gt;
Windows 2000 will detect and activate DMA modes by default whenever it recognizes the disk controller as DMA capable for any DMA capable device connected. You can review the mode set or change it at Device Manager &gt; IDE ATA / ATAPI Controllers &gt; Primary (and Secondary) Controller &gt; Advanced Settings Tab.  It only allows to set "PIO only" or "DMA if possible" for each device, and indicates the currently active mode. But does not show the actual PIO or DMA speed.&lt;br&gt;
&lt;br&gt;
If you do not see these settings, or you cannot enable DMA mode for a device that you know supports it (which includes all modern devices), your controller may not have been recognized properly by Windows 2000 and you may need to install specific drivers provided by the manufacturer. Of course, all Intel chipsets are recognized and perform very well. Mileage with others may vary very much. In particular, the VIA 686A performs particularly bad.  At any rate, you need to have DMA enabled for all of your drives, especially your audio disks.  This is absolutely essential for good DAW performance – a system which can stream 100 tracks of audio in DMA can grind to a halt at only 12 tracks in PIO mode! &lt;br&gt;
&lt;br&gt;
Remember that special 80 wire ATA cables are required for UDMA66 or UDMA100 operation, and highly recommended even for slower modes. If you are still using 40 wire cables, change them immediately, even if you're running UDMA33.  The extra 40 wires aren't attached to anything – they just serve as shielding between every other wire.  The result is less interference and fewer errors - which means fewer retries and faster performance.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;File I/O Optimization&lt;/H2&gt;
Windows 2000 file I/O is very efficient, more than Win9X, and you do not need to tweak any special setting in the operating system – specifically, the VCACHE setting which was so important in optimizing Windows 98 systems is not needed in Windows 2000.  All you need to do is properly format your disks.  Use FAT32 with 32KB clusters when formatting volumes for audio files -&lt;br&gt;
&lt;br&gt;
FORMAT [drive-letter]:  /z:64&lt;br&gt;
&lt;br&gt;
Disk performance statistics can be disabled: type "diskperf –n" at a command prompt. They will remain disabled after subsequent boots. To enable them back, type "diskperf  -y". Disabling disk statistics may improve the file I/O efficiency a bit.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Power Management Options&lt;/H2&gt;
It is better to avoid screen savers, and use instead the power saving modes for the monitor (Control Panel &gt; Power Options).  It is also preferable to not activate the automatic hard disk power down. Normally, start and stop cycles contribute more to hard disk wearing than "on time".  Also disable any options that throttle back the CPU when it is unused.  These settings are useful for battery powered devices but offer no benefit to an AC-powered computer.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Less is More&lt;/H2&gt;
Windows 2000 runs a couple of services that many of us will never use. These steal a very little amount of CPU time, but can waste some memory and startup time. So if you do not need a service, it is a good idea to disable its automatic loading at startup. You can do so going to Control Panel &gt; Administrative Tools &gt; Services. Look for any unneeded service with automatic startup type, and change it to manual. With this setting, the service will not start automatically at Windows startup, but can be started if needed.&lt;br&gt;
&lt;br&gt;
Typical services that might not be necessary:&lt;br&gt;

&lt;ul type="disc"&gt;
&lt;li&gt;Distributed Link Tracking Client (networking, tracks file transfers across NTFS volumes for computers in NT domains)
&lt;li&gt;DNS Client
&lt;li&gt;IPSEC Policy Agent (networking, to manage IP security)
&lt;li&gt;Remote Registry Service
&lt;li&gt;Task Scheduler&lt;/ul&gt;
&lt;br&gt;
Additionally, if you aren't using a LAN, you should be able to disable:&lt;br&gt;

&lt;ul type="disc"&gt;
&lt;li&gt;Computer Browser (networking, to list computers in a LAN)
&lt;li&gt;DHCP client (networking, to get automatically the IP address and DNS from a DHCP server)
&lt;li&gt;TCP/IP NetBios helper (LAN)&lt;br&gt;
&lt;/ul&gt;
&lt;H2&gt;CD-ROM Auto-Play&lt;/H2&gt;
An important tweak in Windows 98 for DAWs was to turn off CD autoplay.  The computer spends some amount of time determining if a CD has been inserted, and if it has, the computer then attempts to auto-run it.  By turning off CD autoplay we were able to get improved performance and stability when tracking.  This tweak no longer offers a significant performance benefit and we no longer need to make it.  The only point to be made is that if you are recording or performing a critical task, just don't insert a CD into the drive, or it will get priority and probably stop your critical task.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Do Not Touch Default Priority Settings&lt;/H2&gt;
You may have seen advices recommending an increase of the default priority settings. This is a bad idea.  Don't do it.&lt;br&gt;
&lt;br&gt;
Programs can set the appropriate priorities for any process or thread. Programmers require advanced skills in multitasking to analyze and design the appropriate priorities scheme for a given program. For example, in a DAW, the soundcard buffer events are of very high real-time priority, since if they are not serviced in few milliseconds, a dropout will occur.  The file pre-read threads must have a lower priority, but still higher than window redraws, and so on. Even DskBench uses several threads with very specific priority each.&lt;br&gt;
&lt;br&gt;
You do not have access to change the programmer assigned priorities.  So some people have recommended increasing the default priority. Increasing the default priority only raises the priorities of all threads in the system for which the programmers did not assign a specific priority.  This means that these threads do not have any special timing requirement, and you might make them take precedence over threads that require faster responses.&lt;br&gt;
&lt;br&gt;
In the worst case, it may be true that many application programmers do not have the adequate skills to properly design the priorities schemes or even basic multitasking issues. But there is nothing you can do about that other than making things worse, unless you are truly an expert willing to spend some time face to face with SoftICE to improve someone else's binaries.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Software Compatibility and the WIN32 API&lt;/H2&gt;
Windows 2000 shares the same basic API (Applications Programming Interface) with Windows 95, Windows 98, Windows Me and NT4: the WIN32 API. More accurately, the Windows 2000 version is a superset of the others.&lt;br&gt;
&lt;br&gt;
I must add an important note here: the code that implements the WIN32 API functions in Windows 2000 is 100% 32-bit code. Just to support 16-bit legacy applications, there are also 16-bit libraries that just call to the 32-bit ones to perform the tasks. That is the right way to implement 16-bit compatibility, but, as you surely know, the 9X family worked in the opposite way: the functionality was written in 16-bit code, and the WIN32 API was implemented by 32-bit libraries which called the 16-bit ones!  This means that Windows 2000 is truly a 32-bit OS, unlike the 9X family.&lt;br&gt;
&lt;br&gt;
Anyway, there are very few compatibility problems in the WIN32 API other than very rare side effects of implementation differences. Most pure WIN32 applications will run on Windows 2000 as well or better than on the 9X OSs. If you find some of the few 32 bit applications that do not run fine on Windows 2000, you should contact the provider for an update.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Multimedia and Other Newer APIs&lt;/H2&gt;
Windows 2000 is ahead of any other older Microsoft OS in all aspects. It includes or can host the newer APIs and most recent versions of any API available, and can run all of them better than any older OS.&lt;br&gt;
&lt;br&gt;
I have read all kinds of statements like "Windows 2000 is not optimized for audio", "Windows 9X/Me is the best choice for multimedia", etc. Surely people saying that were confused by the fact that NT4, the predecessor of Windows 2000, did not receive adequate support for multimedia. But this is not the case in Windows 2000 at all.   Keep in mind that DirectX 8 was targeted for Windows 2000 in first place, and that the first beta only ran on Windows 2000.  Microsoft is clearly targeting Windows 2000 for multimedia.&lt;br&gt;
&lt;br&gt;
Here's the deal.  The key factors for multimedia applications - or any other applications requiring precise timing and massive I/O and processing - are the task scheduler latencies and I/O efficiency. In both, Windows 2000 beats any older OS hands down, in particular the extremely important scheduler latency, which is at least two orders of magnitude better than in the 9X family. Although the huge variety of hardware and software configurations out there makes very difficult to define figures valid in all scenarios, in the average PC Windows 2000 is able to meet worst case high priority task latencies close to 1 ms, while Windows 9X does not even meet 100 ms.  Worst-case high priority task latency is the single most important measure of a systems ability to perform low latency real-time processing of massive data amounts.&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.prorec.com../../3fbdd95be86013f1862567f30025b305/Wcdd8138372034.htm"&gt;Article Continues &gt;&gt;&lt;/a&gt;&lt;br&gt;

</description>
      <link>http://www.prorec.com/Articles/tabid/109/EntryId/243/Tuning-Windows-2-for-Audio.aspx</link>
      <comments>http://www.prorec.com/Articles/tabid/109/EntryId/243/Tuning-Windows-2000-for-Audio.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.prorec.com/Articles/tabid/109/EntryId/243/Tuning-Windows-2-for-Audio.aspx</guid>
      <pubDate>Sun, 01 Jul 2001 00:00:00 GMT</pubDate>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.prorec.com/DesktopModules/Blog/Trackback.aspx?id=243</trackback:ping>
    </item>
    <item>
      <title>In Theory, pt. 2</title>
      <description>&lt;H2&gt;Frequency filters&lt;/H2&gt;
A frequency filter modifies the amplitude response into a determined bandwidth. What we know in the audio world as an &lt;b&gt;equalizer&lt;/b&gt; is a frequency filter. I won't cover here a description of audio equalizers from a usage point of view, what surely you know well. If it is not so, you might want to read the &lt;a href="http://www.prorec.com../../41ce47c8af04077a862565ee00564aa7/Wc925a5516e2d9.htm"&gt;series about equalizers&lt;/a&gt; from Lionel L. Dumond. What I'll explain here are some basic properties of digital filters.&lt;br&gt;
&lt;br&gt;
Filters change audio in two ways: by changing the amplitude vs. frequency, and by changing the pahse vs. frequency.&lt;br&gt;
&lt;br&gt;
The &lt;b&gt;amplitude response&lt;/b&gt; is represented by a graph where the X axis is the frequency and the Y axis the amplitude gain.&lt;br&gt;
&lt;br&gt;
The &lt;b&gt;phase response&lt;/b&gt; is represented by a graph where the X axis is the frequency and the Y axis is the phase.&lt;br&gt;
&lt;br&gt;
There are two main kinds of digital filters: &lt;b&gt;IIR&lt;/b&gt; (Infinite Impulse Response), and &lt;b&gt;FIR&lt;/b&gt; (Finite Impulse Response).&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;IIR filters&lt;/H2&gt;
An &lt;b&gt;IIR&lt;/b&gt; filter is the mathematical representation of analog filters. The core is always a delay line where the output is fed-back to the input. Of course, there are many possible variations, but there are some common characteristics in all IIR filters:&lt;br&gt;
-	Smooth amplitude responses without unwanted discontinuities are possible.&lt;br&gt;
-	The phase response, like in their analog counterparts, can't be flat, it always presents more or less phase shift, usually near the transition points.&lt;br&gt;
-	The parameters or coefficients used in the algorithm to make the wanted response are often easily computed from the type of data the user usually can provide. For example, for a parametric EQ, the user deals with center frequency, gain, and Q factor or bandwidth; for a low pass, with cutoff frequency and slope, and so on. And these are easily translated to the necessary filter parameters in the form of pole and zero vectors.&lt;br&gt;
-	Like analog filters, the wanted performance might require a configuration of several basic IIR filters. Then we speak about first order, second order, and so on based in the number of elements. An element can provide amplitude response slopes up to 6 dB per octave each. A second order filter can provide up to 12 dB/octave, a third order 18 dB/octave, and so on. That is, as more abrupt the amplitude response is, more elements (read higher order) are necessary.&lt;br&gt;
-	Due to the feedback, IIR filters can present lack of stability such auto-oscillation and ringing. Careful design and simulations on operating ranges are necessary, in special when extreme response curves are required.&lt;br&gt;
-	IIR filters require less computational power than FIR filters.&lt;br&gt;
&lt;br&gt;
These characteristics make IIR filters the choice for typical audio equalizers.&lt;br&gt;
&lt;br&gt;
An example of the magnitude and phase responses of a typical IIR band-pass filter is:&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="/portals/1/legacy/Wcd03386f84212.gif" width="322" height="333" alt=""&gt;&lt;/div&gt;&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;FIR filters&lt;/H2&gt;
A &lt;b&gt;FIR&lt;/b&gt; filter has no counterpart in the analog world. It can only be represented or implemented in a numerical, purely mathematical form. It's basically a delay line of length N (number of taps), where the output is the sum of products of each sample in the delay line by the corresponding coefficient in an array of the same length. It doesn't employ feedback. More abrupt amplitude responses requires a larger N. Main characteristics are:&lt;br&gt;
-	The amplitude response is more or less irregular.&lt;br&gt;
-	The phase response is constant if the number of taps N is odd.&lt;br&gt;
-	The coefficients that determine the filter response are not directly derived from the required specifications. The most used method to compute these parameters is the Parks-McCellan algorithm, that converts response specifications including maximum allowable ripple into the parameters array.&lt;br&gt;
-	FIR filters are inherently stable. Due to the absence of feedback, there can't be undesired side effects like auto-oscillation.&lt;br&gt;
-	FIR filters need usually more computational power than IIR filters. Basically, a multiplication and accumulation per tap.&lt;br&gt;
&lt;br&gt;
These characteristics make FIR filters ideal to implement bandwidth limiters. Very steep slopes are possible, even in the range of thousands of dBs/octave. &lt;br&gt;
&lt;br&gt;
An example of the magnitude response of a typical FIR low pass filter of 119 taps follows. Note that phase is not presented as it is flat, a characteristic of FIR filters with odd N. Note also the step transition from 0 dB to –100 dB in less than three semitones. This is a cut!&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Digital vs. Analog filters&lt;/H2&gt;
Digital IIR and FIR filters have been a real revolution, offering performance many orders of magnitude above analog filters, and doing even what would be absolutely impossible in the analog world. Analog filters can't ever present constant phase like odd FIR filters. The higher analog filter order I have ever seen is 4th.  Analog filters are based in components whose impedance changes with the frequency: capacitors and/or inductors. The impedance of a capacitor is half with twice the frequency, and the impedance of an inductor is twice when frequency doubles. This is the cause of the 6 dB/octave slope per element described for IIR filters, that are no more than the mathematical model of an analog filter.&lt;br&gt;
&lt;br&gt;
Current technology has not been capable of producing real capacitors or inductors without large differences from the ideal models. It's difficult to achieve value tolerances better than 10 %. Temperature stability and value drift over time aren't good in capacitors. Many capacitors present very important series inductance, and the ones that doesn't are of very low values. Inductors are affected by lack of linearity in cores. They have unwanted series resistance, parallel capacitance. The size constrains the practical value range, they are very susceptible to magnetic and electromagnetic noise, and they interact with each other when they are close. In definitive, is not possible in practice to even approach the 1% of the possibilities offered by DSP technology.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Sample Rate conversions&lt;/H2&gt;
Discrete sample rate conversions must be always done with integer ratios, either down or up. That is, a 44K1 stream can be down sampled to 22K05, 11K025, ..., or up sampled to 88K2, 176K4,...&lt;br&gt;
&lt;br&gt;
The algorithm that does the down sampling is called &lt;b&gt;decimator&lt;/b&gt;, and the one that does the up sampling is an &lt;b&gt;interpolator&lt;/b&gt;.&lt;br&gt;
When a fractional ratio conversion is required, it is achieved doing an interpolation to the minimum common multiplier of both rates, and then decimation to the final rate. If the minimum common multiplier is a very high rate, we might find a reasonable approximation that is "near" of an integer  multiplier of both rates. But then, we will introduce some distortion, whose magnitude depends on the error with respect to the multipliers. This is the case with conversion between two of the well known standard rates and its derivatives used for audio: 44K1 and 48K. These values were chosen precisely because the difficulty to convert to each other without quality losses. It was imposed by the record industry to constrain unlimited piracy when DAT was introduced.&lt;br&gt;
&lt;br&gt;
Whenever the sample rate is changed, the Nyquist frequency is changed (it's half of the sample rate, do you remember). So, aliasing noise appears. To avoid that, the signal must be filtered before a decimation or after an interpolation to limit the bandwidth to the lowest of both Nyquist frequencies. For efficiency, the anti-aliasing filter is usually integrated with the decimator or interpolator. The best choice for the anti-aliasing filter is a nice odd FIR filter, what can do a perfect work without affecting phase. Many conversion programs are actually using IIR filters for this, and I believe that the only reasons are that programmers doing audio DSP software are often more familiarized with IIR or that IIR can be executed faster. The decimators in oversampling converters almost always employ FIR filters.&lt;br&gt;
&lt;br&gt;
To guarantee absolute absence of alias noise, the low pass filter must present stop band attenuation in the order of the dynamic range. To avoid any alteration in the audible region, the pass band must extend beyond the audible bandwidth. The pass band ripple (amplitude variations) should be lower than 0.5 dB. A FIR filter can easily exceed all of these requirements.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Decimation&lt;/H2&gt;
A decimator converts a stream to a lower sample rate which is in integer ratio with the original. The procedure is simple:&lt;br&gt;
1)	An anti-aliasing filter is first applied to the stream to remove the portion of the bandwidth that can't be represented at the lower rate. As explained, anything above the final Nyquist must be removed.&lt;br&gt;
2)	N-1 of each N samples are removed, where N is the decimator ratio.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Interpolation&lt;/H2&gt;
An interpolator converts a stream to a higher sample rate which is in integer ratio with the original. The procedure is:&lt;br&gt;
1)	Insert N-1 zero samples after each original sample, where N is the interpolator ratio.&lt;br&gt;
2)	Apply an anti-aliasing filter with cutoff frequency below the original Nyquist. To keep the amplitude, the filter must have a gain of N.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Fractional conversion&lt;/H2&gt;
This method must be employed when the two rates aren't one an integer multiple of the other. The conversion goes through an intermediate sample rate that must be the lowest integer multiple of both, that is, the minimum common multiple. We'll call this intermediate rate I. If it's very high, it could be not possible to implement in practice, and we must choose a rate that is close enough to integer multiples of both rates. There will be some distortion in this case thought, but it can be minimal if the chosen rate is close enough to both multiples. Once determined the intermediate sample rate I, let us call M to the ratio between the original rate and I, and D to the ratio between I and the final rate.&lt;br&gt;
1)	Insert M-1 zero samples after each original sample.&lt;br&gt;
2)	Apply the anti-aliasing filter. The cutoff must be below the Nyquist frequency of the original or final sample rate, whichever is lower.&lt;br&gt;
3)	Remove D-1 of each D samples.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Sample format conversions&lt;/H2&gt;
A direct sample format conversion is a simple and trivial procedure. Each sample is converted individually. In the following descriptions, we'll use some assignments to ease reading:&lt;br&gt;
S = source sample&lt;br&gt;
D = destination sample&lt;br&gt;
Sn = number of bits in source&lt;br&gt;
Dn = number of bits in destination&lt;br&gt;
Bit 0 as the least significant bit.&lt;br&gt;
&lt;br&gt;
With float samples, we'll assume here 32 bit floating point numbers where +-1.0 represents 0 dB, what's the standard convention.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Integer to integer, Dn &lt; Sn&lt;/H2&gt;
D contains the higher Sn bits of S. The Sn-Dn lower bits of S are lost.&lt;br&gt;
This is accomplished arithmetically shifting S to the right Sn-Dn bits. The arithmetic shift is a single and efficient instruction in most processors.&lt;br&gt;
&lt;br&gt;
The dynamic range of the converted material is reduced to the maximum corresponding to Dn (=20*log(2^Dn)).&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Integer to integer, Dn &gt; Sn&lt;/H2&gt;
S  is copied to the highest Sn bits of D. And the lowest Dn-Sn bits of  D are the lowest Dn-Sn bits of S, but instead of this, they are usually simply padded with zeroes, because it is more efficient and only introduces a negligible full scale amplitude error that doesn't affect the dynamic range nor any other aspect.&lt;br&gt;
&lt;br&gt;
This is accomplished shifting S to the left  Dn-(Dn-Sn) bits. Again, this single shift instruction is very efficient in most processors.&lt;br&gt;
The dynamic range of the converted material remains the same.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Integer to float&lt;/H2&gt;
The integer is converted directly to float format (this is a single instruction that all processors that suport floating point have), and then, a scale adjustment must be done:&lt;br&gt;
D = S / (2^(Sn-1))&lt;br&gt;
&lt;br&gt;
The dynamic range of the converted material remains the same.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Float to integer&lt;/H2&gt;
First, the float value must be scaled, and then converted to integer (again a single instruction).&lt;div align="center"&gt;D = S * (2^(Dn-1))&lt;/div&gt;&lt;br&gt;
The dynamic range of the converted material is reduced to the maximum corresponding to Dn (=20*log(2^Dn)).&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Dithering&lt;/H2&gt;
Dithering is a method that let us to reduce the dynamic range loss when converting to lower resolution formats, achieving a dynamic range that is greater than the corresponding to the final resolution, at the cost of adding some noise.&lt;br&gt;
&lt;br&gt;
There are several methods. I describe here the basic idea:&lt;br&gt;
&lt;br&gt;
The tracked error resulting from rounding in each sample conversion is accumulated and added to the following sample before it's converted.&lt;br&gt;
&lt;br&gt;
The dynamic range gain is not evenly spread in the total bandwidth. At the top of the bandwidth there is no gain, and the benefit is greater as the frequency is lower. At half the bandwidth, the dynamic range gain is of about 6 dB. With this basic method, the noise added is very low, and it's mainly in the higher half of the bandwidth, where it has a lower psycho-acoustical weight.&lt;br&gt;
&lt;br&gt;
Based in the basic method, more aggressive dithering can be done,  resulting in more dynamic range gain generally around the frequency bandwidth/3, but at the cost of more noticeable noise.&lt;br&gt;
&lt;br&gt;
Basic dithering doesn't present a negative accumulation effect. That is, the signal is not degraded when the sample format is converter to higher resolutions and dithered again. The benefit is kept across accumulative conversions.&lt;br&gt;
&lt;br&gt;
More aggressive dithering might perform badly when the dithered data is converted to higher resolutions and / or dithered again. So, it must be used only at the very last stage of mastering, just when the data will not be processed anymore.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Noise shaping&lt;/H2&gt;
Noise shaping is a procedure that shifts up the spectrum of the noise added by dithering to lower its psycho-acoustical weight. So, it's used in combination with dithering, and its benefit is larger when dithering is aggressive.&lt;br&gt;
&lt;br&gt;
The disadvantage of noise shaping is that if the data is processed after applying it, the result is worse than if no noise shaping was applied. So, it only should be applied to the very last stage and only if the data won't be ever processed again.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Mixed format and rate conversions&lt;/H2&gt;
Although format and rate conversions are totally different processes, there are some cases where it's interesting to combine them in the same algorithm.&lt;br&gt;
&lt;br&gt;
Extra information in higher sample rates can be exchanged by more sample resolution. The opposite is also true. Twice the sample rate has the same quality weight as one additional bit of sample resolution, as long as the bandwidth is always above the required one (that's 20 KHz for audio).&lt;br&gt;
&lt;br&gt;
For example, the following audio loss-less conversions can be done:&lt;br&gt;
44K1/16bits = 88K2/15bits = 176K4/14 bits = ... = 2.8GHz/1bit&lt;br&gt;
&lt;br&gt;
Obviously, twice the sample rate requires much more storage and throughput than one bit more per sample, and so, seems that we should always choose the maximum sample resolution and the lowest required sample rate, but there are exceptions that we'll see soon.&lt;br&gt;
&lt;br&gt;
Having the capability of exchange sample rate and sample resolutions, we can choose the best combination of both in each stage or circumstance. For example, when storing or handling data in a computer, we want the minimum possible sample rate because then the storage, throughput and computing requirements are much lower. At the other side, when converting data to analog, for example, we might prefer a very fast one bit converter, as it can be much simpler and better than a slower converter with more bits.&lt;br&gt;
&lt;br&gt;
This principle of  rate per resolution exchanges is the basis of combined sigma delta modulators and over-sampling methods, what have made possible an impressive improvement in analog to digital and digital to analog converters. This will be the next issue...&lt;br&gt;
</description>
      <link>http://www.prorec.com/Articles/tabid/109/EntryId/68/In-Theory-pt-2.aspx</link>
      <comments>http://www.prorec.com/Articles/tabid/109/EntryId/68/In-Theory-pt-2.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.prorec.com/Articles/tabid/109/EntryId/68/In-Theory-pt-2.aspx</guid>
      <pubDate>Sun, 01 Nov 1998 00:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.prorec.com/DesktopModules/Blog/Trackback.aspx?id=68</trackback:ping>
    </item>
    <item>
      <title>In Theory, pt. 1</title>
      <description>&lt;H2&gt;Introduction&lt;/H2&gt;
Understanding basic DSP (Digital Signal Processing) theory is really helpful to get the most of digital audio recording and processing. This series of articles is directed toward musicians and sound engineers, so, the issues will be covered mostly in a practical way, and the necessary theory will be explained as good backgrounder or just to understand the practical consequences, not to be a deep or complete reference for DSP math.&lt;br&gt;
&lt;br&gt;
The series will begin with the more basic issues, assuming that the reader doesn't know DSP theory at all, allowing anybody to follow and understand the explanations. Very often, it's difficult to understand issue A without first understanding issue B, while B cannot be fully understood without first understanding issue A, so, don't worry if you can't understand completely something, accept it as a hypothesis, and you will understand better each time as you follow the series.&lt;br&gt;
&lt;br&gt;
If you have questions, you can use the &lt;a href="http://www.prorec.com/prorec/prorecording.nsf/by+tool/DSP+Theory"&gt;&lt;b&gt;&lt;u&gt;DSP theory forum&lt;/u&gt;&lt;/b&gt;&lt;/a&gt; at ProRec. I'm yours there. It's preferred for this matter to the e-mail because everybody can benefit from the answers.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Basic audio signal definitions&lt;/H2&gt;
First of all, we need to define some simple concepts about analog audio signals to understand later how they can be represented numerically.&lt;br&gt;
&lt;br&gt;
Sound is variations of air pressure. The air pressure can be converted to an electrical signal by a microphone. We can represent the signal in a graph where the X axis is the time and the Y axis is the instant amplitude (sound pressure) at each time. This representation is called &lt;b&gt;time domain&lt;/b&gt; representation. This representation is what we see in an oscilloscope and sound editing software. The instant sound pressure (or level of the electrical signal) at each time is called &lt;b&gt;instant amplitude&lt;/b&gt;.&lt;br&gt;
&lt;br&gt;
A &lt;b&gt;periodic signal&lt;/b&gt; is a signal where a fixed pattern, or &lt;b&gt;cycle&lt;/b&gt;, is repeated along the time. The &lt;b&gt;cycle period &lt;/b&gt;is the time length of a single cycle. The &lt;b&gt;frequency&lt;/b&gt; is the inverse of the period, that is, the number of cycles per second, and the unit is called &lt;b&gt;Hertz&lt;/b&gt; (&lt;b&gt;Hz&lt;/b&gt;). In musical terms, the frequency is the &lt;b&gt;pitch&lt;/b&gt;, lower frequencies are perceived as bass sounds and higher ones are perceived as treble sounds. Musically speaking, the pitch perception is logarithmic. One &lt;b&gt;octave&lt;/b&gt; is twice the frequency.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Bandwidth&lt;/b&gt; is a range of frequencies. The frequencies that we the humans can hear are inside the range from 20 Hz to 20 KHz. Not everybody can hear this entire range, and this bandwidth is usually reduced with age, exposition to high sound pressure levels, or diseases. More often, only young people can hear very near 20 Khz, while adult people rarely hear beyond 17-18 KHz in the best cases. So, this 20 Hz to 20 KHz bandwidth is what is assumed as the maximum human hearing range, and is adopted by most standards.&lt;br&gt;
&lt;br&gt;
Sound is not only pure periodic signals. But to simplify many math demonstrations, usually periodic signals are used, although the methods &lt;i&gt;are &lt;/i&gt;applicable later to complex and not periodic signals. For this matter, the time is often expressed as an angle, in radians, and so, the frequency as angular speed, in radians per second. &lt;br&gt;
&lt;br&gt;
The simplest periodic signal is the sine function: s(t) = sin(t). Do you remember trigonometric theory? If you rotate a wheel with constant angular speed, the sine function will give you the Y position of a point in its circumference (instant amplitude) for each time. Any other periodic signal, as complex as you want, can be expressed as a sum of sine signals, as demonstrated by the &lt;b&gt;Fourier transform:&lt;/b&gt;&lt;br&gt;
&lt;br&gt;
S(t) = K1*sin(t) + K2*sin(t*2) + K3*sin(t*3) + ... + Kn*sin(t*n))&lt;br&gt;
&lt;br&gt;
The first sine component is the fundamental frequency (the lowest). The rest are called &lt;b&gt;harmonics&lt;/b&gt;, and are multiples of the fundamental frequency. K1 to Kn are the set of coefficients or amplitude of each single frequency, and represent the spectral content of the signal, which in musical terms we call &lt;b&gt;timbre&lt;/b&gt;. For example, a square signal only has certain amplitudes in the odd harmonics, while even coefficients are always 0; a sawtooth signal has certain amplitudes in all harmonics. Fourier transforms can also be applied to any kind of signal, even not periodic, for any given time period.  In this case we are not describing harmonics, as there can be infinite unrelated sine components.&lt;br&gt;
&lt;br&gt;
We can represent the Fourier coefficients in a graph where the X axis is frequency and the Y axis is amplitude, which is called the &lt;b&gt;frequency domain&lt;/b&gt; representation, and shows us the spectral content of a signal. So, the Fourier transform converts time domain information to frequency domain information. &lt;br&gt;
&lt;br&gt;
As you should begin to intuit, Fourier theory is very important for us. The Fourier transform is very complex to compute, but fortunately, there is an approximation that can be computed much faster: &lt;b&gt;Fast Fourier Transform&lt;/b&gt;, or &lt;b&gt;FFT.&lt;/b&gt; It's what is usually implemented, for example, to analyze the spectrum content of a signal.&lt;br&gt;
&lt;br&gt;
Finally, we must know what a &lt;b&gt;decibel&lt;/b&gt; is. We do not perceive sound level linearly, but following a logarithmic transfer function. The decibel is defined as dB = 20 * log10(V1/V2). It represents the logarithmic ratio between two values. Twice the level correspond to + 6 dB, half the level, to – 6 dB. 20 dB is equivalent to a x10 ratio. The power doubles each 3 dB, which means that we must supply 4 times the power to hear twice as loud. &lt;br&gt;
&lt;br&gt;
The decibel is ideal to describe ratios. For example, the dynamic range is the ratio between the maximum level available and the minimum (or noise), the SNR (signal to noise ratio) is the ratio between the nominal signal level and the noise. Sometimes, the decibel is used relative to an implicit value, for example, to define levels. The audio signal level is usually referred to the nominal 0 dB, whose standard value is 1 milliWatt RMS through 600 ohms (aprox 0.775 volts RMS.). RMS means root mean square, which is the form to express average effective power/level, and is related to perceived loudness. When measuring sound pressure (SPL), it's referred to the hearing threshold.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;Numeric representation of analog signals&lt;/H2&gt;
To represent digitally (that is, numerically) an analog signal, we must convert the instant amplitude at each time to a number that represent its value. Each value is called a sample.&lt;br&gt;
&lt;br&gt;
A &lt;b&gt;sample&lt;/b&gt; is a single value that represents the instant sound pressure at a given time.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Sampling period&lt;/b&gt; is the time between two consecutive samples.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;Sampling frequency&lt;/b&gt; is the inverse of sampling period, that is, the number of samples per second (freq = 1 / period).&lt;br&gt;
&lt;br&gt;
The sampling frequency determines the bandwidth that can be represented. The &lt;b&gt;Nyquist therorem&lt;/b&gt; demonstrates that the bandwidth that can be represented using a given sampling frequency is half of that sampling frequency. This sampling frequency divided by two is called &lt;b&gt;Nyquist frequency&lt;/b&gt;. So, the Nyquist frequency corresponds with the maximum frequency of the analog signal that can be represented or bandwidth. If we try to digitize a signal whose frequency is larger than the Nyquist frequency, that signal is registered wrongly as frequency of the original signal minus the Nyquist frequency, which is known as &lt;b&gt;aliasing&lt;/b&gt;. To avoid aliasing, the audio signal must be filtered to remove the portion of the bandwidth above the Nyquist frequency before converting it to digital form. We'll study anti-aliasing filtering further in the next chapter, dedicated to sample rate conversions, and in one further about analog to digital converters.&lt;br&gt;
&lt;br&gt;
This means that sampling frequency must be higher than twice the bandwidth that we want to digitize. This is why CD uses 44100 samples per second: it gives a usable bandwidth of 22050 Hz, which covers entirely the audible bandwidth. Here, we are not dealing with the antialiasing filter, for which the sampling rate is very important; we'll study it in the chapter dedicated to analog to digital converters. So for now, strictly speaking about the information stored in digital form, using higher sampling rates for audio serves no purpose.&lt;br&gt;
&lt;br&gt;
Then you may ask, for example, how a signal of about 20 KHz can be represented with accuracy if there are only less than 3 samples per cycle. Well, it doesn't matter, Nyquist was not wrong: if you learned what the Fourier transform means, then you can understand now that any 20 KHz signal, if limited to a 22k05 bandwidth, is always a sine wave. That is, you can't hear the differences between different 20 KHz signals (sine, square, saw, etc.) because you can only hear the fundamental (a sine wave), as the harmonics are beyond the audible range (the first one at 40 KHz in this example). Obviously, if you pass any 20 KHz waveform by an ideal low pass filter which cuts at 22k05 (our ears cut perfectly before that), the output is always a perfect sine signal, even when the samples seem to represent something like a very irregular square wave. We'll study more on this in a future digital to analog converters chapter. Therefore, a 44k1 sampling rate gives us fully accurate representation in a limited 22k05 bandwidth, which exceeds our hearing bandwidth.&lt;br&gt;
&lt;br&gt;
The &lt;b&gt;sample format&lt;/b&gt; is the form to digitally represent sample values. Digital means that there are only zeros and ones. Each bit is a single binary digit that can take the values zero or one. Grouping bits, we can represent any value.&lt;br&gt;
&lt;br&gt;
For example, with 4 bits, we can code the values from 0000b (0 in our well known decimal form) to 1111b (15 in decimal). This format is called unsigned integer. To represent signed integers, we use two's complement form: 0000b to 0111b are 0 to 7 in decimal, and 1111b to 1000 are –1 to –8 in decimal. The value range that can be represented with integer formats is two raised to the number of bits. For example, with 8 bits we can code 0 to 255 (=2^8) or –128 to +127; with 16 bits, from 0 to 65535 (=2^16) or –32768 to +32767, and so on. We can interpret the numbers scaled by any factor power of two, although the coding is the same, and then we call this fixed point format (an arbitrary number of bits are the integer portion and other the fractional portion). Anyway, if you know simple arithmetic, you'll find that integer and fixed point are treated the same, being the only difference how you want to interpret them.&lt;br&gt;
&lt;br&gt;
Another, more advanced way to represent numbers, is the floating point form. Here, a bit is the sign, a group of bits are called the mantissa, which is coded as a fixed point number, and other group of bits are the exponent of two. This is interpreted and handled as (sign, mantissa * 2 ^ exponent), that is, similar to the scientific notation, but in base two. This way we can code ranges much larger than possible if we code all bits as fixed point. &lt;br&gt;
&lt;br&gt;
There are several standard floating points formats by IEEE, but to represent audio, the smaller is more than needed: 32 bits floats (sign, 24 bit mantissa and 7 bit exponent). The exponent is adjusted automatically to keep the maximum number of meaningful bits in the mantissa (this is called float normalization). Applied to audio samples, the floating point format has some important advantages over fixed point formats: virtually unlimited dynamic range, lower quantization noise, and quantization noise relative to sample value, not absolute as with fixed point. Furthermore, multiplication with floats is significantly faster than with integers in the actual Intel Pentium processors, being the sum of products the core of most (virtually all) DSP operations.&lt;br&gt;
&lt;br&gt;
Note that converters can only work with fixed point data, although the format conversion is a trivial task for any processor with floating point unit.&lt;br&gt;
&lt;br&gt;
How the sample format affects to the audio signal? It defines the dynamic range available and the quantization noise.&lt;br&gt;
Using fixed point samples, the dynamic range (the ratio between the smallest step and the maximum value) is equivalent to the quantization noise. The dynamic range in dB is increased by 6 by each bit.&lt;br&gt;
&lt;br&gt;
dB = 20 * log(2 ^ bits). The 0 dB reference is set at the maximum value, so, values above 0 dB can't be represented and result in overload distortion. For 16 bits, the dynamic range is 96 dB (so the quantization noise is at –96 dB); for 20 bits, it's 120 dB; for 24 bits, 144 dB, and for 32 bits, 192 dB.&lt;br&gt;
&lt;br&gt;
When using 32 bit floating point samples, 0 dB is defined as the value +- 1.0. The dynamic range is virtually unlimited (from –765 dB to +765 dB). The quantization noise is variable in function of the sample value, being always at –150 dB below the level of each sample.&lt;br&gt;
&lt;br&gt;
The "useable" human hearing dynamic range is about 120 dB (from the hearing threshold to the ear injury level). So, for music storage, 16 bits (96 dB) offers very good quality, and 20 bits (120 dB) is equivalent to our hearing capabilities. So, more that that seems at first not useful, but that isn't true. &lt;br&gt;
&lt;br&gt;
The reason is that when we want to digitize sound, we usually can't know in advance the largest peak value that will occur unless we use a hard limiter/compressor (what is very often not desirable at recording time). This way, we can't adjust the level applied to the analog to digital converter (ADC) to take advantage of it's full dynamic range. In fact, to avoid the risk of clipping at the ADC, we usually record below –20 dB. Obviously, if we subtract this necessary headroom from the available dynamic range, we have only about 76 dB of effective dynamic range with 16 bits, which results in a poor quality conversion. So, it's useful to digitize at 20 or even better at 24 bits to end up with full 16 bit quality or better. &lt;br&gt;
&lt;br&gt;
There is another important reason for using more than 16 bits: between the recording and the final master product, we do a lot of processes on the audio signals: we equalize, mix, apply effects... and each single operation of each process adds quantization noise. As this is an accumulative effect, we want the quantization noise as low as possible. 24 bits offer –144 dB of quantization noise, that is significantly lower than the hearing umbral, that is, good enough. 32 bit floats are even better because we can keep –150 dB of maximum quantization noise and much smaller mean quantization noise, regardless of the signal levels. 32 bit floats have another important advantage: productivity. When we apply any process to an audio signal using fixed point samples, the signal can be amplified or attenuated, possibly resulting in clipping or too low value (read increased quantization). And then, we must check always the data after each process, and if the resulting level is not good, undo, adjust the gain of the process, and try again. Obviously, this unproductive work is not necessary using 32 bit floats.&lt;br&gt;
&lt;br&gt;
As a logical result, 16 bit samples are enough for consumer music distribution, and little improvement will result from upgrading to 20 or 24 bits But during the recording and processing, 20 to 24 bit ADC and 24 bit fixed point to 32 bit float samples are desirable. In the following chapter, sample format and rate conversions this will be covered in depth, as these are must-know issues, and we should have already the adequate scope. &lt;br&gt;
</description>
      <link>http://www.prorec.com/Articles/tabid/109/EntryId/67/In-Theory-pt-1.aspx</link>
      <comments>http://www.prorec.com/Articles/tabid/109/EntryId/67/In-Theory-pt-1.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.prorec.com/Articles/tabid/109/EntryId/67/In-Theory-pt-1.aspx</guid>
      <pubDate>Thu, 01 Oct 1998 00:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.prorec.com/DesktopModules/Blog/Trackback.aspx?id=67</trackback:ping>
    </item>
    <item>
      <title>Virtual Memory Optimization</title>
      <description>Recording audio on a computer places demands on the computer never anticipated by the computer's creators or operating system manufacturers.&lt;br&gt;
&lt;br&gt;
For example, if you record on a large disk formatted with FAT32 in Windows 95, Windows will format the disk with small block sizes.  This is an attempt to avoid wasting space, since the entire block is consumed even if it only contains a single byte.  With "normal" sized files, small block sizes mean less wasted space.  With audio, however, small block sizes mean excessive reads and poor disk throughput.&lt;br&gt;
&lt;br&gt;
In a future article I will discuss the proper techniques for setting the right block sizes.  For the moment I want to discuss Virtual Memory.&lt;br&gt;
&lt;br&gt;
Windows' default Virtual Memory settings are usually not good for audio.  First of all, Windows likes to maintain a flexible swapfile size.  This is good for typical usage because it allows Windows to increase the size of the swapfile as you load more and more programs into memory.&lt;br&gt;
&lt;br&gt;
With audio recording, however, disasterous results can occur if you allow Windows to manage the size of the swapfile.  You'll be merrily recording the best take you ever heard, when BANG the recorder stops without warning, as Windows takes over and increases the size of the swapfile.  TAKE LOST!&lt;br&gt;
&lt;br&gt;
The folks at Microsoft didn't want you to change the default settings, either.  Here's what happens if you decide to change the settings in the Windows System Control panel:&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="/portals/1/legacy/Wc81f9d1f15db9.gif" width="395" height="189" alt=""&gt;&lt;/div&gt;&lt;br&gt;
&lt;br&gt;
As if this message isn't sufficiently scary, look at what happens if you bravely decide to disable Virtual Memory completely:&lt;br&gt;
&lt;div align="center"&gt;&lt;img src="/portals/1/legacy/Wcda4887e23d2b.gif" width="398" height="191" alt=""&gt;&lt;/div&gt;&lt;br&gt;
&lt;br&gt;
This is probably a good message to prevent newbies from getting in trouble.  But if you're going to get the most out of your computer-based recorder, you'll need to be brave.&lt;br&gt;
&lt;br&gt;
So the question is: what is the right size setting for virtual memory?&lt;br&gt;
&lt;br&gt;
The answer is: it depends on your computer's particular configuration: processor, physical RAM, etc..&lt;br&gt;
&lt;br&gt;
The following technique will determine the optimal size for your computer's Virtual Memory setting.&lt;br&gt;
&lt;br&gt;
&lt;b&gt;&lt;font color="#FF0000"&gt;Warning!&lt;/font&gt;&lt;/b&gt;  If you are not comfortable editing your system files - STOP NOW!!  Read the entire procedure completely and make sure you are comfortable with each step before proceeding!&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;(1) Set the VCACHE settings in SYSTEM.INI&lt;/H2&gt;&lt;br&gt;
This is not VM, but file cache. To measure VM needs, you should first adjust these values, especially if you do not have much RAM. &lt;br&gt;
[vcache] MinFileCache=0 MaxFileCache=X &lt;br&gt;
X here is the maximum memory dedicated to file caching. File caching does not help audio applications, so set it low if you do not have much memory. I suggest the following values as starting points: &lt;br&gt;
16 MB -&gt; X=1024 &lt;br&gt;
32 MB -&gt; X=2048 &lt;br&gt;
64 MB -&gt; X=4096 &lt;br&gt;
above 64 MB -&gt; X=8192 &lt;br&gt;
The objective is to avoid wasting too much RAM for file caching. &lt;br&gt;
Restart the computer.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;(2) Start the System Monitor and select a graph of ALLOCATED MEMORY&lt;/H2&gt;&lt;br&gt;
Start the audio programs you typically use concurrently. For example, if you usually work with Cakewalk and SoundForge load both programs.&lt;br&gt;
Note the maximum values that allocated memory reach during normal use of your programs.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;(3) Set the MINIMUM VIRTUAL MEMORY SIZE to a value somewhat higher than the maximum allocated memory reached&lt;/H2&gt;&lt;br&gt;
If you have extra disk space, don't worry about setting a larger value.&lt;br&gt;
You can set MAXIMUM VM SIZE to any larger value. Be sure to set it above the maximum memory you ever need. You can set it, for example to 512 MB. No problem, no performance degradation. The swap file will only grow if your programs allocates more memory than the minimum VM size set, that should be a rare case if you adjusted the min VM size as described in the previous point.  &lt;br&gt;
Restart the computer.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;(4) Start the system monitor again and select VM PAGE MISSES graph.&lt;/H2&gt;&lt;br&gt;
Start your usual applications again and while using them see if there are too many page misses during normal operations. Some page misses during program focus change, for example, are aceptable, but not during file playback and the like. If there are many page misses, you'll improve performance adding more RAM.&lt;br&gt;
&lt;br&gt;
&lt;H2&gt;(5) Finally, some aditional information&lt;/H2&gt;&lt;br&gt;
- To defragment the VM file, disable VM, defrag, and set the VM again. This is needed only when changing the VM settings.&lt;br&gt;
- Cakewalk, for example, uses only about 8 MB. To be safe double this to 16 MB to account for lots of effects and large audio buffers. Win95 + Cakewalk usually allocates about 40..50 MB.&lt;br&gt;
- Place the VM on your fastest disk or partition.  This should ideally be a different disk from your audio disk. Moving the VM file will speed up system performance when page misses occur, that is, when the physical RAM is insufficient. The swap file won't cause disk fragmentation if adjusted as described, and so, it won't affect audio file access.   &lt;br&gt;
- If you are getting too many page misses you should add RAM to avoid it.  If it is infeasible to add RAM, place the swap file on a different disk to use all the available disk throughput for audio files: in this case, the disks should not be in the same IDE channel (only applicable to IDE disks).&lt;br&gt;
- ALWAYS USE BUS MASTER DISK DRIVERS!!!  If possible, use those included with Windows OSR2.&lt;br&gt;
- Set the DMA option in all your disks (Control Panel -&gt; System -&gt; Disks...). This will free additional CPU bandwidth for audio processing.&lt;br&gt;
</description>
      <link>http://www.prorec.com/Articles/tabid/109/EntryId/231/Virtual-Memory-Optimization.aspx</link>
      <comments>http://www.prorec.com/Articles/tabid/109/EntryId/231/Virtual-Memory-Optimization.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.prorec.com/Articles/tabid/109/EntryId/231/Virtual-Memory-Optimization.aspx</guid>
      <pubDate>Wed, 01 Apr 1998 00:00:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.prorec.com/DesktopModules/Blog/Trackback.aspx?id=231</trackback:ping>
    </item>
  </channel>
</rss>