social/reddit
[https://reddit.com/r/Jazz/comments/61wxr5/how_the_hell_do_i_use_the_altered_scale_over/dfhzhrg/]
Here’s a huge oversimplification that I think will get you pretty far without getting too technical:
If you’re playing in a generally major key, or “major” sounding section of a song, then when you play a 7 chord (like G7, or C7) a safe bet is to play around with the chord tones (root, 3, 5, b7) plus other notes from the major scale (2, 4, and 6 otherwise known as 9, 11 and 13).
Any other notes you play against that chord (b9, #5, #4, maj7, b3, etc) will produce sounds of tension, dissonance, darkness, etc. You can think of these as “altered 7” or “altered dominant” sounds. You can sort of pick and choose from all the alterations at will for different effect. They sound appropriate in places that should sound “minor” or dark or exotic.
For example in almost all “ii V i” progressions in a minor key, the V will be an altered dominant. For an example with the G7 specifically, try playing an altered sound over the G7 in the beginning section of Tears by Django Reinhardt.