A Guide to Composing Music with Nyquist
Publication Year: 2013
Published by: University of Michigan Press
Download PDF (129.9 KB)
Download PDF (206.6 KB)
Download PDF (165.0 KB)
Download PDF (101.0 KB)
The motivation for writing this book comes from several years of teaching music and engineering students the fundamentals of algorithmic composition. Algorithmic composition, for the purposes of this book, is defined as the use of computers to implement procedures that result in the...
Download PDF (92.3 KB)
This book began as an introduction to the use of Common Music and Common Lisp. Common Music was developed by Heinrich (Rick) Taube with the support of Tobias Kunze, and this book would not have been possible without them. Although the book is now completely independent of...
Chapter 1. Introduction
Download PDF (219.6 KB)
This book describes techniques for algorithmic composition using Nyquist, a computer language for sound synthesis and composition. The purpose of the book is to assist readers who are interested in composing music using computers. The best way of learning about algorithmic composition is by doing, so this book...
Chapter 2. The History and Philosophy of Algorithmic Composition
Download PDF (323.7 KB)
In Chapter 1, we defined algorithmic composition as the use of a rule or procedure to put together a piece of music. This chapter will give you a broader understanding of algorithmic composition, how algorithms have been used throughout music history, and an introduction to the aesthetic issues of algorithmic...
Chapter 3. Introduction to SAL
Download PDF (544.9 KB)
Chapter 3 introduces you to the fundamentals of SAL and programming. You will learn about some of the various data types that SAL supports and many of its built-in functions called primitives. You will learn how to write your own functions and become familiar with typical error messages...
Chapter 4. Programming and Nyquist
Download PDF (495.4 KB)
The normal way to write a program is to type code into a file. The file is then loaded into Nyquist. Loading means that the expressions in the file are evaluated. Usually, most of the expressions in a file define functions. Files are convenient because, if there is an error, you can simply edit the file and reload it rather than...
Chapter 5. Introduction to Algorithmic Composition
Download PDF (352.7 KB)
In Chapter 4, we learned how to use Nyquist to create, modify, and play scores. In principle, these functions can be used to create any score, but the work is tedious because so much must be specified by hand. In this chapter, we will learn new ways to create scores by writing programs. Programs can automate many tasks...
Chapter 6. Printing, Reading, and Debugging
Download PDF (239.5 KB)
This chapter introduces you to writing output, reading data from the computer keyboard, and debugging programs. Displaying information on your monitor is very helpful in locating problems in your programs...
Chapter 7. Variable Assignment and Scoping
Download PDF (347.0 KB)
This chapter introduces you to how to assign and reference variables in SAL (and Nyquist). Variables save values for reuse, avoiding the need to recompute them. Variables also offer a way to name values, making programs easier to understand. You will become familiar with several more SAL functions and the concept of...
Chapter 8. Conditionals
Download PDF (261.9 KB)
Evaluating data and making decisions is an important part of describing music algorithmically. In this chapter, we will learn how to make decisions using SAL’s if statement and the special function #? (no, we’re not cursing, that’s really the name of the function). Programming constructs that choose an action based on...
Chapter 9. Sets and Tables
Download PDF (329.2 KB)
The analysis of atonal music using mathematical set theory was codified by Allen Forte in his landmark book, The Structure of Atonal Music (1973). His theory of atonal music develops a comprehensive framework for the organization of collections of pitches referred to as pitch class sets. We will...
Chapter 10. Functional Programming
Download PDF (290.0 KB)
Functional programming is a programming style that emphasizes the combination of functions to produce values as opposed to the sequential evaluation of commands and the modification of variables. One advantage of functional programming is that functional programs are often easier to reason about than non-functional...
Chapter 11. Recursion
Download PDF (366.1 KB)
Recursion occurs when something refers to itself. For example, a recursive definition uses the term being defined within the definition. A recursive function is a function that calls itself. A classic example of a recursive process is generating the Fibonacci series. In the Fibonacci series, the first...
Chapter 12. Iteration
Download PDF (370.0 KB)
Iteration in programming means repeated evaluation. In SAL, iteration is accomplished through loops. Loops evaluate a set of expressions over and over again. A loop should terminate after a specified number of repetitions or when a condition is met. SAL has several iterative forms, including a loop command with...
Chapter 13. Algorithmic Composition Using Probabilistic Methods
Download PDF (485.0 KB)
Chapter 5 introduced the random item stream pattern type. Using the random item stream pattern type, we were able to select randomly among sets of values. In music, we often want some choices to be more likely than others, or a choice might depend upon the previous choice. In this chapter, we will explore probability...
Chapter 14. Hierarchical and Recursive Musical Structure
Download PDF (305.7 KB)
Most programs are hierarchical. We have already seen many examples of nested expressions and function calls. Complex programming problems should always be decomposed hierarchically into understandable units that can be implemented as functions. Music is often hierarchical. We can decompose traditional...
Chapter 15. Composing Sonic Microstructure and Macrostructure
Download PDF (457.3 KB)
Throughout the previous chapters, we have assumed that scores and notes form an interface between the world of the composer, who creates the scores and notes, and the world of the synthesizer, which turns note specifications into sounds. Common music practice, MIDI, and even most music synthesis languages promote...
Chapter 16. Extended Examples
Download PDF (381.7 KB)
One of the difficulties of writing about programming of any kind is that realistic examples are simply too big and full of uninteresting detail for ordinary reading. Consequently, we, as authors, try to distill examples down to their essential elements and hope the reader will understand how to apply these elements in larger...
Chapter 17. Epilogue
Download PDF (144.9 KB)
Algorithmic composition is important because it offers new ways of thinking about the organization of sound that we call music. In principle, algorithmic composition cannot create anything that we could not create by traditional methods, but that is like saying that a composer, in principle, could write out the ones and...
Appendix. SAL Commands and Functions
Download PDF (206.1 KB)
Download PDF (192.2 KB)
Download PDF (120.9 KB)
Download PDF (205.0 KB)
Page Count: 262
Publication Year: 2013