Music theory for programmers
Summary
The article presents a code-first approach to learning music theory, using JavaScript and the Web Audio API to derive tones, scales, chords, and musical structures without instruments. It walks through concepts like pitch, envelopes, timbre, equal temperament, scales, modes, chords, and harmony, illustrating them with runnable code snippets. The piece emphasizes understanding music as data and engineering decisions rather than memorization of rules.