How a Computer Science Engineer sees guitar music — The basics

Giorgio Malaguti, Ph.D.
5 min readDec 31, 2023

I’ve been playing guitar for many years, more or less 25 now. I’ve been playing for hours, actual working shifts, as I usually say.
I must admit much of that time was wasted at some extent, it was fun and something has come out good, but I was an amateur, I didn’t know what I was doing. I was just memorizing things over the fretboard and trying to be as soulful as I could be (or as fast).
It was only 10 years ago, (and then once again lately) that I approached music theory thoroughly. And it was a blast for me for how aesthetic it was, how harmonic

Easy to say that music is all about maths from the perspective of the actual sound waves, octaves, harmonic intervals and so on, but it’s also about conveying feelings and ambience and messages (art in the end). The point is that the masterly blend of maths and soul is only a fleeting, yet so exciting, sensation in the hands and ears of any musician, no exception.

I am leaving the Computer Science engineering part untold, as it is boring, but it gave me a way to learn and imagine things (that way, you know?) and I grew sort of aware of how my mind works in terms of learning.

My claim to it here is to show how I tried to find my way through the music theory, to get into the musical notes and fell sort of comfortable in there. There are a lots of 101s for start playing guitar and that’s not my intent.

My objective is to show another way to show how music basics can be seen and learnt, especially if you are…that way…:)

When it comes to put these notes on the guitar you’ll face the features of its fretboard:

  1. bidimensional (compared to the piano keyboard);
  2. mod 5 frets disposition (in terms of intervals, or semitonse, a IV interval), with a unpleasant no-linearity when it comes to the B string (mod 4 frets, a major III);
  3. the phisical distribution of the frets is not uniform, due to physics.

So while you’ll struggle getting every finger in the right place, you’ll still have to think what note, or chord, are you playing. In real-time and pseudo-concurrently (human ain’t coming out multicore yet, are they?).

You MUST know the notes on the fretboard, period. But I don’t yet.

I still don’t know all the notes in the fretboard, I mean I know most of them and all the notes on the E strings and on the A strings. But what I do know well are the interval between the notes, in these three principles:

  • the fifth of every note (e.g., C → G, F# → C#, E → B, etc.);
  • the third of every note (e.g., C → E, F# → A#, E → G#, etc.);
  • the intervals in the major scale of the second, fourth, sixth and major seventh are +/- 1 or 2 semitones far from the above two principles

Some examples of the third principle:

  • for the second: C → C + 2 → D;
  • for the fourth: C → G -2 → F;
  • for the seventh C → C -1 → B.

I have a relative knowledge of the notes in my mind, as the hints above work for every root note you choose and these implement on the fretboard, too.

You’ll see that the relations between the notes reflect on the fretboard directly because of the second “feature of the fretboard” that I’ve listed above. I put here some of the basic ones:

  • the fifth of a note is one string down and two frets ahead, and also on string up
  • the eighth of a note is two strings down and two frets ahead and also one string up and 5 frets ahead (yeah, you use this to tune in the guitar)
  • the fourth of a note is one string down and also one string up and 2 frets behind;
  • all of these work adding a +1 fret if you pass the “B-string line” going downward and below and a -1 fret going upward

I encourage you to find your own intervals cheatseet, it shouldn’t be anything written and, more importantly, only something you use daily in your playing.

Some examples of the intervals on the fretboard

You can see inductively that these hold between each other. So for instance, if you set a root note, C, and its fifth, G, you’ll notice that C is the fourth of G and, more importantly, the “rules” listed above still apply (in terms of placement on the fretboard). This is a mere experiment and we don’t like empiricism here…the analytical reason why this happens is (giggles) the modulus operand.

Music is modular.

Any two notes are congruent modulo 12 (i.e., the semitones between one note to its octave, https://en.wikipedia.org/wiki/Modular_arithmetic), that’s how chords either can be put together or not (not entirely true, but the reason is not basic, hence OT).

On the fretboard, to find the notes on it, you’ll notice the 12 interval easily. This explains the horizontal dimension of the fretboard. Back and forth. Unless you get out of the very keyboard.

We may say that the vertical dimension of the fretboard instead is (sparkling wiggles): the intervals any two notes that sit on different strings above the “B string” line are congruent modulo 5, modulo 4 between any string above the B string and itself and again modulo 5 between the B and low E strings. This applies only forth, as the going back it’s modulo 12–5 or 12-4 depending on the string as above.

In the next chapter, I’ll talk about the Major scale with the “Computer Science Engineer” approach.

--

--