Composing Music with Nyquist SAL


During my time at Carnegie Mellon University, I had the opportunity to study under Professor Roger Dannenberg, who is a professor emeritus of computer science, art, and music, as well as one of the creators of Nyquist. Nyquist is a language for sound synthesis and music composition that handles both signal processing and sound synthesis in a single integrated system. Unlike score languages that deal only with events or signal processing languages that focus only on signals and synthesis, Nyquist combines the two in a unique way.

To create my composition using Nyquist, I started with a 19-second sample of "100 Grandkids" by Mac Miller, which can be played below.

100 Grandkids, Mac Miller




I employed several signal processing techniques, such as sound-stretching, amplitude modulation, and low-pass filters, to create the sounds in my final composition. The creation of my composition primarily relied on multiple functions, such as the Load Sample function. For those unfamiliar with Nyquist's coding syntax SAL, the Load Sample function reads a wave file, plays it backwards, stretches the sample by a given value, and sets its volume with amps. For those familiar with Python and other programming languages, these functions may be readable, although the syntax is distinct from more widespread languages.

Load Sample Function



Although Nyquist requires coding instead of manipulating sound interactively, the techniques used to process and synthesize sounds are no different from those used in graphical interfaces such as GarageBand. However, the coding format offers greater control over the produced sound.

In the end, my composition, "Elevator Service," was created by running a simple function play sim(sound(comp()) * 0.7, sound(make-beat()) * 0.7). Functions comp() and make-beat() call other functions. For more detail, you can view the full composition, which is written in SAL.

 Final Composition