I've always been able to play by ear -- and figure out how to play just about any instument.
However, I have your problem -- I cannot create a new melody entirely without spending all day at the keyboard pressing random notes until something sounds good and then developing on that.
A good idea in my opinion is to take a good other song, most likely a non-copyrighted one, and tweak a few notes. There are dozens of versions of the song Crying Soul on Newgrounds... and most of the remixes are better than the original.
I'd suggest listening to several original songs, then tweak the melody, rather than try to make a melody from scratch.
However, I have your problem -- I cannot create a new melody entirely without spending all day at the keyboard pressing random notes until something sounds good and then developing on that.
A good idea in my opinion is to take a good other song, most likely a non-copyrighted one, and tweak a few notes. There are dozens of versions of the song Crying Soul on Newgrounds... and most of the remixes are better than the original.
I'd suggest listening to several original songs, then tweak the melody, rather than try to make a melody from scratch.