honesty, if your getting started with music, im not the one to ask about melody's and such, (im bad at music theory ) i'm much better teaching with drums, percussions and sampling
I put melody's together through what I think will sound good(it takes time), focusing on timing (time signatures) and music theory can be good but if you're just starting focus more on drums, percussions and sampling