
Music Theory: An Education from First Principles - akalin
http://www.lightnote.co/
======
anton_tarasenko
A similar project:
[https://www.teoria.com/en/tutorials/](https://www.teoria.com/en/tutorials/)

Focused more on practitioners. Includes exercises with MIDI/USB piano
keyboards in the browser:
[https://www.teoria.com/en/exercises/](https://www.teoria.com/en/exercises/)

These resources also can be useful:

1\. [https://www.musictheory.net/lessons](https://www.musictheory.net/lessons)
(exercises included)

2\. [http://www.earbeater.com/online-ear-
training](http://www.earbeater.com/online-ear-training) (ear training
exercises)

3\.
[https://www.iwasdoingallright.com/tools/ear_training/online/](https://www.iwasdoingallright.com/tools/ear_training/online/)
(ear training)

4\. [https://trainer.thetamusic.com/](https://trainer.thetamusic.com/)

5\. [http://music.stackexchange.com/](http://music.stackexchange.com/)

N. Wikipedia is a good reference. E.g.,
[https://en.wikipedia.org/wiki/Glossary_of_musical_terminolog...](https://en.wikipedia.org/wiki/Glossary_of_musical_terminology)

If someone wants to try music, start with playing an instrument and then pick
the theory. If in physics theory says how the world works, music theory is
mostly about labeling things that sound good vs noise. And it's hard to get
the words without playing first.

~~~
fenomas
Great list. I would add hooktheory:

6\. [https://www.hooktheory.com/hookpad](https://www.hooktheory.com/hookpad)
(interactive composition tool)

7\.
[https://www.hooktheory.com/theorytab](https://www.hooktheory.com/theorytab)
(searchable database of chord progressions in popular songs, playable in
abovementioned tool)

They also sell an interactive music theory primer, which I've not read, but
everything else there is free (and amazing).

------
zodiac
I like this! I've always wanted to build a music theory textbook (like Laitz)
where the examples could be played.

> When a song says that it is in the key of C Major, or D Minor, or A
> Harmonic, etc. this is simply telling you which of the 12 notes are used in
> this song.

Small nitpick, this is not accurate, C Major and A (natural) Minor have the
same notes but different starting notes so they are different scales, and
pieces written in them sound different from each other. It's one of those
things that's slightly hard to explain if you don't sing/compose/play an
instrument/read music but very obvious if you do.

~~~
coldtea
> _Small nitpick, this is not accurate, C Major and A (natural) Minor have the
> same notes but different starting notes so they are different scales, and
> pieces written in them sound different from each other._

Only because they follow usual (classically derived) patterns about the chords
played in each key (e.g. 1st, 4th, 5th etc, with are different in each key,
and thus give different priority to each note of the scale).

One could play absolutely the same song in C major and A minor (same chords,
not same relative chords) -- and it would sound 100% the same, the chords
would just have different relationships with each key.

~~~
holri
The chord relation 1st - 4th - 5th is derived from the natural overtone series
every vibrating string or air column emits. Every human can deduce
unconsciously the base key note of a song by hearing the song. This is a
adaption to physical laws not a cultural convention.

~~~
coldtea
> _This is a adaption to physical laws not a cultural convention._

Finding it nice to listen is the cultural convention. Other cultures enjoy
microtonal works, or completely different harmonies just fine.

------
nspeller
This is actually my side project. It's very much unfinished but if anyone has
any feedback I'd love to hear it.

~~~
floatrock
It's very western-focused, especially when you describe the chromatic scale as
"modern music".

I would also lose the "from first principles" by-line. The pentatonic scale
description was neat in that you talked about how frequencies that sound good
together have certain clean ratios, but when you jumped to chromatic scale,
there was nothing about how that was derived other than "filling in the
blanks." I love the site in general, but the "from first principles" by-line
implies a few things that are kinda missing. It's more accurate to call it a
visual introduction to western music theory.

A while back this article popped up on HN:
[https://arxiv.org/html/1202.4212v2](https://arxiv.org/html/1202.4212v2) That
one dived more into the physics and math that derive different music systems.
As I was reading it, I wanted some interactivity like this. So well done!
There's a lot of detail in there that could give you ideas for additional
visualizations. It was also criticized here on HN a bit for also failing short
of it's "first principles" promise, so worth finding and reading that
discussion too.

The other thought I have is make the notes keyboard-playable. A lot of the
examples are around playing notes together, and shifting between them using a
mouse is too slow.

Awesome site overall!

~~~
coldtea
> _It 's very western-focused, especially when you describe the chromatic
> scale as "modern music"._

99% of the music people write and listen to in the west is western-focused,
and not even that adventurous at that, so this is a little moot point.

~~~
lebca
Sure, but even in western music the chromatic scale is considered to have been
exhausted in the 20th century. Modern music has moved on to use other notes
and sounds and in many cases is not even pitch-centric.

~~~
coldtea
> _Sure, but even in western music the chromatic scale is considered to have
> been exhausted in the 20th century._

Yeah, but by people like Schoenberg, Alban Berg, and the like, or the wilder
jazz guys. Not exactly what most people enjoy with a cup of coffee.

> _Modern music has moved on to use other notes and sounds and in many cases
> is not even pitch-centric._

I think that for e.g. electronic, dance, experimental music etc, the chromatic
scale/classical harmony/etc. is still a good foundation -- the additional not
pitch-centric focus is either in rhythm (which is orthogonal) or in
sample/noise-based focus which usually just goes with "if it sounds good, it's
ok" kind of approach.

So, not much micro-tonal or other approaches going on in practice.

~~~
TylerE
It's out there if you open your eyes a bit. There is a TON of microtonality in
blues guitar playing - they just don't use the $10 academic words for it.

~~~
joeyespo
Have any examples you could link to? I'm very curious to hear what that sounds
like.

~~~
TylerE
Just listen to any blues...there are string bends all over the place, and many
of them aren't traditional western 12-tet intervals.

------
robbrown451
This is excellent. The graphics and sounds are nicely done.

One thing that I don't see in it, but that I find fascinating, is that in
western music each half step represents a ratio of the twelfth-root of two, in
terms of frequency. That way 12 half steps (an octave) will double the
frequency.

Certain notes within this are close, but not exactly, on a "simple ratio".
It's just coincidental that it works out pretty good. (although you could make
it work out just as good with something other than a 12 step scale....a
19-step scale has been used:
[https://en.wikipedia.org/wiki/19_equal_temperament](https://en.wikipedia.org/wiki/19_equal_temperament)
)

Anyway, I think that would fit in well with what you've done so far, but
obviously, explained in the nice simple graphics that you seem very good at.

I also must say I love the way you use color, I have a music project of my own
(that I'm hoping to debut very soon) that also uses color in a very similar
way. Did you know that Isaac Newton fixated on 7 colors (ROYGBIV) because he
thought there was a connection between the diatonic scale and colors? That's
why indigo seems to have been promoted from some obscure color to one of the
"basic" colors of the rainbow. (I prefer BOYGBPP, red-orange-yellow-green-
blue-purple-pink)

~~~
nandemo
> Certain notes within this are close, but not exactly, on a "simple ratio".
> It's just coincidental that it works out pretty good.

It isn't coincidental. Equal temperament was a fork of just intonation.

~~~
robbrown451
Not sure what you are saying. It is chance how close they are. It works out
fairly well in 12 tone scales, worse in most others. Is "coincidence" the
wrong word? Maybe. But it didn't have to work out that way, luck or whatever
you want to call it was involved.

~~~
nandemo
Just intonation is based on intervals that are ratios of small whole numbers.

The 12-tone equal temperament scale is historically a development of just
intonation (a "fork" in software terms).

So it's not a coincidence that 12-tone equal temperament intervals are close
to ratios of small whole numbers.

------
kroger
Shameless plug: I wrote a book a couple years ago that people in this thread
may find interesting: "Music for Geeks and Nerds". It's a short book that uses
Python to teach music concepts:

[http://pedrokroger.net/mfgan/](http://pedrokroger.net/mfgan/)

------
hkailahi
Nice. I've been thinking a lot about writing a interactive blog series of
something similar (music fundamentals for CS people). It'll probably be a
while before I start writing that though.

I think the biggest thing that's missing at the moment is a section on
rhythm/time. I'm sure you have plans for that. Looking forward to seeing
finished course.

------
baddox
I wish this was even more "from first principles." I wish the "harmony"
section would point out that the "simple ratios" they initially show both have
powers of two in their denominators, and thus are just octave adjustments of
the harmonic series. I wish the "chords" section would derive the major triad
as the fundamental frequency combined with the first two (non-octave)
frequencies in the harmonic series octave-adjusted down to be close to the
fundamental.

~~~
meowface
Do you have any simple resources (similar to the OP link) to help learn a bit
more of the math behind musical ratios?

~~~
baddox
Sadly, I really don't. I've picked it up over a long time, and I still
probably have plenty of misconceptions and less-than-rigorous understandings.

~~~
meowface
The thing I don't quite understand is why many seem to argue that major chords
aren't inherently more "consonant" than minor chords, and that it's just
psychological/cultural, despite the mathematical consonance that seems to be
inherent of major triads.

~~~
nandemo
"Consonant" vs "dissonant" is subjective: it's a matter of perception, taste.
The way you test the hypothesis "This chord is more consonant/more pleasant
than that other chord" is by asking a lot of people. Just like "steak tastes
better medium-rare than well-done". Physics & chemistry can inform the
discussion but it cannot prove or refute the hypothesis.

------
akalin
I found this to be a way better resource than the "Music theory for nerds"
article floating around a while ago.

------
quadrangle
There's not a smidgen of principle in the jump from harmonic ratios to
tempered tuning and standard scales and chords.

True first-principles music theory must (A) focus primarily on psychology over
physics (B) not tell people that complex ratios sound bad but simply help
people notice that they are _different_ from simple ratios (C) actually go
through the full logic of how the tempered system is derived from chains of
harmonic ratios adjusted to temper out commas. The easiest approach to the
latter is to simply teach diatonic scales as harmonic ratios and not introduce
temperament at all until much later.

Far far far from perfect but having the direction that this attempt is
missing:
[http://www.tallkite.com/AlternativeTunings.html](http://www.tallkite.com/AlternativeTunings.html)

Anyway, I'd write the ultimate thing if I ever found the time. There's at
least some good elements to this attempt so far. It really needs to be
licensed CC-BY-SA though so that people can adapt and contribute and improve
to get it to where it's really good.

~~~
andrepd
>Anyway, I'd write the ultimate thing if I ever found the time.

Sure you would...

Here's the thing, it's not that your criticism isn't valid, because I actually
agree with it, but what's the point of finishing your remarks with "So anyway,
this is why you're wrong and I'm right. Also, I would actually write the
ultimate thing myself except I don't have the time."? Yeah, and I would write
the ultimate language and compiler, if only I had the time, and I would invent
fusion and cure cancer, if only I found the time. I mean, what's the point of
remarks like those?

~~~
quadrangle
I meant more specifically: "I know how hard it is to get this sort aof thing
optimally done. I've been considering doing this sort of thing for a long
time, but it's a massive amount of work" programming languages and compilers.
Which is to say, I acknowledge how hard it is to do this right. So, it's a
statement of understnading along with a clarification that I'm someone with
the knowledge to do this if only I had time, which I cannot say about

------
analog31
I'm kind of late to the game in this thread, but my thought about theory is
that it should start with physiology and technology. At each level we're
reminded that we study the aspects of music that people have already invented,
and that we may overlook a lot of important things, such as rhythm.

Physiology: Some of this may be speculative, but it seems likely that
"harmonious" intervals, that have a superposition of harmonics, have a
physiological effect.

Technology: The 12 tone scale could be described as a technology for tuning an
instrument with harmonious intervals. Temperament is a technology for solving
the problems of tuning primarily keyboard instruments.

Naturally, math is involved in understanding these things, as with many areas
of science and technology.

I would talk about a handful of widely used instruments, such as keyboards,
strings, winds, guitars, and drums.

Then you can begin to talk about scales, chords, melody, form, and so forth.

------
xchip
This is absolutely fantastic. I have seen many musicists trying to explaing
this with not much success, mainly because they dont understand the physics
behind.

You explanation makes perfect sense and it is so clear and so well that once
you read it you can remember it forever.

Thanks!

------
PeterWhittaker
Well done! It summarizes a lot of theory it took me months to puzzle out on my
own.

One nit: At the top of each section there is a section title, at the bottom of
each section, there is a "Next section" title, a description, and a next
section button, and on the side there is a list of sections. Some of the
titles are inconsistent from list to top of current and from bottom of current
to top of next. It's a little confusing right now, and there are only a few
sections; when there are more, it will be far more confusing. I don't have a
suggestion as to how fix it, just pointing out the confusing inconsistency.

------
tempestn
Great idea! Just FYI I'm noticing a fair bit of static when playing the
various tones. It's mostly at the beginning, which makes me think it's just
due to the discontinuity at the beginning (maybe start the volume at zero and
quickly increase?) But I'm getting blips of static in the middle of most tones
as well, so there must be something else going on. Tried both Chrome and
Firefox. I suppose this could be an artifact from my onboard sound card or
something like that, but I haven't noticed anything similar elsewhere.

------
fiatjaf
This is nice, very nice. But it is quite disappointing that at least for
everybody reading HN the whole "Music Theory" topic seems to be just a few
concepts that can be learned in 1 or 2 hours.

~~~
Ericson2314
I know right? I left some lengthy comments in the more interesting stuff in
earlier threads...upvotes but no responses. Thanks but I'd actually like to
have this discussion.

~~~
fiatjaf
Are you a spambot?

------
smackfu
I'm good on music theory right up to time signatures. It seems like black
magic to me, and often it is taught by just asking you to hear the beats and I
just don't hear them.

~~~
getoj
Can you do metre? This is about as clear an example of 3/4 time (dactyls, in
poetry) as you can get, I think:

 _RAINdrops on | ROSes and | WHISkers on | KITtens [beat] | BRIGHT copper |
KETtles and | WARM woolen | MITtens [beat]_

Fast syncopated 4/4 (trochees) is Johnny B. Goode:

 _(deep) | DOWN in LOUsi|ANa CLOSE to|NEW or [BEAT beat] |LEANS [beat BEAT]
way | BACK up IN the | WOODS aMONG the | EVer [BEAT beat] | GREENS [beat BEAT]
there | STOOD..._

Okay, maybe not the best example. Other common times are just variations on
those two.

------
WhitneyLand
Love this, it's the way i would want to learn.

------
anon4711
With Safari entirely unable to handle this page, I really feel like I'm
missing out on the modern web with it for the first time.

------
dmritard96
this is great but I there was recently an article that made the rounds on HN
pointing out that what sounds 'Nice' to people not exposed to western music is
very different from what sounds 'Nice' to westerners. This is a great site and
people can learn a ton but its very western centric and it might be worth
pointing that out early on.

~~~
Joof
Is there a resource for other styles? I'd love to learn about them.

------
kmm
Interesting, but too bad it's not much more than the basics. I struggle to
find a good explanation of how harmony works, i.e. what they mean by the terms
"resolution" or how chords are made, in short: how a musical piece is built.

My piano teacher's refusal to explain these to me is one of the reasons I lost
interest in the instrument

------
aridiculous
This is the perfect minimalist introduction to music theory. A similarly good
explanation is in Daniel Levitin's "This is Your Brain on Music". It's first
few chapters explain music theory to beginners in a really elegant way.

I previously thought music was composed without any rules.

------
tiglionabbit
Inspired by this, I decided to write a JavaScript keyboard that only plays
notes in the key you're in.
[https://nickretallack.github.io/theme/](https://nickretallack.github.io/theme/)

------
Grue3
> The Major Chord is the most common chord. Whenever you're asked to play a
> chord without specifying what type, then it's a Major chord.

Certainly not in modern pop music. By far the most common chord is power
chord.

~~~
skinnyarms
Power chords aren't actually chords, since they're only two notes.

~~~
metaloha
That's kind of like saying a bathroom isn't a room :)

But they're also not major chords, they're fifths - E5, A5, etc, although I
personally often add the octave to make it 3 notes.

------
RickS
This is great! I found the more robust examples really useful, like the ones
that show notes and triads in a key. I'd love to have something like this in
the form of a VST or something usable in Ableton.

------
dejv
If you are more into mechanical practice of notes reading I had created
[http://notationtraining.com](http://notationtraining.com)

------
codeulike
So why do notes sound good together when the frequency ratios are simple?
Needs a section on the inner ear, stereocilia, and how overtones affect them.

~~~
callalex
This is still an open question after multiple millennia. Some posit that it is
innate and have primate studies to back it up. Others posit that it is a
culturally learned phenomenon and have social studies to back it up.

------
whitten
Does anyone know of a music theory class that works with GNU Lilypond format
files, as discussed on lilypondblog.org ? Thanks in advance !

------
em3rgent0rdr
I disagree with the equivocation of "sound good" with consonant notes and
"sound bad" with dissonant notes.

~~~
anon4711
You're not alone: [http://www.smithsonianmag.com/smart-news/researchers-
travel-...](http://www.smithsonianmag.com/smart-news/researchers-travel-
amazon-learn-musical-taste-not-hardwired-180959804)

------
danenania
This is fantastic! Looking forward to the next one.

Can anyone suggest good resources in this vein that apply these basic
principles to guitar?

------
bcheung
Love it. Thanks for sharing. Wish I had this when I had some music theory
classes back in college.

------
ticktockten
Thanks! Really enjoyed the tutorial

------
bmay
FYI sound does not play in Firefox

~~~
vitro
Does in mine.

~~~
andrewclunn
I'm having issues in Chrome. (Does quick speaker check), yeah my sound is
good, but not working on the site right now.

------
zump
Software engineer here. Finding my creativity is drying up.. Whats the
fastest/easiest way to learn a musical instrument at the highest possible
level?

~~~
sporkologist
Get a good teacher and take weekly lessons for the first few months. Make sure
your instrument is up to snuff. Make a habit of practicing at least 30 minutes
a day of technically hard stuff. Most importantly, find an instrument (and
music genre) that you love.

~~~
rhapsodic
Follow sporkologist's advice and also read "The Talent Code" by Daniel Coyle.
It will give insight into why some approaches to practice produce far better
results than others.

~~~
sporkologist
Thanks for mentioning that book, I hadn't seen it before but it formalizes a
lot of things that have helped me in the past. Also they mention the Finland
educational system. Yeah I'll have to get a copy of this one.

------
Pulce
Ctrl-- in firefox 45 to see Subscribe button. Apart this, thanks :)

