That, and listen to what bass players are doing. They are, in effect, playing 'tunes' that fit with everything else. Start off with country basslines that are pretty basic to start with, then work your way up from there. After that it's the old practice, practice, practice.