Think of one of your favorite songs. What jumps out at you first? Unless you’ve got white noise blasting from your speakers, the answer is probably “melody.” Whether it’s Michael Jackson’s “Smooth Criminal,” Guns N’ Roses’ “Sweet Child O’ Mine” or Justin Bieber’s “Baby,” earworms are built upon strong melodies. But writing a tune that sticks is one of the hardest things to do in music—here are a few tips from four guitarists.

Figure out the melody first

Pete Huttlinger live
Pete Huttlinger. Image: Larry Jacobsen

Melody first, chords second, style third—this is an example of a simple formula that you can use to craft good tunes. It certainly did for the late fingerstyle legend, Pete Huttlinger. “Melody is king,” he told Guitar.com. “The melody has to be the loudest part of what you’re playing. And then you put the chords to it, but then decide the style [you’re going to do it in].”

While Huttlinger was referring to arranging old songs, the advice is still relevant to writing new ones: that a great melody anchors the song deep into the grooves of the listener’s mind. “A tune like ‘Superstition,’ that’s one where you have to get the bassline and melody, and then you figure out the chords and horn parts that you can get in there,” he described. “But I start with things that aren’t that difficult. I start by teaching what melody is, and once [I] get the melody down, then [I] can start looking at the chords.”

Write like a vocalist

Tommy Emmanuel. Image: Ivica Drusany/Shutterstock.com

Sometimes, a melody feels like it lacks the ‘X factor.’ But some songwriters believe that changing everything but the melody can reap rewards. Tommy Emmanuel, for instance, shifts chords around to change the dynamics of a piece—and that can deliver what he had been looking for.

He explained, “If the melody is going a certain way, and that’s really working for me, then I need to repeat it. And when I repeat it, I need to play the melody the same, but maybe the chords underneath could be a little different the second time around to keep it interesting. There has to be a definite plan: a verse and a chorus and a verse and a chorus, so it takes the listener somewhere.”

A good tip from Emmanuel is to pretend as though you’re writing for a singer, where the notes you play are meant to be sung out loud. More than stringing together a few catchy melodies, this lets him create a ‘story’ with his music. “I go looking to tell a story with notes against chords—and it’s always got to be sing-able.’

Use a different instrument

Paul Gilbert live
Paul Gilbert. Image: DFP Photographic/Shutterstock.com

It could be your voice, the keys or, in Paul Gilbert’s case, a kazoo. The former Mr Big axeman uses the small instrument to escape from familiar shapes and patterns that his guitar-playing fingers may have stored in their muscle memory.

“It’s a great composing tool,” he said of the kazoo, “because suddenly your guitar habits are taken away. You’re left with pure melodic intention, and you can discover what’s really in your head. Am I playing from the fingers, from finger memory and visual shapes? Or am I actually playing a melody that came from a whole different part of the brain: the musical part.”

While any instrument can work, the kazoo’s a great place to start simply because you only have to hum into it. “If there are ideas, it allows me to bring them out immediately,” Gilbert explained. “There’s no way I’m going to hit the wrong fret or get confused about a fingering. So I record that, then go back with the guitar and figure it out.”

Rewrite an existing song

Jon Herington live
Jon Herington. Image: Geoff Bosco

Digging up old classics and thinking of new ways to play them can force you to arrive—unintentionally or not—at something you can call your own. For instance, you can try swapping the harmonies or changing the key of chord progressions of iconic songs. More musicians do it than you realize.

Jon Herington is one of them. “I’m such a fan of so many great writers,” said the sessionist who has toured with Steely Dan, among other bands. “I’ve been so lucky to have a chance to get to know so much great music over the course of many years that I just can’t resist the impulse to throw my two cents in, too.”

A self-professed lover of the Beatles, Beach Boys, Jimi Hendrix and Led Zeppelin, Herington seeks to create tunes that match up to those of his idols. “When I write, I just dive in and see if I can come up with anything that approaches those impossibly high standards. Then, after a whole lot of work and time in some cases, I sort through the mess and try to find the best that I can do, and I go with that!”