Hello, I just started playing bass guitar, I'm studying with music theory. But as far as I looked for on the internet, I couldn't understand how the tonic works. Now, do I need to play the root note in this bass line, or the tonic notes written above, or both? Or are these chords? Thanks
Root and Tonic are related but not the same. The Tonic is the note that the Key of the song is written in. So that's the sound that the entire song is built around.
As part of that song we have many different cords. A "C" chord is made up of the the notes "C-E-G". That's a major chord Chords are presumed to be "major chords" unless there is a modifier with them. A "C-minor chord" has a far different sound than a C major chord and it consists of the notes "C-Eb-G" and is notated as "Cm". Cm=C-minor. There are all kinds of "C" chords - C, Cm, C7, Cmaj7, Csus4, Cdim, C9, C11, C9b5, etc. All of these C chords have taken the C major chord and modified it by changing or adding one or more notes. So they are all C chords but all sound different than the C major chord. The one thing they have in common is they all are C chords. The note "C" is the "root" note of all those chords. They are all built around the note C.
Same thing with all the D chords, E chords, F chords, etc. In the Key of "C" you will have an F-chord, and a G-chord that will often be played in the song. In the key of C, the "Tonic" is the C-note. The F is the "root note" of the F chord and the G is the "root note" of the G chord but the Tonic remains the same. So each chord has a root note and the Tonic could be looked at as the "root note/chord of the key". The roots change with the chords. The Tonic only changes when the key is changed.
To make it clearer, or perhaps muddy the waters, these chords are often charted as "I", "IV", "V" (1-4-5). The I is tonic, the IV is the fourth note of that scale (subdominant), and the V is the 5th note (dominant) of that scale. This is handy to know because it tells you the structure of the song and you can move it to any key you want. Most blues songs use that progression of a version of that progression. In the Key of C, the I-IV-V progression is C-F-G. If the singer can't sing the song in that key he or she may ask you to do it in the key of A. In the Key of A, the I-IV-V is A-D-E. So if the singer needed it to be "transposed" to the key of E, what would the chords be (presuming all are major chords)?
(E-A-B)
So if you know how to play the song in the key of C, and you need to play it in A, you can continue to use the same patterns that you play on your bass in C, but move them to the new tonic, starting on A. Learn it in the most common key and move your patterns around on your fretboard as needed to play it in the new key. That I-IV-V structure in C still remains the I-IV-V structure in A. Once you understand that, transposing becomes a fairly simple thing to do. All you're doing is moving the Tonic around to play the same patterns in a different key.