Comparing Melodic Phrases

Recently, I made a video about makossa music, a popular genre in Cameroon. The video is in French, and I have included a personal aspect to it, given my upbringing in the Cameroonian diaspora in Montreal. My parents immigrated from Cameroon in the mid-80s and early 90s, during the peak of the "new wave makossa." They didn't follow the subsequent trends that emerged from the country after the decline of makossa. Growing up in the early 2000s, my sister and I have fond memories of listening to old Dina Bell CDs and "Testament du Makossa" by the amazing bass player, Aladji Toure.

In the video, I delve into the genre's history and also discuss a recurring melodic phrase that I've noticed in many makossa songs. However, in this post, I'd like to focus more on the process behind creating the musical graph that you can see at the end of the video.
First, I recreated the melodies I investigated using the FL Studio platform. Then, I imported all the individual notes of each melody into the Jupyter Notebook platform using the mido library, which allows for the import and reading of MIDI format files. The notes from FL Studio were converted into a 2D array with three columns and 'n' rows, where 'n' represents the number of notes in the sequence. The first column represents the note as a number, the second column indicates the relative start time of the note, and the third column represents the duration of the note.

Notes sequence in FL studio

Imported notes in Jupyter notebook using mido

Final 2D array of notes

I normalized the total time of the sequence and divided the imported phrase into two different segments, which I then superimposed.

Graph linking the whole phrase

The two segments superimposed

The purpose of this exercise was to demonstrate the contrast between successive melodic segments within a melodic phrase. This analysis helped me further explore the musical characteristics or signature of the genre. In this case, the first segment ends on the third note of the scale, while the second segment ends on the first note of the scale, also known as the tonic note. Ending on the tonic note often provides a sense of finality, while ending on the third note creates a feeling of partial closure.
This exercise represents one of my initial attempts to analyze and quantify melodies, aiming to better visualize the mood and feeling of a song, as well as to compare and differentiate between songs and genres.