Are you curious about the sound of pi? What sort of tune is the Dow Jones Industrial Average singing today? How does redwood DNA translate into an environmental symphony?

Music professor Jonathan N. Middleton and a team of students from the mathematics and computer science departments at Eastern Washington University have created a computer program and Web site that allows you to find out. It’s available at http://musicalgorithms.ewu.edu/.

In essence, the interactive program uses various algorithms to convert sequences of numbers into sounds—musical notes of varying pitch and duration. A visitor to the Web site simply follows the step-by-step directions, making decisions along the way that affect what’s heard in the end. Numbers go in, music comes out.

With an algorithm called “powers,” for example, you create a sequence of squared numbers, associate each number with a pitch and duration, listen to the sounds, and print out the composition as sheet music.

Middleton envisions a range of applications for his software. Music students, for example, could use it as a source of ideas—a way of generating musical themes that can then be incorporated into compositions. Middleton himself used the program to come up with some musical themes based on the genetic code of redwood trees. It took just minutes to generate potential themes. It took nearly a year to shape selected themes into a suitable form and orchestrate his recently premiered “Redwoods Symphony.”

Because the algorithms can handle a variety of data, from the digits of pi and batting averages to seismic data and DNA sequences, the program may also be useful to researchers looking for patterns or trends. Indeed, you can think of an orchestral piece itself as variables that change with time.

The use of sound is a promising way of making sense of masses of data because the human ear is so good at routine tasks such as recognizing a voice, picking out a single word in a cacophony of cocktail chatter, or hearing a flute’s sweet tone in the midst of an orchestral romp. The ear can integrate disparate sounds into a harmonious whole or detect subtle nuances buried in noise. Data presented as sounds may help in picking out patterns or trends not evident when displayed in graph or chart form.

One of the inspirations for Middleton’s effort was the work of contemporary composer Tom Johnson, who relies heavily on mathematical ideas, from permutations and prime numbers to Pascal’s triangle, Fibonacci numbers, and self-similar structures, for his experimental music (http://kalvos.org/johnson.html).

## Subscribe to Science News

Get great science journalism, from the most trusted source, delivered to your doorstep.

The simple rules that are the framework of Stephen Wolfram’s *A New Kind of Science* also lend themselves to creating music. Based on systems known as one-dimensional cellular automata, these programs are completely specified by a short string of numbers. Yet, when run, they produce remarkably complex patterns, which can then be converted into diverse musical forms.

Every piece of music generated by any of these programs is original, created from scratch. Remarkably, even though there’s no randomness built into the programs or rules, the results of a given program are essentially unpredictable. It’s unlikely that you would ever get two “tunes” that sound exactly alike. Yet, because of the underlying rules, the programs generate patterns that make sense globally as music.

You can quickly create your own tunes at the Wolfram*Tones* Web site (http://tones.wolfram.com/). As one immediate application of this technology, the Web site allows you create a unique ringtone in seconds and then, for a wireless-carrier-imposed fee, download it to your cell phone.

Wolfram suggests that the same software could be used to write a song, create the soundtrack for a film, or compose fresh music for a video game.

Mathematician Larry Lesser of the University of Texas at El Paso has an approach to math-inspired music that doesn’t rely on computers or even algorithms. As a self-styled mathemusician, he writes and performs lively, math-related lyrics set to familiar (and not-so-familiar) tunes (see http://www.math.utep.edu/Faculty/lesser/Mathemusician.html).

Lesser’s “American Pi,” for example, incorporates a mnemonic for the first six significant digits of pi and recounts some the number’s history. It can be sung to the tune of Don McLean’s 1971 pop hit “American Pie.” His version of “The Gambler” addresses probability issues that arise when playing a state lottery. Other songs include “Hotel Infinity,” “Stairway to Seven,” and “We Will Graph You!”

For a somewhat more sophisticated take on mathematics, check out the music of The Klein Four Group, which is based at the Northwestern University mathematics department (http://www.math.northwestern.edu/~matt/kleinfour/). You can view a performance of their romantic ditty “A Finite Simple Group (of Order Two)” at http://www2.collegehumor.com/movies/149448. The song was written by Matt Salomone.

Who would have thought that “upper bound,” “axiom of choice,” “without loss of generality,” “one-to-one,” “finite limit,” and other paraphernalia of higher mathematics could blend so smoothly into a poignant love song?