50% of the time it's off the top of my head, 40% of the time, I load an mp3 into the project file and do it by ear, and 10% of the time I use a MIDI. For some people, I know they do their best work with MIDIs, but for whatever reason, things turn out the best for me when I just kinda wing it based upon how I remember the source sounding.
In case anyone's been keeping track of my Wily Remix Thing music, I did Electric Sleep and Groove, Swing, March off the top of my head, and I used a MIDI for Current Events which, ironically, was by far the simplest of the 3 Wily sources.
And to whoever says MIDI is a crutch: it is only if you let it be one. I know for a fact that a few prominent remixers here use MIDIs in just about every remix they have done, yet they don't struggle to write interesting, musically complex originals. So what's so crutch-y about it if it saves time and doesn't hold back your musical development?