Natural Language Processing

Neural Networks & A.I In Rap Lyrics

DeepBeat is an algorithm for rap lyrics generation. Lyrics generation was formulated as an information retrieval task where the objective is to find the most relevant next line given the previous lines which are considered as query. The algorithm extracts three types of features of the lyrics—rhyme, structural, and semantic features— and combines them employing the RankSVM algorithm. For the semantic features, DeepBeat developed a deep neural network model, which was the single best predictor for the relevancy of a line. They quantitatively evaluated the algorithm with two measures.

First, they evaluated prediction performance by measuring how well the algorithm predicts the next line of an existing rap song. An 82% accuracy was achieved for separating the true next line from a randomly chosen line. Second, they introduced a rhyme density measure and showed that DeepBeat outperforms the top human rappers by 21% in terms of length and frequency of the rhymes in the produced lyrics.

The validity of the rhyme density measure was assessed by conducting a human experiment which showed that the measure correlates with a rapper’s own notion of technically skilled lyrics. Future work could focus on refining storylines, and ultimately integrating a speech synthesizer that would also give DeepBeat a voice.

INTRODUCTION

Rap lyrics

Writing rap lyrics requires both creativity, to construct a meaningful and an interesting story, and lyrical skills, to produce complex rhyme patterns, which are the cornerstone of a good flow. DeepBeat presents a method for capturing both of these aspects.

Emerging from a hobby of African American youth in the 1970’s, rap music has quickly evolved into a mainstream music genre with several artists frequenting Billboard top rankings. Our objective is to study the problem of computational creation of rap lyrics. Our interest on this problem is motivated by many different perspectives. First, we are interested in the analysis of the formal structure of a rap verse and the development of models that can lead to generating artistic work.

Second, as the interface between humans and machines becomes more intelligent, there is increasing demand for systems that interact with humans with non- mechanical and rather pleasant ways. Last but not least, our work has great commercial potential as it can provide the basis for a tool that would either generate rap lyrics or assist the writer to produce good lyrics.

Rap is distinguished from other music genres by the formal structure present in rap lyrics in order to make the lyrics rhyme well and hence give a better flow to the music. Literature professor Adam Bradley compares rap with popular music and traditional poetry, stating that while popular lyrics lack much of the formal structure of literary verse, rap crafts “intricate structures of sound and rhyme, creating some of the most scrupulously formal poetry composed today”

ANATOMY OF RAP LYRICS

In this section, we first describe a typical structure of rap lyrics, as well as different rhyme types that are often used. This information will be the basis for extracting useful features for the next-line prediction problem, which we discuss in the next section.

Then we introduce a method for automatically detecting rhymes, and we define a measure for rhyme density. We also present experimental results to assess the validity of the rhyme-density measure.

Rhyming Various

Different rhyme types, such as perfect rhyme, alliteration, and consonance, are employed in rap lyrics, but the most common rhyme type nowadays, due to its versatility, is the assonance rhyme. In a perfect rhyme, the words share exactly the same end sound, as in “slang – gang,” whereas in an assonance rhyme only the vowel sounds are shared. For example, words “crazy” and “baby” have different consonant sounds, but the vowel sounds are the same as can be seen from their phonetic representations “ kôeI si ” and “ beI bi.”

An assonance rhyme does not have to cover only the end of the rhyming words but it can span multiple words as in the example below (rhyming part is highlighted). This type of assonance rhyme is called multisyllabic rhyme.

“This is a job — I get paid to sling some raps

What you made last year was less than my income tax”

Multisyllabic rhymes are hallmarks of all the dopest flows, and all the best rappers use them.

Song structure

A typical rap song follows a pattern of alternating verses and choruses. These in turn consist of lines, which break down to individual words and finally to syllables. A line equals one musical bar, which typically consists of four beats, setting limits to how many syllables can be fit into a single line. Verses, which constitute the main body of a song, are often composed of 16 lines. Consecutive lines can be joined through rhyme, which is typically placed at the end of the lines but can appear anywhere within the lines.

The same end rhyme can be maintained for a couple of lines or even throughout an entire verse. In the verses we generate, we always keep the end rhyme fixed for four consecutive lines (see Appendix A for examples). 3.3 Automatic rhyme detection Our aim is to automatically detect multisyllabic assonance rhymes from lyrics given as text. Since English words are not always pronounced as they are written, we first need to obtain a phonetic transcription of the lyrics.

We do this by applying the text-to-phonemes functionality of an open source speech synthesizer eSpeak, 2 assuming a typical American– English pronunciation. From the phonetic transcription, we can detect rhymes by finding matching vowel phoneme sequences, ignoring consonant phonemes and spaces.

Rhyme density measure

In order to quantify the technical quality of lyrics from a rhyming perspective, we introduce a measure for the rhyme density of the lyrics. We compute the phonetic transcription of the lyrics, remove all but vowel phonemes, and proceed as follows:

1. We scan the lyrics word by word.

2. For each word, we find the longest matching vowel sequence that ends with one of the 15 previous words (We start with the last vowels of two words, if they are the same, we proceed to the second to last vowels, third to last, and so on. We proceed, ignoring word boundaries, until the first non-matching vowels have been encountered).

3. We compute the rhyme density by averaging the lengths of the longest matching vowel sequences of all words. Some similar sounding vowel phonemes are merged before matching the vowels.

When finding the longest matching vowel sequence, we do not accept matches where any of the rhyming words are exactly the same, since typically some phrases, for example, in the chorus, are repeated several times and these should not count as rhymes. Also, rhymes whose length is only one vowel phoneme, are ignored to reduce the number of false positives, that is, word pairs that are not intended as rhymes. The rhyme density of an artist is computed as the average rhyme density of his or her (or its) songs.

Data

We compile a list of 104 popular English-speaking rap artists and scraped all their songs available on a popular lyrics website. In total, we have 583 669 lines from 10 980 songs. To make the rhyme densities of different artists comparable, we normalise the lyrics by removing all duplicate lines within a single song, as in some cases the lyrics contain the chorus repeated many times, whereas in other cases they might just have “Chorus 4X,” depending on the user who has provided the lyrics.

Some songs, like intro tracks, of ten contain more regular speech rather than rapping, and hence, we have removed all songs whose title has one of the following words: “intro,” “outro,” “skit,” or “interlude.”

Evaluating human rappers’ rhyming skills

We initially computed the rhyme density for 94 rappers, ranked the artists based on this measure, and published the results online. Some of the results are not too surprising; for instance Rakim, who is ranked second, is known for “his pioneering use of internal rhymes and multisyllabic rhymes”.

On the other hand, a limitation of the results is that some artists, like Eminem, who use a lot of multisyllabic rhymes but construct them often by bending words (pronouncing words unusually to make them rhyme) are not as high on the list as one might expect.

Validating rhyme density metric

After we had published the results one rap artist contacted us asking to compute the rhyme density for the lyrics of his debut album. Before revealing the rhyme densities of the 11 individual songs he sent us, we asked the rapper to rank his own lyrics “starting from the most technical according to where you think you have used and by the artist himself according how technical he perceives them. the most and the longest rhymes.”

Bedroom recording studio

The editor and content writer for HNHH (UK). Real world views, alter-ego theories.

Leave a Reply

Your email address will not be published. Required fields are marked *