Thursday, July 21, 2011

Chance Music

When a composer or songwriter finishes a new piece of music, typically the result is a fixed and defined work that can be reproduced consistently. Classically, a set of score dictates what notes to play, when to play them, for how long, how loudly, and so on. Even in jazz, a quintessentially improvisational form of performance, a fixed melody known as the “head” is played (usually at the start and end of the piece), and a lead sheet specifies the chord changes through which the music cycles. Recordings capture performances and multitrack constructions with excellent fidelity. In all these cases, there is some degree of chance, relying on the skills and inclinations of the performers or the capabilities and settings of the equipment involved, as well as the acoustic properties of the listening environment; however, some composers incorporate chance into the very structure of the music itself.

At least as far back as the late 15th Century, games existed in which short fragments of music were selected and arranged according to the results of rolling dice. A manuscript written by Wolfgang Amadeus Mozart in 1787 consists of several two-bar segments of score with various marks indicating some system was used to piece them together, and one example is even included, though the precise rules were not recorded (or have not survived) and attempts to deduce them remain inconclusive. Several other varieties of "Musikalisches Würfelspiele" (musical dice games) were credited by their publishers to Mozart, though nearly all of these are almost certainly inauthentic; one such game was produced by Nikolaus Simrock in Berlin, who was Mozart's own publisher, though its attribution to Mozart has never been confirmed.

In the early 20th Century, Marcel Duchamp used chance in the composition of two musical pieces, while Charles Ives and Henry Cowell produced pieces that required performers to arrange fragmentary music. Soon, many other composers began experimenting with chance in various ways, including Karlheinz Stockhausen, Pierre Boulez, and John Cage. “Water Walk,” a piece Cage performed on the show I've Got A Secret in January of 1960 had to be modified for television, as the composition originally required five radios turned on and off at specific instances, incorporating by chance whatever might be on the air at the time of performance, but a dispute between two labor unions on the set of the show meant the radios could not be used; as a solution, Cage instead opted to smack the top of each radio at the designated moments to signify turning them on, and to signify turning them off, he knocked them to the floor.

Developments in computing technology allow for the production of highly variable music. For example, Brian Eno's 1996 CD-ROM album Generative Music 1 is a collection of twelve compositions where each conforms to its own complex parameters but never plays out quite the same way twice. More recently, Eno also composed the elements used in the procedural music system for the videogame Spore, yielding a soundtrack that never repeats. Many programs for creating different varieties of chance music are available, both commercially and as free and open source software, with some offering the user little control while others provide extensive options.

Though it may seem easier for a composer to relinquish decision-making to chance, this is not usually the case; in fact, it's often far simpler to write a traditional fixed piece than to devise a system of parameters within which the results are bound to produce the sort of effect a composer wishes to convey. Not only does the incorporation of chance allow a musician to emphasize the broader shape of a piece rather than place too much significance in the specifics of one possible implementation of an idea, it can also offer the listener a fresher experience each time through.

I've conducted several experiments with different types of chance music, and I'd like to offer a brief example. “Inganok” is one selected result of a C++ program I wrote in 2008 to produce highly variable Csound scores, a technique I've since been revisiting and revising with Python. Of course, this simplistic mood piece reflects more on my own tastes and abilities than on the usefulness of chance music in the hands of more skilled musicians!

Thursday, June 30, 2011

How Slow Can You Go?

In Halberstadt, Germany, the medieval St. Burchardi church has become the home of a unique pipe organ designed and built to perform a single piece of music. The performance commenced on September 5, 2001 and is planned to conclude after 639 years, in 2640.

The piece in question is Organ²/ASLSP ("As SLow aS Possible"), written by the influential avant-garde composer John Cage in 1987 and adapted from a work he had developed for piano two years earlier. The revised piece has been performed many times by several esteemed organists, including Gerd Zacher, to whom it is dedicated. It spans eight pages of score, and since the only instruction for pacing is to play as slowly as possible, a typical performance may stretch across several hours.

In 1997, a conference of musicians held a discussion regarding just how slowly the piece might be played. They became inspired to develop a long-term project for such a performance, and wanted to begin in the year 2000; September 5th was selected as it was the composer’s birthday. The location and duration were chosen based on the first documented permanent installation of a modern pipe organ, which was completed in the cathedral of Halberstadt in 1361, or 639 years before the intended starting date of this performance.

The actual start was delayed until 2001. Because the piece begins with a space interpreted as silence which (in proportion to the whole of this performance) spans seventeen months, the first sound was not produced until February 5, 2003. Since then, chord changes have occurred once or twice a year, in keeping with their relative positions in Cage's score, though after 2013 a new chord is not due until 2020. On the dates when such changes are scheduled, hundreds of visitors from around the world gather at the church to witness and celebrate the occasion.

Even aside from the composition being performed, the instrument itself is impressive. Custom bellows, pumped continually by machine, force a constant stream of air through the organ pipes. The positions of the pedals determine which notes are sounded, and these are weighted with sandbags hanging from strings. The weights are adjusted by hand on the designated days. In consideration of the community around the church, a cube of acrylic glass surrounds the instrument to dampen the ongoing sound. Because a well-maintained organ can remain functional indefinitely, it is hoped that generations of attendants will continue the performance through the centuries to come.

While it's clear this performance will be quite lengthy, other compositions are intended to last even longer. A computerized piece by Jem Finer appropriately named "Longplayer" began on January 1, 2000 and is intended to continue without repetition for a thousand years. On a still more ambitious scale, Brian Eno and Danny Hillis have collaborated on a system of ever-changing musical chimes for the Clock of the Long Now, a monumental mechanical timepiece designed to run for 10,000 years. I plan to post more about these projects within the next few decades, so stay tuned.

Monday, June 27, 2011

Just Intonation

Often the first step a musician might take away from the familiar environs of the standard Western twelve-tone equal temperament is to explore a method of tuning known as just intonation.

In an equal temperament, the distance between every pair of neighboring pitches is exactly the same. This is very useful for practices such as transposition and modulation, since the relationships between notes don't change as they are moved up or down as a group.

However, today's standard is the result of numerous compromises made throughout history. For thousands of years, until only about three centuries ago in Western culture, tuning was done with pitches being related to one another by specific ratios. The smaller the numbers in the ratio, the more consonant (smooth, pleasant, at rest) the interval sounds, as it is physically easier for the human ear to identify its harmonic properties.

The mathematical procedure to apply these ratios is relatively straightforward: a basic pitch is chosen, and the frequency of that pitch is multiplied by the desired ratio to arrive at the second pitch. For example, standard concert tuning is known as A440, because the A above Middle C is set at 440 Hz (Hertz, a unit that measures vibrations per second). If we take this as our basic pitch and want to find the pitch at a ratio of 3:2 above it, we'd have 440*(3/2) = 660 Hz.

Tonus (Whole Tone)
Diatessaron (Perfect Fourth)
Diapente (Perfect Fifth)

The simplest ratio, 1:1, is two instances of the same pitch, and is therefore appropriately termed a unison. The next-simplest ratio, 2:1, is one pitch exactly double the frequency of the other, which for historical reasons is called an octave ("oct-" being a prefix meaning "eight", the octave is the eighth note at the end of a heptatonic scale, a return to the functional position of the tonic; in other words, the distance between the first and last "do" of "do re mi…").

The next-simplest ratio, 3:2, was named the diapente ("dia-" translated variously as "by/from/through/of", "pente" meaning "five") and is the fifth step of "do re mi…", namely "sol". Its inversion is the diatessaron ("by/from/through/of four"), ratio 4:3, the "fa" in "do re mi…". The distance between the diapente and the diatessaron was called the tonus, ratio 9:8, what is today called a whole tone; a whole tone up from "do" is "re".

These intervals all exist in what is known as Pythagorean tuning, an ancient Greek system in which the ratios involved exhibit no prime factors greater than 3; for example, 9:8 factors to (3*3):(2*2*2). This system can also be called 3-limit just intonation, and it's the most fundamental of all musical tunings beyond the basic unison and octave. It's easy to tune because the octave and pure perfect fifth are simple to hear, and a Pythagorean scale is achieved by stacking pure fifths and collapsing the results into the span of an octave.

However, limiting eligible ratios to the prime factor of 3 can yield some relatively complicated intervals: for example, a Pythagorean major third (more properly called a ditone, a stack of two whole tones) is the ratio 81:64, and the minor second (or semitone) could be either 256:243 (called the Pythagorean limma, or diatonic semitone) or 2187:2048 (the Pythagorean apotome, or chromatic semitone). Such complicated intervals tend to sound dissonant (harsh), as they are more difficult for the human ear to process.

A far simpler system can be constructed by raising the prime limit to 5, thus allowing ratios like 5:4 to serve as the major third, 6:5 the minor third, and 16:15 the minor second.

Minor Second
Major Second
Minor Third
Major Third
Perfect Fourth
Perfect Fifth
Minor Sixth
Major Sixth
Minor Seventh
Major Seventh

Notice that the most basic Pythagorean intervals are retained in this tuning, as they are simpler than ratios involving the prime factor 5; for example, 9:8 is simpler than 10:9, which would otherwise be the simplest ratio for a major second.

Notice also the measurements given in the unit of cents. This common measurement scheme is an extremely convenient means to compare the sizes of any intervals, and is based on 1200 cents per octave. Dividing the octave into twelve equal tones, as does the common Western standard tuning, yields one tone every 100 cents: 100 is the minor second, 200 is the major second, 300 is the minor third, and so on. Understanding this, and given the chart above, it becomes clear how impure the intervals of standard tuning are; for example, a minor third in twelve-tone equal temperament is 16 cents (about a sixth of a semitone) flat from the pure version of the same interval, while a major third is 14 cents sharp, and the same is also true (but reversing the sharp and the flat) for their inversions, the sixths.

The pure intervals have been tempered to equal widths for the sake of conveniences like unhindered transposition and modulation. However, the cost of this compromise is the loss of the distinctive characters of each key and their modes, and the harmonic purity of chords.

5-limit just intonation is perhaps the most welcoming first step out of equal temperament, as a great deal of existing traditional and contemporary popular music can be performed in this tuning and (due to the purity of the intervals) end up sounding sweeter, literally more harmonic, than it would in standard twelve-tone tuning.

On the other hand, there are serious dangers inherent in just intonation: beware, for outside the comfortable conveniences of equal temperament, there be wolves!

A wolf interval is so named because it is so dissonant (far from pure) that it "howls". The size of a fifth built on most degrees of a just-intoned scale will be pure (there are 702 cents between the just minor second and just minor sixth, for example), but certain fifths are monstrously wrong: the distance between a just major second and just major sixth is only about 680 cents, almost a quarter of a semitone flat from pure!

Taming these wolves was another cause for the compromise of equal temperament. Without tempering, the second chord of both the major and minor scales would be practically unusable for the vast majority of purposes, and having access to this chord is certainly very useful. This is one excellent reason that equal temperament started to find favor about three centuries ago, and has since become the de facto standard tuning of practically all Western music.

However, for music which cleverly evades those rare wolf intervals, and which does not have a great need for complete freedom of transposition or modulation, just intonation offers a sweetness of sound unparalleled by standard tuning. In fact, transposition and modulation are still perfectly useful techniques within just intonation, but certain modes work better together than others, as they each have a unique arrangement of intervals rather than the uniform smear of equal temperament.

For the exceptionally adventurous musician, just intonation can even be extended beyond the 5-limit into higher primes. Septimal just intonation incorporates ratios involving the prime factor of 7, most readily recognized in the "barbershop seventh" of 7:4 (so called due to its ubiquity in the purely harmonized performances of barbershop quartets, more formally known as the "harmonic seventh", "subminor seventh", or "septimal minor seventh", and sometimes as the "perfect seventh" or "pure seventh"). Even higher primes have seen occasional use by the arguably insane (such as the good folks of the Alternate Tunings group on Yahoo! and the Xenharmonic Alliance on Facebook), though a highly trained ear is required to discern such intervals. Sometimes, to achieve a particularly unusual tuning, certain low primes (even 3 and 5) are actually excluded!

With modern technology, just intonation has become widely accessible. Even an inexpensive synthesizer may have a retuning capability, often with a list of presets including basic just intonation. Many acoustic instruments support just intonation natively, though fretted instruments like guitars may require modification (the frets must be bent into carefully calculated squiggles). In most professional multitracking software, MIDI tracks can be retuned instantly, lending the purity of just intonation to a song that was originally composed in equal temperament and giving it a little extra shine. Give it a try!

Wednesday, June 8, 2011

The Persian Dastgāh System

An obsession of mine over the past several months has been the family of music traditions of the Middle East, most especially the Persian dastgāh system. A dastgāh is a collection of related "modes" and associated melodic rules. In theory, there are more than fifty such collections in existence, though twelve standard dastgāhs were codified in the 19th Century and are widely practiced today.

Each "mode" in a dastgāh consists of seven core pitches, to which further pitches are added to accommodate modulation or expression. These are not exactly modes in the Western sense, because the widths of certain intervals differ from one "mode" to another. As a result, a given instrument is limited only to certain sets of possible "modes" without being retuned (unless it uses a compromised tuning such as those detailed below).

A dastgāh also entails established practices regarding the role or function of each pitch in a "mode" over the course of musical development; these practices are known as sayr. Additionally, many short melodic fragments known as gushehs are incorporated into the larger context of each performance; how these gushehs are handled is part of the artistry of an individual performer. The full set of dastgāhs, with their associated sayr and gushehs, is called the radif.

Music historians consider the dastgāh system to have its roots in the court of Xosrov II, ruler of the Persian Empire from AD 590 to 628. He was patron to the musician Bārbod, who organized a musical system containing seven Royal Modes (Xosrovāni), thirty related modes (Lahn), and 360 melodies (Dastān). When the Persians were conquered in AD 642, Bārbod's system became the basis for the Arabic system of maqām (and thereby the Turkish makam); many of the original Persian names survive in the present-day maqāmat (the plural form).

The matured dastgāh system of modes and melodies grouped together into collections emerged by the end of the 19th Century, though there is little surviving evidence of the specific developments up to that time. Like the Arabic and Turkish systems, the dastgāh tradition has been passed down aurally through history by its practitioners, very few of whom left any written records. As such, tunings for the same dastgāh can vary from region to region, or even between cities or individuals.

Several attempts have been made to standardize a tuning system that could be used in which all dastgāhs could be represented with an acceptable degree of fidelity:

• In the 13th Century, Safiaddin Ormavi devised a scale with 17 tones per octave that ostensibly became the standard of Middle Eastern music theory for several centuries; however, it is not likely this system was adhered to in practice, given the nature of the instruments, the fact that most music used only about seven tones at a time, and especially the inherent variability of the aural tradition.

• Impressed with the advanced developments of European harmonic techniques and desiring to incorporate them into their own traditions, some prominent Middle Eastern musicians in the 19th and 20th centuries (notably Mikhail Mashaqa and Ali Naqi Vaziri) advocated the adoption of an equal temperament; however, because the semitone was too large to accommodate all traditional intervals, a further subdivision to a quarter-tone was proposed. The resulting 24-tone scale has found some favor for its relative practicality, as existing 12-tone instruments can be used (a basic technique involves splitting a composition between two pianos with one tuned a quarter-tone apart from the other), though many consider this tuning a poor compromise at best and culturally inappropriate at worst.

• In the 1940s, a physicist named Mehdi Barkesli conducted studies to measure the actual intervals used in practice by several Persian singers in various modes. Influenced by the writings of respected medieval scholars such as Ormavi, he presented a 22-tone scale as a means to unite all dastgāhs into a common tuning. However, this scale is built on a 7-tone scale from which the remaining tones are derived, but the basic scale itself is arbitrary, and the additional tones are calculated by means that have little relevance to actual practice.

Each of these systems makes the assumption of octave equivalence, though in reality the interval of a perfect octave may not even be present; pitches exist individually, not as members of a pitch class that repeats an octave higher or lower. Furthermore, as each pitch is an individual entity, it is inappropriate to consider one pitch a modified (raised or lowered) form of another, as is often done under influence from the Western tradition of sharps and flats.

In 1965, Hormoz Farhat presented his theory of flexible intervals in the dastgāh system. He identified five characteristic intervals from which the Persian modes may be constructed, and recognized the inherently approximate nature of these intervals in practice. These intervals range from about 90 cents (slightly smaller than the semitone of 12-tone equal temperament, though very close to the Pythagorean interval of 256:243 on which it is historically based) to about 270 cents (called a "plus-tone" by Farhat, it is significantly smaller than a minor third and perhaps best thought of as an augmented second). With this approach, there is no assumption of octave equivalence, and individual pitches serve distinct roles.

In addition to dastgāh itself, I have been studying the closely related Turkish makam, particularly the work of Karl Signell. He also identifies five characteristic intervals of makam, though two of the intervals are each about 20 cents different from their counterparts presented for dastgāh by Farhat. The makam intervals Signell offers are all multiples of a basic comma of about 23 cents (in his glossary, he identifies it as the Pythagorean comma, which has a value of 23.46 cents, though the numbers he provides for the intervals strongly suggest he actually uses the Holdrian comma of 22.64 cents, which indeed has been used by noted Turkish composers and theorists). He explains that the number of commas stacked to produce a given interval can vary; thus, those two intervals that differ between Farhat's dastgāh and Signell's makam could easily be adjusted with the addition or removal of a comma.

90¢ 90¢
135¢ 114¢
160¢ 180¢
204¢ 204¢
270¢ 271¢

There is still much for me to learn in this area, and I'm very excited to see where it leads. I'm curious to try using those five basic intervals, perhaps with appropriate adjustments to the number of stacked commas, to build some musically useful non-traditional modes, taking advantage of the precise tuning afforded by modern electronics. I also plan to study the rhythmic aspects of Middle Eastern music, which are based on cycles called uṣūl and more recently on the meter of a form of poetry known as ghazal, though that is definitely a subject for another day.

Friday, May 6, 2011


The foundation of the Western musical tradition is the diatonic scale, known best by its "major" and "minor" modes, though there are five other modes of this scale used somewhat less often. The diatonic scale is a specific pattern of intervals, called whole- and half-steps (or more formally, tones and semitones), arranged in a circle. Any of the seven degrees of this circle can be used as a starting position, becoming the tonic of a particular mode, the pattern of which is formed by going around the circle until returning to the tonic.

On a piano, starting on a particular white key and playing up along the next seven white keys yields one of the modes, with a "whole-step" being whenever a black key is skipped and a "half-step" being wherever there is no black key. However, the pattern itself is what defines a mode, and the pattern could be started from any key, skipping or landing on both white and black keys as the pattern dictates; the "white keys only" method simply provides one convenient example of each mode to understand and remember.

Ionian (major scale)
Aeolian (natural minor scale)

In this table, the "2367" column gives the patterns of major (M) and minor (m) seconds, thirds, sixths, and sevenths for each mode; the fourth and fifth degrees are assumed perfect, though the Lydian mode has an augmented fourth and the Locrian mode has a diminished fifth, as noted. This view provides an easy way to construct the modes from any starting key, and to directly compare their properties.

Notice that each sequence in the "Pattern" column features the same sequence as its neighbors above and below, but with the interval at one end (either a Whole- or Half-step) moved to the other end; the sequences at the top and bottom of the list are likewise related. This reflects the circulating nature of the diatonic scale.

While the "major" and "natural minor" modes have been most commonly used, all seven modes of the diatonic scale have been employed throughout history and are still in use today. There are, however, two other circulating seven-tone scales that can be built out of the standard twelve-tone system using only whole- and half-steps, and these scales remain considerably more obscure. In this context, the diatonic scale is known as Heptatonia Prima, in contrast to Heptatonia Secunda and Heptatonia Tertia.



A quick glance at these tables can give a good idea why these patterns haven't often been explored: they exhibit many more augmented and diminished intervals (and resulting chords) than Heptatonia Prima, which makes working with them harmonically considerably more difficult. Tertia even has an augmented sixth in one mode, and (even worse for the tonic chord) a diminished third in its inversion! These are certainly awkward in comparison to Prima.

However, there are clearly a few modes that are relatively straightforward. For example, the MmMM mode of Secunda is also known as the "melodic minor" scale, and has been used regularly. Its inversion, the mmMm mode, is equally stable, though both these modes do feature some augmented and diminished chords, and therefore some skill is required to handle them well. Similarly, the mmMM mode of Tertia features both augmented and diminished chords, but has seen use as the "Neapolitan major" scale.

An exploration of even the most complicated modes could yield interesting results in the hands of an adventurous composer. It is a challenge not often undertaken, and many distinctive works may yet be produced!

Tuesday, May 3, 2011

Classic Rock: The Great Stalacpipe Organ

Today, I'd like to take a look at what I consider the most incredible musical instrument in the world: the Great Stalacpipe Organ of Luray Caverns.

Devised in 1954 by Leland W. Sprinkle, a mathematician and electronic engineer at the Pentagon and also a talented organist who studied at the Peabody Conservatory of Music, the Great Stalacpipe Organ is the conversion of 3.5 acres of ancient caverns in Luray, Virginia into a single massive musical instrument.

Sprinkle selected 37 stalactites throughout the caverns that, when struck, produced tones that closely matched the Western musical scale, and fine-tuned them to concert pitch by grinding with a sander (though two were found naturally in tune). He then mounted electronic mallets with rubber-tipped plungers and used more than five miles of wire to connect them all to a large console, custom-built with four keyboards and a pedal board. When a key is pressed, it triggers a particular mallet to strike, and the resulting chime rings out through the caverns.

It took Sprinkle three years to complete the initial stage of his project, which he unveiled to the world on June 7, 1957. His dedicatory recital received much attention from the press; the portmanteau "stalacpipe" was coined by music critic Paul Hume of the Washington Post, and the name stuck. Over the course of another 33 years, further development saw this monumental instrument refined to its present state.

Several recordings of Sprinkle's live performances were made. This is an impressive feat of engineering on its own, considering the size of the area involved and the nature of the caverns. Reverberations of dripping water contributed to the natural ambience of these recordings.

The organ can even be controlled automatically by a system of rotating plastic belts full of holes, somewhat like a player piano (or a very large music box). Visitors to the caverns can still hear the organ played this way; the selections of music are changed seasonally.

Although the Great Stalacpipe Organ is certainly expansive, it is not generally considered the largest musical instrument in the world. That distinction is held by the Convention Hall Auditorium Organ in Atlantic City, which will be the subject of an upcoming post.

Monday, May 2, 2011

Circuit Bending

In 1966, Reed Ghazala began experimenting with the musical potential of electronic toys by taking them apart and poking around inside, short-circuiting them in different places and producing all manner of unplanned sounds and effects. He added buttons, switches and knobs to control these sounds, and coined the term "circuit bending" to describe the process. Since then, he has converted many toys into circuit-bent instruments for musicians like The Rolling Stones, Tom Waits, Peter Gabriel and King Crimson. Examples of his work are held by New York City's Museum of Modern Art, The Guggenheim and The Whitney, and other galleries around the world.

While Ghazala is credited with pioneering and championing this unusual art form, he does not claim to have been the first to do it. Serge Tcherepnin, who would go on to design the historic Serge modular synthesizer, experimented in the 1950s with modifying transistor radios. Even as early as 1897, Thaddeus Cahill's Telharmonium reportedly could be influenced by direct contact with its electrical circuits.

Any low-voltage battery-powered device can potentially be "bent" into a useful musical instrument, and such devices are common and inexpensive at secondhand stores. Also, no prior experience or understanding of electronics is necessary, as the low voltages involved (Ghazala recommends 6v or less) are not dangerous; the circuitry can safely be touched by hand, and it can be shorted out and rewired in any configuration. At worst, a device will simply cease to function. For these reasons, circuit bending is very accessible to virtually anyone. There are many excellent tutorial videos and performances on YouTube, as well as written guides, both online and in print.

Interesting connections are usually found by probing different points of a circuit board with either a wet finger or a metal probe, such as the end of a wire held in a clip. Modifications can be made permanent with a soldering iron and the addition of buttons, switches, potentiometers (knobs), resistors, capacitors, and other basic electronic components. Photoresistors can be used to make a circuit light-sensitive, so a performer can wave their hand over the device or cover the photoresistor to achieve a particular musical effect. Even metal objects like nails or studs can be used to provide "body contact" (finger-touching) control points. These additional components can be fastened through new holes drilled in a device's existing case, or the case can be removed and replaced by one custom-built for the project.

I am currently in the process of bending a toy keyboard I bought used, and I also have a voice-changing megaphone I suspect will provide some interesting effects. The plan is to connect them to each other with the addition of a plug to one and a jack to the other; this way, they won't be permanently wired together and the megaphone could also be hooked up to future bent instruments, or any other sound source (like an MP3 player). I might even figure out a way to use the megaphone's microphone to modulate the keyboard. Who knows? Circuit bending is all about experimentation; you never know exactly what you'll find!