scieee AI-readable full text Open interactive document viewer

Generative Techniques in "The Third Man," for Fretless Electric Guitar and Electronics

Wilson, Adam James

Abstract

“The Third Man” is the latest in a series of pieces, spanning fifteen years of iteration, for solo fretless guitar and “automatic improvisation” software. Prior works in the series have been performed throughout the United States, many of them at the New York City Electroacoustic Improvisation Summit between 2016 and 2024. The author serves as the principal performer/composer and programmer of this and prior works, which has enabled the progressive refinement of generative techniques to support very personal compositional aesthetics and performance practices. Setting aside the stylistic idiosyncrasies they serve, details of the relatively simple generative techniques used in “The Third Man” are the main focus of this article.

Full text

Generative Techniques in “The Third Man,” for Fretless Electric Guitar and Electronics Adam James Wilson∗ New York City College of Technology, City University of New York [email protected] Abstract “The Third Man” is the latest in a series of pieces, spanning fifteen years of iteration, for solo fretless guitar and “automatic improvisation” software. Prior works in the series have been performed throughout the United States, many of them at the New York City Electroacoustic Improvisation Summit between 2016 and 2024. The author serves as the principal performer/composer and programmer of this and prior works, which has enabled the progressive refinement of generative techniques to support very personal compositional aesthetics and performance practices. Setting aside the stylistic idiosyncrasies they serve, details of the relatively simple generative techniques used in “The Third Man” are the main focus of this article. 1 Overview “The Third Man 1 ” presents, rhythmically and timbrally, as a jazz fusion quartet (drums, bass, harmony and lead guitar). However, aside from being mostly algorithmically generated and orchestrated with virtual instruments, it deviates from the fusion tradition through (1) use of harmonies built on a microtonal scale and (2) subtle deployment of passages that human instrumentalists would find impossible. Drums are pre-generated from a short kernel of composed music, providing a scaffolding for formal structure, while harmonies are generated in real time and develop according to a few rule-based systems and a simple probability model applied to a factor oracle representation of music produced by the improvising guitarist. Pitches and note durations from the live guitar are tracked in real time and quantized to a pitch-duration cross-alphabet before being fed to the factor oracle. The pitch of the live guitar is used to adjust the reference frequency of the scale from which harmonies are derived. 2 Drums Pre-generated drums are the only immutable elements in “The Third Man.” The percussion instruments dictate the overarching formal structure of the piece and contain cues for parameterization of harmony instruments. Software for generating the drums, DrumGen , was written in the Ruby programming language. Although it is most often used for web development, Ruby has an elegant, self-documenting syntax, making it ideal for rapid prototyping in many contexts. The design of the DrumGen is simple. The user starts by defining a “kit,” which maps human-readable and semantically meaningful symbols to MIDI key and controller numbers targeting a particular synthesizer or sampler. Kits are referenced inside the Pattern class, instances of which encapsulate ∗https://adamjameswilson.info 1 The title of the piece refers to a mysterious presence, such as that referenced in The Waste Land (Eliot, 2001), manifesting itself in soundscapes that appear—despite arising from concrete interactions between the improvising guitarist, composer/programmer, and software—to materialize autonomously. Credit for the title goes to Eric Lyon (2017), who originally made the analogy between The Waste Land and a similar piece, “Eighteen Eighteen,” performed at the 2016 New York City Electroacoustic Improvisation Summit (https://eis.nyc/#--program-2016). Proceedings of the 6th Conference on AI Music Creativity (AIMC 2025), Brussels, Belgium, September 10th-12th sequential musical events. Events are expressed as a two-dimensional array of “strikes:” rows hold events, and columns hold information defining a single event, including instrument name, articulation type, duration, amplitude, and pitch controller value. The Riff class combines instances of Pattern “vertically.” Instances of Riff can also be strung together sequentially. Finally, a build_pattern function is used to re-hash patterns into new forms. It allows the user to choose the duration of the output pattern, the source patterns to draw from, the option to remove all rests, the minimum and maximum lengths of random chunks of patterns to concatenate, the probability that selected chunks will appear in reverse order, a list of instruments to thin, a global duration coefficient, and a list of instruments to “buzzsaw,” or divide into rapid attacks that pitch-shift along a curve.         5:4  + fff 1 24 high hat 4 4  1 12 4 4  = 172 9  + f o 1 6  fff snare  1 6 1 10  15:16  1 4 kick  fff ride  o ff 1 4 high hat 5:4   1 5 snare   o  3:2    1 6 tom 2 5:4   fff 1 20 ride  1 20 snare   skins 1 hat and ride 1 3:2 3:2      3:2 15:16  + fff 1 4 high hat 4 4  fff 1 4 kick 4 4  = 172  + ff 1 12   f 0 1 60 tom 2   -1  -2  -3  -4  o 1 6  -5  -6  -7 hat and ride 2  -8  -9  0 1 24 tom 1    skins 2   3:2 75:64    + fff 1 12  1 24    1 6 ride       1 24  0 1 200 tom 2  -3 -6 -9 3:2  3:2  fff 0 1 120 snare  +2  0 1 40   o ff 1 3 high hat   +2  +4  +6  Figure 1: Pre-composed (top measure) and generated percussion excerpts. Ratios indicate fractions of a whole note. Integers indicate pitch deviation. Each category of note marking (dynamics, ratios, pitch deviations, instrument labels, articulations) persists until the next marking of the same type. The first bar in Figure 1 shows music composed with DrumGen . Note the interpenetration of pulse divisions on beats three and four of “skins 1.” These discontinuities give the drums a human quality, while the “buzzsaw” technique shown in the following bar provides an extra-human quality. 3 Bass For each bass articulation following a guitar note onset, the bass chooses between the most consonant intervals that can be formed with the current guitar note using the scale shown in Figure 2: 0.0, 2 701.96, 386.31, 203.91 (cents) or 1/1, 3/2, 5/4, 9/8 (frequency ratios). Ratios with smaller prime factors in both the numerator and denominator are perceived as more consonant (Partch, 1974), hence the “5-limit" observed here. S= [0.0, 104.96, 203.91, 297.51, 386.31, 470.78, 551.32, 628.27, 701.96, 772.63, 840.53, 905.87, 968.83, 1029.58, 1088.27, 1145.04] Figure 2: Scale used as the basis for all generated harmonic content in the “The Third Man” expressed in cents. S is made up of the first sixteen odd harmonics above a reference frequency. It has relatively few consonant intervals, with only 0.0, 203.91, 386.31, and 701.96 (1/1, 9/8, 5/4, 3/2) falling at or below the 5-limit. After the initial choice, and between onsets in the live guitar, the bass can choose from the union of the above four pitch-classes and the two pitch-classes neighboring the last chosen value (e.g., 104.96 and 1145.04 if the last value chosen was 0.0). start get gp bp =gp +x∈RC guitar onset? bp =gp +x∈R(C∪ {S[index(S, bp)±1] mod 16}) yes no Figure 3: Process for choosing bass pitch-classes: gp is the guitar pitch-class; bp is the bass pitchclass; C={0.0,701.96,386.31,203.91} , the set of pitch-classes that form the most consonant intervals with gp ; S is the complete list of available pitch-classes shown in Figure 2. All values are expressed in cents. 4 Harmony guitar Virtual guitar accompaniment is produced by a Max external called realguitar , which initially uses a variant of the Fischer-Yates shuffle to assign pitch-classes from S to strings. At 4:10, a much more interesting algorithm, leveraging a factor oracle finite state automaton, takes control of the accompaniment. 012345 2 4 4 4 2 2 4 Figure 4: Factor oracle for the string “24424." 4.1 What is a factor oracle? A factor oracle is a directed acyclic word graph capable of producing all substrings of a word. Following all sequences of transitions (solid arrows) starting from state 0 in Figure 4 yields all 3 substrings of the word “24424.” Dotted arrows represent suffix links, which are artifacts of the factor oracle construction algorithm. Each suffix link points to the end of a substring that shares the longest suffix with the substring ending its origin state. Each substring s1 ending with a skip-state transition points to the end of a substring s2sharing a common suffix with s1. One side effect of the factor oracle construction algorithm is the occasional discovery of substrings that don’t exist in the input word. Despite this shortcoming, factor oracles are more memory efficient than suffix trees, and, unlike suffix trees, factor oracles can be built in real time. This makes the factor oracle particularly useful for handling musical data obtained from a live improvisation, a situation in which the complete string cannot be known in advance. An exhaustive introduction to factor oracles is given in Allauzen et al. (1999). Figure 5: Max patch showing the interaction between quantize,xalpha, and fo externals. 4.2 How is factor oracle used in “The Third Man?” “The Third Man” uses a modified version of the factorOracle2 external ( fo ), written for the Max and Pure Data programming environments (Wilson, 2016). There are two parallel processes in fo : construction of the automaton and traversal of the automaton to generate music. Prior to construction, musical parameters of interest are combined into unique tokens—in this case, a cross-alphabet of sixteen pitch-classes S and a range of twenty durations. For each incoming guitar note, the duration and fundamental frequency are detected, and each value is quantized to the closest member in its associated alphabet and then encoded with a unique integer m , where 0<=m < 320. Quantization and encoding/decoding of cross-alphabet values are handled by Max externals quantize and xalpha , respectively. Factor oracle traversal, actuated with a “bang” in the left inlet of fo , follows a simple scheme: a value P is assigned by the user, which governs the probability of taking a forward link as opposed to a suffix link. Using suffix links turns the factor oracle into a cyclic word graph, so that it can be used continuously for generation. Following more suffix links means more deviation from “idiomatic” sequences. As the live guitarist listens to the output of fo , a feedback loop emerges: less idiomatic recombinations of interest can be reinforced in the model through repetition by the guitarist, while uninteresting recombinations can simply be ignored. 2https://github.com/ajwnycct/factorOracle-Max https://github.com/ajwnycct/factorOracle-Pd 4 References Allauzen, C., Crochemore, M., and Raffinot, M. (1999). Factor oracle: A new structure for pattern matching. Lecture Notes in Computer Science, 1725:295–310. Eliot, T.S. (2001). The Waste Land, page 17. W.W. Norton & Company, Inc., New York, New York. Ed. Michael North. Lyon, E. (2016/2017). The first NYC Electroacoustic Improvisation Summit, New York City College of Technology. Array, the Journal of the International Computer Music Association, page 55. Partch, H. (1974). Genesis of a Music, page 86. Da Capo Press, New York, New York. Wilson, A. (2016). factorOracle: an extensible Max external for investigating applications of the factor oracle automaton in real-time music improvisation. In Proceedings of the 4th International Workshop on Musical Metacreation, Paris, France. 5