The pipe organ is a keyboard musical instrument that produces sound by venting mechanically compressed air (wind) through resonant pipes. Each pipe produces sound at one fixed pitch, so they are provided in sets or "ranks" with one pipe or more per note, each rank having a common timbre and loudness throughout. Most organs have multiple sets of pipes (ranks) of differing timbre, pitch and loudness which the player can employ singly or in combination through the use of console mounted controls called stops. A single rank of pipes may have several stops controlling it, allowing the rank to be played at multiple pitches or on multiple manuals. Conversely, a single stop may control more than one rank of pipes (as in "celeste" and "mixture" stops). A pipe organ may have one or several keyboards, called manuals, played by the hands, and a pedalboard, usually used for bass notes, played by the feet, each of which has its own group of stops.
Larger organs typically have "combination actions" which allow stop settings to be "captured" on "pistons" (small white buttons) located beneath the front edge of each keyboard, or by toe studs located near the pedalboard. The pistons may be "divisional" (affecting only the keyboard they are located on) or "general" (affecting the entire organ.) Pressing one of these pistons during performance resets the affected stops to their memorized positions, functioning like a patch change on a synthesizer keyboard. Typically an pipe organ is described with an annotation indicating the number of keyboards and ranks in the instrument. For example an organ described as a 4/65 instrument has 4 keyboards controlling 65 ranks of pipes.
The smallest portable pipe organs may have only one or two dozen pipes and one keyboard; the largest may have over 20,000 pipes and seven keyboards. Its continuous supply of wind allows the pipe organ to sustain notes for as long as the keys are depressed, unlike the struck and plucked strings of the piano and harpsichord, the sounds of which begin to decay immediately after the keys are pressed.
The origins of the pipe organ can be traced back to Ancient Greece in the third century BC; the wind supply was created with water pressure. Since the sixth or seventh century AD, bellows have been used for this purpose. Beginning in the twelfth century, the organ evolved into a complex instrument capable of producing different timbres. By the seventeenth century, most of the sounds available on the modern classical organ had been developed.
Pipe organs are used for the performance of classical music, sacred music and secular music, and are installed in churches, synagogues, concert halls, and other public buildings. In the early 20th century, pipe organs were installed in theatres to accompany films during the brief silent movie era; in municipal auditoria, where orchestral transcriptions were popular; and in homes of the wealthy, equipped with player mechanisms,  until supplanted by subsequent technological marvels. The beginning of the 21st century has seen an increase in installations in concert halls.
A pipe organ contains one or more sets of pipes, a wind system, and one or more keyboards. The pipes produce sound when pressurized air produced by the wind system is driven through them. An "action" connects the keyboards to the pipes. Stops allow the organist to control which ranks of pipes sound at a given time. The organist operates the stops and the keyboards from the console.
See main article: Organ pipe.
Organ pipes are made from either wood or metal and produce sound when wind is directed through them. Because one pipe produces a single pitch, multiple pipes are necessary to allow the organ to sound at different pitches. The longer a pipe is, the lower its resulting pitch will be. The volume of the sound produced by a pipe depends on the pressure of the wind flowing to the pipe and how the pipe is voiced (adjusted by the builder to produce the desired tone and volume). Thus, a pipe's volume cannot be changed directly while playing.
Organ pipes are divided into flue pipes and reed pipes according to their design and timbre. Flue pipes produce sound by forcing air through a fipple, like a recorder, whereas reed pipes produce sound via a beating reed, like a clarinet.
The pipes are arranged by timbre and pitch into ranks. A rank is a row of pipes mounted vertically onto a windchest. The stop mechanism admits air, or "wind", to each rank. For a given pipe to sound, the stop governing the pipe's rank must be engaged, and the key corresponding to its pitch must be depressed. Ranks of pipes are organized into groups called divisions. Each division generally is played from its own keyboard.
An organ contains two "actions", or systems of moving parts. When a key is depressed, the "key action" admits wind into a pipe. The "stop action" allows the organist to control which ranks are engaged. An action may be either mechanical or electrical.
A key action which physically connects the keys and the windchests is a mechanical or tracker action. Connection is achieved through a series of rods called trackers. When the organist depresses a key, the corresponding tracker moves, allowing wind to enter the pipe. In a mechanical stop action, each stop control is physically connected to a rank of pipes. When the organist activates the stop control, the action allows wind to flow into the selected rank. This control is usually a stop knob, which the organist activates by pulling (or "drawing") towards himself. This is the origin of the idiom "to pull out all the stops".
An electric action uses electricity to control the key and/or stop mechanisms. The electricity may operate the action indirectly through air pressure valves, in which case the action is electro-pneumatic. When electrical wiring alone is used to connect the console to the windchest, electric actions allow the console to be separated from the rest of the organ. The key action is independent of the stop action, allowing an organ to feature a mechanical key action along with an electric stop action. A common electrical stop control is the rocker tab, which sits on a hinge and activates or deactivates an electrical circuit, depending on the direction in which it is pressed. These may be used in place of, or in addition to, any stop knobs.
The wind system comprises the parts that produce, store, and deliver wind to the pipes. Pipe organ wind pressures are on the order of 0.1 psi (0.7 kPa). Organ builders often measure organ wind using a U-tube manometer containing water, so commonly give its magnitude as the difference in water levels in the two legs of the manometer, rather than in units of pressure. The difference in water level is proportional to the difference in pressure between the wind being measured and the atmosphere. The 0.10 psi above would register as 2-3/4 inches of water (70 mmAq). An Italian organ from the Renaissance period may be on only 2.2 inches (56 mm), while solo stops in some large twentieth-century organs require 100 inches (2540 mm).
Playing the organ before electricity required at least one person to operate the bellows. When signaled by the organist, a calcant would operate a set of bellows, supplying the organ with air. Because calcants were expensive, organists would usually practice on other instruments such as the clavichord or harpsichord. By the mid nineteenth century bellows were also being operated by steam engines or gasoline engines. Starting in the 1860s bellows were gradually replaced by wind turbines which were later directly connected to electrical motors.  This made it possible for organists to practice regularly on the organ. Most organs, both new and historic, have electric blowers, although others can still be operated manually. The wind supplied is stored in one or more regulators to maintain a constant pressure in the windchests until the action allows it to flow into the pipes.
See main article: Organ stop.
Each stop usually controls one rank of pipes, although mixtures and undulating stops (such as the Voix céleste) control multiple ranks. The name of the stop reflects not only the stop's timbre and construction, but also the style of the organ in which it resides. For example, the names on an organ built in the north German Baroque style generally will be derived from the German language, while the names of similar stops on an organ in the French Romantic style will usually be French. Most countries tend to use only their own languages for stop nomenclature. English-speaking nations as well as Japan are more receptive to foreign nomenclature. Stop names are not standardized: two otherwise identical stops from different organs may have different names.
To facilitate a large range of timbres, organ stops exist at different pitch levels. A stop that sounds at unison pitch when a key is depressed is referred to as being at 8′ (pronounced "eight-foot") pitch. This refers to the length of the lowest-sounding pipe in that rank, which is approximately eight feet. For the same reason, a stop that sounds an octave higher is at 4′ pitch, and one that sounds two octaves higher is at 2′ pitch. Likewise, a stop that sounds an octave lower than unison pitch is at 16′ pitch, and one that sounds two octaves lower is at 32′ pitch. Stops of different pitch levels are designed to be played simultaneously.
The label on a stop knob or rocker tab indicates the stop’s name and its pitch in feet. Stops that control multiple ranks display a Roman numeral indicating the number of ranks present, instead of its pitch. Thus, a stop labelled "Open Diapason 8′ " is a single-rank diapason stop sounding at 8′ pitch. A stop labelled "Mixture V" is a five-rank mixture.
When a rank of pipes is made available as part of more than one stop, the rank is said to be unified or borrowed. For example, an 8′ Diapason rank may also be made available as a 4′ Octave. When both of these stops are selected and a key (for example, c′) is pressed, two pipes of the same rank will sound: the pipe normally corresponding to the key played (c′), and the pipe one octave above that (c′′). Because the 8′ rank does not have enough pipes to sound the top octave of the keyboard at 4′ pitch, it is common for an extra octave of pipes used only for the borrowed 4′ stop to be added. In this case, the full rank of pipes (now an extended rank) is one octave longer than the keyboard.
Percussive (un-pitched) stops may also be used, for example, the Zimbelstern, "Nightingale" (which admits wind into a pipe submerged in a small pool of water, creating the sound of a bird warbling), and the "Effet d'orage" (thunder effect), a device that sounds the large (lowest) bass pipes simultaneously. Standard orchestral percussion instruments such as the drum, chimes, celesta and harp have also been imitated in organ building.
See main article: Organ console.
The controls available to the organist, including the keyboards, couplers, expression pedals, stops, and registration aids are accessed from the console. The console is either built into the organ case or detached from it. Organs in larger cathedrals and concert halls may have two consoles, allowing the organ to be played from different parts of the building.
Keyboards played by the hands are known as manuals (from the Latin Latin: manus, meaning "hand"). The keyboard played by the feet is a pedalboard. Every organ has at least one manual (most have two or more), and most have a pedalboard. Each keyboard is named for a particular division of the organ (a group of ranks) and generally controls only the stops from that division. The range of the keyboards has varied widely across time and between countries. Most current specifications call for two or more manuals with sixty-one notes (five octaves, from C to c″″) and a pedalboard with thirty or thirty-two notes (two and a half octaves, from C to f′ or g′). 
A coupler allows the stops of one division to be played from the keyboard of another division. For example, a coupler labelled "Swell to Great" allows the stops drawn in the Swell division to be played on the Great manual. This coupler is a unison coupler, because it causes the pipes of the Swell division to sound at the same pitch as the keys played on the Great manual. Coupling allows stops from different divisions to be combined to create various tonal effects. It also allows every stop of the organ to be played simultaneously from one manual.
Octave couplers, which add the pipes an octave above ("super-octave") or below ("sub-octave") each note that is played, may operate on one division only (for example, the "Swell super octave," which adds the octave above what is being played on the Swell to itself), or act as a coupler to another keyboard (for example, the "Swell super-octave to Great," which adds to the Great manual the ranks of the Swell division an octave above what is being played).
In addition, larger organs may use unison off couplers, which prevent the stops pulled in a particular division from sounding at their normal pitch. These can be used in combination with octave couplers to create innovative aural effects, and can also be used to rearrange the order of the manuals to make specific pieces easier to play.
See main article: Expression pedal.
Enclosure refers to a system that allows for the control of volume without requiring the addition or subtraction of stops. In a two-manual organ with Great and Swell divisions, the Swell will be enclosed. In larger organs, parts or all of the Choir and Solo divisions may also be enclosed. The pipes of an enclosed division are placed in a chamber generally called the swell box. At least one side of the box is constructed from horizontal palettes known as louvres or swell shades, which operate in a similar way to Venetian blinds; their position can be adjusted from the console. When the louvres are open, more sound is heard than when they are closed.
The most common method of controlling the louvres is the balanced swell pedal. This device is usually placed above the centre of the pedalboard and is configured to rotate away from the organist from a near-vertical position (in which the shades are closed) to a near-horizontal position (in which the shades are open). An organ may also have a similar-looking crescendo pedal, found alongside any expression pedals. Pressing the crescendo pedal forward cumulatively activates the stops of the organ, starting with the softest and ending with the loudest; pressing it backwards reverses this process.
See main article: Combination action.
Organ stops can be combined in countless permutations, resulting in a great variety of sounds. A registration is a specific combination of stops. A "combination action" can be used to switch instantly from one registration to another, faster than the organist can change the stops by hand. Combination actions feature pistons that can be pressed by the organist, generally located beneath the keys of each manual ("thumb pistons") or above the pedalboard ("toe pistons"). The pistons are either preset by the organ builder (and cannot be changed), or can be altered by the organist when necessary. Modern combination actions operate via computer memory, and can store several channels of registrations.
The pipes, action, and wind system are contained in a case, the design of which also may incorporate the console. The case blends the organ's sound and aids in projecting it into the room. The case often is designed to complement the building's architectural style and it may contain ornamental carvings and other decorations. The visible portion of the case, called the façade, will most often contain pipes, which may be either playable or "dummy" pipes solely for decoration. The façade pipes may be plain, burnished, gilded, or painted. 
Organ cases occasionally feature a few ranks of pipes protruding horizontally from the case in the manner of a row of trumpets. These are referred to as pipes en chamade and are particularly common in organs of the Iberian peninsula and large twentieth-century instruments.
Many organs, particularly those built in the early twentieth century, are contained in one or more rooms called "organ chambers". Because sound does not project from a chamber into the room as clearly as from a freestanding organ case, enchambered organs may sound muffled and distant.
The organ is one of the oldest instruments still used in European classical music. Its earliest predecessors were built in Ancient Greece in the third century BC. The word organ is derived from the Latin organum, an instrument similar to a portative organ used in ancient Roman circus games. Organum is derived in turn from the Greek όργανον (organon), a generic term for an instrument or a tool.
The Greek engineer Ctesibius of Alexandria is credited with inventing the organ in the third century BC. He devised an instrument called the hydraulis, which delivered a wind supply maintained through water pressure to a set of pipes. The hydraulis was played in the arenas of the Roman Empire. The pumps and water regulators of the hydraulis were replaced by an inflated leather bag in the second century AD, and true bellows began to appear in the sixth or seventh century AD.
Portable organs (the portative and the positive organ) were invented in the Middle Ages. Towards the middle of the thirteenth century, the portatives represented in the miniatures of illuminated manuscripts appear to have real keyboards with balanced keys, as in the Cantigas de Santa Maria. Its portability made the portative useful for the accompaniment of both sacred and secular music in a variety of settings.
Large organs such as the one installed in 1361 in Halberstadt, Germany, the first documented permanent organ installation, likely prompted Guillaume de Machaut to describe the organ as "the king of instruments", a characterization still frequently applied. The Halberstadt organ was the first instrument to use a chromatic key layout across its three manuals and pedalboard, although the keys were wider than on modern instruments. It had twenty bellows operated by ten men, and the wind pressure was so high that the player had to use the full power of his arm to hold down a key.
Until the mid-fifteenth century, organs had no stop controls. Each manual controlled ranks at multiple pitches, known as the Blockwerk. Around 1450, controls were designed that allowed the ranks of the Blockwerk to be played individually. These devices were the forerunners of modern stop actions. The higher-pitched ranks of the Blockwerk remained grouped together under a single stop control; these stops developed into mixtures.
During the Renaissance and Baroque periods, the organ's tonal colors became more varied. Organ builders fashioned stops that imitated various instruments, such as the krumhorn and the viola da gamba. The Baroque period is often thought of as organ building's "golden age," as virtually every important refinement was brought to a culminating art. Builders such as Arp Schnitger, Jasper Johannsen, and Gottfried Silbermann constructed instruments that were in themselves artistic masterpieces, displaying both exquisite craftsmanship and beautiful sound. These organs featured well-balanced mechanical key actions, giving the organist precise control over the pipe speech. Schnitger's organs featured particularly distinctive reed timbres and large Pedal and Rückpositiv divisions.
Different national styles of organ building began to develop, often due to changing political climates. In the Netherlands, the organ became a large instrument with several divisions, doubled ranks, and mounted cornets. The organs of northern Germany also had more divisions, and independent pedal divisions became increasingly common. The divisions of the organ became visibly discernible from the case design. Twentieth-century musicologists labelled this the Werkprinzip.
In France, as in Italy and Spain, organs were primarily designed to play alternatim verses rather than accompany congregational singing. The French Classical Organ, became remarkably consistent throughout France over the course of the Baroque era, more so than any other style of organ building in history, and standardized registrations developed. . It was elaborately described by Dom Bédos de Celles in his treatise L'art du facteur d'orgues (The Art of Organ Building).
In England, existing pipe organs were destroyed during the English Reformation of the sixteenth century and the Commonwealth period. It was not until the Restoration that organ builders (particularly Renatus Harris and "Father" Bernard Smith) brought new organ-building ideas from continental Europe. English organs evolved from small one- or two-manual instruments into three or more divisions disposed in the French manner with grander reeds and mixtures. The Echo division began to be enclosed in the early eighteenth century, and in 1712 Abraham Jordan claimed his "swelling organ" at St Magnus-the-Martyr to be a new invention. The swell box and the independent pedal division appeared in English organs beginning in the eighteenth century. 
During the Romantic period, the organ became more symphonic, capable of creating a gradual crescendo. New technologies and the work of organ builders such as Aristide Cavaillé-Coll and Henry Willis made it possible to build larger organs with more stops, more variation in sound and timbre, and more divisions. Enclosed divisions became common, and registration aids were developed to make it easier for the organist to manage the great number of stops. The desire for louder, grander organs required that the stops be voiced on a higher wind pressure than before. As a result, a greater force was required to overcome the wind pressure and depress the keys. To solve this problem, Cavaillé-Coll configured the English "Barker lever" to assist in operating the key action.
Organ builders began to lean towards specifications with fewer mixtures and high-pitched stops. They preferred to use more 8′ and 16′ stops in their specifications and wider pipe scales. These practices created a warmer, richer sound than was common in the eighteenth century. Organs began to be built in concert halls (such as the organ at the Palais du Trocadéro in Paris), and composers such as Camille Saint-Saëns and Gustav Mahler used the organ in their orchestral works.
The development of pneumatic, electro-pneumatic, and electric key actions in the late nineteenth century made it possible to locate the console independently of the pipes, greatly expanding the possibilities in organ design. Electric stop actions were also developed, which allowed sophisticated combination actions to be created.
In the mid-twentieth century, organ builders began to build historically-inspired instruments modelled on Baroque organs. They returned to building mechanical key actions, voicing with lower wind pressures and thinner pipe scales, and designing specifications with more mixture stops. This became known as the Organ reform movement.
The technology of electronic organs developed throughout the twentieth century. Old pipe organs were replaced by digital organs because of their lower purchase price, smaller physical size, and minimal maintenance requirements. Hybrid organs, usually called pipe/digital combination organs, incorporate both pipes and electronic representations of pipe sounds. Rodgers Instruments pioneered the hybrid organ in the early 1970s and remains a leader in this field.
Components of digital organs are now being incorporated into pipe organs, allowing simpler and more reliable key, stop, and combination actions. This also makes it possible to record and play back an organist’s performance via the MIDI protocol. Although the sound of a pipe organ cannot be completely replicated by a digital organ, it is becoming increasingly common for organ builders to place digital stops in new organs .. Because they rely on loudspeakers rather than hundreds of individual tone-generating sources spaced in an array (pipes), digital organs can sound two-dimensional. Hybridizing organs has always been a controversial practice and is considered less desirable than using pipes where money is not a major factor. Digital organs are exceptionally useful for homes and studios or where portability is desired.
In Europe, organs benefitted from the reverberation of stone churches and cathedrals. In America, Canada and elsewhere where rooms are built of hollow plaster walls, drywall or other materials, there can be a sound-absorption effect that is less favorable to organ tone. Carpeting, draperies and the padding of pews also soaks up organ tone to a considerable extent.
The development of organ repertoire has progressed along with that of the organ itself, leading to distinctive national styles of composition. Because organs are commonly found in churches and synagogues, the organ repertoire includes a large amount of sacred music, which is accompanimental (choral anthems, congregational hymns, liturgical elements, etc.) as well as solo in nature (chorale preludes, hymn versets designed for alternatim use, etc.). The organ's secular repertoire includes preludes, fugues, sonatas, organ symphonies, suites, and transcriptions of orchestral works.
Although most countries whose music falls into the Western tradition have contributed to the organ repertoire, France and Germany in particular have produced exceptionally large amounts of organ music. There is also an extensive repertoire from the Netherlands, England, and the United States. Most composers of organ music throughout history have been organists themselves. With the notable exception of Johann Sebastian Bach, few composers who have contributed extensively to the organ repertoire are well-known except for their organ music. Similarly, few composers well-known in other genres have written much music for the organ.
Before the Baroque era, keyboard music generally was not written for one instrument or another, but rather was written to be played on any keyboard instrument. For this reason, much of the organ's repertoire through the Renaissance period is the same as that of the harpsichord. Pre-Renaissance keyboard music is found in compiled manuscripts that may include compositions from a variety of regions. The oldest of these sources is the Robertsbridge Codex, dating from about 1360. The Buxheimer Orgelbuch, which dates from about 1470 and was compiled in Germany, includes intabulations of vocal music by the English composer John Dunstable. The earliest Italian organ music is found in the Faenza Codex, dating from 1420.
In the Renaissance period, Netherlandish composers such as Jan Pieterszoon Sweelinck composed both fantasias and psalm settings. Sweelinck in particular developed a rich collection of keyboard figuration that influenced subsequent composers. The Italian composer Claudio Merulo wrote in the typical Italian genres of the toccata, the canzona, and the ricercar. In Spain, the works of Antonio de Cabezón began the most prolific period of Spanish organ composition, which culminated with Juan Cabanilles.
Early Baroque organ music in Germany was highly contrapuntal. Sacred organ music was based on chorales: composers such as Samuel Scheidt and Heinrich Scheidemann wrote chorale preludes, chorale fantasias, and chorale motets. Towards the end of the Baroque era, the chorale prelude and the partita became mixed, forming the chorale partita. This genre was developed by Georg Böhm, Johann Pachelbel, and Dieterich Buxtehude. The primary type of free-form piece in this period was the praeludium, as exemplified in the works of Matthias Weckmann, Nicolaus Bruhns, Böhm, and Buxtehude. The organ music of Johann Sebastian Bach fused characteristics of every national tradition and historical style in his large-scale preludes and fugues and chorale-based works. Towards the end of the Baroque era, George Frideric Handel composed the first organ concertos.
In France, organ music developed during the Baroque era through the music of Jean Titelouze, François Couperin, and Nicolas de Grigny. Because the French organ of the seventeenth and early eighteenth centuries was very standardized, a conventional set of registrations developed for its repertoire. The music of French composers (and Italian composers such as Girolamo Frescobaldi) was written for use during the Mass. Very little secular organ music was composed in France and Italy during the Baroque period; the written repertoire is almost exclusively intended for liturgical use. In England, composers such as John Blow and John Stanley wrote multi-sectional free works for liturgical use called voluntaries through the nineteenth century. 
Organ music was seldom written in the Classical era, as composers preferred the piano with its ability to create dynamics. In Germany, the sonatas of Felix Mendelssohn (published 1845) marked the beginning of a renewed interest in composing for the organ. The French organist-composers César Franck and Charles-Marie Widor led organ music into the symphonic realm. The development of symphonic organ music continued with Louis Vierne and Charles Tournemire. Widor and Vierne wrote large-scale, multi-movement works called organ symphonies that exploited the full possibilities of the symphonic organ. Max Reger and Sigfrid Karg-Elert's symphonic works made use of the abilities of the large Romantic organs being built in Germany at the time.
In the nineteenth and twentieth centuries, organ builders began to build instruments in concert halls and other large secular venues, allowing the organ to be used as part of an orchestra, as in Saint-Saëns' Symphony No. 3. Frequently the organ is given a soloistic part, such as in Joseph Jongen's Symphonie Concertante for Organ & Orchestra, and Francis Poulenc's Concerto for Organ, Strings and Tympani. Other composers who have used the organ prominently in orchestral music include Gustav Holst, Richard Strauss, Ottorino Respighi, Gustav Mahler, Anton Bruckner, and Ralph Vaughan Williams. Because these concert hall instruments could approximate the sounds of symphony orchestras, transcriptions of orchestral works found a place in the organ repertoire. As silent films became popular, theatre organs were installed in theatres to provide accompaniment for the films.
In the twentieth century symphonic repertoire, both sacred and secular, continued to progress through the music of Marcel Dupré, Maurice Duruflé, and Herbert Howells. Other composers, such as Olivier Messiaen, Jehan Alain, Jean Langlais, and Petr Eben, wrote post-tonal organ music. Messiaen's music in particular redefined many of the traditional notions of organ registration and technique.