How do I learn to write music?

Just start writing and play a lot. It doesn't matter if it's good or bad at first, just write something. Choose three random notes (or chords) and play them in a row. It doesn't matter if they don't seem to fit, just do it. Then repeat those notes in that order a few times. There, you basically have a melody or a riff. Lets call it part A. Then maybe change their order a bit and repeat that a few times. Lets call it part B. Then go like AAAABBBBAAAABBBB. Does it work? If yes, good! If no, change something. Take something away. Or add something. Let some note play longer. Make some note shorter. Choose another note for part C. The more you do it, the more you notice what works and what doesn't and most importantly what works for you! Then if you can record, record that and try playing something else on top of that AAAABBBB -thing. Try completely different notes and different rhythms. You'll get the idea eventually. After that it's all about experimenting and trying what ever comes to your mind. It's also good to try and analyze the songs you like from your favourite artists. Like not by comparing your own stuff immediately to them, but like what's happening in the songs. What they repeat and how many times? What they don't repeat? What they do when they transit from one part of a song to another? What similarities there are between the parts? What changes? And so on and so on.. Someone who knows more about theory might feel this is a silly way to do it but this is pretty much how I started when I had all the energy and no idea what I was doing. Trial and error. And my first songs were quite.. well, let's say unique in a weird way. I've never really learnt theory more than reading tabs and the very essentials for communicating with other musicians and I started writing stuff before I could really play anything. Partly 'cause I started to play to write songs, not to play covers. If you are motivated to learn theory then do it, it sure makes things easier. It also helps breaking the rules when you know what the rules are. But you don't really need theory to write. To write you just need to write and to get good at it you need to do it a lot. The most important thing is that it appeals to you. I know many really good players who don't really write that much or well 'cause it's not their thing. They just want to play and thats it. I've been writing music for over fifteen years (+ playing guitar over a decade) and I still think I'm only a mediocre player, even below average. But I do have this illusion that I've learnt a thing or two about writing music during the years. And that I've done by writing probably hundreds of songs.

/r/WeAreTheMusicMakers Thread