Even if you know the key signature of the song you are going to play, you still don’t know what key you are in because one key signature represents two keys: major and relative minor. And even after you analyze the song and know the key you are in, you still won’t be able to improvise because to do that you need to know what scale to play. As we will learn in this lesson, that’s not always a simple choice. So, let’s begin with the traditional view of music, which starts with…
http://www.12tonemusic.com/bass/lessons/Improve%20Your%20Improvisation.pdf