A counter melody is a second line written to run against your main melody in the same key, usually in a different octave and with a different rhythm, so the two interact instead of doubling each other. Knowing how to write a counter melody is what separates a loop that sounds like a sketch from one that sounds finished. Most EDM producers can write a hook and stop there, then wonder why the drop feels empty.
The fix is less about theory than about decisions. Pick one job for the new line, keep it out of the lead’s register, make it move where the lead is not, and never let it out-volume the hook.
Four rules cover almost every situation:
- Same key. Borrow notes from the progression you already have, not from a new one.
- Different octave or different instrument. A line in the same octave as the lead turns into mud or a unison.
- Opposite or complementary rhythm. Where the lead holds, you move. Where the lead moves, you hold.
- Phrase like a conversation. Answer the last bar of the hook instead of repeating it.
An old Gearspace thread on this exact question still ranks, and the top advice there has not really changed: mute the lead and improvise. Everything below is that idea turned into a repeatable process you can follow in any DAW.
Table of Contents
- What You Need
- Step-by-Step: How to Write a Counter Melody
- 1. Start with the main melody
- 2. Choose what the counter melody will do
- 3. Use the existing chord progression
- 4. Write a contrasting rhythm
- 5. Develop the line across the arrangement
- 6. Edit, voice, and test the result
- Common Mistakes
- Frequently Asked Questions
- What is a countermelody in music?
- Should a counter melody be in the same key as my main melody?
- Can you write a counter melody without knowing music theory?
- What instruments and sounds work best for a counter melody in EDM?
- How do I stop a counter melody from distracting from my main hook?
- Is counterpoint still relevant in modern music production?
- Conclusion
What You Need

Five things, and most of them are already in your session. If you are starting from a blank project, fix the first two before touching anything else.
- A finished main melody. A lead vocal, a synth hook, a pluck line — something you actually like. Counter lines built around a melody you plan to rewrite are wasted work.
- The chord progression and its notes. Either a MIDI chord track or a scale or scale-degree reference for the key. This is what keeps the new line sounding like it belongs.
- An open DAW project. Ableton Live, FL Studio, Logic Pro, whatever you already produce in. Nothing here requires a plugin.
- A second sound source. A MIDI instrument, a sampled instrument, a guitar, or a second vocal take. Two sounds of the same patch in the same octave is the one setup guaranteed not to work.
- A reference track or your own rough arrangement. This tells you where the counter line is meant to live: intro, verse, build, drop.
You do not need to read sheet music, and you do not need a chord-scale dictionary. If you can hum your hook, you have everything required.
Step-by-Step: How to Write a Counter Melody
1. Start with the main melody
Before writing a single new note, map what the lead is already doing. Contour, rhythm, phrase length, rests, and emotional role — five things, about three minutes of work.
Play the hook and mark where it rises, where it falls, where it stops, and how long each phrase lasts. Then listen back to only the parts where the lead is silent. Those gaps are your available space, and the shape of them usually tells you what the counter line wants to do before you have an idea.
The check for this step is simple: if you can describe your hook’s contour in one sentence, you understand it well enough to write against it. If you cannot, keep listening. Producers who skip this step usually end up with a second melody that fights the first one instead of answering it.
2. Choose what the counter melody will do
Give the line exactly one job. This is the decision that separates a working counter melody from a second hook, and it is the one step beginners skip most often.
- Answer a phrase. The hook sings four bars, your line replies in the next four. This is the strongest option for a chorus or drop.
- Fill the rests. You play only where the lead is silent. Safe, useful, and easy to automate later.
- Reinforce the hook. A simplified, lower octave version of the same contour. Subtle depth rather than contrast.
- Add tension. A held note or a rising line under a static lead, pulling toward the next hit.
- Support the bass. A line that locks to the kick pattern instead of the melody, which is common in house and melodic techno.
A VI-Control thread on counter melodies makes the same point about purpose, effect, and placement, and adds a useful vocabulary: a counter-gesture is a single answering note, a counter-motif is a repeating fragment, a counter-line is a continuous thread, and a full counter melody is an independent tune. Most EDM needs a counter-line, and very few need a second hook.
Once the job is chosen, decide the direction of movement. This is what counterpoint theory calls the type of motion, and there are four:
| Motion | What the counter line does | What it sounds like | When to use it |
|---|---|---|---|
| Parallel | Follows the lead’s direction, same intervals | Strong, doubled, slightly mechanical | Very short bursts, stabs, or a held pad behind a one-note hook |
| Similar | Same direction, different interval size | Familiar but looser than parallel | Building on a hook you want to keep recognizable |
| Oblique | Stays still while the lead moves, or the reverse | Stable, calm, easy to sit under anything | Sustained pads and drone-like lines under a busy vocal |
| Contrary | Moves opposite to the lead | Wide, emotional, most noticeable | The default for a chorus or drop where you want lift |
If your lead rises across the last two bars of the hook, write a descending line under it. That single swap of direction is the difference between a background texture and something the listener feels. Forum users describe hearing this contrast in the records they love most, and they notice it long before they can name it.
The check here: play the lead alone, then the two together. If you cannot tell whether the new line is moving the same way or the opposite way, the motion is too vague to register. Make it deliberate.
3. Use the existing chord progression
Pull the new line from the harmony you already have. Four note sources, in order of safety.
- Chord tones. The notes actually played in each chord. Impossible to clash with the progression and the safest place to start.
- Scale tones. Any note in the key signature. Safe, and it gives you more room to move.
- Passing notes. Notes that sit briefly between two chord tones on the way somewhere. One or two in a phrase is plenty.
- Tensions. The 9th, 11th, or 13th of the chord. These are what make a line sound expensive and slightly unresolved.
The interval rules matter more than people expect. Stepwise motion (seconds) and leaps of a 3rd, 4th, 5th, or 6th sit comfortably under almost any lead. Leaps of a 2nd and 7ths are where a counter line turns into a fight, because those intervals land right on top of the lead’s most exposed notes.
Dissonance is not a mistake, it is a seasoning. A 4th or a major 7th against the lead’s note can create the exact tension a build needs, provided the line resolves or cuts before the drop. What kills it is sustained dissonance under a resolved chord. If the tension is not going somewhere, remove it.
To check your work, solo the harmony and the new line together with the lead muted. If the line sounds consonant on its own, it will be fine in the mix. If it sounds sour without the lead, it is doing too much.
4. Write a contrasting rhythm
Rhythm is where beginners get stuck, and it is also the fastest fix. The rule is not “add more notes.” It is “occupy a different part of the beat.”
- Lead is straight eighths? Write syncopated sixteenths or offbeat stabs in the gaps.
- Lead is syncopated? Write a long, sustained line. A held note is contrast when everything else is busy.
- Lead is legato and long? Use repeated short notes, even one pitch on a repeated rhythm.
- Lead has a clear arc? Land your line’s peaks on the lead’s rests, not on its peaks.
Phrase endings deserve their own attention. A counter line that ends on the same beat as the hook tends to sound like a copy. Ending a bar early, or landing a held note into the next downbeat, makes it sound like an answer instead.
The check: sing the two rhythms out loud, separately, then together. If your counter line is audibly in the same place as the lead for more than a bar at a time, the contrast has collapsed.
5. Develop the line across the arrangement
A full counter melody does not need to play everywhere. Writing six bars and pasting them across the whole track is the most common arrangement mistake, and it is why busy loops feel exhausting.
A progression that works in EDM:
- Intro. A fragment only, maybe two notes, filtered and low. It hints that something else exists.
- Verse. Short answering phrases in the gaps. Keep it sparse enough that removing it would leave a noticeably empty space.
- Build. Expand the phrase. Repeat the motif, raise the register a little, or let the rhythm get busier as the filter opens.
- Drop or chorus. The strongest, fullest version, with the register chosen so it is clearly under the lead.
- Breakdown. Strip back to the fragment or drop it entirely so its return later means something.
One arrangement trick saves a lot of writing: swap the melody and the counter line between repeats. If the hook returns in a later section, put the previous counter line on top and let the old hook sit underneath. You get variety without composing a single new note.
6. Edit, voice, and test the result
The raw improvisation is a sketch. Four passes turn it into a part.
- Tighten the repeats. Anywhere you played the same figure more than twice with identical timing, nudge the later ones so the groove stays alive without drifting.
- Fix the register. If the line crosses the lead’s register, move the whole thing up or down an octave. Sitting below the bass is a common beginner error, and no amount of mixing fixes it.
- Clear the conflicts. Any moment where your note and the lead note are seconds or sevenths apart, either move your note, shorten it, or let it rest.
- Set the level, then stop. Bring the counter line up until you can hear it clearly without thinking about it, then pull it back about 3 dB. Solo it once to check the writing, then never solo it again.
Test the result honestly. Play it on phone speakers at low volume, because that is where buried layers disappear. Play it in the car. If the counter line is the first thing you notice on headphones, it is too loud.
In Ableton Live, capture the line by arming a MIDI track with input set to your controller or computer keyboard, record a few passes over the loop, then work in the piano roll and quantize with a light setting rather than a hard grid. In FL Studio, use the piano roll’s quantize menu on the selected notes and leave a small percentage of them unquantized for feel. In Logic Pro, add a MIDI track, set the input to your keyboard or a virtual instrument, and use the Editor’s Drag and Quantize mode to move notes onto stronger divisions while preserving the ones that already feel right.
That is how to write a counter melody without a single music theory lesson: capture freely, clean up deliberately, and level by ear last.
Common Mistakes
Almost every bad counter melody is one of six things. Each has a quick fix.
- Copying the lead. You are doubling the hook in another octave instead of answering it. Fix: reverse the hook in MIDI, play it over itself, and use the result only as a seed. This trick has been recommended on producer forums for years because it works in about thirty seconds.
- Overcrowding the arrangement. The new line plays in every section and the hook starts to feel thin. Fix: choose two sections for it, write a distinct fragment for the drop, and mute it everywhere else for now.
- Wrong register. The line sits under the bass, or in the same octave as the lead. Fix: pick a register a full octave above or below the lead, at least a sixth away, and commit to it.
- Weak harmony. Notes come from a vague scale with no chord relationship. Fix: rebuild the line using only chord tones on strong beats, then add scale tones and tensions in the weaker moments.
- Over-automating. Every note has its own volume, filter, and pitch lane. Fix: flatten the lane, write the automation once for the whole section, and keep one or two movements for the drop.
- Sitting too high in the mix. The counter melody is louder than the hook. Fix: automate it down 3 to 6 dB during the drop, duck it slightly under vocal phrases, and mute it under any lead vocal moment that already carries the emotion.
A seventh, quieter habit is worth naming. If you remove the counter line and the track loses nothing, you either wrote the wrong line or wrote it in the wrong place. That test takes two seconds and catches most weak parts immediately.
Frequently Asked Questions
What is a countermelody in music?
A countermelody is a second melodic line written to run against a main melody at the same time. It usually stays in the same key but sits in a different octave, moves in a different direction, and uses a different rhythm so it complements the lead instead of duplicating it. Its job is to add depth and answer phrases, while always staying quieter and simpler than the main melody.
Should a counter melody be in the same key as my main melody?
Almost always yes. Staying in the same key is what keeps the line sounding like part of the track rather than a second song layered on top, and it means you can borrow notes from the chords you already wrote. The exception is deliberate colour, such as a borrowed note or a moving bass line in a breakdown, where the change of key reads as intentional rather than mistaken.
Can you write a counter melody without knowing music theory?
Yes. Mute your lead, play or sing whatever comes to mind, and record it. Then clean up timing, remove notes that clash, and keep only what answers the hook. Chord knowledge helps you make fewer mistakes, but it is not required to get a result. Plenty of working producers write every counter line they release by ear alone.
What instruments and sounds work best for a counter melody in EDM?
Anything with a clear midrange attack works: plucks, saw or square leads, bells, string or brass patches, distorted guitar, or a second vocal. Plucks suit sparse gaps, pads and strings suit sustained tension, and a detuned saw sits well under an aggressive lead. Avoid putting two sounds in the same octave or the same frequency range as the hook.
How do I stop a counter melody from distracting from my main hook?
Reduce the note density first, since busy lines pull more attention than loud ones. Keep the line quieter than the lead by roughly 3 to 6 dB, place it in a different register, and avoid sustaining dissonant seconds or sevenths against the hook. Mute it during the parts where the vocal or lead carries the emotion, and bring it back at the drop where it has room to breathe.
Is counterpoint still relevant in modern music production?
More than ever, because most production tools make adding layers easy and making them work hard. Contrasting motion, register separation, and answering phrasing are what stop a loop sounding like a stack of parts. You will hear the principles constantly in house, melodic techno, future bass, lo-fi, and cinematic underscore, even when the music has no harmonic sophistication at all.
Conclusion
Learning how to write a counter melody is mostly about making one decision before you touch the piano roll: what job is this line doing, and where does it belong in the arrangement. Everything after that is craft.
Start with the smallest possible task. Mark the rests in your main melody, choose one role from the list above, pull chord tones from the progression you already have, and write one short phrase that moves the opposite way to your hook. Drop it into the build, keep it quieter than the lead, and listen on your phone before you add anything else.
Write six versions before you settle on one, and leave them overnight. The line you wake up and immediately hear as too busy was probably the wrong answer, and you will spot that in five seconds with fresh ears.


