SaaS & Software·Jul 22, 2026

Fretboard Memorisation with Modular Arithmetic

Article URL: Comments URL: Points: 4 # Comments: 0

Hacker News6 min readSingle source
Fretboard Memorisation with Modular Arithmetic
Image · Hacker News
The gist
5-point summary · 1 min

Article URL: Comments URL: Points: 4 # Comments: 0

  • In particular, “learning the fretboard” is a topic frequently discussed in guitar circles for its importance in improvisation & soloing.
  • The 24-hour clock starts at 0, and goes up to 23 before starting at 0 again.
  • If you assign each note a number starting with $A$ at 0 and ending with $G^\#$ at 11, you get a system of modular arithmetic that corresponds perfectly to the frets on the $A$-string.
  • If you don’t fret the string and pluck it, you get $A$, if you fret the string at the first fret and play it, you get $A^\#$ (or $B^\flat$), et cetera.
  • This system of fretboard memorisation can be generalised to any tuning, any number of strings, and any number of frets.
$24$23$30$12$13$0
In this article

2024-03-01Table of ContentsIntroductionAside: What is Modular Arithmetic?My SystemAdvantages of My SystemDrawbacks of My SystemIntroduction§Memorising (or “learning”) the fretboard refers to when an individual learns which musical notes correspond to what positions on the fretboard of their instrument, a skill that is useful for playing just about any instrument that has frets. In particular, “learning the fretboard” is a topic frequently discussed in guitar circles for its importance in improvisation & soloing. In general, the common approaches to learning the fretboard seem to consist of a combination of just committing it to memory and using some tricks to help with that memorisation; however, I have a number of problems with this approach:It’s too much effort: I am far too lazy to memorise the note that corresponds to up to $24 \times 6 = 144$ positions on a 24-fret guitar (or $24 \times 5 = 120$ positions if you take account of the two $E$ strings being identical except for their pitch).It doesn’t translate to other tunings: it’s all well & good memorising the note that corresponds to each position in standard tuning, but your effort is rendered useless when you switch to a different tuning or a different instrument.Aside: What is Modular Arithmetic?§While I would encourage anyone not already familiar with modular arithmetic to read up on it in detail themselves, I’ll give a brief explanation here so that anyone can understand what I’m talking about (a good overview can be found in the book Discrete Mathematics – An Open Introduction by Oscar Levin here). Modular arithmetic refers to number systems in which the values don’t get higher and higher towards infinity, but rather wrap around and start again from 0 once a certain maximum number called the modulus is reached.Perhaps the most famous example of modular arithmetic is the 24-hour clock. The 24-hour clock starts at 0, and goes up to 23 before starting at 0 again. There is no way to exceed 23 on a 24-hour clock. In this sense, the 24-hour clock is an arithmetic system modulo 24. If an event start at 23:00 and takes 2 hours, we don’t say that it finishes at “25:00”: instead, we say it finishes at 01:00 as $23 + 2 = 25 \equiv 1 \text{ mod } 24$ (25 is congruent to 1 modulo 24).Modular arithmetic can also be thought of as dividing any given number by the modulus and getting the remainder. For example, $30 \text{ mod } 24 \equiv 6 $ because $30 \div 24 = 1 \text{ remainder } 6.$Incidentally, many resources refer to the 12-hour clock as a classic example of a system of modular arithmetic, but I think that this is a poor example as the 12-hour clock starts at 1 and ends at 12, meaning that it’s not quite modulo 12 (which starts at 0 and ends at 11) and also not quite modulo 13 (which start at 0 and ends at 12).My System§I realised when I was teaching myself guitar that the chromatic scale can be thought of as a system of modular arithmetic modulo 12: there are 12 notes ($A$ through $G^\#$, including the sharps/flats). If you assign each note a number starting with $A$ at 0 and ending with $G^\#$ at 11, you get a system of modular arithmetic that corresponds perfectly to the frets on the $A$-string. If you don’t fret the string and pluck it, you get $A$, if you fret the string at the first fret and play it, you get $A^\#$ (or $B^\flat$), et cetera. If you fret the string at the 12th fret, you get $A$ again, and if you fret the string at the 13th fret, you get $A^\#$ again, in accordance with $12 \text{ mod } 12 \equiv 0$ and $13 \text{ mod } 12 \equiv 1.$ Hence, we already have a system for memorising all the notes on the $A$-string: it’s just arithmetic modulo 12. All we need to do is memorise a value for each note in the chromatic scale. Then, to find out what note a certain fret corresponds to, we can just find its value modulo 12, and to find a certain note on the string, we can just look at the frets at multiples of the value of the note.$A$$A^\#$ / $B^\flat$$B$$C$$C^\#$ / $D^\flat$$D$$D^\#$ / $E^\flat$$E$$F$$F^\#$ / $G^\flat$$G$$G^\#$ / $A^\flat$$0$$1$$2$$3$$4$$5$$6$$7$$8$$9$$10$$11$This same system can actually be generalised to all the other strings on the guitar with little adaptation. The only difference is that we need to remember at what number on the scale each string starts and add this to the number of each fret on that string to get the integer value corresponding to the note at that fret. Take for example one of the $E$ strings: this string is tuned to the note $E$ (which has value 7). To find out what note is at the 5th fret of the $E$ string, we use the same approach as with the $A$ string, but add the value that the string starts at to the fret number before getting its value modulo 12: $7 + 5 = 12 \text{ modulo } 12 \equiv 0$, indicating that the note at the 5th fret of the $E$ string is an $A.$$$ v \equiv r + f \text{ modulo } 12 $$where $v$ is the value of the note at that fret, $r$ is the “root value” of the string (i.e., the value of the note to which the string is tuned), and $f$ is the fret number.This might appear quite complicated at first glance due to the formulae, but it’s actually quite simple once you’ve memorised the values. This system of fretboard memorisation can be generalised to any tuning, any number of strings, and any number of frets. Furthermore, I would submit that this is actually also the most correct system, as it gets straight to the reasons why a fret is a certain value: simply because of the number of increments it is from the note that the string is tuned to.Advantages of My System§Requires only the memorisation of 12 key-value pairs, one for each of the musical notes, in contrast to the up to 144 positions that have to be memorised for the more conventional approach.It’s tuning-agnostic: you don’t have to learn anything new to have the fretboard memorised in different tunings, you just need to know the “root value” that each string is tuned to.The number of strings don’t matter: you don’t have to learn anything new to have the fretboard memorised for a 6, 7, 8-string guitar or even a different instrument so long as it has frets at semi-tone intervals.It could be adapted to a microtonal instrument so long as it has frets and that the intervals between the micro-tones is consistent, although this would require memorising an entirely new set of key value pairs.Drawbacks of My System§It requires pre-existing knowledge of modular arithmetic and the ability to quickly do mental calculations modulo 12. While this may seem overly-complicated to someone not familiar with modular arithmetic, modular arithmetic is actually quite simple once you get your head around it, and is worth learning for its applications in mathematics such as in encryption.It still requires that you memorise 12 key-value pairs, one for each of the musical notes, although this is considerably less memorisation that the conventional approach.It is not applicable to fretless instruments, such as fretless guitars, cellos, violins, etc.While I’m sure that I’m not the first person in music history to think of this strategy, I have never seen it mentioned anywhere online or in print, so I’m sharing it here in the hope that it will be useful for others as it was for me.

Integrity note  ·  Xela does not rewrite or paraphrase article content. The excerpt above is the source publication's own words, sanitized for display. For the full piece — including any quotes, charts, or images — read it at Hacker News. Xela's rewritten version is off for this story, so there's no editorial angle attached — you're getting the source's reporting unfiltered. When the rewrite is on, we add a What this means block underneath with the operator/trader takeaway.

What people are saying

Discussion

Hot takes

0/280

Loading takes…

Comments

Discussion · 0

Sign in to comment, like, and save articles.

Sign in

Loading comments…

Keep readingSaaS & Software desk
See all in SaaS
Show HN: ValuePair – a friendship app that cares about values first
·

Show HN: ValuePair – a friendship app that cares about values first

Hey, I would like to show you my project, but it's difficult because it only works with a registration, so I explain the concept to you. The Idea: Everyone who registers has to do an onboarding and answer meaningful questions that help you to find a right match. The matching happens by the system. Once you're done with the onboarding, you enter the pool. When a match is found, you go into a 1on1 14 question-set with that person. All answers are revealed immediately. At the end both decide if they form a connection or not. Only if both agree, the chat opens. Once a connection is formed, they can play through other prepared question sets, so the conversation doesn't get dry. It's also possible to create custom question sets to play through with your connected matches. I just got this idea because I really wanted away from all the typical friendship and dating apps that are just a marketplace of user profiles. I feel like that's the only hook other apps offer, people come back because they are bored and browse through profiles. On tinder it's swiping through pictures and on other apps it's a list of profiles where you can filter with your matching criteria. But all that felt just shallow to me. I think people rarely ask the right questions each other, like really mandatory things that matter to form a any kind of relationship with someone. I've been on multiple different social platforms and it always felt mega shallow. Most people can't even start a good conversation, it's often just stuck at small talk. Maybe it's not even peoples fault, that's why I tried with these question sets to tackle multiple problems. First, that you don't even have to bother with someone if you have entirely different worldviews, which you would normally just find out if you talk long enough with someone. And second, just killing the small talk issue, by giving people a base. So before I started coding this project, I actually did a research if there is anything backed by science to find out, which kind of questions would actually matter to find out, if you can handle someone. There were a lot of studies I've found e.g. "Aron and colleagues (1997)", "Hall (2019)", "Byrne (1971)", "Finkel and colleagues (2012)" and "Hazan and Shaver (1987)". I took their research work and tried to create questions based on them. The project is running on Next, Postgresql, everything dockerized, running on a small Hetzner VPS. I used Claude+Codex to develop everything, but I wouldn't say it's really vibecoded, since I work as a Senior Dev and I used my main tech stack. It's an open beta currently and it's live for like 14 days - I have ~150 users right now. And honestly, I am really overwhelmed by those numbers, because it's the first time that I ever managed to attract this amount of people on a project I've launched. When I started, I launched it as a closed beta, so it was invite only. During that period I got so much good feedback from people, it was incredible. I implemented almost everything my first users told me. Since all the changes, I didn't retrieve any further feedback what people wish would be different. It's just constant good feedback since then. People contact me from alone and just tell me how much they like these questions and the loop. My marketing strategy is mainly Reddit currently, but I started also new methods. I found some super relevant subreddits that had no rules against advertising. When I wrote my posts on reddit, I didn't mention a product name or link. I've only described the idea and if somebody would have interest trying it out. That worked surprisingly well. Another thing I've done was using a social app that allows anonymous posts at your current location, kinda something like "Nextdoor". Posts on this app bring me daily 1-5 new registrations. I wonder what you guys think about it and I am open for any critics! Comments URL: Points: 3 # Comments: 2

Hacker NewsSingle source
Newsletter

Track saas & software every morning.

Daily digest tuned to this beat. The 5 stories most worth your time. Unsubscribe anytime.