Migos Song Generator Project


Overview

Migos are a rap trio from Atlanta who achieved worldwide fame with the release of their 2017 album Culture. Their music is infectious, catchy, and often repetitive. That got me thinking: how hard would it be to probabilistically generate a new Migos song?

Using Java, a friend and I were able to build something fun, interesting, and hilarious.

(Note: some words have been creatively censored)

How it works

On the left are the lyrics to Migos smash hit Bad and Boujee. The following steps will show how these lyrics were modfied and processed through multiple steps

Generally, Migos songs are made up of a repeated chorus and one verse from each member. We repeated all of these steps separately for each member so that the verses generated for them were as authentic as possible.​​​​​​​

We wanted to “train” our program on every song off of Migos’ album Culture, so we first convert the lyrics of each of the songs into a format that java could easily read. 

Then, using Java and a homemade part-of-speech database, we convert every lyric.

Using our part-of-speech lyrics, we are then able to generate a transition matrix. Each row represents a part of speech and every column represents the next part of speech in the sentence. Each value represents the frequency with which that transition occurs.

For example, the 4th row represents articles, and the 7th row represents nouns. In this section of lyrics, nouns follow articles 9 times, so the value for that entry in the matrix is a 9.

We used one frequency matrix dedicated to each member and one for the chorus.

Then, we divide every row by the sum of the row’s frequencies to get a probability transition matrix. Every entry in this matrix represents the probability that the row’s part of speech will be followed by the column’s part of speech

We then use a random number generator along with our probability matrix to generate a new verse’s worth of parts of speech.

Random words are then selected from the part-of-speech database we had made earlier to fill in the rest of the lyrics.

And voíla! Complete songs of total Migos-themed gibberish!