I am attempting to finally learn music theory after years of owning a bass and screwing around. So, with that, I have been playing certain things and trying to figure out the chord or scale.

Take for instance this very simple line:

Even though it does not start at the root, I am assuming this is a D Major scale (correct?). Because of this, having the major triad for D, I can only assume further that the first 10 notes until G are a D Major Chord.

However, I am unsure about the last set of G notes. Because there is nothing after it, can I assume that it is just a standard G maj chord? The reason I ask this is because doing a search with all 4 notes shows that this could also be an E minor 9 chord. Would it be simpler (or easier to remember) to say D maj and then G maj rather than an all encompassing E min9?

When noting chords on actual sheet music, could you also just note the scale since the D Major scale also contains all of these notes. I tried to search, but I couldn't find anything for notating a scale.

Notice that all four keys contain all four notes. However, this excerpt of music in isolation is most likely to sound like it is in E Minor, simply because this is the starting note. Without seeing the context of this short excerpt it is impossible to say if this indeed in E Minor, though. (Also, it is worth noting that we are talking about E Natural Minor here; popular music commonly uses natural minor scales, which have exactly the same pitches as their relative minor. However, "classical" music would most likely use the Harmonic and/or Melodic Minor scales, which adjust these natural minor notes, most significantly by raising the seventh by a semitone, to a D# in this case. And, notice we are only taking about diatonic scales here, each of these can be interpreted as several modes, and then there are a great number of more exotic scales which would contain these four pitches, which aren't diatonic.)

So, now to the chords that this bass line would suggest. Again, it is impossible to say with certainty. If no other parts play with this bass line, then yes each bass note would most likely be interpreted as the root note of chords within whichever key the music seems to be in. As I say above, this would appear to be E Minor, which means the chords implied by the bass line could be: Em, D, F#dim, G. Ah, but wait a minute! F#dim doesn't seem like the most obvious chord to hear implicitly above these F#s. Perhaps one could "hear" the first inversion of the preceding D chord (a D Major chord with F#, the third, in the bass). Or maybe this music isn't in E Natural Minor (Aeolian) at all, but is in E Dorian (which just so happens has D Major notes). The E Dorian chord with F# as its root is F#m.

The point to realise here, is that there are more and less likely chords and keys implied by this short excerpt of bass line, but you can only say for certain which key (or even mode) you are "in" by knowing which other pitches are being used. And, you can only know for certain which chords (or harmony, if you want to call it that), would appear above this bass line, by deciding (if you are writing this music) or working out (if this music already exists) which notes are sounding in other parts at the same time as each of these bass notes.

Finally, it is worth pointing out that the bass notes do not have to be either root notes or even triadic notes. An Em chord could sound above all of the notes in this bass line: with the F# and D being non-chord-tones (you imply this interpretation by mentioning Emin9).

EDIT: here are a few simple examples of chords which can harmonise this short bass line (i.e. which chords would seem to naturally fit with these bass notes):

As I mentioned above, there is no reason why the harmony above these bass notes cannot have pitches which are not suggested by the bass line itself; in other words, notes which are chromatic within whichever key seems to be suggested. However, having tried to find some examples of suitable chromatic chords above this bass line, all attempts seemed pretty contrived; this is unsurprising, as these bass notes strongly outline a portion of a diatonic scale or mode. Trying to harmonise them in a way which doesn't fit with the implied diatonic scales associated with these notes is therefore bound to sound contrived and "difficult".

I did indeed throw this together so there is nothing before or after and what you wrote makes a lot of sense and is probably why I have been constantly second guessing myself while trying to learn/teach myself. I realize now that it is basically relative to its surroundings which should help a lot. Thanks a lot!
– TyCobbDec 7 '14 at 22:09

1

Throwing a short bit of music together can yield great results though! Sometimes the simplest little ideas allow you the most freedom to experiment. I've just spent the last few minutes playing various chords above your bass lines, and of course the possibilities are vast. Will add some extra to my post to illustrate this...
– Bob BroadleyDec 7 '14 at 22:12