This dissertation explores the nature of musically mediated gameplay, establishing conceptual frameworks for understanding music as constitutive of video games rather than superfluous to it. The project starts with the premise of play as a form of cognition, extending the self into virtual environments with special rules, logics, and boundaries. This theory is extended to encompass music, which generates its own rules and boundaries through special resources for meaning, affect, and expectation. These rules, or musical frameworks, mold the point of encounter between player and game. In positioning music as part of the interactive ecologies of video games, I outline how music is a substrate for experience and meaning-making in virtual environments, and how play, in turn, shapes musical meaning. Chapter 1 discusses the magic circles of games that contextualize meaning and offer possibilities for music to shape those meanings. Chapter 2 develops a concept of affective zones that circumscribe musical spaces of feeling and perception. Chapter 3 considers the formal structures of games through the procedures of music, developing a theory of ludomusical narrativity. Finally, I show in chapter 4 how music can be considered part and parcel of interactive ecologies through player adaptation, or habituated play. Each chapter investigates a different facet of gameplay, considering the inherently musical ways that meaning is created in the seemingly endless possibilities of virtual worlds.