I normally try and get some thoughts down about the melody first. That way i know how the beat should drive it. Other times I get an idea for a rhythm and just loop it to give me something to try melodies out to. Then, when I've got that going, I record the melody and fill out the beat for it as...