For pre existing chords, I usually do this:
1.) play quarter notes on the root note, and go all the way through the song. Reinforces the harmonic motion of the song in my ears/head.
2.) Find a simple rhythm that works. either by A.) asking myself if the song feels like a specific genre where the bass has a well defined rhythm (like jazz, latin, country etc) and cop the feel of said genre. Books like
the Bass Bible can be handy for reference
or B.)With no specific genre, or something broad like pop or rock, I listen to the drums and vocals for a cue to the rhythmic flavor. But I keep it simple, and stick to the root.
3.) once I have a solid rhythmic idea, I examine chords themselves to see if they imply any interesting motion. sometimes you can find a nice step-wise or chromatic run across several chords by swapping the root out with another chord tone on the 'in between' chords. If the song stays on the same chord for a long time, I look for a nice groove within that scale. If the chords change rapidly, i look for opportunities to pedal.
5.) Next I'll listen to the band for any other instrument who is doing something I could follow either rhythmically, tonally, or both. Especially around transitions to new sections.
4.) finally, i listen to the rest of the band for spaces that that would allow me to tastefully wank with my mad skillz. not all spaces need to be filled, however.
As you can see from the order of the list, I'm giving precedence to the song and the ensemble before indulging myself. I know it's not very explicit in terms of note choices/theory, but at an abstract level that's how I think.
If I'm not working with an established progression, It's all ears I guess. I usually come up with what sounds good and figure out what chordal motion, if any, is implied. And these days, I try to create without the bass in hand: I sing somehting and once it feels solid, I reach for the instrument and figure it out. a fellow TBer mentioned not reaching for the bass unless he can easily recall what he had sung the next day, that way you know its catchy.