Music 101 with JS Bach
summary
Reimplements musical primitives — pitch, rhythm, harmony — in JavaScript and shows working code: a metronome built from setInterval moved to a Web Worker and scheduled precisely via the Web Audio API oscillator; demonstration proves the ear stops hearing beats below about 50 ms / 20 Hz. Compares Pythagorean ratios to modern well‑tempered tuning using the 2^(n/12) formula, quantifies split notes by cents (humans hear ~5 cents), and plays The Well‑Tempered Clavier’s 24 keys to show it works.
AI-written summary · about
chapters (9)
- 0:00Start
- 6:36Subdivisions of Time
- 15:19Put it all together
- 20:34Frequency
- 32:50Pythagoras
- 35:12Enharmonics
- 36:58Enharmonic frequencies
- 41:09Well Tempered tuning
- 42:28Back to Bach
related talks
26mBeats in the Browser - Coding Music with JavaScript
37mHow to code music?
44mBeats in the Browser - Coding Music with JavaScript
31mBeats in the Browser - Coding Music with JavaScript
19mComposing music with composed functions
24mDrum 'n' JS
40mBeats in the Browser - Coding Music with JavaScript
24mPlay Them Off, Keyboard App: Building a virtual piano in JavaScript
