Why are there 12 Notes in Western Music 🌱

The justly tuned pitch ratio of a perfect fifth is 3:2 (also known, in early music theory, as a hemiola),[10][11] meaning that the upper note makes three vibrations in the same amount of time that the lower note makes two.

Sound is produced when an object vibrates, creating a pressure wave. This pressure wave causes particles in the surrounding medium (air, water, or solid) to have vibrational motion. As the particles vibrate, they move nearby particles, transmitting the sound further through the medium. The human ear detects sound waves when vibrating air particles vibrate small parts within the ear. As a sound wave moves through a medium, each particle of the medium vibrates at the same frequency. This is sensible since each particle vibrates due to the motion of its nearest neighbor. A guitar string vibrating at 500 Hz will set the air particles in the room vibrating at the same frequency of 500 Hz, which carries a sound signal to the ear of a listener, which is detected as a 500 Hz sound wave.

Screen Shot 2021-01-09 at 2.23.14 PM.png Here let’s say we have a speaker or a tuning fork on the left that vibrates back and forth (left and right). When the speaker moves right it pushes air molecules together, compressing them to create an area of high pressure. Then when the speaker moves back left there will be some space created that new particles can come and fill in. These will be areas of space with fewer particles and low pressure (rarefactions). We can measure the pressure of the air particles at every point in time and plot it to get a view of the sound wave created by the speaker.

Screen Shot 2021-01-09 at 2.01.55 PM.png

Screen Shot 2021-01-09 at 3.28.00 PM.png

The frequency of a sound wave refers to the number of cycles/vibrations per unit of time. A single cycle/vibration is commonly measured as the distance from one compression (or rarefaction) to the next adjacent compression (rarefaction).

  1. The ear is sensitive to ratios of frequencies (pitches) rather than to differences in establishing musical intervals.

The fundamental frequency of a string is inversely proportional to its length, so vibrating longer strings, makes a lower note.

The Greeks realized that sounds which have frequencies in rational proportion are perceived as harmonius. Pythagoras, who experimented with a monochord, noticed that subdividing a vibrating string into rational proportions produces consonant (two tones are said to be consonant if their combination is pleasing to the ear, and dissonant if displeasing) sounds. Here’s a video of a monochord https://www.youtube.com/watch?v=gYtSI4-ShLU

Here are some ratios that sound good and their corresponding notes in the key of C. Screen Shot 2021-01-09 at 3.47.35 PM.png

Suppose we just tuned our instrument to C. The following table depicts in cents (percentage of a semitone), how poorly a justly intoned piano tuned in the key of C would do in capturing the various intervals in the various keys. This is compared, in the last column, against equal temperament. For example, the table says, that in the key of A, a major third would be off by 41% of a semitone. Notice in the last column, that, while equal temperament captures the intervals 3/2, 9/8, 4/3, and 16/9 quite well, the other intervals are all off by more than 11% of a semitone. Screen Shot 2021-01-09 at 3.53.00 PM.png

In particular, if you don’t use equal temperament then different keys sound different.

An equal temperament is a musical temperament or tuning system, which approximates just intervals by dividing an octave (or other interval) into equal steps. This means the ratio of the frequencies of any adjacent pair of notes is the same, which gives an equal perceived step size as pitch is perceived roughly as the logarithm of frequency

The idea behind twelve is to build up a collection of notes using just one ratio. The advantage to doing so is that it allows a uniformity that makes modulating between keys possible. Unfortunately, no one ratio will do the trick exactly. However, the ratio of 3/2 happens to work reasonably well using 12 steps. With 3/2 as the basis for the scale, none of the above ratios besides a unison, fifth, and major 2nd are captured exactly.

Here we have the circle of fifths: Screen Shot 2021-01-09 at 4.11.43 PM.png

However the most important constraint- namely that we get a repeating pattern going up in octaves, is almost satisfied by this scheme. Namely, after 12 applications of the ratios 3/2, we come back very close to where we started from (always dropping down by an octave, i.e. dividing by 2, each time the ratio exceeds 2): Screen Shot 2021-01-09 at 4.13.11 PM.png

  • These 12 frequencies correspond to the circle of fifths. If we start from C, we then get G D A E B F# C# Ab Eb Bb F and back to C.

The choice of 3/2 says that, next to the octave, it should be regarded as the most important interval. So, we want to understand when a power of 3/2 will be close to a power of 2 so we can use 3/2 to approximate an octave: We solve the equation:

(3/2)a=2b⟹(3/2)=2b/a⟹x=log(3/2)/log(2) where x=b/a.

We want to find a good fraction approximation for x x=log(3/2)/log(2)β‰ˆ.58496250072

And we happen to choosse the approximation 7/12 = .5833333333… which suggests using an octave of 12 steps, with a fifth equal to 7 semi-tones. Therefore, in equal temperament, a half-step is the same as a frequency ratio of 21/12; that way, twelve half-steps makes up an octave. In the modern equal temperament (which came into practical use during the early part of the 20th century), all fifths are tuned to 2^(7/12)=1.49651…, slightly less than 3/2, and 12 repetitions of this ratio gets us back to where we started (after dropping down 7 octaves).

One can also use a major 3rd (i.e. ratio of 5/4) to build up a scale. If one, similarly, forms the continued fraction for log(5/4)/log(2)=.32192809…, one finds the following list of approximating fractions: 1/3, 9/28, 19/59, 47/146, etc. This suggests, for example, that a 28 note scale would work nicely using the major 3rd as the basis for its construction.

On the other hand, we need not always work with the best. For example, 11/19 = .5789… is reasonably close to log(3/2)/log(2) = .5849…, and 6/19 = .3157… is reasonably close to log(5/4)/log(2)=.3219…. This suggests that a 19 note scale with a major 3rd being 6 β€˜semi-tones’ and a perfect 5th being 11 β€˜semi-tones’ might work nicely. In fact, 19 appears in the denominators of rational approximations of the continued fractions for log(5/3)/log(2), and log(6/5)/log(2). This says that 19 would also work well for capturing the reciprocal pair of ratios 5/3 and 6/5. Screen Shot 2021-01-09 at 4.17.17 PM.png

The sharps and flats don’t really mean annything. The white keys are an β€œhistorical accident”, being the keys of the major scale of C.

Here is the sound wave of an A at 100Hz produced elecontronically (red) overlayed with an A played by an acoustic piano (black). The red curve is only the fundamental frequency, which is why it looks like a perfect sine curve. The acoustic piano has harmonic frequencies that give it its unique sound (or timbre), which is why a piano sounds different from say a guitar even when they play the same notes. Screen Shot 2021-01-09 at 6.33.25 PM.png

A musical note is a harmonic series, or the sum of a bunch of different sin/cos waves. The lowest frequency member of the harmonic series is the fundamental frequency and the pitch of a note is usually perceived as the lowest as the fundamental frequency.

Any tone you produce in nature carries with it has a Fourier series: βˆ‘(ansin⁑2Ο€nft+bncos⁑2Ο€nft) where the coefficients an and bn determine the timbre of the sound. This is why different instruments sound different even when they play the same notes, and has to do with the physics of vibration. So any tone which you hear at frequency f almost certainly also has components at frequency 2f, 3f, … etc. Because of the typical spacing of the resonances, these frequencies are mostly limited to integer multiples.

Notes mentioning this note

There are no notes linking to this note.


Here are all the notes in this garden, along with their links, visualized as a graph.

5G and WiFiAWS Step FunctionsAnalyzing Reddit Post on the Dollar StandardAsync, Await, and PromisesBayesian AverageBias Variance DecompositionBlockchain PresentationBreakpoint Debugging in VSCodeBrief Look into Measure TheoryC4 Model for Software ArchitectureCache vs Session StoreCant compare mean and median from different setsClient vs Server Side RenderingCode Production in an AI CompanyComparing Client Side Storage MethodsComputational Perception HighlightsConfidence Intervals for Known Distributions and...Cool Stocks ListCrazy Meeting with Obama, McCain, and Bush Post...Curse of DimentionalityDatabase vs Data Warehouse vs Data LakeDifferent Git AddsDocker (containerization) vs Vagrant (virtual...Explaining Decision Boundary of a Support Vector...Exporting Databricks Files to GithubFloyds Tortoise and Hare AlgorithmFresh Mac Setup Installation EssentialsGraphical Model IndependenciesHighlights from Bad SamaritansHighlights from Good Economics for Hard TimesHighlights from The Righteous MindHow Does Chromosomal Heredity WorkHow Does Light Influence the Rate of Capture in a...How Does Sweating WorkHow Does Version Naming WorkHow Not To Be Wrong Excerpt Self Selecting BiasHow Not to be Wrong Excerpt Public Opinion Doesn't...How Quantum Computers Could Quickly Break...How Someone Made a Spectral Lamp that Can Emit all...How are images compressed and stored in a computerHow do SPACs WorkHow does Hypothesis Testing WorkHow does air slow objects downHow is Neural Network a Universal ApproximatorHow is Unit Testing DoneHow to Access a Previous Commit with GitHow to Add to Your System Path Variable for MacHow to Build a Full Stack ApplicationHow to Clear Unused Docker ContainersHow to Convert from Celsius to FahrenheitHow to Delete a Branch GithubHow to Export Pandas DataFrame to CSV ProperlyHow to Force Pull and Overwrite GitHow to Get the Bootstrapped Standard Error for a...How to handle violations in positivityHow to Properly Explain Technical ToolsHow to Push Code for ProductionHow to Read a Path in S3How to Set Up Python Aliasing In the Command LineHow to Set a Specific Branch to Track a Specific...How to Store and Access SQL Queries in DatabricksHow to Take a Weighted AverageHow to Temporarily Stash Changes with Git StashHow to Untrack Committed Files from GitHow to Use PyenvHow to Use Sample Splitting for Doubly Robust...How to Write Output to Text FileHow to edit Obsidian themes with CSSHow to make copies of DNA with PCRHow to use Bounds and Sensitivity Analysis in...How to use Scipy Optimize to solve for values when...Info on Stock OptionsInspirational Computer PioneersIntuition Behind the Doubly Robust EstimatorInverting Hypothesis TestsInvesting LessonsJupyter Widgets ExistML CheatsheetsMaking Sense of a Betting Market with...Managing Ruby Versions with rbenvMarket Makers and Quant TradingMarket Making PresentationMatching IntuitionMethodology for Managing Web AppsMicroservices vs Monolithic ArchitectureModeling Advice and Lessons Learned Working at a...Multinomial to Binomial Stick Breaking...Music Theory NotesNotes from Michael Nielsen Effective Research PostNotes from the Martian by Andy WeirNotes on Bayesian OptimizationNotes on Exon Skipping with ASOsNotes on Options SpreadsNotes on Quantum CountryOne Persons Perspective About Why We Shouldnt Read...Presentation on the Kronovet Family Clothing...Python Dataclasses UpdatePython Package Reference InstructionsRandom CMU Course WebpagesRandom Facts from What If by Randall MunroeReading about Internet ServicesRock Thrust ExplainedSSHing into AWS and Running ThingsSome Bash Commands to Find Redundant Files and...Some Cool Python FeaturesSome Notes on Exploding Gradient ProblemStats BlogsStock Options in a CompanyTesting Code on GithubThoughts after Reading Hillbilly ElegyThoughts on Andy Matuschak Article on Teaching...Thoughts on Approaching Infinite KnowledgeThoughts on Maria Konnikova Knowledge Project...Thoughts on the End of Natural SelectionTor Network and .Onion DomainsUsing nonparametric models in doubly robust...Various Treatment Effects and their...Virtual Environment in AWSWhat Database do I useWhat are Git Pull and Push RequestsWhat are Information CriteriaWhat are Javascript WorkersWhat are MakefilesWhat are Moment Generating FunctionsWhat are Multiple CPU CoresWhat are Progressive Web AppsWhat are Wasserstein and Earth Movers DistancesWhat are the Four Fundamental Forces in Our...What is Apache SparkWhat is Bootstrapping in StatisticsWhat is Cryptocurrency StakingWhat is ElasticsearchWhat is Express.jsWhat is GLUEWhat is GraphQLWhat is HTTPSWhat is IV CrushWhat is Integration ReallyJAMStackWhat is KubernetesWhat is Mahalanobis DistanceWhat is MakerDAO CryptoWhat is Markov Chain Monte Carlo SamplingWhat is Nested Cross ValidationWhat is Next.jsWhat is PAC LearningWhat is R SquaredWhat is RedisWhat is ShrinkageWhat is Spearman CorrelationWhat is SvelteWhat is TerraformWhat is The Graph (Blockchain)What is Variational InferenceWhat is Vue.jsWhat is WebAssemblyWhat is a Credible IntervalWhat is a Fourier transformWhat is a Gaussian Mixture ModelWhat is a Gaussian ProcessWhat is a Object Relational MapperWhat is a Qini CurveWhat is a Sufficient StatisticWhat is independent component analysisWhat is the C-Statistic for BenefitWhat is the Dirichlet ProcessWhat is the EM AlgorithmWhat is the Hidden Markov ModelWhat is the Indian Buffet ProcessWhat is the Naive Bayes algorithmWhat is the Negative Binomial DistributionWhat is the Runtime of a LanguageWhat is the Studentized BootstrapWhat is the Wake Sleep AlgorithmWhat is the hypergeometric distributionWhy are Conjugate Priors UsefulWhy are there 12 Notes in Western MusicWhy is Cross Fitting Useful for Estimating...Why is a room hotter when you leave the fridge...Working with ClientsWorking with Terminaldata science overviewhighlights from Debt The First 5000 Yearshighlights from Enlightenment Nowhighlights from Hacking Darwinhighlights from How Not to be Wronghighlights from Leonardo da Vincihighlights from Open an Autobiographyhighlights from Range Why Generalists Triumph in a...highlights from Salt, Fat, Acid, HeatSapiens a Brief History of Humankindhighlights from Stumbling on Happinesshighlights from The Genehighlights from Thinking Fast and Slowhighlights from Trick Mirror