The premise of Piranha Plants as Charade is to transform a melody into a full-fledged song in the style of “Piranha Plants on Parade” from the video game Super Mario Bros. Wonder. We developed a four-step music generation algorithm to transform the input melody.
To contrast, here's what the “Piranha Plants on Parade” melody sounds like with random chords:
How it Works
An overview of the architecture of Piranha Plants as Charade.
The core of Piranha Plants as Charade follows a four-step process:
Extract the melody. In order to analyze our input in musical terms, we need to represent it with a suitable abstraction. This involves extracting, among other information, the pitch, start time, and duration of each note in the input — for which we use various librosa tools.
Generate the chord progression. To generate a pleasing musical accompaniment, we use a framework based around chord progressions, a common technique employed by composers and songwriters. We model the problem using a hidden Markov model, and we solve for the chord progression with Viterbi's algorithm.
Generate the musical arrangement. Our melodic and harmonic contexts are sufficient to create a convincing accompaniment. We handle each part (e.g. piano, voice, etc.) independently, and with the aforementioned contexts, we model a virtual musician for each part using the appropriate musical conventions. Our musician models follow rule-based approaches to generate their respective contributions to the output, represented by musical structures.
Export the arrangment as a digital signal. With our output formalized in musical terms, the last step is to convert it into a digital signal. First, we convert the non-vocal parts into a digital signal by interfacing with pre-existing programs. For the vocal parts, we splice together modified voice samples from Animal Crossing: New Horizons. We combine the results from our two processes to get our final output.