How to Write a Melody — The Basic Tricks

Melody is the most important part of the song. It remains deep in the listener’s memory even after the track is completely forgotten. Writing a melody isn’t as tricky as it seems, but it requires some skill and patience.

The Basics

The word “Melody” comes from ancient Greek language. It is used to define the consequence of sounds that are perceived as a single entity. The person listening to a melody does not hear each note individually, but the pattern as a whole thing.

Melody is as well the most memorized part of the track. Though the bit base is the most important of EDM, the listener can hardly appreciate all the work done with it. On the other hand, even the most beautiful consequence of sounds will not be accepted warmly, if it has no rhythm. So, there has to be a balance between the melody and the bit.

You’ll need following stuff to get started:

  • DAW. Workstation is where all the work will be done and polished. It is also the place to combine the melody with the beat and finish the track.
  • VSTi, MIDI or real musical instruments. These are the source of sound. While it is easier to experiment with real instruments, it is more convenient to work with VSTi. The best option is to have both of them. However, if you can only pick one, choose VSTi, as it is much more efficient in terms of creating electronic music.
  • Basic music knowledge or tutorials. Writing a melody requires at least a little understanding of how the music works. It is possible to get started with pre-recorded loops, but for creating unique music, you’ll need to get musical education (it is rather easy, as there are thousands of tutorials on the internet).

So, let us without hesitating jump right inside the World of composing music and learn some basic definitions and patterns used in melodies. There are seven of them: Contour, difficulty, form, harmony, line, range, rhythm. We’ll take a closer look at each of these aspects and find out how to work with them right below.

Creating a contour

Contour is a representative of macro musical level. It does not work with each note individually, but shows the pattern of the melody on the full track’s length. The contour can also define the instrument that will be used to play the melody (it is hard to play complicated melodies on guitars or trumpets). There are some basic patterns:

  • Ascending. Think of contour as of graph line. Ascending melody can be depicted as a line rising in the whole period. Or, using the musical definitions, every previous note is lower than the following one.
  • Descending. It is the same line, but reversed. The notes start with the highest one in the melody and go down to the lowest.
  • Convex. Imagine the triangle that has no bottom. This is how convex can be depicted. Both start and finish pitches are lower, than the middle one.
  • Concave. Now imagine the same triangle but upside down. The middle pitch is the lowest, while the side ones are getting higher.
  • Horizontal. Just a straight line. All the notes are equally high/low.

While making your own contour, remember, that there are no limits and rules in the music. It is possible to combine different types of contours, cut them or have wild self-created examples.

However, remember that contour has a large influence on how the listener’s mood will change while listening to music. The ascending music creates more excited mood, while descending may create tension.

The best way to start is to draw a line (horizontal contour) and start adding different components to it. When you feel comfortable with one instrument, add the second one with its’ own contour. However, the track should not be to complex, as it will not be that easy-to-listen.

Melodies you should listen to: Orjan Nilsen – “Between the Rays”, Samuel Barber – “Adagio for Strings”.

Adjusting Difficulty Level

Beginners often overestimate own strengths and try composing melodies, that are way above of what they are capable of. Of course the fail happens. This is where moral strike occurs and motivation disappears. To avoid such an unnecessary career finish, follow some simple rules:

  • Don’t be afraid to use loops. Only well-educated musicians can start composing melodies straight away. If you are a beginner, I’d rather recommend using a couple of simple loops and analyzing them in your DAW. After getting the basic understanding of how the music works, try making melodies of two or three notes.
  • Use one instrument only. The best option is piano, as it is rather simple and provides a wide range of possibilities. However, if even the piano seems difficult, try using guitar or horn.
  • Don’t try making too long tracks. Electronic music tends to have really long melodies, but it is not necessary to start with them. Repetitive melodies that last 30-40 seconds can be base for a track that lasts around 3 minutes. That’s OK for the first try.

Now, that you realize what the basic mistakes of the beginners usually are, let us get to more detailed information. Micro level so to say:

  • Speed. The faster the melody is, the harder the mixing will be. Though EDM requires fast tempo, it is possible to create nice tracks without using 130 BPM melodies. Try making rhythm more well-balanced as it need less specific knowledge.
  • Range of notes. It is easy to keep melody balanced, if you only use notes from middle range. Mixing melody with very high or very low notes is harder and takes more time and skill.

Remember: most of popular EDM tracks (check Beatport Top-100) have simple structure. So, there is no need to make melody complicated. Sometimes it even makes track harder to listen to.

Establishing Rhythm

It is important to have the rhythm not inside the bit only, but inside the melody itself as well. Nice rhythm is one of the best and easiest way to make a melody catchy. You should think about this aspect not as about a part of the track, but as about separate independent piece of art. It is not the hard to adjust notes to what comes in your head, so think more about the rhythmic nature.

I started composing only several months ago. Well, my results are satisfying, but not perfect of course. However, I've already had a huge breakthrough. It happened when I started paying more attention to rhythmic component. Melodies started being more stable and classy.I have one own strategy for finding new rhythm. It is simply looking for it in surrounding sounds. The cars, the people, the birds, the subway – everything has its' own unique pattern. Antony, 23, Amateur

Here is an interesting experiment: try writing two simple melodies, one thinking about the notes only and the second – thinking about the rhythm. The chances are pretty high, that the first one will consist of quarters and eighths mainly, while the second one will be more variable. The thing is that new ideas only come in your head, when you are not trying hard to find them.

An interesting tip: Try drawing the rhythm of melody on a piece of paper, try snapping it with the fingers, Experiment a lot.

Music to listen to: Stravinsky – “The Rite of Spring”, Vivaldi – “Four Seasons”.

Choosing a Line

While the contour represents the whole picture of melody, line shows what happens from note to note on micro level. There are two main types of lines:

  • Conjunct. It is easy to understand that conjunct melody follows some pattern during the whole play. It usually has no skips, or very little of them. Conjunction tends to be more peaceful and to have simple rhythm.However, this line might create tension as well, though it's not that rational.

Music to listen to: Grieg – “Morning”, Samuel Barber – “Adagio for Strings”.

  • Disjunct. Disjunct melodies have skips, breaks and unexpected rhythm- and tempo- changes. It would be wrong to say, that they follow no pattern at all, but overall structure is much more complicated and harder to track.It used to be really popular in the 18-20th century. Such melody usually creates a lot of tension, so you are likely to meet it in some classical ballets and operas.

Tip: If you are a beginner, start with conjunct line. It is to create and control this type.

I always loved Prokofiev's works a lot. They inspired me to start learning music and composing my own back in the days. I have always been trying to follow maestro's pattern. My first attempts to do it were really awkward, as creating disjuncted lines is hard overall. However, this was the thing that made my compositions unique and individual. Victor, 58, composer

It is important to mention, that if you are writing a melody for EDM, you should use simple conjunct lines. Most of popular genres, as house, trance and techno, all rely on powerful rhythm more, than on complicated melodies. Music does not have to be way to pretentious to be catchy.

How to write a Harmony

Well, if you are at the very beginning of your way, you have no need to think about this. Harmony comes in handy, only when their more than one note in a line. So, simple basic melodies do not use it at all.

However, if you are going to create more complicated music, here is what you need to know:

  • Harmony is all based around chords. There are literally thousands of possible progressions, but modern music mainly uses two chords: I and V. The keys for them are C Major Chord and G Major Chord. Your first attempts will naturally be based around this couple, even if you experiment with minor keys.
  • Different musical styles use different harmonies. Jazz and blues are the most difficultly built, using 7th and 9th chords. On the contrary, pop, folk and electronic music do not include that much harmony.
  • Ability to write harmonies comes with practice. Creating harmonies depends on skill and practicing more than on talent. The more you try, the easier it becomes for your ears to find the perfect balance. There is a lot of literature devoted to choosing and combining chords as well, so gaining theoretical knowledge won't be a problem as well.
Tip: Try using already existing chord progressions. If you are a beginner, it is more important to understand how the harmony works, not how to create it.

Again, if we are talking about electronic music, harmony is not the number one priority. In fact, some genres are based on being disharmonic, so missing this knowledge a bit won't be a huge problem. However, if you're going to develop your music skills, you'll have to learn what harmony is. It is just not that essential in the beginning.

Building a Form

The form is important when it goes about complicated melodies. Unusual forms are common for electro-house and dubstep, while trance and house tend to have repetitive patterns.

Building a form means deciding where to place the most powerful drop, how to adjust breakdowns, and so on. If you have an ear for music, forms will so to say create themselves in a natural way. This skill will develop with practice, when you start feeling your own music.

It is very easy to get basic understanding of what form should be like, by simply listening to music. General recommendations are:

  • Don't place the most powerful drop in the first half. You should rather save it for later, when the tension is already created.
  • Don't make breakdowns too long. Making crowd wait for drop creates tension. However, when this process lasts too long, tension drops and the track becomes dull and boring.
  • Add components consistently. First drop should be simple (for example, drums, bass and melody), second a bit more complicated (add shakers), final – the most complicated (add whistling and snaps).

Don't be afraid to experiment. You will probably create some interesting tracks by breaking common rules.

What Melodies are used in EDM

A lot of melodies can be composed, but not all of them are suitable for EDM. Let us take a look at the most popular types and structures.


This one sounds scary, right? Well, it is not at all. In fact, arpeggio is one of the simplest melody forms. It is based on notes following one another. In more simple words, arpeggio is made of single notes, which are played one per time. The whole consequence sounds like a simple rhythmic melody. This is exactly what an energetic track needs.

Interesting: The word “Arpeggio” comes from Greek language. It was originally used for defining harp play.

Chord-based melodies

A chord is a set of notes (usually three or four), that contains a harmonic idea. The main feature of chord-based melody is that is perceived as if all the notes are played simultaneously. There is called chord progression. This is the name for playing several chords one by one. Chord progressions are the most impressive parts of chord-based melodies.

Composing chords is rather hard, and, if you are a beginner, effect will not usually be worth the effort. You can try composing some chords for sure, but during the same period of time, you can produce two or three arpeggio based tracks.

Tip: When composing a progression, pay attention to the note before the chord choice. It is the key element for this type.

On the other hand, you shouldn't underappreciate chords. They make tracks more melodic and really help with creating tension and releasing drops. It's just more important to start with simple stuff, and then learn to compose more difficult one.

Interesting: Chords are mostly used in African and Oceanic traditional music. In western culture chords are popular among classical composers and pop-music singers.

Motif-based melodies

Motif can be called melody's little brother. It is a small repetitive consequence of notes, which has a simple rhythm, but has no finished idea. Motif-based melodies are used in house and chill music. The main feature of this type is that it is really easy-to-listen and does not stick. While complicated melodies might make an ear-worm, motifs are usually forgotten soon.

Composing motif-based melodies is a nice way to going from simple arpeggios to more complicated chord progressions. Although motifs usually contain no simultaneously played notes, they progress as well, gaining a bit of new pattern with each repetition.

Honestly, all types of melodies are equally good for creating EDM. It is even possible to remix some rock or jazz songs. However, if you are a beginner, you should not start with complicated remixes and difficult structures. Three types of building a melody named above are the best ones for starting your EDM composer career.

Analyzing Different Melodies

The best way to learn something is to look at how professionals do this. Let us at some of the most memorable melodies in EDM and analyze the way they are constructed and how they sound.

  • Basto – Again and Again

Any person older than 16 years old must have heard this track at least once. The melody is really catchy and makes a perfect earworm for several month. It sounds a little bit complicated, but is rather simple.

The melody is based on medium-sized up and down jumps with one large jump on the every fourth beat in odd-numbered bars. The D# is the brightest key that leads the whole melody.

  • Faithless – Insomnia

Old but gold. The melody is a bit complicated, and it has unique and powerful mood. Insomnia consists of A and B sections. A section slowly goes down, while B is, on the contrary, rising from E to F#.

It is combination of two sections and repetitiveness that makes melody memorable.

  • Crazy Frog – Axel F

Yet another famous melody based on repetitiveness. It is more simple than “Insomnia”. There is simply A section that moves up and down in cyclic manner. The track got spread so widely because of correct combination of rhythmic component and melodic part.

So, as you can see, the melody does not have to be too complicated to become popular. It is correct combination of all components and well-adjusted mixing, that make track sound great.

This statement is especially suitable in electronic music, where the rhythm means just as much (and sometimes even more) than the melody itself. So the best idea for beginner is two pick just two or three notes and play with them a little, creating a contour and making some simple motifs.

Finding Inspiration

It might not look like a problem at first, but after several weeks of composing, you completely run out of ideas. It just feels like all the melodies you make, have already been written by someone else. Or they just sound terrible and you have absolutely no clue about how to improve them. Here are some useful tips for situations like that (save them just in case):

  • Take a look around. Everything surrounding you has its' own unique contour. Looking at photos, nature, city structures or even your kitchen design may trigger a brilliant idea for future track's contour and sounding.
  • Listen to everything. Staying in silence for a while helps to relax, but it won't create any new melodies. If you are out of ideas try listening to some noise. Cars, traffics jams, trains, loud human conversations, birds singing and so on. It looks silly, but every natural sound has a unique pattern that might be considered as a base for new track.
  • Look for rhythm and combine. Again, it might look not effective at the first sight, but simply try to find rhythmic sequences in everyday routine noise. For example, cars move and beep with predictable frequency, as they are controlled by traffic lights. Speed it up in the head a little, add the noise of local building's instruments and a smooth shade of bird singing in the background. This already looks like something!
  • Check the classical music. Being complicated by itself, classical music can be inspiring. Upload a masterpiece in your DAW and play with it. Remove some notes, until only a simple motif remains. Rework it and try listening again.

The surrounding possibilities are indeed endless. Stop considering that melody is a must-do object and concentrate on what is around. The World will help you if you accept its' help.

Summing Things Up

By now you should realize what it is like to compose a melody and have basic understanding of how to do it. Take a quick look at the summary to memorize the most important aspects:

  • Create the rhythm first. It will make the process easier and save even the awkward melody.
  • Use pre-recorded loops. There is nothing wrong with using already existing samples. Just try analyzing them in DAW instead of thoughtless copypasting.
  • Start with simple things and develop your skill smoothly. Go for easy melodies first, and make things complicated only when you are sure about your skill level.
  • Make the process creative. Draw the contour, whistle the melody, write down the notes. Art shouldn't be dull.
  • Keep things organized. Store all the attempts (even the unsuccessful ones) in special folders. It will help with tracking down the progress.
  • Do it simple. There is no need to make super complicated melodies in electronic music. Combine simple stuff with simple rhythms. This will make tracks easy-to-listen.
  • Continue learning. Analyze different tracks, study classical theory of music, learn to play instruments.
  • Don't give up. Continue making attempts and looking for inspiration even when it feels like all the melodies suck. Continuous attempts lead to success.

Now go ahead and try creating some music!

1 Star2 Stars3 Stars4 Stars5 Stars (58 votes, average: 4.34 out of 5)

Top materials

1 Response

  1. Lisbeth
    I think this article is not a stand-alone piece, but a great and very useful addition to your articles on how to write electronic music and remixes. And if that's the case, then I want to say that if you've read the previous guides, then it's just a must-read.

Leave a comment