ALGORITHMIC STOCHASTIC MUSIC by ALEX COOKE
Total Page:16
File Type:pdf, Size:1020Kb
ALGORITHMIC STOCHASTIC MUSIC by ALEX COOKE Submitted in partial fulfillment of the requirements for the degree of Master of Science Departments of Mathematics, Applied Mathematics, and Statistics CASE WESTERN RESERVE UNIVERSITY May 2017 CASE WESTERN RESERVE UNIVERSITY SCHOOL OF GRADUATE STUDIES We hereby approve the thesis/dissertation of Alex Cooke Candidate for the degree of Master of Science Committee Chair Wojbor Woyczynski Committee Member Wanda Strychalski Committee Member David Gurarie Date of Defense 4/5/2016 *We also certify that written approval has been obtained for any proprietary material contained therein. 4.3 Bibliography 47 List of Figures 1 The C Major scale. .4 2 The a minor scale, relative minor of C Major. .4 3 The triads in C Major: C major, d minor, e minor, F major, G major, a minor, and b diminished. .5 4 The movement between functions. .5 5 Some typical harmonic progressions. .8 6 An example melody. .9 7 A sample realization. 11 8 A modulation via a secondary dominant. 12 9 Modulation to new random walk. 13 10 A stochastic matrix of frequency and intensity, slices of time with corresponding frequencies, and a sample screen and its evolution in time. 16 11 The musical realization. Note that slots two and three are combined into one note; this provides some rhythmic variation. 29 12 The musical realization. 32 13 The pitch set f0; 1; 4; 6; 7g..................... 40 14 Pitch set harmonies. 41 15 The minor heat map and an example of re-weighting it to emphasize a somber mood. 46 47 Algorithmic Stochastic Music Abstract by ALEX COOKE The aim of this project is to develop a system of tonal musical generation that can recognize shifts in tonal center via random processes and reorient itself accordingly. One might liken this to a random walk with the added property of boundary crossings. These weights can be conveniently encoded in the discrete probability mass functions corresponding to each scale degree. The result is a self-generating system of music that follow tonal rules in a convincing way. 1 Introduction 1.1 Musical Motivations and Background Tonal music is by far the most recognizable form of Western music to the majority of musicians and non-musicians alike. From pop music to a large portion of classical repertoire, the majority of music is built upon or deriva- tive of the tonal system, which uses an asymmetric organization of a series of pitches to induce relationships based on movements between three types of triadic harmony (harmonies built on the interval of a third). A key is a collection of pitches around a certain pitch, based on the order- ing set forth by a major or minor scale. A major scale is given by the se- quence of whole steps (two semitones, or adjacent pitches) and half steps (one semitone): WWHWWWH, whereas a minor scale is given by: WH- WWHWW. Note that a minor scale is equivalent to a major scale begin- ning on the sixth scale degree. Such a relationship is called the "relative" key. Figure 1: The C Major scale. Figure 2: The a minor scale, relative minor of C Major. 4 By stacking notes together that are a third apart, one creates "triads"; these harmonies form the basis of motion in music. Triads are named based on their root (the note of the scale upon which two other notes are stacked) and their "quality," the size of the steps between notes. A major third (four semitones) followed by a minor third (three semitones) is a major triad, a minor third followed by a major third is a minor triad, and two minor thirds form a diminished triad. Figure 3: The triads in C Major: C major, d minor, e minor, F major, G major, a minor, and b diminished. The three basic categories of harmonies are tonic, predominant, and dom- inant, so named because of their respective functions. Whereas chords can be augmented by other tones, substituted for one another, or borrowed from other keys, their individual functions can all be placed in one of these three categories, within which certain rules govern their movement within and between the categories. Figure 4: The movement between functions. 5 Tonic is the most the versatile of the functions and is typically thought of as the "home" of a key. Harmonies that belong to the tonic category are either the chord built on the root of the key, or share two of their three notes with the chord built upon the root (called tonic substitutes). Pre- dominant chords serve as an intermediary for tonic and dominant chords; they overwhelmingly move to the dominant. Rarely, they move back to the tonic in a motion called a "plagal cadence." This is both rare and highly specific and does not drastically alter the function of a predominant har- mony. Dominant chords serve to move back to tonic to reinforce it as the base of a key. They accomplish this through two main mechanisms: a de- scending fifth motion, considered the strongest relationship in tonality, and the half-step relationship between the seventh scale degree and the tonic degree, which creates a strong pull toward the tonic, so strong that it is called the "leading tone." 6 In major, triads are categorized as follows: Scale Degree Triad Quality Function I Major Tonic ii minor Predominant iii minor Tonic IV Major Predominant V Major Dominant vi minor Tonic vii° diminished Dominant In minor, triads are categorized as follows: Scale Degree Triad Quality Function i minor Tonic ii° diminished Predominant III Major Tonic iv minor Predominant v minor Dominant VI minor Tonic VII Major Dominant One may stay in a category as long as one pleases, but when one moves be- tween categories, the rules of Figure 4 must generally be followed. There are other rules of good harmonic practice that dictate the motion between individual harmonies (namely, the vertical arrangement of the harmony, known as "voice leading") that are beyond the scope of this thesis; they will often be simplified or overlooked for the sake of illustration. Some typ- ical harmonic progressions are shown next: 7 Figure 5: Some typical harmonic progressions. The first progression is the most basic harmonic motion: I-V-I (T-D-T). The second progression introduces a very typical predominant chord, the IV chord (also known as the subdominant). The third example illustrates the same progression in minor. Very often, the v chord in minor will be replaced with the V chord from the parallel major (the major key sharing the same tonic), as the this replaces the seventh scale degree (the third of the chord) with the major seventh scale degree, which is a half-step from tonic, creating a stronger tendency to resolve. So often is this done that it is not often labeled as a borrowed chord. The final chord illustrates a "de- ceptive" cadence, a movement from V to vi, which subverts the expectation of a V-I movement. Such a movement could be used to modulate (intro- duce a new key) to the relative minor, which would make vi the new i. While harmonies provide the basis of motion within a piece, melodies can be thought of as the "singable" part of music. They are typically single note lines that consist of notes taken from the underlying harmony; whereas harmony is the vertical component, melody is the horizontal. The contour of a melody may also be improved by the use of non-harmonic tones that make for a smoother line or create musical tension and resolution. Such non-harmonic tones may include steps (passing tones), neighbors (a move to a note directly above or below and back), anticipations (a sounding of a 8 note in the next harmony), or other variations. Figure 6: An example melody. In this example, the melody starts on A, both the root of the opening har- mony and the tonic of the key, moves through a lower neighbor G for orna- mentation, jumps to D on the second beat, before a passing tone C moves it smoothly to the harmonic tone B on the third beat, where it outlines the e minor harmony, finally ending on the harmonic tone A of the fourth beat. 9 1.2 From Music to Math The inherent asymmetry of the tonal organization of pitch induces relation- ships that have been repeated in many variations throughout the history of classical music. These tendencies and relationships are so prevalent that they have been essentially ingrained in the Western listener's ear; whereas musical training lends the vocabulary necessary to articulate these phe- nomena, it is hard to argue that most people have a musical instinct that musicians consistently exploit in their work by constantly building, sub- verting, and rewarding aural expectations. As seen, at a higher level, the driving force of these aural expectations is the harmonic functions of chords. Within these functional groups, com- posers make decisions on usage of individual harmonies based on mood, musical direction, form, length, etc. Nonetheless, we can examine the rela- tive frequency of each harmonic motion in repertoire and encode this as a probability: n(Hi ! Hj) P ! P [Hi ! Hj] n(Hi ! Hj) i 10 A set of harmonic motions might then be thought of as a random walk: H1 ! H3 ! H5 ! H2 ! H1 Figure 7: A sample realization. While the idea of a random tonal walk is interesting in its own right, the notion takes on much more interest and ability to create long-form pieces when we open it to modulation. Modulation is a shift in tonal center, a reorientation of our scale using another note as the base.