I have no set formula. Sometimes the words come first, followed by a melody that fits with them. Other times, a complete musical piece will come together first that invites its own lyrics to match the "mood" of the piece.
For a long, long time the vast majority of my songs, strictly in terms of the music portion, began with a bass line. I am all about building songs around a bass part that is more melody than anchor. From there, it was usually pretty easy to put a guitar part or two over that complimented the bass line while providing a surrogate anchor.
Over time, I learned to build songs around guitar or key parts as the first ingredient. Sometimes, I have even had a drum part in my head turn out to be the first ingredient to an eventually completed song.
The moral of the story, is that I don't confine myself to any formula or plan. I just let the songs come regardless of where they get their start.
Sent from my Transformer TF101 using Tapatalk 4