4 Secrets to writing a Melody | Sonicallys Producer packs & Melodies

4 Secrets to writing a Melody

The importance of melody can’t be understated.

Melodies are the part of music that the audience carries with them and humms to themselves as they try and find the track that gave them an earworm. It’s ingrained in us – without melodies, we wouldn’t have many folk stories passed on through song, or national anthems that define cultures. Music simply wouldn’t speak without it.

Understandably it is this element that many musicians struggle with the most.

A bad melody can destroy a song, and even worse, a mediocre melody can get forgotten forever. So where do you begin with such a key aspect of songwriting?

An effective melody is fundamentally simple and easy to remember.

A great melody should be memorable, engaging, and lift your ear above the music. Listen to most memorable songs, and you’ll find that each melody shares four things in common: Patterns. 

Our brains have a fetish for patterns and naturally look for them – they’re soothing and familiar and just damn nice. We also like things that we can predict. This can be seen in small children who always want to see the same movie over and over again because they know what will happen next and they’re learning that pattern. As we grow up, we want to discover new things and be told new stories, of course, but we still have this part of our brain that craves knowing what’s coming next.

With the help of a guided example at the end, let’s first break down how to write a melody for your chord progression.

Pentatonic scale

A great place to begin learning how to write a melody is the pentatonic scale. 

Found in nearly every style of music, the pentatonic scale is a scale constructed from five of the seven notes in a major/minor scale. It summarizes the scale succinctly without taking too much colour and makes whittling down your note options much easier.

The strong points in the pentatonic scale are the tonic, third, and fifth. These make excellent starting points for melodies because of their relationship to the chord they represent. Songs like “Like a Rolling Stone” and “Sweet Child of Mine” primarily use the tonic, third, and fifth in their choruses.

Repeating rhythm

Repetition in melody is essential. A strong repeating rhythm in your melody gives it power and is often what people will recall first when trying to remember a melody that’s escaped their immediate recall. When writing your melody, it’s important to add in one or two rhythmic phrases that reoccur and emphasize the underlying rhythms in the song.

“Smells Like Teen Spirit” is an excellent example of repeating rhythms in melody as every verse including the guitar solo uses the same melodic rhythm. The chorus melody is built entirely of a repeating cadence of two eighth notes and two dotted quarter notes.

Regarding your melody, let’s use a few simple rhythmic cadences to tie into each other. We’ll also use the fifth and minor third of the minor pentatonic scale as anchors for our melody. One easy way to employ repeating rhythm is to use the same rhythmic phrase every time the progression starts over.

Strong direction

While repetition and note choice are important for memory, a strong direction is what gives a melody its purpose so to speak. 

It’s therefore important to understand melodic contour. Melodic contour is the shape of the melody, or the movement between its notes. By shaping your melody a certain way, it leads the listener’s ear and mind and creates direction.

A strong melodic direction pushes the song into new sections, and can also give context to lyrics. A great example of this is Leonard Cohen’s Hallelujah, where the melody notes escalate on the chorus’s major chord and de-escalate on the minor chord, implying a shift in the feeling behind the lyric. The melody descends over three chords, and pushes the fourth chord back to the beginning with a new, higher pitched melodic phrase. On the second time through the chord progression, the slight note variation at the end of the fifth measure grabs the ears and keeps your attention while maintaining the same rhythm as the first measure.


While flair isn’t the most important part of a melody, it can be what separates your melody from similar ones. By adding in passing tones and tensions to a pentatonic scale (and performed with a spot of pazazz!), flair can evolve your melody into something unique.

Whitney Houston was a master of flair. The chorus of I Will Always Love You, has a strong, yet simple melody on paper, yet it became so iconic because of Houston’s incredible personal panache. Her signature vocal runs and slightly delayed delivery are what make that melody so unique and makes her performance stand out so much decades on.

The beauty of adding flair is that it’s distinctly personal and it’s a bit of you, the artist. What you decide to do with your basic melody is entirely up to you.


By starting with a small note range, establishing simple repeating rhythms, implying direction, and adding your own personal touch, your melody can be just as memorable as it is representative of who you are as a producer.

I hope you’ve enjoyed this blog!I use these techniques every time I create a melody pack, check out our best sellers below: