never, and i mean NEVER even consider using theory to write melodies. that is the fastest way to stifle your creative impulses and spirit of experimentation. disregard theory frequently in favor of what you want to hear, or rather what creates the desired musical effect. embrace dissonance and deconstruction.
How do should I go about learning music theory?
Logan Hall
Lincoln Howard
Yes, just play random notes that are completely out of key.
Gr8 plan
James Anderson
if it sounds how you want it to sound do it. never make music for other people, never aspire to please wide audiences. if you have an idea you want to execute and it requires playing out of key, do it. learn the rules in order to break them.
in fact, modes can be used to great effect by switching your melody up, which can add dimension to your harmonies.
Luke Cook
But deciding to play out of key is still "using theory".
I used to hate this shit when I was playing guitar and trying to write. People just say "play what sounds good" which just leads of making random noises for hours to find anything.