How on earth do you compose music?

Looking around I’ve gathered I’m not the only one who’s not a music expert. I’ve dabbled a bit in playing musical instruments in my time. When it comes to composing game music however I’m totally at a loss.

Does anyone know any good 101 beginners guides to making simple melodies or fun little tunes? I just want to be able to make a basic happy tune and sad tune with very little complexity or depth.

If that’s not something that can really be found then perhaps some advice from participants in the past?

Tags: composing, ld32, music