I obviously need to explain the sequence I posted.
To some extent and in some situations, the notes that musicians play define what the chord sequence is, rather than the other way around. This seems like a cool example.
The extended chord in the sequence defined by the notes you are playing is just built up diatonically in thirds from the D major, and it fits rather nicely. It's definitely not the case that every note in every bass line becomes a chord tone, but with this one it works well, I think.
Here's your sequence played very simply on piano and bass, four times, with the notes you specify for the bassline in the third bar each time round. The first and third time through the sequence, the piano just plays D major over this bar. The second and fourth time, the piano plays the extended chord, DM9#11. Listen carefully and you should see how that fits. After all, that's why you chose the notes.![]()
Awesome! Thanks for putting in the time to create a sample and explain the theory. Very helpful! And it seems you've got it right, only I question the minor in the D given that there are two guitars playing D Major chord while I'm doing the riff (unless I didn't understand you, which is my bad). But anyhow, when I listen to a recording of it, I have a better understanding why it sounds good to me. Because it just sounds good!
Edit: never mind, I see the notes for this now. Thanks!