In the NGAUC, I'm about to complain about everyone's composition. Which would not be very fair if I didn't explain how to get better at it. Here we go!
In order of how important I think it is:
- Learn an instrument. - Playing the piano is the best thing I've done for my composition. It allows me to experiment so much more rapidly than anything else. Plus, for some reason I'm a lot more creative when I'm not on my computer. (Just think, how many good ideas have you come up with while on your computer? Ok, now: how many good ideas have you come up with in the shower? On walks?)
- Play along with songs that you enjoy.
This is the most important tip here, so read this carefully.
- Find a song you like and play it on speakers.
- Simultaneously, try to play along with it on your favorite instrument. Play until you can pick out the bassline and melody most of the time. You're going to make mistakes - a LOT of mistakes. Play until you get to the point where you're playing the meaning of the song, with feeling, rather than hunting notes or playing mechanically.
Repeat forever.
It's hard to explain exactly why, but after doing this for a few days, you'll find that your fingers just naturally want to go to chords that sound good and just naturally want to find melodies that are more interesting. You don't have to internalize rules like "chord movement by 5ths sounds the strongest" - you'll just know, because you've heard it in practice over and over again.
It's a little like jamming, except you're jamming with musicians who are ridiculously talented.
By the way, this approach is actually fun too - I mean, you're listening to your favorite music and learning how to play it. How could that not be fun?
- The importance of coffee, exercise and alcohol can not be overstated. Whenever I write a song I have this voice telling me that what I'm writing is no good. Doing any one of these 3 things is enough to get him to shut up long enough to be creative. The combination of coffee and exercise is particularly amazing. I have never written a bad song while drinking coffee after a run.
- Try to use your mistakes - Mistakes inspire creativity. Every time you accidentally do something, stop and see if you could somehow work what you just did into the song. e.g. one time I accidentally pasted a melody into the wrong place in a song - but then I realized it sounded kinda neat and tweaked it into something awesome. Or maybe you accidentally sidechain your lead to the kick, but then it sounds kinda neat. The point is to reframe "oops that was a mistake" into "maybe I can use that!"
- Write chiptune. I love writing chiptune because it's a genre that's 90%+ dependent on your compositional strength (mixing is trivial). If you write a lot of if you're just naturally going to get better at writing melodies. There's nothing else to do.
- Give good feedback to other people. I don't think it's a coincidence that some of the best musicians I know (ahem... @Step, @SkyeWint ...) are also the people who can write like 10 paragraphs dissecting something I wrote. You learn a lot from really sitting down and actively paying attention to other music you like. Figure out exactly what is going on in a song. Try to figure out every layer that's playing. Try to figure out exactly why a buildup is working so well. And yeah, you can help out other people immensely by giving them feedback.
Keep this in mind: Writing good melodies is hard. Really hard. Even as musicians we often don't appreciate just how hard it is to come up with a great melody. So don't feel bad if you don't do good on your first attempt, or in your first month, or even in your first year. EVERYONE struggles with this.
I hope that helped. Now let's get excited and write some awesome music!
Troisnyx
The alternative, which I often suggest (and which I also learned as part of music theory several years ago) is to take a set of words, mainly poetic ones, try saying them, and noting where our voice goes high and low. Then treat the tones in speech like tones in a song. Set it to a melody, putting the higher notes on the emphases or something..... make sure it all sounds tonal and not bad to the ears.... and then here you go!
(That can be done with rhythm as well; longer counts for emphases, shorter counts for quicker syllables.)
This method sometimes sticks with me, I'll admit, and I remember doing lots and lots of practice on setting poetic verse to music -- I remember the first example given to me was "My heart leaps up when I behold / A rainbow in the sky"; you could imagine how easy it would be to place emphases.
Just thought I'd throw it out there; it might be a good method for some.