Full text
GREG (Guided Real-time Euphony Generator) A Music Composition and Generation Tool Owen Roberts [email protected] – artist and educator / Media Arts and Technology Department, Borough of Manhattan Community College, New York, NY Introduction GREG (Guided Real-time Euphony Generator) is a procedural generation music program written in JavaScript for web applications, art games, interactive animations and other multimedia works by the author. GREG begins with a composition by the author and a set of parameters that guide randomized changes to the melody, harmony, rhythm, instrument voices and sound effects over an indefinite series of playback loops. GREG reacts to an accompanying game or animation, reflecting changes in state with changes in key, tempo, and other parameters, to match the tone or feeling of the animation. GREG enables dynamic accompanying music to animation and interactive projects with a streamlined composition process. Over several years of development, GREG has more recently become a standalone project, with the author using it as a music composition and performance tool. Description The code that eventually evolved into GREG was written for the game Infinite Hell [1], created for ProcJam 2020 [2], a game jam featuring works using procedural generation, a common approach in the indie-game world for creating game content like level maps, narrative, character designs, sound and other features. GREG is in part a solution to the problem of creating music for games and works of art with variable duration. GREG evolves a theme indefinitely and can react to changes in game states, using a flexible set of parameters leading to a range of outcomes, from contained performances with little change, to wildly reactive and expansive performances. By starting with an original composition, however, the music can have recognizable themes associated with specific works or stages within a work. The name GREG is a reference to Gregorian chant, an early inspiration for the style and melodic content of the compositions for games and animation. My work often borrows from themes, symbolism, mythology and imagery of religious art and literature. The structure of the early compositions using GREG are loosely inspired by the historical development of Gregorian chant and sacred music. Early forms of chant were monophonic, then at later stages, developed into forms like organum, which introduced a parallel harmony at a fixed fourth or fifth interval, and independent rhythmic and harmonic movement [3][4]. I mimicked this development in early uses of GREG in Infinite Hell and Garden [5], inspired by The Garden of Earthly Delights by Hieronymus Bosch. Garden depicts a modern version of hell on earth through symbols referencing historical conceptions of sin and the sins of the modern 1
world, like ecological disaster and labor exploitation. I began to use GREG as an all-purpose music composition and performance tool for non-interactive works like the animation Seven Spider Myths [6]. The first "album" of GREG-based works, Four Compositions [7], is currently in progress, along with accompanying animations (in this case the animations react to the music). GREG compositions typically start with a simple melody. Small variations are introduced to incrementally transform the theme so that each loop is recognizable from the previous. In practice, this approach favors short, simple melodies, so minor variations are easily recognized, exposing the mechanism of the algorithm to the listener over time. Longer and more complex melodies can make it hard to follow when variations occur. Shorter compositions also afford more variation over time, since variations occur after each loop of the composition. One of the limitations or "liabilities" of GREG is the possibility of "bad" performances, which is subjective but can be characterized by atonality, abrupt changes in tempo, time signature, loudness and other qualities, or the lack of dynamics. Ensuring "good" performance is a balance between the design of the algorithm, and the original composition and parameters designed by the author. The default starting parameters are unlikely to produce dissonance but may lack dynamics. The parameters for each composition are designed to add character and feel matching the project. View the website for the presentation here: https://owen.cool/talks/wac2025/ Acknowledgments GREG uses Tone.js, https://tonejs.github.io/, for audio synthesis, sample playback and sequencing. References 1. Infinite Hell, https://owenribbit.itch.io/infinite-hell 2. ProcJam 2020, https://itch.io/jam/procjam2020 3. Randel, Don Michael, ed. 2003. “Gregorian Chant.” In The Harvard Dictionary of Music, 4th ed. Harvard University Press. https://search.credoreference.com/articles/Qm9va0FydGljbGU6MTY3NjgxMg==?aid=102774. Accessed 3/8/2023. 4. Randel, Don Michael, ed. 2003. “Organum [Lat.].” In The Harvard Dictionary of Music, 4th ed. Harvard University Press. https://search.credoreference.com/articles/Qm9va0FydGljbGU6MTY3ODEzNw==?aid=102774. Accessed 3/8/2023. 5. Garden, https://thenewriver.us/garden-roberts/ 2
6. Seven Spider Myths, https://owen.cool/work/ssm/ 7. Four Compositions, https://four.owen.cool/ Biographies Owen Roberts (he/him) is an artist and educator based in Brooklyn, New York. His work includes animation, art games, websites and other multimedia works. He is an Associate Professor of Media Arts and Technology at the Borough of Manhattan Community College. His website is owen.cool. Licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0). Attribution: owner/author(s). Web Audio Conference WAC-2025, November 19–21, 2025, Paris, France. © 2025 Copyright held by the owner/author(s). 3