I love all the ideas said by J! Good stuff! Thinking back to my first theory class I was so nervous to just write a melody. Which is a silly concept, it's just music, but where do you really start? A simple thing that helped me was to start to look at what the chords are doing, and try starting by my writing a melody using only notes in the chord that you're playing underneath it. So if youby thblvrd - Music Theory Questions and Answers
Not sure if you're still keeping up with this post, but, I did a lot of theory analysis in college, and it definitely helped me personally a lot with writing better music. I find even analyzing music today that's created can be a refreshing way to be inspired. I'm a theory nerd so I always find it fascinating to see what people capitalize on; even with mainstream pop and country music. To resby thblvrd - Music Theory Questions and Answers