MCMChaos: Improvising Rap Music with MCMC Methods and Chaos Theory
Robert G. Kimelman
TL;DR
The paper addresses the challenge of generating expressive rap lyrics with real-time, mathematically grounded control. It introduces MCMChaos, which combines three approaches—text-derived MCFlow data, a Collapsed Gibbs Sampler with a target distribution $f(x,y,z)$, and a Lorenz attractor-based chaos model—to modulate text-to-speech output, all via an interactive GUI. Key contributions include three variants with distinct dynamics, an open-source implementation, demonstration of sampling convergence (e.g., $10{,}000$ samples) and chaotic behavior (butterfly attractor), and educational framing for STEAM. This framework enables perceptual studies and educational experimentation in math-powered music generation, while also highlighting practical limitations in voice synthesis and user interaction.
Abstract
A novel freestyle rap software, MCMChaos 0.0.1, based on rap music transcriptions created in previous research is presented. The software has three different versions, each making use of different mathematical simulation methods: collapsed gibbs sampler and lorenz attractor simulation. As far as we know, these simulation methods have never been used in rap music generation before. The software implements Python Text-to-Speech processing (pyttxs) to convert text wrangled from the MCFlow corpus into English speech. In each version, values simulated from each respective mathematical model alter the rate of speech, volume, and (in the multiple voice case) the voice of the text-to-speech engine on a line-by-line basis. The user of the software is presented with a real-time graphical user interface (GUI) which instantaneously changes the initial values read into the mathematical simulation methods. Future research might attempt to allow for more user control and autonomy.
