User Guide  for  Hauptwerk
About Hauptwerk
Welcome
What is it?
What is it used for?
Licensing
Installation
Prerequisites
Background
Installing
Upgrading
Backups
Quick start
Stand-alone
MIDI sequencing
VSTi plug-in
Background
Tour of a pipe organ
Using Hauptwerk
The virtual console
Settings screens
Menus
The File menu
Loading sample sets
Combination files
The registration sequencer
Temperaments
Audio routing and multi-channel audio
Activation and reset
Capture mode
Recording audio
Master tuning
The transposer
MIDI input
MIDI output
Re-directable inputs
Component installer
Importing v1 organs
MIDI organ consoles
MIDI sequencing
Organ design tools
Performance tuning
General options
Sample set options
Voicing
Reference
MIDI implementation
Troubleshooting
Creating sample sets

Performance tuning



There are several key goals when optimising Hauptwerk and its computer:
  • Maximising polyphony. The (static) polyphony is the approximate number of pipes that Hauptwerk can sound simultaneously without being overloaded. For a full discussion of polyphony, please see the computer specs section on the Crumhorn Labs website, and also the section below. Note especially that 'wet' (reverberant) sample sets need higher polyphony than dry since each release sample (reverb tail) continues to consume a voice of polyphony until it has completely died away.
  • Minimising latency. Latency is the delay between pressing a key on the MIDI keyboard and hearing the corresponding sound from Hauptwerk. All digital audio instruments require a certain amount of latency since the audio output is generated in small chunks, and time is required to calculate them. When playing Hauptwerk live, you would normally want Hauptwerk to respond as immediately as possible. For sequencer use latency is usually much less important.
  • Eliminating audio glitches. If the computer becomes overloaded, a digital instrument may be unable to calculate the audio output fast enough, and an unpleasant audible glitch can occur in the output. Hauptwerk has mechanisms designed to eliminate this problem, but it is important to tune Hauptwerk and the computer appropriately in order that they can work properly.
  • Setting audio levels optimally. To produce the best quality audio output, the levels should be set as high as possible, without allowing clipping to occur. Clipping causes unpleasant audio distortion.
  • Maximising audio quality and realism. Many sample sets optionally support high-resolution audio, and some of Hauptwerk's processor-intensive models can be disabled to improve polyphony at the expense of realism. Similarly, options exist to try to make a sample set usable within a limited amount of memory.
  • Eliminating background noise. Audio or sound cards can sometimes produce background digital crackling due to hardware or software resource contention, which should be eliminated.
  • Minimising sample set loading times.

The audio interface hardware and its drivers

The quality of the audio interface has an enormous effect on the quality of the sound you will hear from Hauptwerk, as well as an enormous effect on its performance (both polyphony and latency). It is hard to stress this point enough. For example, with some high-quality professional-grade audio interfaces it is even possible to play twice as many pipes at once in Hauptwerk compared to some low-cost consumer sound cards. Similarly, the difference in overall latency usable in Hauptwerk can differ from 3-7 milliseconds for a high-end interface to 100 milliseconds for a poor-quality one.

You are also very unlikely to get satisfactory high-quality audio from a cheap sound card designed for playing computer games. There is little point spending a large amount of money on a fast computer to run Hauptwerk and then economising on the audio interface, which is perhaps the most crucial component in the system. Simple basic professional audio interfaces will give very good results and are not particularly expensive. Good-quality amplifiers and speakers or headphones are of course also important.

Before attempting to optimise Hauptwerk's performance in any other way, we strongly recommend ensuring that you have the latest operating system updates applied, including the latest version of DirectX on Windows platforms, and the latest version of your audio interface's drivers. Driver versions can make a very big difference to the latency that can be achieved and can also eliminate background crackle and other problems.

For Windows platforms, ASIO drivers usually give much better performance than DirectSound drivers, and are available with almost all professional audio interfaces. Except for the Creative sound cards (whose ASIO drivers do not support multiple sample rates, which are usually required by Hauptwerk), if a native (manufacturer-supplied) ASIO driver is available we would strongly recommend using it. Hauptwerk's audio driver can be changed using the General settings | Audio outputs screen (only one distinct driver can be used for ASIO). Note also that a considerably higher polyphony is possible with 64-bit versions of Windows than with 32-bit versions, provided that a 64-bit processor is installed in the computer. However, at the time of writing, relatively few MIDI and audio interfaces have reliable drivers for 64-bit Windows.

You should always make sure that you have the native (manufacturer-supplied) driver for your audio interface selected, and not an emulated driver. Emulated drivers very often give very poor performance indeed, commonly giving audio glitches, distortion, high latency or low polyhony. Ensuring that you have the latest driver for your audio interface, and have selected the correct entry for it on the General settings | Audio outputs screen is an absolutely essential first step for obtaining good performance from Hauptwerk.

Light background crackle from an audio interface is usually caused by hardware resource contention or heavy traffic on the computer's bus to which it is connected. With PCI/PCIe cards, moving the card to another slot often cures the problem. Attempt to avoid situating a PCI/PCIe audio card in a slot which shares any hardware resource (for example, a PC IRQ/interrupt) or bus with a high-traffic device, such as a graphics card or disk controller.

Try to avoid having firewire/USB audio interfaces sharing a firewire/USB port or firewire/USB controller with any other device. If possible, try to ensure that an audio interface doesn't share any resources with any other device at all. Try firewire audio/USB interfaces in each possible firewire port and PCI/PCIe cards in each possible slot, and ensure that a firewire/USB audio interface is connected directly to a port on the computer, rather than via a hub or another device.

If you have problems with general crackling, disconnect all unnecessary hardware from the computer, such as spurious firewire or USB devices or PCI/PCIe cards to see if that eliminates the problem.

If you are using Windows as your operating system and you hear periodic audio glitches and your computer has wireless networking (WiFi) capability, please try disabling Windows wireless networking. This is a very common problem.


Buffer sizes and latency

The audio output is calculated in very small chunks at regular time intervals. The buffer size determines the size of these chunks and hence the amount of constant delay that is introduced between pressing a note and its sound being heard through your audio output, termed the latency.

Smaller buffer sizes give smaller latencies, and thus make the virtual organ more responsive for playing in real-time. However, below a certain limit, smaller buffer sizes also increase the load on the computer's processor(s), which can lead to a lower polyphony being achievable. A balance must thus be struck.

Note that the audio interface hardware, its driver and your buffer size setting determine the latency, not Hauptwerk itself. High-end professional audio interfaces (e.g. from RME and MOTU) are specially-designed to give very high performance even at very low latencies.

The buffer size is adjusted on the General settings | Audio outputs screen:

Setting the buffer size


Before adjusting the buffer size, make absolutely certain that you have the correct and most current manufacturer-supplied driver selected on the screen, as discussed above. Note that some Windows ASIO drivers only allow the buffer size to be adjusted via the manufacturer-supplied ASIO control panel. If Hauptwerk's buffer size setting is having no effect, click on the Show device control panel button and try adjusting the buffer size there:

ASIO control panel button on Windows


On Apple Macs or Windows PCs with ASIO drivers we would normally recommend a buffer size of 1024 samples (23 milliseconds at 44.1 kHz) as a starting point, which should always give reliable operation with almost all audio interfaces. On Windows PCs with DirectSound drivers, start with a buffer size of 2048 samples (46 milliseconds at 44.1 kHz). You can then try smaller buffer sizes to give a faster reponse (lower latency) if your driver supports it, usually at the expense of a little polyphony when the buffer size falls below a certain threshold. Most professional audio interfaces can work well with a buffer size of 512 samples (12 milliseconds at 44.1 kHz) without a noticeable drop in polyphony.

On Windows PCs, sometimes certain small DirectSound buffer sizes work, whereas medium sizes do not. Hence we recommend trying each buffer size from the smallest setting in increasing size order until a sound can be played in Hauptwerk without the audio crackling. If the audio interface driver's control panel also has a buffer size setting, it may also have an effect on DirectSound the driver and be necessary to experiment with different combinations of the two. Most DirectSound drivers will work with a latency of between 3 and 23 milliseconds. Note, however that, also unlike ASIO, DirectSound itself and the drivers often introduce considerable additional 'invisible' latency, which cannot be queried by Hauptwerk, so the true latency can sometimes be as much as twice the value indicated by the Hauptwerk buffer size.

Under no circumstances should you select a Windows DirectSound audio device that has an '(emulated)' suffix in the list of audio devices on the General settings | Audio outputs screen, since performance will be very poor.

On Windows PCs, for the same reason you should avoid any 'ASIO DirectX ...' and 'ASIO Multimedia Driver' driver entries if they are present. Note also that we have not found the freeware third-party 'ASIO4All' driver to give good performance with Hauptwerk, since it gives a large reduction in polyphony.

If you hear any audio glitches in Hauptwerk's output whilst it is recording but not at other times, or find any glitches in the resulting audio file, try increasing the Audio output recording buffer size setting on the General settings | General options screen:

Recording buffer size


The setting determines the maximum amount of time Hauptwerk allows your hard-disk to write a chunk of streamed audio to disk before an audio glitch will be heard or recorded. The default setting should be fine for most modern hard-disks but if you have an old or slow disk or are recording a lot of audio outputs simultaneously then it might be necessary to increase this setting. Larger values use a little more memory.


Memory and rank routing

Hauptwerk needs to keep all audio sample data in memory in order to achieve the very high polyphony for which it is designed, and which is necessary to model a pipe organ effectively. It does not stream samples from hard-disk drives, since that is not presently able to provide sufficient performance in most cases, without a very high expenditure on many disk drives, resulting in higher hardware cost than using memory.

If you try to load a sample set that will not fit into the free memory available, then performance will usually be terrible, since the samples may be cached ('paged') onto the computer's hard-disk by the operating system. The total of your computer's physical memory and its disk cache ('page file') is termed its 'virtual memory'. If Hauptwerk's pipe samples have been cached to disk then the operating system will not have time to re-load them when you play the corresponding note(s), causing significant audio interruptions, or the need for an extremely audio large buffer size. The most obvious symptom of your memory having been over-filled is that the audio might break up when you play a given note the first or second time, but not subsequent times. That happens because the operating system will re-load the pipe sample data for the note from its disk cache when Hauptwerk tries to access it, i.e. when you first play the corresponding note.

If you experience problems with latency or audio breaking up, please make sure that have sufficient free memory for the sample set you are loading. The creator of a sample set will usually state the memory it requires. Under Windows 2000 and XP, look at the Performance tab after pressing Ctrl + Alt + Del (Task Manager) to check the memory being used. On Mac OS X, use /Applications/Utilities/Activity Monitor (see below). Also verify that no memory is being paged to disk.

When loading a sample set, Hauptwerk constantly monitors the amount of remaining free physical memory and tries to detect when that usable physical memory is very nearly exhausted. The Action if operating system reports low memory setting on the General settings | General options screen determines what Hauptwerk does in that situation. Continuing to load in such cirumstances gives a high risk of audio glitches and poor performance. In some cases (OS X Tiger, or on Windows if its page file is disabled, or if disk space is also used up) continuing can also give a significant risk of the operating system becoming unstable or the computer crashing or even corrupting your files, applications and data. In other cases (OS X Leopard or Windows if there is sufficient page file), a crash should not occur, but audio glitches are likely and the system might become unresponsive. If an error occurs the sample set data cache might also need to be regenerated. The default action is to show a warning message and ask whether to continue loading.

On Mac OS X you can verify how much memory is being used by using Finder to launch /Applications/Utilities/Activity Monitor and looking at the memory usage figures:

Mac OS X Activity Monitor


If you are running Mac OS X 10.5 'Leopard', Hauptwerk's memory is included in the memory shown as 'active'. If you are using Mac OS X 10.4 'Tiger', it is instead included in the memory shown as 'wired' (cannot be paged to disk) in the pie chart. On Windows, look at the Performance tab after pressing Ctrl + Alt + Del (Task Manager) to check the memory being used:

Windows Task Manager


Always make sure that you have sufficient free memory for the sample set you are loading.

Using the Organ | Load organ, adjusting rank audio output routing screen you can choose not to load some ranks to save memory, thus allowing a larger sample set to be loaded (in part) than your computer memory would normally allow:

The Organ menu


To do so, change the Audio enabled? setting for one or more ranks to 'No'. Note that no automatic indication of total memory required is currently given; please consult the documentation provided with your sample sets for guidelines:

Rank audio output routing screen


Setting Maximum memory sample resolution to '16-bit' (the default) causes 24/32-bit samples to be loaded in memory in 16-bit format, halving the memory requirement over loading in 24/32-bit (both 24 and 32-bit formats are loaded in 24-bit (32-bit aligned) for performance reasons). St. Anne's uses 16-bit samples, so the setting has no effect upon it. There is likely to be very little audible loss of quality in loading samples in 16-bit, since all of Hauptwerk's audio processing, mixing and audio output stages happen in higher resolutions, resulting in a much higher effective resolution than 16-bit even if the samples are loaded in 16-bit. 14 and 20-bit resolutions only offer any advantages if memory compression is enabled, since they compress much more than 16 and 24-bit respectively, thus saving a large amount of memory.

The 20-bit option is especially useful since it gives most of the audible benefits of a 24-bit resolution, but without using much more memory than loading in 16-bit without compression. Note that you might notice more hiss with the 14-bit option, due to the limitations of the lower resolution. However, it might, for example, be a useful choice for some ranks for which only a few pipes will sound at once, such as softer Pedal ranks.

Using Memory compression mode you can turn off loss-less memory compression for some or all ranks, typically increasing the memory required for a given rank by between 40 and 70 percent. Memory compression is enabled by default for all ranks when you load an organ for the first time. Disabling memory compression has no effect at all on audio quality but reduces the load on the computer's processor slightly, increasing the polyphony that can be achieved by between 10 and 15 percent. Hauptwerk's polyphony management system automatically takes this into account.

For most fairly recent computers the slight reduction in polyphony resulting from memory compression would not be a problem. If a sample set easily fits into memory and your processor is struggling to provide the polyphony you want, try disabling compression. If you need to increase polyphony but there is insufficient free memory to disable memory compression for all ranks, try disabling it only for ranks that place the highest demand on polyphony but leaving it enabled for those that place the least demand on polyphony, such as Pedal division ranks where typically only one pipe would sound at a time, or leaving it enabled for those ranks that are used least frequently.

[Note that Hauptwerk's loss-less memory compression is highly optimised for sample sets in native Hauptwerk version 2 format and above, and the memory saving it gives is typically less for imported version 1 sample sets.]

To save memory you can also set the Maximum memory channel format to 'Mono' on the routing screen. If your audio outputs are configured for stereo, then samples will be loaded into memory in mono but panned into stereo in real-time, resulting in a halving of memory requirements over true stereo, and increased polyphony (unlike Hauptwerk version 1). However, of course the result is likely to be much less realistic than use of true stereo samples. Note that mono sample sets, such as the St. Anne's, Moseley organ, are always loaded into memory in mono regardless of the setting.

Hauptwerk supports samples containing multiple loops, which it plays in a complex sequence to reduce perceived repetition. For the most realistic results, always leave Multiple sample loop handling mode set to 'Load all available loops (max realism, most memory)' if you have enough memory to load the whole sample set, so that all loops available in the rank's samples are used. The setting has no effect on samples with only one loop. If you select 'Load only loop which ends first (less realism, less memory)' then usually considerably less memory is required if the samples contain several loops. If a sample set is only slightly too large to fit into memory, try loading only the first loop for the least frequently-used or least prominent ranks. Note the multiple sample loop playback can also be disabled globally using the General settings | General options screen.

Hauptwerk also allows a sample set to include multiple real release samples for each pipe, which gives extremely realistic handling of releases, especially when playing fast passages. For the most realistic results, always leave Multiple release sample handling mode set to 'Load all available samples (max realism, most memory)' if you have enough memory to load the whole sample set, so that all release samples included in the sample set are used. The setting has no effect on pipes with only one release sample. If you select 'Load only default sample (less realism, less memory)' then usually considerably less memory is required if the sample set contains multiple release samples, but the virtual acoustic of the organ will sound much less convincing when playing short notes.

The Multiple attack/sustain sample handling mode setting works similarly for sample sets with several attack/sustain samples per pipe. Multiple attack/sustain samples are used in some sample sets to model a pipe organ tracker-action response, to select samples randomly to reduce repetition, to give more realistic attacks to a pipe that sounds immediately after it has stopped speaking, and to give other improvements in realism. However, if you don't have sufficient memory to load the whole sample set, it is generally best to disable multiple attack/sustain samples in preference to disabling multiple release samples, since multiple release samples give the most obvious improvement in realism.

Release sample truncation causes Hauptwerk to truncate release samples artificially, using specially-shaped frequency-dependent decays, to simulate 'dry' samples (with no reverb). With very 'wet' sample sets, which have long release samples, simulating dry samples in this way can save a considerable amount of memory. It can also allow such sample sets to be played in reverberant spaces and helps to reduce noticeable differences in acoustics when using sample sets containing samples drawn from several different sources. However, the results are never completely the same as using true dry-recorded samples, mainly because a room acoustic also affects the attack and sustaining portions of the sound, which simple truncation of releases cannot model. True dry samples are thus highly preferable to using this option, and it is recommended that it only be used as a last resort. The licences for some sample sets do not allow modification of samples in this way, and this option is disabled for such sample sets.

In general, you should consult the documentation included with a sample set for its memory requirements and recommendations, and ensure that you never attempt to load more than will fit into your computer's memory.


Disabling Hauptwerk's models

The option which has by far the largest effect on polyphony is Disable interpolation (use fixed-pitch playback)? on both of the General settings | General options and Organ settings | General options screens:

General audio engine settings


Organ audio engine settings


Selecting the option on either screen will typically at least double the polyphony that can be achieved on a given computer (usually giving a significantly higher polyphony than was possible with Hauptwerk version 1). However, Hauptwerk's temperaments and adjustable tuning cannot be used if the option is selected, and a few sample sets cannot be loaded because they require interpolation in order to work, for example if a single pipe sample is assigned to a range of notes of different pitches. Such sample sets will give an error if you attempt to load them.

Most importantly, Hauptwerk will sound considerably less realistic as a result of disabling interpolation (but still much better than Hauptwerk version 1). In particular, tremulants, the wind supply model and Hauptwerk's various models which impart life and movement to the sound will be much less effective with interpolation disabled. It is recommended that you only select this option if the polyphony you can achieve with your computer hardware is not adequate.

By default, Hauptwerk applies either one, two or three specially-designed real-time audio filters to each pipe individually in real-time:
  1. The harmonic-shaping filter is used to give realistic tremulants, for pipe voicing and to control the harmonic content of the pipe in responses to changes in the modelled air flow through the pipe (*).
  2. The swell box filter is used only for pipes enclosed in a virtual swell box in order to shape the sound of each pipe to model the acoustic effects of a swell box.
  3. The pipe EQ filter can be applied for any given pipe by the sample set creator, or via the per-pipe voicing screen (Advanced Edition only). It is used to adjust the EQ of each pipe for voicing purposes. For most sample sets it is not applied to any pipes by default and so adds no additional processing load.
[(*) The wind supply model is not currently available to customers in the U.S.A. and is only available in the Advanced Edition of Hauptwerk.]

Each of these filters has a significant effect on polyphony, very approximately reducing it by 30% in each case. You can disable any or all of the filters on the Audio Engine tab of either of the General settings | General options or Organ settings | General options screens. However, tremulants and swell boxes will sound very noticeably less realistic without their respective filters and voicing brightness controls will no longer work. We recommend only disabling these models as a last resort.

Also on the General settings | General options screen, the Optimise for polyphony instead of model accuracy? setting can give a 20-30 percent gain in polyphony on multi-processor or multi-core computers (it has no effect on single processor/core computers), but at the expense of some tremulant and physical model realism at times of heavy polyphony load. If the performance of the tremulant, wind supply model and other physical models is important to you, we recommend not selecting the option. However, in most cases the difference is not noticeable and it is usually best to leave the option selected. In particular, since tremulants are so important for theatre organs and the tremulant model used for a theatre organ sample set typically requires a higher amount of processing power than for classical sample sets, we recommend that Optimise for polyphony instead of model accuracy? should not be ticked if you use theatre organ sample sets.

By disabling interpolation, all three types of real-time filter and multiple sample loop playback, Hauptwerk will typically achieve about three times the polyphony possible with all features enabled. Although this comes at the expense of realism, these features make it still possible to get very high performance from older computer hardware.

In particular, because the options can be defined separately for each sample set (using the Organ settings | General options screen), it is usually best to leave all features enabled for smaller sample sets, and fine-tune the enabled features only for larger sample sets that push the computer to its limits. You can thus get the best possible results from each sample set.


Determining and limiting polyphony

Most sample sets play one sample for each virtual pipe, although a few use multi-layered playback, where several samples play at the same time when a virtual pipe sounds to allow independent control of several aspects of the sound. Each layer consumes one voice of polyphony whilst it is sounding. Hence for single-layered sample sets (the most common type), one voice of polyphony is consumed per pipe whilst the pipe is sounding.

A pipe (layer) continues to consume a voice of polyphony until its sound has entirely died away. Thus, for sample sets with long reverberation recorded into the samples, each pipe may continue to consume a voice of polyphony for several seconds after its key has been released.

Apart from latency, the static polyphony is the most important basic measure of Hauptwerk's performance on a given computer. It is the number of virtual pipes that can be sustained at once without overloading the computer and without releasing and re-triggering any pipes (which would cause additional release samples to play, making accurate benchmarking difficult).

To measure the static polyphony, select General settings | General options:

General audio engine settings


On the Audio Engine tab, set the Polyphony limit setting to:
  • 8192 if you are using the Hauptwerk Advanced Edition (although a maximum polyphony of 32768 is possible, the polyphony testing organ only has about 8000 pipes and higher values consume a little more memory).
  • 1024 if you are using the Hauptwerk Basic Edition. The polyphony is limited to 1024 in the Basic Edition.
Also ensure that Disable swell box filters? is not ticked, nor is Disable harmonic-shaping filters?, i.e. that both models are enabled. Decide whether polyphony is more important than accuracy of the tremulant and physical models to you (see above), and set Optimise for polyphony instead of model accuracy? and Disable interpolation (use fixed-pitch playback)? accordingly (see above).

Also ensure that the audio buffer size is set to the value you wish to use on General settings | Audio outputs, bearing in mind that very small buffer sizes may reduce the polyphony that can be achieved, as covered above:

Setting the buffer size


Now load one the 'polyphony testing organs' using Organ | Load organ from the Hauptwerk menu. The organs use ranks from the St. Anne's, Moseley sample set to create a very large instrument with up to almost 8000 virtual pipes, just for the purpose of testing polyphony. There are three variants on the polyphony testing organ for computers with different amounts of memory. First make sure that no programs other than Hauptwerk are running on the computer. If you have:
  • 2 GB or more of installed memory, load the organ named
    PolyphonyTestingOrgan-For2GBMemoryOrMore.
  • 1 GB or more of installed memory, load the organ named
    PolyphonyTestingOrgan-For1GBMemoryOrMore.
  • 512 MB or more of installed memory, load the organ named
    PolyphonyTestingOrgan-For512MBMemoryOrMore.

Once the sample set has loaded, select Organ settings | General options from the menu, and view the Audio Engine tab. Ensure that none of the options are ticked and that this Polyphony limit setting is set to zero (which means that the global polyphony limit is used instead), then click OK:

Organ general options audio engine settings


Change the number of pipes per key selection on the right-hand side of the screen to 50, or the highest number shown on the list if it is less than that:

Engaging polyphony testing organ ranks


Using your arm or some books or other large objects, slowly and gently press and hold down each key successively from the bottom of the MIDI keyboard you use to play the Great virtual keyboard. Be careful not to release any keys so that no release samples are triggered, and to add keys one at a time:

Testing polyphony


As soon as the audio starts to break up, release all keys and count how many you had pressed. (Check that you can see all of the virtual keys pressed that you have pressed physically on your MIDI keyboard, since some MIDI keyboards have a limit on the number of keys that can be pressed at once.) Multiply by the number of pipes per key setting to give the static polyphony. For example, if you had been able to press 54 keys before the audio began to break up, and had selected 50 pipes per key, then your static polyphony would be 54 x 50 = 2700.

If you could press all 61 keys at once, then increase the number of pipes per key and repeat until you reach the point where the audio breaks up. Similarly, you can repeat the test with less pipes per key to obtain a more accurate measure if required.

Once you have an initial measurement, repeat the test a few times to verify the result.

On Apple Mac computers, you can use Finder to launch /Applications/Utilities/Activity Monitor to watch the load on each available processor core during the test. Usually the audio will start to break up when the overall load on the system is between 95 and 100 percent:

Mac OS X Activity Monitor


On Windows systems, you can press Ctrl + Alt + Del and select the Performance tab to watch the load on each available processor core during the test. Usually the audio will start to break up when the overall load on the system is between 95 and 100 percent.

Windows Task Manager


However, you should perform the final polyphony measurement without any other processor monitoring tools running, because they do have a small but signficant negative impact on polyphony.

Note that the static polyphony measure is made using mono, unenclosed samples (being the type of samples and pipes used in the polyphony testing organ), but with the harmonic-shaping filters enabled. Hauptwerk automatically makes adjustments for stereo samples, enclosed pipes, and ranks for which loss-less memory compression has been enabled when applying the polyphony limit. Very approximately, playback of true stereo samples gives a reduction in polyphony of 20 percent, and enclosed pipes by 30 percent (hence a reduction of about 44 percent for stereo enclosed pipes). Loss-less memory compression typically gives a reduction in polyphony in the range of 10 to 15 percent.

When a pipe ceases to speak, Hauptwerk performs a brief phase-aligned cross-fade from the main sustaining part of the sample to the release sample. During this cross-fade, processing overheads increase momentarily, giving a further brief reduction in achievable polyphony of about 25 percent. However, provided that the computer is broadly powerful enough for the sample set being used, it is extremely unlikely that a significant proportion of pipes will cease to speak at exactly the same moment. You can test the exact polyphony that can be achieved when all pipes start and stop speaking at the same time using the polyphony testing organ by simply pressing and releasing all of the keys in question simultaneously, again multiplying the number of keys of by the number of ranks to obtain the final value.

Now select General settings | General options from the menu. On the Audio Engine tab, change the Polyphony limit to between about 60 and 80 percent of the static polyphony value you had calculated. For example, if your static polyphony was 2700, then you could set the value between 2700 x 0.6 = 1620 and 2700 x 0.8 = 2160:

Setting the polyphony limit


From now on, when this polyphony value is reached, Hauptwerk will prevent any new pipes from sounding, thus preventing the audio breaking up. A little before the limit is reached, it will attempt to fade out specially selected release samples to minimise any noticeable interruption or loss of pipes. For multi-processor computers, a limit of about 80 percent of the static polyphony is often appropriate for the limit. However, for smaller computers or for theatre organ sample sets, it is beneficial to set the limit lower (67 percent is recommended), since there is a greater chance that a significant proportion of the pipes will cease to speak at exactly the same time.

Provided that the limit is set correctly and that the computer is broadly powerful enough for the sample set under average load, then Hauptwerk's polyphony management algorithms can be relied upon to cope safely and unobtrusively with heavy loads, giving an appearance of unlimited polyphony. Regardless of the computer's power, if the limit is set correctly, it should never be possible for the audio to break up. The worst that can happen is that the organ may sound slightly more 'dry' in times of extreme load (if many release samples must be dropped) or, in the most extreme cases, that new pipes will not be allowed to sound.

Having set the limit, load the largest sample set you intend to play, engage as many stops as you would ever realistically use, and play it as fast as you would ever want to. You should not be able to hear the audio crackling or breaking up. If you can, set the limit a little lower and repeat the test until you cannot. If the realism of the tremulants or speed of response of the physical models (such as the wind supply model) are noticeably degraded when many pipes are sounding, also try reducing the limit and repeating the test.

Note that, if you wish, you can fine-tune the limit for each individual sample set using the Organ settings | General options screen. If its polyphony limit is set to a non-zero value then it overrides the global setting (on the General settings | General options screen), only for whichever sample set is currently loaded. This is most useful when used in combination with the other options on the screen to disable audio engine features.

For example, suppose you had several smaller sample sets which could easily be used on your computer with all audio engine features enabled, thus giving the highest possible degree of realism. However, suppose you also owned one very large sample set that pushed the computer to its limit, but you wanted to be able to use a higher polyphony to get the full 'tutti' sound from that sample set. You might then perhaps consider disabling interpolation or the harmonic-shaping filters just for that sample set, and so would be able to set the polyphony limit correspondingly higher just for that sample set:

Organ general options audio engine settings


Apart from allowing Hauptwerk's polyphony management system to ensure glitch-free audio at all times, setting the polyphony limit to the correct value for your computer is advisable because higher polyphony limit settings consume a little more memory, so having the polyphony limit set unnecessarily high wastes memory, slightly reducing the size of sample set that you can load.


Other operating system optimisation

We recommend having as few other programs and background processes running at the same time as Hauptwerk as possible, since all running programs and processes will take processing resources away from Hauptwerk to some extent and can sometimes interrupt audio by accessing the Internet or hard-disks. There are many websites that cover optimising particular operating systems for audio.

If you had previously disabled the Windows page file (which was recommended for Hauptwerk 2 and earlier versions) or had adjusted Windows virtual memory settings in any other way, please make sure the page file is re-enabled and set specifically back to its default of 'system managed size'. Having it disabled or set to an inappropriate size can cause stability problems, performance problems, or other severe problems with Hauptwerk, other applications, or Windows itself, especially if 4 GB or more of memory is installed. On Windows XP use Start | Settings | Control Panel | System, then click on the Performance | Settings button on the Advanced tab. Select Adjust for best performance, then click the Advanced tab. Leave Processor scheduling and Memory usage both set to favour Programs. Click Virtual memory: Change and select System managed size for the hard-disk you want Windows to use for its virtual memory, then click Set. Finally click OK on all of the windows and re-boot the computer if you changed any settings.

No operating system optimisations are usually needed on Apple Macs, since OS X is already well-optimised for audio and MIDI.


Minimising sample set loading times

Hauptwerk has an ultra-fast sample set loading mechanism that was introduced in version 3.10 and should load sample sets in a fraction of the time that was possible with any previous version. It is designed to take full advantage of multi-core computers and RAID arrays (RAID 1 or RAID 5 are probably best and safest).

The mechanism attempts to tune itself automatically for the number of CPU cores and the amount of free memory available. Fastest possible results should be achieved with computers that have four CPU cores (or more), two (or more) disks in a RAID array, and plenty of memory. However, loading should still be very fast even with older single-core computers.

During the loading process, the mechanism needs to use some memory for buffering to try to get best possible performance from the disk drive(s) and processor(s). The mechanism is very carefully designed to minimise the amount of memory it needs at each point in time, and in many cases no more memory overall will be needed when loading a sample set. However, if minimising memory usage in all circumstances is more important to you than minimising loading times then you can disable the new mechanism completely using the Disable sample set loading acceleration? option on the General settings | General options screen.

Extensive performance and diagnostic information relating to the loading of each sample sets is written to the log file (Help | View recent error/activity log).

The first time that you load a sample set, or if you change its rank/memory options, the sample set will still be slow to load because Hauptwerk will need to regenerate its cached version of the sample set data. However, subsequent loads should then be extremely fast.


Visit Crumhorn Labs on the Internet
© Crumhorn Labs Ltd 2001-2008

Hauptwerk, Hauptwerk virtual pipe organ, Crumhorn Labs and the Crumhorn Labs and Hauptwerk logos are trademarks of Crumhorn Labs Ltd.