Computer gaming has grown over the last decade from simple entertainment to a high-level art form. Today, more and more computer games have intricate plots, interesting characters, and sophisticated narratives. It is for this genre of game that I have created a computer program, called Mezzo, that procedurally composes music in the style of the Romantic Era to accompany gameplay. By composing game music procedurally, there are two problems that Mezzo addresses. First, how to keep music from becoming repetitious, as prerecorded, looped music often becomes when a game experience stretches on for long periods of time. Second, how to computationally define and compose music that evokes the narrative states occurring in a game, and to change from one state to another as the game changes. Mezzo's design is based on the idea that repetition is more than just a necessary means of extending musical material over time. Patterns of repetition actually have signifying functions; they express a wealth of musical states by creating different degrees of markedness and unmarkedness.
Mezzo uses three musical features as vehicles for conveying markedness: harmonic tension, formal regularity, and energy. It takes in small melodic motives and harmonic progressions from a user, and then composes, with a genetic algorithm, its own different harmonic progressions that conform stylistically to those given to it. It uses these progressions to compose music during a game in which the input melodic motives are organized and developed in ways that reflect the various states of the game story. This process is based on the idea that certain patterns of melodic repetition combined with harmonic function became conventionalized in the Classical Era as normative forms. Each musical form has a normative structure, and various ways in which this structure can be deformed. `Formal regularity' refers to how close an instance of such a form adheres to its normative structure. Forms that deviate from their normative structures have various levels of irregularity and hence markedness. Mezzo composes forms during gameplay and deforms them in order to convey various levels of markedness that correspond to game action. Furthermore, it applies these deformations stochastically, in order to avoid repetitiousness. The type of forms composed, the deformations applied, and the stochastic constraints on how these deformations are applied are all determined by the state of the game narrative, in accordance with a semiotic model of the expressive qualities of formal irregularity.
Three scores written by Mezzo are included, each written in real time as an accompaniment for a different computer game. Each piece is analyzed in terms of its musical form and its semiotic relations to the game narrative it accompanied.