In lieu of an abstract, here is a brief excerpt of the content:

198 Chapter 15 Composing Sonic Microstructure and Macrostructure 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 this idea. In this chapter, however, we will dig below the note level to explore the possibilities of pattern generation and algorithmic composition at microscopic levels of sonic detail. So far, we have relied upon built-in functions, especially note, in Nyquist to perform scores. We will have to learn more about Nyquist’s synthesis capabilities in order to explore further. The next section contains a much-abbreviated introduction to Nyquist as a synthesis language. After learning about sound synthesis in Nyquist, Section 15.2 presents a general function for sound synthesis using pattern generators for sound control , and Section 15.3 explains how to encapsulate synthesis algorithms so they can be invoked from a Nyquist score. One of the most important elements of music is the evolution of various qualities over time. These include dynamics, tempo, pitch register, harmonic tension, and many others. One of the attractions of algorithmic composition is that one can specify high-level trends and trajectories, leaving the details to be worked out automatically. When the first results are not satisfying, one can modify the high-level specification rather than tediously rewriting many notes. Section 15.4 shows how you can use high-level controls to guide pattern generators. Algorithmic composition is particularly interesting for work at the level in between traditional notes and traditional musical sound. It would be humanly impossible to perform sounds with elaborate “micro-structure,” but computers allow us to approach the synthesis of tones with the same mindset we bring to composition. The GENDY programs by Xenakis and colleagues (1992) are influential and pioneering work. Sergio Luque surveys this work and expands the concept in his thesis (2006). Microsound by Curtis Roads (2004) explores “granular” sound, which refers to sounds and textures created by combining many short sound events, usually lasting from 10 to 100 ms. 15.1 Sound Synthesis in Nyquist 199 15.1 Sound Synthesis in Nyquist We have written programs that deal with numbers, lists, and symbols . Nyquist can also compute sounds. A sound in Nyquist is basically a function of time that returns a floating point number. Each sound has a starting time, ending time (they are not infinite), a sample rate, and some other properties. Nyquist has many functions that return or manipulate sounds. For example pluck(g4, 3.0) returns a plucked-string sound with pitch G4 and a duration of 3 seconds. play is a special command that evaluates an expression and plays the resulting sound. Try evaluating play pluck(g4, 3.0). Typically, sounds are constructed by combining many of the built-in functions in Nyquist. In Example 15.1.1, we multiply our plucked string sound by a low-frequency sinusoid to make a fluttering effect. The “*” operator multiplies two sounds together. The lfo function takes two inputs—a frequency and a duration. The play command prints some information as it works. The first line says that the sound is being saved to the file nyquist-temp.wav. If you want to keep a sound produced by Nyquist, a simple way is to just copy or rename this file so that Nyquist will not overwrite it with a new sound. The next line displays sample counts as the sound is computed and played. These numbers print about once for every second of sound. When the computation completes, play prints the total number of samples computed (132300) and some information about normalization. Normalization is the process of adjusting the overall sound level to avoid distortion. The last thing printed is the return value of play, which is the peak amplitude of the sound. If things are working normally, this should be about 0.9. Otherwise, you might want to consult the Nyquist manual about normalization options. Example 15.1.1: A tone with rapid amplitude modulation SAL> play pluck(g4, 3.0) * lfo(6, 3.0) Saving sound file to ./nyquist-temp.wav 44880 88740 total samples: 132300 AutoNorm: peak was 0.899999, peak after normalization was 0.9, new normalization factor is 1 0.899999 Figure 15.1.1 illustrates the output of pluck, the output of lfo, and the output of mult (the...

Share