(beginner, intermediate, or advanced) so I can tailor the advice!
One book has risen as a gold standard for answering these questions:
Unlike vertical chord-stacking methods, Olmstead's approach—inspired by Lenny Tristano and Dave McKenna—emphasizes horizontal, melodic movement: Berklee Online Bass Line Development:
: The text teaches students how to play several melodic lines simultaneously, a technique heavily influenced by the contrapuntal mastery of J.S. Bach .