How to Compose Music
Listening to music and enjoying the melodic overtones makes you wonder if you also could compose a song, or even just a melody! Some very well known composers do not know how to read sheet music, but are very successful. Most of the time however, a background in reading music and playing an instrument is important.
 Method 1
Enroll in a class and take lessons for a beginners instrument
Learn to actually listen to the musical devices and their sound.
Learn the musical scales. the most powerful scale tool musicians have is the diatonic modes, which are just scales (played on the white keys of a piano) starting on different root notes.
If you have a solid background on music theory, you may want to take easy and well-known pieces and try to switch them around, make your own version of them, change the key, and alternate the chords. Be creative!
Listen to other composers' music to learn techniques through instrument combination or rhythms that get the most out of each emotion.
Understand that after creating the melody, knowledge of harmony and accompaniment is essential. Some helpful things to look up for an accompaniment would be chord progressions and scale knowledge. Remember that music theory was made so each musician wouldn't have to experiment as much when making music.
Know the sounds of each instrument used in your composition. Know which instruments fit into the category of music (e.g. Woodwind Quintet ~ Flute, Oboe, Clarinet, Horn in F, Bassoon; Brass Quintet: 2 trumpets, horn in F, trombone, tuba).
Sit at the piano or pick up a guitar, and have fun. Play by ear. Play things and see if they sound good together. If you want to be able to play the same thing again later, try using a MIDI keyboard. It can be hooked up to a computer, and will print your notes onto sheet music for you.
If you have good ear training try to make a melody in your head, then hum it, and pass it to the guitar or piano. This takes a lot of practice and dedication, but is a great composing tool.
Have a notebook with the musical staff and pencil handy, if you don't use a MIDI keyboard. Write the note combinations that sound good to your ear. With guitar, write down the chords you play. It will help you to be familiar with music so you can name the chords and know the notes that should be played along with the chord.
Create a rough draft. Just like a written composition in English class, music requires multiple revisions before the final piece is ready. Build off your melody. The best thing here is imagination. Don't forget about dynamics, expressions, or articulation.
Utilize contrary motion. Contrary motion is the technique of having one line go down while the others go up. This is an extremely useful technique that will rapidly improve the sound of your piece.
Consider carefully the structure of the piece; if it has sections make them clear, and keep the listener interested. Try to think where the listener will become bored, and be brutal with your judgments.
As well, if you are a student you can go to your music teacher and ask him/her for help. Often you will find they are more willing than you assume.
Start from the foundation (percussion and bass), the rhythm (guitar and/or keys), or the melody (lead guitar/keys). Songs have a definite structure to them. You want to get to the foundation as soon as you can, to create a strong base for your piece.
Create a groovy bass line that complements the melody but doesn't copy it note for note (use counterpoint for example).
Make a drum beat starting with just the kick and snare that complements and supports the bass line. Note: just lay down a basic beat to act as a template. Once you go to the other sections you can return to change things up a little based on the progressive sound of the song. Quite often I find I have a vision of what I'm trying to write and it will morph into something new. You have to be able to make adjustments along the way.
Create a rhythm that complements the core/ foundation of the song. Start with a basic chord progression and build/ change from there. For example a chord progression may use I, III, and V (ex C, E, G) and fall into a: I, III, pattern for example (where I is the root of the chord and III and V are the next two higher notes in the chord).
Play individual notes randomly, then see which ones sound good playing at the same time and use that to build chords from scratch.
While you write the music, write lyrics to the song. You may have lyrics, then tailor a song to match them, or do the lyrics after the rhythmn. The thing to keep in mind to to ensure you tell a good story. Don't be afraid to change lyrics or the music to achieve the best mutual fit.
Make sure you put in all the essential elements: Intro, verse, hook, bridge(optional), and outro/CODA. Let the lyrics help guide you if you have lyrics.
Pick a key idea of the song or a catchy phrase and a cool guitar/ keyboard lick to create a melody. You'll know you're there when you can't get the phrase/ lick out of your head! Quite often a 2-8 word phrase will do it ("shoulder lean", "love shack, baby love shack", etc).
Once you have it to this point add a pad, sound effects, lead parts, etc.
If you song "tastes right" then you've done a good job
Record and listen back to your song as a music critic (would you listen to this on the radio or change the station?). Let others listen to it and make suggestions.
Go back and make any adjustments you need to, but be warned! too many adjustments will make your song sound/ "taste" terrible, DO NOT over correct.
Good luck and have fun!
Keep in mind that some of these steps are - clearly - for songs with guitars. You don't have to follow all of them exactly - in fact, some of them can just be omitted from memory if you don't need them for the kind of music you play. It's not recommended that you do, but follow the general outline.
Pick a scale/mode for a note. Any one works. If you're writing a progressive song, then you have the option of picking more than one, just make sure the two aren't the same thing (check out the notes in each scale and make sure that they are significantly different).
Find out the chord configuration for that scale/mode (the major scale, starting from the first degree, is as follows: major, minor, minor, major, major, minor, diminished).
Come up with a drum beat. Don't overdo and try to "display all your talent," especially if the tempo of the song doesn't call for it.
Write the rhythm and lead guitar riffs. If you're writing an upbeat song, you can use full/barre chords, power chords or both. If you're writing a slow, calm song, only use full/barre chords, or there will be nothing in the song worth listening to. If you're going for the heavy metal song, then you can use the higher note/bass note patterns that At the Gates popularized for flavor or groove (although it's not recommended that you do it a whole lot, or else you'll seem like you're hopping on the mallcore train), power chords can provide the chord progression, and full/barre chords can add something different.
Add the other instruments. Bass can follow the chord progression, but also has the option of doing whatever as long as it stays in the key everyone else is playing in. Keyboards/pianos generally follow the chord progression, although some bands have keyboardists that follow the lead guitar part.
Write the lyrics if you have them. Come up with the chorus, bridge, etc. Progressive songs don't necessarily need the song structure.
Add the extras such as solos, etc.
Come up with a collaboration between all the instruments.
A cooking analogy can help you remember to add some things to make your song better. Start with boiling water and some hearty stock to nail down the main flavor and add your meat (drums and bass). Next add in all the different main ingredients (rhythm). Finally, add the spices and flavorings, just enough to kick it up a notch, but not enough to drown out the main flavor (leads, pads, effects).
Read Aaron Copland's "what to listen for in music," it will greatly influence your methods especially if you are just a beginner.
Play your music for a friend who is good with music, and find out what they think. Fix any spots where the chords clash.
After you learn to really 'hear' the music in your head, you can also play on a table if you are not near a piano. Yes, it sounds weird, but after awhile, you will be able to hear the music, without actually playing it. Many very well-known composers have written entire songs on a napkin while having dinner out, just by hearing the music in their heads. Once you develop this ability, you can amaze your less musically-inclined friends!
If you are using a guitar to compose, learn tab chords function in major and minor keys, you can apply your knowledge to any piece of music.
Try using some music notation programs: Finale, LilyPond, Sibelius, Magic Score, Rosegarden, GuitarPro, etc. are all good programs. They allow you to create professional-looking copies of your music. Some are even free.
Some musicians also try to just play. It is possible to randomly choose notes while practicing. Over time your ears and hands may lean towards emphasizing how you want the music to sound. To become a good musician, all one truly needs is time and dedication to your instrument(s).
Above all, have fun with it.