The Hauptwerk Virtual Organ

A. Summary
Hauptwerk is a computer program that enables an organist to play digital samples of pipe organs using MIDI keyboards and pedalboard connected to a computer.

The software was written in the UK in 2003 by Martin Dyde, who created his software company Crumhorn Labs to market the software. (For those that may not know, a "crumhorn" is a type of organ stop.) The software is now at version 3.3 with a release of version 4.0 imminent (February 2011). Crumhorn Labs was recently taken over by the American company Milan Digital Audio.

The availability of the Hauptwerk Virtual Organ software is giving pipe organ enthusiasts, as well as professional musicians and organists, access to organs from all over the world and is also providing a means of preserving the sound of organs that are being destroyed, either as a result of re-use, or demolition, of the buildings housing them, or because there are insufficient funds to enable their restoration.

This article outlines how pipe organs can be recorded for use with Hauptwerk software, and how a combination of pipe organ samples, Hauptwerk software, computer hardware, MIDI keyboards and pedalboard, and sound systems can be put together to produce the nearest simulation possible of what is known as "The King of Instruments".


B. The Principles

Pipe Organ Principles
A pipe organ produces sound by blowing air across the mouth of a pipe, a little like one may do with a penny whistle. However, the pipes of a pipe organ can range from an inch in length, up to sixty-four feet in the largest of  organs. The length of the pipe determines the pitch of the resulting note, whilst its material and the cross-sectional area and shape, as well as whether its vibration is caused by air blown across a lip (as in a flute) or through a reed (as in a clarinet), determine its timbre.   

Image
Ranks of metal pipes

Image    
Ranks of mainly wood pipes

It should also be noted that it is the air, not the pipe, which vibrates. Although some pipes may be visible as part of a façade, they are often non-speaking, as most of the pipes are out of sight in the organ chambers. (The images show pipes in the chamber of  the Brindley and Foster organ at St Anne's Church, Moseley, UK. Courtesy of Hauptwerk.com)
 
Manuals and Pedalboard
The part of a pipe organ that is usually most clearly visible is the console, where the player sits. Pipe organs are played using a set of manual keyboards (at least two, usually, but up to seven in what the author believes to be the largest organ), played with the hands, and a pedalboard, played with the feet. The keyboards typically have 61 notes, and each keyboard mainly controls one "division" of the organ.     

Image
The image shows an organ console with a lower manual, part of the pedalboard and bench, and some stops and combination pistons, and a swell pedal visible. (The image shows the Brindley & Foster organ at St Anne's Church, Moseley, UK. Courtesy of Hauptwerk.com)

Divisions of an organ
Think of a division of an organ as one collection of pipes all controlled by one of the manual keyboards, or by the pedalboard. In English organs, the organ divisions are often called the "Great Organ" and the "Swell Organ". A third manual might control a "Choir Organ" division, and a fourth, a "Solo Organ". A pedalboard usually has 30 or 32 notes and plays the pipes of the "Pedal Organ" division. In a large English organ, there are sometimes additional divisions such as the "Echo".

Other countries, such as France, Holland, Hungary, Italy and Germany, also with strong organ building traditions, use other names for the divisions of their organs. These names include Grande, Hauptwerk, Oberverk, Positiv, Ruckpositiv, Bombarde.


Ranks and Stops
In each manual division there are sets of 61 pipes of similar construction but varying lengths, called "ranks"; each rank corresponding to one of the "stops" on the organ console. Each rank of pipes can be made available for playing by operating a control knob, a stop. Each pipe in the rank is played by one key on the manual keyboard, and therefore produces one note of the complete scale.

Even a smallish organ may have ten or fifteen stops in each manual division, and a further five or more stops in the pedal division. Thus if a single key on a manual keyboard is depressed, and a single stop is pulled, then in most cases one pipe will play to produce the note. If all ten stops of such an organ were to be pulled then ten pipes will speak for each key that is pressed. A full chord played with all ten fingers would thus cause one hundred pipes to sound. There are, in some larger organs, stops which control a rank of pipes where more than one pipe speaks when one pipe is played. These ranks are known as "mixtures" and often two or three pipes, of differing design or pitch, play simultaneously.

How many pipes?
Plainly there are a great many pipes in a typical organ. For example, an organ with three manual divisions with 10 stops each and a pedal division with five stops will have:
• 61 x 10 x 3 = 1,830 pipes in its manual divisions, and
• 30 x 5 = 150 pipes in its pedal division.
And that is certainly not a large organ!

As mentioned briefly earlier, in addition to stops having one pipe per note, there may be mixture stops, having, for example three or four pipes per stop, giving 183 or 248 pipes in a single mixture stop of a manual division.
A large pipe organ such as that in the Royal Albert Hall in London has thousands of pipes (the Royal Albert Hall actually has 9,997 pipes). The largest pipe organ, in the USA, has about 28 thousand pipes.

Combinations
Playing a large organ may require frequent changes to the stops that need to be pulled for each part of the piece of  music. This can be difficult to do without interrupting the continuity of play, and in the past, an assistant would pull out the stops at the correct place in the music. However, most larger organs now have "combination pistons" which are often placed immediately below each manual, and take the form of small buttons which can be pressed by a thumb, even while playing. Each button will cause a preset combination of stops to be pulled. The organist can "save" a set of preferred stops, called a "registration", so that the particular registration can easily be set up when required by pressing that one button.

Couplers
As well as stops to control whether or not a particular rank of pipes should speak, a typical pipe organ has several other significant types of control. There are couplers, which are pulled like stops, but which have the effect of causing the pipes of one division to be played with a keyboard manual normally associated with a different division. Thus the Choir Organ division can be coupled to the Swell Organ division so that stops from either or both of those divisions can be played at the Swell Organ keyboard manual. Couplers may also be provided to enable the pipes of an octave above or below the note being played to sound with the actual note.

Swell and Crescendo
Two other types of control are the adjustable foot pedals for swell and crescendo control. These pedals are not pedal keys like those of the pedalboard; rather, they act somewhat like a sort of foot-controlled volume or expression pedal found on many electronic organs. However, they are not strictly volume controls at all. They can perform two functions: the swell pedal opens and closes the shutters which typically enclose the Swell Organ division in its chamber. Opening and closing these shutters alters both the timbre and the power of the pipes as heard by the audience. The crescendo pedal has a very different effect: depressing the crescendo pedal will cause an increasing number of ranks to be sounded as the pedal is lowered, until eventually, when the pedal is fully depressed, the Great Organ, and possibly other divisions, may well be playing in tutti - i.e. full organ.

Creating a Virtual Organ
Creating a digital, or "virtual" organ entails recording, or sampling every pipe in the organ - a major task for a large organ, with important implications for the hardware and software systems that can be used to re-create the organ using a computer.

First, someone with acoustic and recording expertise must visit a pipe organ, and must make recordings of every pipe in the organ, in general one pipe at a time. In fact, several recordings of each pipe are usually made, because for example, an organ pipe "speaks" differently when a short (staccato) note is played compared to a longer note, several samples are made to reflect this.

As well as making several recordings of each pipe so as to record the response of the pipe to different types of playing of the note, samples are made both inside the organ pipe chamber, very close to each pipe, and outside the chamber out in the listening area of the church or cathedral. Recording the pipe with the microphone very close to it provides acoustic isolation, and the pipe is heard free from the effect of the reverberation present in a church, cathedral or other large building. Such a sample is called a "dry" sample. Recording the pipe sound with the microphone out in the nave or the transept of the church or the cathedral enables the pipe to be recorded in the richly reverberant acoustic environment of the building. This type of sample is called a "wet" sample, and when played using the Hauptwerk software, simulates very closely, the building in which the organ was played. Once again it is necessary to record several samples of each pipe, as the reverberation of a building gives us a different auditory experience when a staccato note is played from that when a legato style is used.

Perhaps it would be helpful to answer the question: "What determines whether recordings are to be made wet or dry?" The answer to that is that where the virtual organ is to be played in a large acoustic space, perhaps similar to the original, it is very much better to play a dry sample and allow the natural acoustic of the space to create the reverberation. If, one the other hand, the virtual organ is to be played in a small room, or using headphones, then if the organ is recorded wet, it will be heard in its original acoustic environment.

After recording, the sample set must be prepared for use. Special steps are taken to ensure that a note can be played which is longer than the sample but without the "join" being detectable - this is the principle of the "pipe loop". Computer software which analyses the waveform of the recordings to identify where they can best be joined, enables this to be done. The samples will also need to be "de-noised" using special software that ensures that only the real sound signal is present in the recording.

The Virtual Console
Often, the operating noises of the organ wind system, manuals, pedals and stops are also recorded, for maximum realism. (The image below shows the Virtual Console of the Brindley & Foster organ at St Anne's Church, Moseley, UK. Courtesy of Hauptwerk.com)
Once the full sample set has been prepared, images are produced, to create a photo-realistic virtual console of the organ, complete with the keyboard manuals and pedalboard, all the organ stops and couplers, so that when the project is finished, proper movement of keys, stops and other controls can be shown on the computer screen.     


Image
The sampling of musical instruments to make digital copies is certainly not new, and is no longer remarkable. However, digital sampling of musical instruments has not previously extended to making many, many thousands of sound samples that are required for the most realistic sound of the Hauptwerk Virtual Organ. Therefore, we should perhaps interpret the term "sample" rather differently from its normal use in digital musical instruments, it is not a "sample" of the pipe, but a full recording.

The entire sample set and the images constituting the photo-realistic console are then packaged up for delivery using one of the standard software installer packages. A small organ can be accommodated in a single DVD, but the largest of organs consisting of tens of gigabytes may be delivered on a fixed disc.

C. Computer Hardware and Software
The digitised sound samples used to create a virtual organ are each individually sometimes more than a megabyte long. Given that there can be thousands of such samples required to model every pipe under various conditions of playing, the sample sets are quite massive. Furthermore, if the sounds are to be played with no delay in response between depressing a key on a keyboard manual or pedalboard, and hearing the pipe speak, the entire sample set must be held in computer memory, ready for immediate sounding.

Polyphony and Memory
Then there is the question of how many pipes must be able to be sounded simultaneously - the so-called "polyphony" requirement. The consequences of these considerations is that virtual organs based on large physical organs require a significant quantity of random access memory (RAM).

One limitation of most computer operating systems and their associated hardware architecture is that of "memory address space". In theory, a modern 32-bit processor has a 32-bit addressing scheme. Thus the address space of the processor is 232 = 4,294,967,296. This is 4 gigabyte. Operating systems however, are not always able to use the entire address space: for example, Windows XP makes available only about 3 gigabyte on most motherboards. This is not enough for large sample sets, though many smaller and medium sized organs can be played.

If one uses a dual- or quad-core processor, along with a 64-bit version of Windows XP or Vista, or Windows 7, the cores can be used in such a way that two processors are combined to give 64-bit addresses. 264 is 18,446,744,073,709,551,616 which is 18.4 exabyte. However, motherboards and 64 bit operating systems such as Windows Vista x64 will not allow the use of such massive memory capacity! In most cases, dual and quad core processor-capable motherboards permit 8, 16 or 32 gigabyte of RAM. 16 gigabyte is enough for all but the very largest of virtual pipe organs, and a great many organs can be used to full effect with less.

At this point it is worth considering the difference between "wet" and "dry" sample sets in terms of their demands upon computer memory and processing power. The playing of a dry sample set sounds only the pipes that are being played at any one instant, because very nearly as soon as the keys are released, the pipe stops speaking. However, when a wet sample set is being played, each pipe continues to sound for as long as the reverberation inherent in the building dictates. The standard definition of reverberation time is "the time taken for the sound energy to decrease to one millionth of the energy present at the time of the cessation of its source". A large church or cathedral may have a reverberation time of 8 second, even though the very end of the reverberation may not be audible or may not be recorded. Nevertheless it can be appreciated that if a wet sample set is being played, each note is sustained for the duration of the reverberation.

As a rather limited example, consider an organist playing a piece that involves the playing of a passage of music with two hands and for the most part, one foot (organists may also play two-note chords on the pedal organ division using two feet simultaneously). Suppose that, in a building with a five second reverberation time, the organist is playing the Great Organ (GO) division with one hand with fifteen stops pulled, and a mixture stop consisting of three pipes, at fifteen keys per second, and on the Swell Organ (SW) with 10 stops pulled at 15 keys per second, whilst on the Pedal Organ (PED) division nine stops are pulled and one mixture of three pipes and three pedals are being played per second. During the period of reverberation, the following number of pipes may be sounding:
• (15 x 18 x 5) = 1,350 great organ pipes
• (15 x 10 x 5) = 750 swell organ pipes
• ( 3 x 12 x 5) = 180 pedal organ pipes.
This is 2,280 pipes that must be sounded simultaneously - a considerable task given the fact that each pipe sound comes from a separate sound sample which must be routed through sound-producing modules. Furthermore, manual and pedal divisions can be "coupled" so that playing notes on one manual causes pipes in other divisions to sound as well. So when an organ is played in tutti the computer faces a massive processing task.

D. MIDI Control for Hauptwerk
Exactly how is a virtual organ played? Well in short it is played with keyboards and a pedalboard, just like any other pipe or electronic organ, (although the Hauptwerk system is a long way from a conventional electronic organ). So, one needs a set of keyboard manuals, preferably of 61-note compass, so that every pipe in a full rank of a modern organ can be sounded, and a pedalboard of preferably at least 30-notes. Ideally the number of keyboard manuals should match (or exceed) the number of manuals in sample set of the original organ. If there are more manual divisions in the sample set than in the Hauptwerk Virtual Organ setup, it may be possible to use configuration methods or coupling techniques to enable the division that is missing a manual to be played through the manual of an alternative division. This if the sample set has Great, Swell and Choir divisions, but the Hauptwerk setup has only two manuals, then the Swell and Choir divisions in the sample set can be played by coupling one or other of those divisions to the second manual, leaving the Great division controlled by the first keyboard manual.

However, a medium to large Hauptwerk setup may require more than one MIDI interface, as well as having high performance requirements. Therefore Hauptwerk users often fit high-performance MIDI interfaces to their PCs, quite often using USB ports for connecting the devices.
Having said all that, exactly how does the arrangement enable the pressing of a key to sound an organ pipe?


Image
This is achieved using a MIDI system of hardware and software. MIDI is an acronym standing for "musical instrument digital interface". MIDI requires a hardware interface at the keyboard manual and pedalboard and at the PC as well. Many PCs are fitted with a MIDI interface built into the game port of the sound and multimedia device.    
The schematic shows how the keyboard manuals, pedalboard, controller, touchscreen and speakers may be connected to a powerful PC to create a Hauptwerk Virtual Organ.

Each of the keyboard manuals, and the pedalboard of a Hauptwerk Virtual Organ must be fitted with an electronic device known as a MIDI controller. When a key or pedal is depressed so as to sound a note, the MIDI controller device detects the action by means of a switch. It then identifies the key pressed, and generates an appropriate MIDI event. In this case it would be a "note-on" event which would include MIDI codes to represent the note-number of the key pressed, and possibly other parameters such as the speed of depression, to represent the volume of the note. Not all the information generated is necessarily appropriate to an organ. The keyboard which generated the event can be identified either by a MIDI channel number, or by the MIDI controller device to which it is connected. MIDI channel numbers can permit several keyboard manuals to be used, effectively simultaneously, with a single MIDI controller.
The MIDI event information is passed down a cable which is connected to the MIDI port of the PC, whether it be via an external device or a built-in MIDI port. The MIDI event is picked up by a driver in the PC and passed to the Hauptwerk software, which identifies which key of which keyboard manual or pedalboard generated the event. The Hauptwerk software then determines which organ division should be accessed, and which, if any, stops of that division are pulled, and sends off the appropriate pipe sounds for playing through the sound system.

Controlling a Virtual Organ
How, with a Hauptwerk Virtual Organ, does the organist set exactly which stops should play, and how are the other controls present in a real pipe organ implemented? The answer to this question is important, because when an organist is playing it is often necessary quickly to pull out or push in stops, change registrations using combination pistons, couple keyboard manuals and pedalboard to different organ divisions, and to operate swell and crescendo pedals.
With the exception of the swell and crescendo pedals, there are two main methods available to implement these controls. One method uses a touch-screen monitor: one the screen an image, which is highly representative of the organ being played, is displayed. The touchscreen image has all the stops, couplers and combination pistons of the organ present. All the organist has to do is to press gently on the screen over the control that is to be activated or de-activated, and the stop will open or close - the Hauptwerk software can detect the operation of the touch screen via its drivers, and can operated the controls accordingly.
These controls could also be activated by mouse-clicks but this is not as effective during playing the organ.
    
Image
The author's Hauptwerk Console.
Control is via the MIDI keyboards, the pedalboard, ten foot-operated combination pistons, swell and crescendo pedals, and a touchscreen monitor. Only two of the seven speakers are shown.


The other method involves the provision of physical switches which can be operated by the organist. This makes for a highly realistic experience when playing such an organ. The switches must be connected to a suitable MIDI controller which passes appropriate MIDI messages to the PC and hence to the Hauptwerk software so that the stops, combinations and couplers can be controlled. If money is no object, solenoid activated stop switches can be used, and these will respond to a MIDI-OUT signal so that all stops pulled by a particular combinations switch setting will automatically pop out when that combination is selected.

Swell and Crescendo Pedals
In the case of swell and crescendo pedals, although these can be controlled using the mouse, this is not a practical method during playing. Therefore, foot pedals fitted with variable resistors must be used, and a MIDI controller connected to such pedals can convert the alteration of resistance as the pedal is depressed into MIDI messages which Hauptwerk interprets so as to alter swell or crescendo pedal settings in the virtual organ.

E. Sound Systems for a Virtual Organ
The organ is an instrument with both a truly amazing dynamic range, and the largest pitch range of any musical instrument. That means that if justice is to be done to the organ sample sets that can be played, a high quality sound system is required for playing.
It is definitely worth investing in a semi-professional sound card (or more than one), rather than using a surround-sound gaming sound card that may have been delivered with the PC. However, there are a few surround-sound organ sample sets which have been recorded to take advantage of this type of arrangement, so it cannot be discounted completely.
Hauptwerk has found itself used in a wide variety of situations: it is used in churches and in public buildings where the full power of a large pipe organ is required. It is also used in homes and smaller rooms where it may be played through monitor speakers.

F. Hauptwerk Software versions
There are three editions of the software
- the Free Edition allows samples of up to 1.5 gigabyte, polyphony of up to 256 and  two (stereo) audio channels;
- the Basic Edition allows samples of up to 3 gigabyte, polyphony of up to 1024 and two (stereo) audio channels;
 - the Advanced Edition has hardware-only limits on sample size and polyphony, up to 512 audio channels, pipe and rank audio routing, MIDI-OUT for moving stop hardware and extensive voicing controls.
Thus the Advanced Edition of the virtual organ software can enable an entire division, a selected rank or ranks of a division, or even individual pipes, to be directed to a particular audio output channel. There are Hauptwerk users who have several dozen speakers connected to multiple soundcards inside multiple PCs, giving an amazingly realistic experience.
For the organist playing at home, however, a pair of good quality monitor speakers, with a sub-woofer capable of taking two channel input, will give a sound and playing experience that is second only to playing the real pipe organ that has been modelled. Headphones are a good alternative if there is a danger of troubling neighbours!

Kenneth Spencer
This is an original article, written in December 2008 and first contributed to wikipedia.org in January 2009. It was removed arbitrarily from wikipedia.org by user Jaksama with no reference to myself as the author.
The author has no connection  with Milan Digital Audio nor with Hauptwerk.com except as a user and supporter of the Hauptwerk software application.
http://www.my-music.mine.nu/project.htm


 
< Prev   Next >