One String
Why does a stretched string have a pitch, and why does one string sound like several notes at once?
The part opens on the Tune's first two notes, a fifth, and on the legend of Pythagoras and the blacksmith's hammers, which is false: a string under twice the weight rises by half an octave, as Vincenzo Galilei found and as the simulated string confirms. The monochord's ratios are true, and Mersenne's laws say what sets the pitch; twenty-four simulated strings obey them. A bump on a rope shows that the pitch is the number of round trips a wave makes each second. Newton's law for one bead on a thread becomes the wave equation, and its two solutions, d'Alembert's travelling shapes and Bernoulli's standing modes, turn out to be one motion, after a quarrel that Fourier settled. A plucked string then contains mode n in the amount sin(n pi beta)/n squared, so one string is already a chord, and strings in simple ratios share partials: a first answer to Pythagoras. The part ends with real strings, which fade, are stiff and stretch, and with the Tune played on one simulated string.
What you need. School algebra and trigonometry. The derivation of the wave equation uses a second derivative; the film says what it means as it goes. No earlier part is needed.
- Ideas, mathematics and history
- Pythagoras and the false legend of the hammers, the monochord, Mersenne's laws, the wave equation, d'Alembert against Bernoulli, modes and harmonics, pluck position
- What we build, compute and hear
- a simulated string checked against the analytic solution; the Tune on one string
What you will be able to do
Foundations
- Compute a string's frequency from its length, tension and mass per metre, and say what each change does to the pitch.
- Name the octave, fifth and fourth by ear and by ratio, and multiply ratios to add intervals.
- Explain why two strings in the ratio 3 to 2 share every third and every second partial.
Full course
- Derive the wave equation from Newton's law for one bead and take the limit of small beads.
- Show that f(x - ct) + g(x + ct) solves it, and that fixed ends force the period 2L/c.
- Compute the modal amplitudes of a plucked string and predict which partials are missing.
Research
- Explain why a string's tension rises with its amplitude and estimate the resulting pitch glide.
- State what an exactly conserved discrete energy guarantees about a numerical scheme.
- Say why uniform stretching cannot regenerate a missing mode, and what in a real instrument can.
Practice
- Choose a plucking or striking point for a wanted tone, and explain touched harmonics.
- Explain to an instrument maker why bass strings are wound and why short thick strings sound inharmonic.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Foundations 30 min · Full course 50 min · Research 54 min · Practice 37 min.
- 0The hammersFoundations4 min
- 1One string, four numbersFoundations3 min
- 2What sets the pitchFoundations5 min
- 3A wave on a stringFoundations4 min
- 4The wave equationFull course4 min
- 5Two travelling wavesFull course4 min
- 6Standing wavesFoundations4 min
- 7The quarrelFull course4 min
- 8The plucked stringPractice4 min
- 9One string is a chordFoundations4 min
- 10Why the ratios?Foundations4 min
- 11Real stringsPractice3 min
- 12Frontier: when the string stretchesResearch4 min
- 13What we will buildFull course2 min
- Variation 1, recap and problemsAll tracks3 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.
The hammersFoundations4 min
You know this tune. Nearly everyone on Earth does. It starts by saying one note twice, and then it jumps. Musicians call that jump a fifth. It is the subject of the oldest experiment in science, and of a question that has been open for two and a half thousand years.
The story goes like this. Around 530 BC, Pythagoras walks past a blacksmith's shop and hears the hammers ringing in harmony. He goes in and weighs them: twelve, nine, eight and six. Twelve to six is two to one, and those two hammers sound an octave. Twelve to eight is three to two: the fifth. Twelve to nine is four to three: the fourth.
Then, the story says, he went home, hung the same four weights on four strings, and heard the same harmonies again. Number rules the world. We have the story from Nicomachus, who wrote it down six hundred years later. Boethius copied it, and for a thousand years it opened every textbook on music.
It is false. Both halves of it. The hammers first. Strike one anvil with four hammers and the ring you hear belongs to the anvil. Change the hammer, and the notes do not move.
Now the strings. Hang six units of weight on one string and twelve on another just like it. The legend promises an octave. Listen.
That is no octave. An octave is twelve hundred cents wide, and our string, simulated, moved . Exactly half an octave, the most awkward interval there is. Doubling the weight multiplies the pitch by the square root of two.
Someone finally hung the weights. In the fifteen-eighties a lute player called Vincenzo Galilei tried it, and found that an octave takes four times the weight, not twice. His son Galileo was in his twenties, and watching.
One part of the story is true, and it is the part with an instrument in it. This is a monochord: a single string over a box, with a bridge you can slide. Stop the string at half its length, and this happens.
An octave: the same note, higher. So the numbers are real. It was the explanation that stood on nothing for two thousand years. Why does a string have a pitch at all? And why should two to one, or three to two, sound good together? The first question we will answer today, completely. The second got its first real answer in the nineteenth century, and people are still arguing about it. This series follows that argument.
This is Part 1 of Music, Built: sixty-eight lectures that start with one string and end with an orchestra, a recording studio, and machines that listen and compose. Everything you hear in this series is made by the code we write along the way. In this part: the monochord. What sets the pitch of a string. The wave equation, from Newton's law. Travelling waves, standing waves, and the quarrel between them. Why one string is already a chord. And a first answer to Pythagoras.
1One string, four numbersFoundations3 min
The instrument could hardly be simpler. One string, stretched over a hollow box that makes it loud enough to hear, and fixed at both ends. Monochord just means one string. The Greeks had a second name for it, the kanon, which means the ruler, and that name is the better one. This is a measuring instrument. It turns a sound into a length you can read off a scale. Here is the open string.
Now a second string just like it, with a bridge we can slide. The Greeks could measure only lengths. We can also measure how many times a second the string goes back and forth, its frequency, in hertz. Our simulated string, open, makes round trips a second.
Read the last column. Half the length, twice the frequency. Two thirds of the length, three halves the frequency. Three quarters, four thirds. The frequency ratio is the length ratio turned upside down, and on our string it holds to within cents, where a cent is a hundredth of a semitone. Nobody told the simulation that. We will see what it was told.
So here is the definition the whole series will use. An interval is a ratio of two frequencies. And ratios do not add, they multiply. Go up a fifth: keep two thirds of the string. Then up a fourth from there: keep three quarters of what is left. Three quarters of two thirds is one half. A fifth and then a fourth make exactly an octave.
And the gap between them, a fifth divided by a fourth, is nine to eight. The Greeks called it the tone. It is the step between the fourth and the fifth notes of the scale.
Octave, fifth, fourth and tone: all of it from the numbers one, two, three and four. The Pythagoreans drew those numbers as a triangle of ten dots and swore oaths by it. You can see why they thought they had found the key to everything.
Before we go on, a first question for your ears. Two pairs of notes. Which pair is the fifth?
It was . The second pair went further up: the bridge at two thirds. If you sang the Tune's first jump to yourself to check, that is exactly what a musician does. So, four numbers and three intervals. But why should length set the pitch at all, and is length the only thing that does?
2What sets the pitchFoundations5 min
Anyone who has tuned a guitar knows three ways to change the note of a string. Press it against a fret, and it gets shorter. Turn the peg, and it gets tighter. Or pick a thicker string. Three knobs: length, tension, and the mass of each metre of string. Let us turn them one at a time on our simulated string and measure what comes out.
Length first: the whole string, three quarters, two thirds, a half. The measured points fall on a curve: one over the length. That is the monochord again. Now tension: the same string, pulled with twice the force, three times, four times.
It takes four times the tension to go up one octave. The pitch grows as the square root of the tension, which is exactly what Vincenzo Galilei found with his weights. Last, the mass: the same length and the same tension, but a string four times as heavy.
An octave lower. The pitch falls as the square root of the mass. That is why the bass strings of a guitar or a piano are wound with wire: it makes them heavy without making them long.
These three rules are called Mersenne's laws. Marin Mersenne was a friar in Paris, and in 1636 he published them in a book called Universal Harmony. Frequency goes as one over the length, as the square root of the tension, and as one over the square root of the mass per unit length. Galileo printed the same thing two years later. Mersenne did something else nobody had done. He made strings so long and slack that he could count their swings by eye, then used his own laws to scale up, and so put the first actual number, vibrations per second, on a musical note.
Put together, with the constant that makes it an equation: the frequency is one over twice the length, times the square root of tension over mass per unit length. Mersenne had the proportions. The factor of one half had to wait for calculus.
Do the laws hold for our string? Here is the test. We made up strings with random lengths, tensions and masses, simulated each one, and measured its pitch from the motion alone, by asking after how long the motion repeats. Plotted against the formula, every string lands on the diagonal. And if we let a computer fit the powers, without telling it what to expect, it finds for the length, for the tension, for the mass, and a constant of .
Minus one, a half, minus a half, and one half. The formula was never typed into the simulation. All it was given is Newton's second law, applied to each small piece of the string. So Mersenne's laws must follow from Newton's. Before we see how, let us use them once.
One worked example, with a real string. The top string of a guitar is steel, a quarter of a millimetre thick. It is millimetres long, a metre of it weighs grams, and it is tuned to the E above middle C, hertz. Solve the law for the tension, and you get newtons: the weight of about kilograms, hanging from that one thin wire.
Now you predict. Suppose you wanted this string an octave higher, and all you did was turn the peg. How much tension would that take?
Four times as much: newtons, about kilograms. The wire breaks long before that. This is why the six strings of a guitar differ in thickness and not much in tension: each one carries roughly the same load, and the mass does the work. So we have the law, and we know it must come out of Newton's. To see how, we first have to watch a string move.
3A wave on a stringFoundations4 min
Forget music for a minute. Take a long rope, tie the far end to a wall, and flick the near end. A bump runs down the rope. It keeps its shape, and it travels at a steady speed. When it reaches the wall it comes back, upside down.
Why upside down? Here is a way to see it. Imagine the rope does not stop at the wall but carries on, and that on the imaginary half an upside-down copy of the bump is coming the other way. The two bumps arrive at the wall together, and there they cancel exactly, always. That point never moves. So this endless rope behaves, on our side, exactly like a rope tied to a wall. The reflection is the imaginary bump walking out into the real world.
One more experiment. Send two bumps towards each other. They do not bounce. They do not merge. They pass straight through, and while they overlap the rope's height is simply the two heights added. This is called superposition, and everything in this part depends on it. Waves on a string add.
How fast does the bump go? Tighten the rope and it goes faster. Use a heavier rope and it goes slower. The speed turns out to be the square root of the tension over the mass per metre, which at least has the right units. We will derive it in the next chapter. On our monochord's string we timed a bump between two points: metres a second, against from the formula.
That is slower than sound in air. On a guitar's top string a wave runs at metres a second: faster than sound, on a wire a quarter of a millimetre thick.
Now the string of an instrument: short, tight, and fixed at both ends. Pull a bump into it and let go. The bump splits into two halves that run opposite ways. Each one reaches its end, flips, and comes back. They cross in the middle, flip again at the far ends, and arrive home at the same moment, the right way up. The string is exactly as it started, and it all happens again.
How long did that take? Each half travelled the length of the string twice, so one cycle takes two L over c. The frequency is one over that: c over two L. Put in the speed, and there is Mersenne's law, with its one half. The half is the round trip.
So this is what the pitch of a string is. It is the number of round trips a wave makes along it each second. On the monochord's open string a round trip takes thousandths of a second, so there are of them a second. Here is that string, let go from this bump: the motion slowed down, the sound not.
A string has a pitch because a wave on it keeps coming back. That is the idea. To make it exact, and to find where that speed comes from, we need the string's equation of motion.
4The wave equationFull course4 min
How do you write Newton's law for a string? A string is not one object in one place. So chop it up. Picture a row of small beads on a weightless thread, each a distance h from the next. Each bead can move only up and down, and its height is called u. And each bead feels exactly two forces: the thread on its left and the thread on its right, both pulling with the tension of the string, T.
Take one bead. The thread on its right pulls along the thread, with force T. Only the up-and-down part of that pull can move the bead, and for a gentle slope that part is T times the slope: the difference in height, over h. The left thread does the same with its own slope. Add them, and tidy up.
Read that as a sentence. Add the two neighbours' heights and subtract twice your own. The bead is pulled towards the midpoint between its neighbours. If it sits above the midpoint, it is pulled down. Below, and it is pulled up. And if the three beads lie on one straight line, however steep, the two pulls cancel and there is no force at all.
Now Newton. A bead's mass is mu, the mass of a metre of string, times h. Mass times acceleration equals force. That one line is all the physics in a string. It is also our whole simulation. These two lines are from the code that made every sound so far. The first compares each bead with its neighbours. The second moves every bead one small step forward in time. No pitch in there. No ratios, no harmonics, no Mersenne.
You can hear what the beads do. Here is our string chopped into six pieces, then sixteen, then two hundred, each plucked the same way. Listen to the first one's overtones.
With five beads the second partial is cents flat, most of a semitone, and the higher ones are worse. It rings like a toy. With two hundred pieces you cannot tell it from a string. So let the beads shrink to nothing.
Divide both sides by the bead's mass. On the right there is now a difference of differences, divided by h squared. As h goes to zero, that is the definition of a second derivative: the curvature of the string. On the left, the bead's acceleration becomes the second derivative in time. And the constant, tension over mass per metre, gets a name: c squared.
This is the wave equation. Jean d'Alembert wrote it down for the vibrating string in 1747: one of the first laws of physics stated as an equation between rates of change in space and in time.
Before solving it, read it. The left side is the acceleration of a point of the string. The right side is the string's curvature there. So a string accelerates wherever it is bent, towards the inside of the bend. A hump is pulled down. A dip is pulled up. And any straight stretch, however much it slopes, feels nothing.
Which makes a plucked string a strange case. Pull a string aside with one finger and it is two straight lines. Nothing is curved, so nothing wants to move, except at one point: the corner, where the curvature is enormous. When you let go, everything that happens has to start from that corner. The equation tells us where the string accelerates. It does not yet tell us what the string will do. For that, we have to solve it.
5Two travelling wavesFull course4 min
We saw bumps slide along a rope at a steady speed without changing shape. So try that as a solution. Take any shape, call it f, and slide it to the right at speed c: f of x minus c t. Differentiate twice in x, and you get f double prime. Differentiate twice in time, and each derivative brings out a factor of minus c, so you get c squared times the same thing. The wave equation is satisfied, whatever the shape.
A shape sliding left works just as well, and because waves add, so does the sum of the two. D'Alembert proved that this is everything. Every possible motion of the string is one shape moving right plus one shape moving left. So the constant c in the equation really is a speed: the square root of tension over mass, as promised.
Which two shapes? That depends on how the string starts. Pluck it: pull it aside and hold it still. A string let go from rest starts as two copies of its own shape, each half as tall, lying on top of each other. Let go, and one copy slides right and the other slides left. What you see is their sum.
Look at the string itself. The corner you made with your finger has split into two corners, running apart, and between them the string is straight, though it can be tilted. When a corner reaches an end, it reflects, upside down, exactly like the bump on the rope. So a plucked string never looks like the smooth wobble people draw. It is three straight lines at most, with two corners chasing each other round and round.
Is that really what our simulation does? The line is d'Alembert's formula. The dots are beads, each obeying Newton's law and knowing nothing about any formula. Over a whole cycle the two never differ by more than about one part in ten to the . That is the rounding error of the computer's arithmetic. The bead model and d'Alembert's solution are, at this step size, the same thing.
And now the pitch falls out. With both ends fixed, each travelling shape is the starting shape, reflected back and forth for ever: it repeats every two string lengths. A shape moving at speed c covers two lengths in a time of two L over c. So the whole motion repeats that often, and the frequency is c over two L. That is Mersenne's law, the one half included, derived from Newton's law and nothing else.
Notice what we never used: the plucking point. In this ideal model, pluck the string gently in the middle or near the end. The shape differs, but the motion returns after the same round trip. Special shapes can repeat sooner: those are the standing modes we will see next. The round trip sets the lowest mode's frequency.
Travelling waves explain the pitch. They do not explain something Mersenne noticed in 1636 and could not account for: that a single string seems to sound several notes at once. For that we need a second way to solve the same equation.
6Standing wavesFoundations4 min
Here is a different kind of motion to look for. Not a shape that travels, but a shape that stays where it is and swings: every point of the string moving up and down in the same rhythm, some more, some less. In symbols, a fixed shape, X of x, times a cosine in time. Put that into the wave equation. The cosine cancels, and what is left says that the shape's curvature is proportional to minus the shape itself. Only a sine wave does that. And a sine that is zero at both ends has to fit a whole number of half-waves into the string.
So a string can swing in place, but only in certain shapes, and each shape has its own frequency: one, two, three, four times the frequency we found in the last chapter. Whole multiples, and nothing in between.
These are the first eight. Each one is called a mode of the string. The second mode has one point in the middle that never moves: a node. The third has two nodes, the fourth three. The frequencies, one, two, three, four times the lowest, are called harmonics. Listen to them in order. Each is a single pure tone, at the frequency of that mode.
You heard a staircase whose steps get smaller. From the first mode to the second is an octave: two to one. From the second to the third, a fifth: three to two. From the third to the fourth, a fourth: four to three. Those are the monochord's ratios. Pythagoras found them by moving a bridge between different lengths. They were inside the one string all along, as the ratios between its own modes.
Is this a new kind of solution, one d'Alembert missed? No. A standing sine wave is exactly two travelling sine waves of half the height, one going each way. Where they always cancel, there is a node. A mode is a travelling wave meeting its own reflection.
Modes are not just mathematics. You can pick them out with a fingertip. Pluck a string, and then touch it, very lightly, exactly at its midpoint. Every mode that is moving there is stopped by the finger. But the modes with a node at the midpoint never moved there in the first place. They do not feel the finger at all, and they ring on.
This was how the nodes were first seen, in the sixteen-seventies: little paper riders on a string, thrown off everywhere except at the nodes. So we have two descriptions of one string. Shapes that travel, and modes that stand. In 1750 the question of which one is right started a fight between the best mathematicians in Europe.
7The quarrelFull course4 min
D'Alembert published his travelling waves in 1747, and he was strict about what counted as a shape: it had to be given by one formula. The next year Leonhard Euler disagreed. A string can be pulled into any curve a hand can draw, corners included. A plucked string is two straight lines, which did not fit their requirement of one analytic formula. Then, in 1753, Daniel Bernoulli made a bolder claim. Every motion of a string is a sum of the standing sine waves. He had no proof. He had his ears: a musician hears those tones sounding together.
Euler would not have it, and his objection sounds unanswerable. Every sine wave is perfectly smooth. Add smooth curves together and you get a smooth curve. So how could a sum of sines ever be a triangle, with a corner? A young man in Turin, Joseph-Louis Lagrange, started from beads on a thread, let the beads shrink, and came within one step of the answer without taking it. The argument ran for fifty years.
We can do what they could not. We can add it up, and listen while we do. Here is the plucked shape, in grey. We will build it from modes: one, then two, three, five, ten, thirty. Each time, you will hear the string as it would sound with only those modes in it.
With one mode it is a hum and a smooth arch. With thirty, the corner is nearly there and the sound has its bite. With a hundred terms the sum is within percent of the pluck everywhere, and the gap goes on shrinking like one over the number of terms. No finite sum has a corner. The infinite sum does. So Bernoulli was right, and so was Euler. The plucked shape is not smooth, and it is a sum of sines.
It was settled in 1807 by a man who was not thinking about music. Joseph Fourier was studying how heat spreads, and he claimed that any shape whatever is a sum of sines, and gave the recipe for how much of each. The old guard, Lagrange among them, would not print it. Making it rigorous took twenty more years, and mathematicians had to decide what a function is. A quarrel about a string ended up rebuilding the foundations of mathematics. We use Fourier's recipe in the next chapter, and Part 3 is built on it.
So which is the string: travelling shapes, or standing modes? Both. The line is the plucked string as d'Alembert's two travelling shapes. The dots are thirty modes, each one doing nothing but swinging in place at its own frequency, added together. It is one motion, described twice. The travelling picture tells you why there is a pitch. The standing picture tells you what is in the sound. And that raises the practical question: for a given pluck, how much of each mode do you get?
8The plucked stringPractice4 min
Fourier's recipe is a way of asking a shape a question: how much of mode n is in you? To answer, lay the mode over the shape, multiply the two together point by point, and add up the result along the whole string. Where shape and mode are on the same side, they contribute; where they are on opposite sides, they take away. What is left is the amount.
For a pluck the sum can be done exactly, and here is the answer. It has two parts that matter. One over n squared: the higher the mode, the less of it there is, and the amounts fall quickly. And the sine of n pi beta, which is nothing but the height of mode n at the point where you plucked. If a mode has a node there, it gets nothing. You cannot start a mode by pulling on the one place where it does not move.
One correction before we listen. A string moves almost no air. What makes the sound is the force it puts on the bridge, and that goes with the string's slope at the end, not its height. Taking a slope multiplies mode n by n. So at the bridge the amounts fall as one over n, not one over n squared: brighter than the shape alone suggests.
Here is the test. Four plucks of the same string at the same pitch: in the middle, at a third, at a fifth, and at a tenth of the way along. The bars are the partials of the force on the bridge, taken from the bead simulation. The white marks are the formula. They agree to within decibels on every partial that matters. Now listen to the four.
In the middle, every even partial is missing, and the sound is hollow. Hold on to that sound: a clarinet has the same gap, for a different reason, and we will meet it in Part 8. At a third, partials three, six and nine are gone. And near the end, the first few partials are closer in level: bright, thin and nasal. At a tenth of the length, the tenth partial is still missing: it has a node at the plucking point.
Every player of a plucked or bowed instrument uses this, whether or not they know the formula. Guitarists and violinists have names for the two ends of the range: over the fingerboard for a soft, round tone, by the bridge for a bright, glassy one. A harpsichord maker chooses the plucking point for every string, and a piano's hammers strike about an eighth of the way along. Listen to one string as the plucking point walks from the middle to the end.
A question for your ears. The same note, plucked twice. Which one was plucked in the middle of the string?
. The hollow one, with its even partials missing. A was plucked a tenth of the way along. So one pluck sets a dozen modes going at once, in amounts we can calculate. The obvious question is whether we actually hear them.
9One string is a chordFoundations4 min
In 1636 Mersenne wrote down something odd. When he listened closely to one string he heard, besides its own note, at least four higher notes sounding with it. He could not explain them. Sixty-five years later Joseph Sauveur could: the string is swinging in all its modes at once, and each mode sings its own note. We can look at that directly. This picture is called a spectrogram. Time runs to the right, frequency runs upward, and brightness is loudness. Every horizontal line is one mode of the string. Here is a single pluck.
Now take the pluck apart. Each line of the spectrogram is one partial, and we can play them one at a time, each at the same loudness, from the bottom up. The table says what note each one is nearest to.
Read the names. , an octave above it, then a G, then another C. Partials four, five and six are C, E and G: a major chord, the most familiar chord in Western music, and our pluck contains all three. A different plucking point can remove one of them, as we just saw. The fit to the piano's notes is close but not exact. The E is cents flat of the piano's E, and the seventh partial falls cents below B flat, in a crack between the keys. Part 6 is about that crack.
So why do you not hear a chord when someone plucks a string? Try this. I will play the third partial on its own, quietly. Hold on to it. Then the whole pluck.
Most people find that the note is there once they know where to listen, and that it is hard to stop hearing it afterwards. Organ builders and piano tuners train themselves to do this all day. But left alone, your hearing does something remarkable: it takes a dozen frequencies and reports one note. How and why it does that is the subject of Part 4.
Some words. Any single frequency in a sound is a partial. The lowest is the fundamental for this string. Partials at whole multiples of it are harmonics. An overtone is a partial above the fundamental, so the first overtone is the second harmonic. And timbre is what tells two sounds apart when their pitch and loudness are the same.
For our string, the timbre is two lists. How strongly each partial starts, which the plucking point sets. And how long each one lasts. The fundamental rings for seconds; the tenth partial is gone in . That is why a plucked note starts bright and ends mellow. A note is not a frequency. It is a family of them, with a life in time. Now we can go back to Pythagoras with something he did not have.
10Why the ratios?Foundations4 min
Pythagoras had lengths and ratios. We have something he did not: we know that every string is a ladder of partials at one, two, three, four times its fundamental. So put two strings on one frequency axis. The lower string's ladder below the line, the upper string's above it. Start with the octave, where the upper string is twice as high.
Every partial of the upper string lands exactly on a partial of the lower one. of the lower string's first twelve are doubled, and the upper string brings nothing that was not already there. That is why an octave does not sound like two notes. It sounds like the same note, coloured differently, and it is why men and women singing a tune together an octave apart believe they are singing the same thing.
Worse than nothing, in fact. Look at the seventh partial of the lower string and the fifth of the upper. They miss each other by cents: too far apart to be the same, too close to be heard as two. What happens then is the last thing we need.
Two tones that nearly agree do not sound like two tones. They sound like one tone that swells and fades. The two waves drift in and out of step, adding when they are together and cancelling when they are opposed. These are called beats, and the number of beats per second is simply the difference between the two frequencies. Here is a fifth mistuned by cents, a difference you would never notice in a single note. First just the two partials that ought to meet. Then both strings, mistuned. Then both strings, tuned true.
That slow throb is how instruments are tuned. You do not judge the note; you listen for the beats and slow them down until they stop. And the picture was not a cartoon. It is the band where those two partials sit, filtered out of the sound you heard, and in the mistuned fifth it swells times a second: the difference of the two frequencies.
So here is a first answer to the question we started with, and it is essentially the one Hermann von Helmholtz gave in 1863. Strings in simple ratios share partials. Shared partials cannot beat. Move away from the simple ratios and the partials only nearly agree, and the sound throbs or grates. The simpler the ratio, the more is shared.
It is a good answer, and it is not the whole one. It depends on the partials being harmonic, which is true of strings and pipes and false of bells and drums. It tells us where the beats are, but not why an ear should care: there is no listener in it yet. And not every culture agrees that smooth is better. Each of those gaps is a later part of this series. For now, one more debt. Our string so far has been ideal, and no real string is.
11Real stringsPractice3 min
Everything so far was about an ideal string, and the ideal string has a flaw you can hear at once. Here it is, plucked: the wave equation and nothing else.
It never dies away. Every partial rings for ever at full strength, and it sounds like a buzzer, not an instrument. Now the string we have actually been using.
A real string loses energy three ways: to the air it pushes, to friction inside the wire, and through the bridge into the body of the instrument. That last loss is not a defect. It is the sound. A string that kept all its energy would be silent.
In the equation, loss is two extra terms. One brakes all motion alike. The other brakes sharp bends harder than gentle ones, so it takes more from the high modes, which are all bends. Each mode then dies away at its own steady rate.
Here is that rate for the first twelve partials: the curve from the equation, and the points measured on the bead simulation. They agree to within percent. The fundamental needs seconds to fall by sixty decibels; the twelfth partial, . That is what you saw in the spectrogram: a note that starts bright and ends as almost a pure tone.
The second thing a real string has is stiffness. A wire is not perfectly limp. It resists being bent, like a very thin ruler. That adds a restoring force of its own, a term with four derivatives, which hardly matters for a gentle curve and matters a great deal for a tight one. The effect is that the upper modes come out sharp. The partials are no longer exactly one, two, three times the fundamental. They are stretched. In this formula, f flex is Mersenne's frequency before stiffness is added. Even the first partial shifts above it.
On our half-millimetre wire the stretch is small: by the twelfth partial, cents above the flexible-string harmonic. Multiply the parameter kappa by six. At fixed mass, that means thirty-six times the bending rigidity. The twelfth partial is cents sharp: more than two semitones. Listen to what that does to a pluck.
It no longer sounds quite like a string. It is on the way to a bell, or a struck bar. A piano's bass strings are short and thick, so they are stiff, and this stretched ladder of partials is a large part of what makes a piano sound like a piano. Losses and stiffness change the modes, but they leave one thing alone: the modes still do not talk to each other. In the last chapter of this part's physics, that fails too.
12Frontier: when the string stretchesResearch4 min
Every result in this part rested on one quiet assumption: that the tension of the string is a constant. It is not. A string pulled aside is longer than a straight one. A longer string is a stretched string, and a stretched string is tighter. Kirchhoff put this into the equation in 1883: the tension grows with the total amount of slope along the string. For a gentle pluck the correction is nothing. But pull our steel wire aside by millimetres and its tension goes up by percent.
Tighter means higher. So the pitch of a string depends, a little, on how hard you play it, and it changes while the note dies away. Here is the simulation with Kirchhoff's term switched on: first a soft pluck, then a hard one, made equally loud so that only the pitch differs.
The hard pluck starts cents sharp, most of a semitone, and slides down to the true note as it fades. You know this sound: it is the twang of any slack string hit too hard. The obvious estimate, the square root of the average tension, predicts cents. The simulation gives more, because the string is tightest exactly when it is most bent. The linear theory of this part is a theory of quiet strings.
There is a second frontier, in the computer. How do you know a simulation of a violent, nonlinear string will not simply explode? The modern answer is energy. Start with our ideal, linear string. Its bead scheme conserves a discrete energy: motion between two time steps, plus stretch measured across those steps. It approaches the physical energy as the steps shrink. Over steps it wanders by a few parts in ten to the : rounding error. On a grid satisfying the wave-speed stability limit, this energy is positive and bounds the motion. That is the idea to carry into nonlinear instrument models, which need their own energy balance. This check is for the ideal string.
And here is where our model stops. Pluck a string a third of the way along and, by chapter eight, its third mode is missing. In 1984 Katherine Legge and Neville Fletcher measured real strings and found that the missing mode comes back: within about a tenth of a second it has grown to an amplitude you can hear. In our simulation, even with stretching, it never does. Stretching changes the tension everywhere at once, and that cannot pass energy from one mode to another. A real bridge that gives a little can.
So the frontier of the vibrating string, three hundred years after Taylor, is contact. Strings that touch things as they move: the curved bridge that gives a sitar its buzz, a slapped bass, a fret that rattles. A string also swings in two directions at once, and nonlinearity makes them trade energy, so the motion whirls. Writing simulations of these that are provably stable is work of the last ten years. This part's research problem is one of them, and we will need it in Part 34, when the series builds a tanpura.
13What we will buildFull course2 min
This part answered one question completely: why a string has a pitch. The other one, why simple ratios sound good, has been answered six times in twenty-five centuries, each time by a different science. Number. Vibration. Partials. Beats. The ear. And, in 2016, habit. To follow that question we will need all six sciences, and that is the plan of this series.
Three things will hold the series together. The first is an instrument. We call it Monochord, and today it is exactly that: one simulated string. Each part adds the layer it teaches. Real instruments: bows and hammers, reeds, a voice, drums and bells. The machinery of music theory. Oscillators, filters and effects. Then a whole studio, and finally machines that listen and write. Every layer is checked against something that does not share its code, the way today's beads were checked against d'Alembert's formula.
The second is a map. Music travels a chain: from a mind to a score, through a player's hands and an instrument, across the air to an ear and into another mind. Today we lit one link. The detour underneath, through microphones and loudspeakers, is how most music has travelled for the last hundred years. The third is the Tune. Every part ends by writing a variation on it, using only what that part has built, and the last part performs them. And three rules. Everything you hear, you will also see. Every sound is computed by the code we write: no recordings. And every part will train your ears as well as your pencil.
Variation 1, recap and problemsAll tracks3 min
Every part of this series ends the same way: by doing something to the Tune with what the part has just built. Today we built exactly one thing. So this is Variation 1: the Tune on one simulated string, with one bridge and six places to put it. Each place is a ratio of whole numbers. Nothing else is on this recording.
That goes into the ledger as row one. seconds, six positions of one bridge, and every interval within cents of its ratio. There are sixty-seven rows to go.
What did we find? An ideal string's lowest frequency follows from a wave's round-trip time, and counting the trips gives Mersenne's law. Newton's law for one small piece of string is the wave equation: a string accelerates where it is curved. Its motion can be told two ways, as travelling shapes or as standing modes, and the two are the same. A plucked string contains modes in amounts we can calculate, so one string is already a chord. Strings in simple ratios share partials, which is a first answer to Pythagoras. And real strings fade, resist bending and stretch.
Five problems. One to compute, one to derive, one for your ears, one to build in the repository, and a research problem, marked with a star. Full solutions are in this part's notes. Pause here.
Where does this come back? Modes and harmonics are the subject of Part 3, the foundation of Part 5 on consonance, and the whole physics of pipes in Part 8. Beats are how Part 6 tunes a keyboard. Stiff strings return in the piano of Part 7. And the bead simulation is how this series will build every instrument it plays.
And in practice. This is the daily arithmetic of anyone who designs a stringed instrument: a length, a thickness and a tension for every note. Players use the plucking point and the harmonics. Piano technicians live with stiff strings and tune by beats. And every plucked-string synthesizer is d'Alembert's two travelling waves, run in a loop.
The books and papers this part follows. The full list, with notes, is in the README.
One thing we stepped around all the way through. A string is thin. It slices through the air and moves almost none of it. Take the monochord's string off its box and stretch it between two nails, and you can barely hear it. So what does the box do? What is it that actually travels from the instrument to your ear, how fast, and how does it get round corners? That is Part 2: Waves in Air.
Where it goes next. Modes and harmonics become the spectrum of Part 3 and the consonance curves of Part 5; beats return when Part 6 tunes a keyboard; stiffness returns as the piano's stretched octaves in Parts 6 and 7. The bead simulation is how Parts 7 to 9 build every instrument, and d'Alembert's two travelling waves are the digital waveguide of Part 52. Monochord, the Chain and the Tune, introduced here, run through the whole series.
Key results
The part's results in one place, for revision.
Try it
Lab 1 · A string from beads: its pitch and its pluck
Simulate a random string as beads obeying Newton's law, read its pitch off the motion and compare it with (1/2L) sqrt(T/mu); then compare the partials of the force on its bridge with sin(n pi beta)/n.
python -m videos.music.labs 1
needs numpy, scipy, matplotlib · download lab01.py ·
source on GitHubstring L = 0.782 m, T = 77.0 N, mu = 1.20 g/m, 147 beads
pitch from the motion 161.61 Hz
(1/2L) sqrt(T/mu) 161.58 Hz (+0.32 cents apart)
plucked at 1/2 of the length
partials missing (theory) 2, 4, 6, 8, 10, 12
their level in the simulation -71 dB or lower
other partials: worst gap 0.04 dB from sin(n pi beta)/n
ear problem, the order (listen first) 1/2, 1/4, 1/10
Newton's law for the beads gives Mersenne's pitch, and a pluck excites mode n in proportion to the mode's own height at the plucking point: modes with a node there are missing.
The code (78 lines; it asserts its own result)
"""Lab 1: build a string from beads, measure its pitch against Mersenne's law, and its pluck against sin(n pi beta)/n."""
import numpy as np
from videos.coursekit import labs
from explainer.music.monochord import Clip, concat
from explainer.music.monochord.dsp import f0_autocorr, partials
from explainer.music.monochord.instruments import plucked
from explainer.music.monochord.physics import String, pluck_shape, simulate
TITLE = "A string from beads: its pitch and its pluck"
GOAL = ("Simulate a random string as beads obeying Newton's law, read its pitch off the motion and compare it with "
"(1/2L) sqrt(T/mu); then compare the partials of the force on its bridge with sin(n pi beta)/n.")
TASKS = [
"Change BETAS to (1/7,). Which partials vanish, and what does the bar chart look like at n = 7 and 14?",
"Give the string stiffness (kappa=1.5 in String(...)). How many cents sharp is the eighth partial, and does the fundamental move?",
"Add a struck start (Problem 4: zero shape, a velocity over 2 cm) and check that the partial levels fall as 1/n.",
]
BETAS = (1 / 2, 1 / 3, 1 / 4, 1 / 5)
SR = 48_000
def run(seed=0):
rng = np.random.default_rng(seed)
lab = labs.Lab()
# 1. a random string: its pitch from the motion alone
L, T, mu = rng.uniform(0.4, 1.0), rng.uniform(50, 150), rng.uniform(0.001, 0.006)
s = String(L=L, T=T, mu=mu)
beta = BETAS[int(rng.integers(len(BETAS)))]
out = simulate(s, lambda x: pluck_shape(x, s.L, beta, 1e-3), 0.3, sr=SR, snapshot_every=8)
f = f0_autocorr(out.pickup, SR, 0.5 * s.f1, 2.0 * s.f1)
cents = 1200 * np.log2(f / s.f1)
lab.row("string", f"L = {L:.3f} m, T = {T:.1f} N, mu = {1000 * mu:.2f} g/m, {out.N - 1} beads")
lab.row("pitch from the motion", f"{f:.2f} Hz")
lab.row("(1/2L) sqrt(T/mu)", f"{s.f1:.2f} Hz ({cents:+.2f} cents apart)")
assert abs(cents) < 3.0, "the beads' pitch is Mersenne's law"
# 2. the pluck: partials of the force on the bridge against sin(n pi beta) / n
n = np.arange(1, 13)
got = np.array([p["db"] for p in partials(out.force[: int(0.1 * SR)], SR, s.f1, 12)])
want = 20 * np.log10(np.maximum(np.abs(np.sin(n * np.pi * beta)) / n, 1e-9))
got, want = got - got.max(), want - want.max()
strong = want > -30
worst = float(np.abs(got - want)[strong].max())
missing = [int(k) for k in n if abs(np.sin(k * np.pi * beta)) < 1e-9]
lab.row("plucked at", f"1/{round(1 / beta)} of the length")
lab.row("partials missing (theory)", ", ".join(map(str, missing)))
lab.row("their level in the simulation", f"{max(got[k - 1] for k in missing):.0f} dB or lower")
lab.row("other partials: worst gap", f"{worst:.2f} dB from sin(n pi beta)/n")
assert worst < 1.5 and max(got[k - 1] for k in missing) < -40
# 3. three plucks to listen to (Problem 3): in the middle, at a quarter, at a tenth, in a shuffled order
order = rng.permutation(3)
places = (1 / 2, 1 / 4, 1 / 10)
notes = [Clip(plucked(seconds=1.6, beta=places[k])).fade(0.002, 0.1) for k in order]
lab.audio = concat(notes, gap=0.4).at_level(-18.0)
lab.row("ear problem, the order (listen first)", ", ".join(f"1/{round(1 / places[k])}" for k in order))
fig, (a, b) = labs.figure(2)
half = int(round(0.5 / s.f1 * SR / 8))
for i, k in enumerate(np.linspace(0, half, 7).astype(int)):
a.plot(out.x / s.L, out.snaps[k] * 1000, color=labs.GOLD, alpha=0.35 + 0.1 * i, lw=1.6)
a.set_title("The plucked string over half a period")
a.set_xlabel("position along the string (fraction of L)")
a.set_ylabel("displacement (mm)")
b.bar(n, got - (-60), bottom=-60, color=[labs.RED if k in missing else labs.BLUE for k in n], width=0.6,
label="simulated (beads)")
b.plot(n, np.maximum(want, -60), "o", color=labs.GOLD, ms=5, label="sin(n pi beta) / n")
b.set_ylim(-60, 3)
b.set_title(f"The force on the bridge, plucked at 1/{round(1 / beta)}")
b.set_xlabel("partial")
b.set_ylabel("level (dB below the strongest)")
b.legend()
lab.fig = fig
lab.note = ("Newton's law for the beads gives Mersenne's pitch, and a pluck excites mode n in proportion to the "
"mode's own height at the plucking point: modes with a node there are missing.")
return lab
Now change it
- Change BETAS to (1/7,). Which partials vanish, and what does the bar chart look like at n = 7 and 14?
- Give the string stiffness (kappa=1.5 in String(...)). How many cents sharp is the eighth partial, and does the fundamental move?
- Add a struck start (Problem 4: zero shape, a velocity over 2 cm) and check that the partial levels fall as 1/n.
Problems, with solutions
Try each problem before opening its solution.
-
A string's numbers. A string 65 cm long with a mass of 3 g per metre is tuned to 110 Hz. Find its tension and the speed of a wave on it. What interval does it rise by if the tension is doubled?
Solution
f = c / 2L, so c = 2Lf = 2 × 0.65 × 110 = 143 m/s. c² = T/μ, so T = μc² = 0.003 × 143² = 61.3 N, the weight of about 6.3 kg. Doubling T multiplies c, and so f, by √2: the string rises by 1200 log₂ √2 = 600 cents, half an octave (a tritone, to 155.6 Hz). This is the interval the legend's weights 12 and 6 really give; an octave takes four times the tension.
-
What the bridge feels. Show that the force a plucked ideal string puts on its bridge is a rectangular wave that is high for the fraction β of each period, and recover the amplitudes sin(nπβ)/n from it.
Solution
With F the odd, 2L-periodic extension of the plucked shape, u = ½[F(x − ct) + F(x + ct)]. The force on the end at x = 0 is T ∂u/∂x = ½T[F′(−ct) + F′(ct)] = T F′(ct), because the derivative of an odd function is even. For a pluck of height h at βL, F′ takes only two values: h/(βL) where |z| < βL (mod 2L), and −h/((1 − β)L) elsewhere. As ct runs through one period 2L, the first holds for a length 2βL, a fraction β of the period. A rectangular wave that is A for |θ| < πβ and B otherwise has cosine coefficients (2/π)(A − B) sin(nπβ)/n; here A − B = h/(Lβ(1 − β)), giving (2Th / πLβ(1 − β)) · sin(nπβ)/n. That is exactly T · aₙ · nπ/L with the aₙ of chapter 8. The narrow pulse of a string plucked near its end is why such a tone is bright, and why its peaks stand far above its loudness.
-
Ear. The lab plays three plucks of one note (
python -m videos.music.labs 1writesrenders/labs/music/lab01.wav). One was plucked a quarter of the way along. Which, and which partials told you?Solution
A pluck at 1/4 has no fourth, eighth or twelfth partial: every mode with a node at the plucking point is missing. On C3 the fourth partial is the C two octaves up (523 Hz) and the eighth the C above that. The pluck in the middle is the hollow one (no even partials at all), the pluck at a tenth is the bright, thin one, and the pluck at a quarter is between them, full in its low partials but without that high C. The lab's last row gives the order for the seed you ran.
-
Build. A hammer gives a string speed, not shape. Add a struck start to
simulateinexplainer/music/monochord/physics/string.py(an initial velocity v over a short stretch around βL, zero displacement) and show that its modes fall as 1/n where a pluck's fall as 1/n².Solution
The scheme needs the step before the start: for a pluck u(−k) = u(+k); for a strike u(−k) = u(0) − k v. Projecting the motion on the modes, a narrow strike gives velocity amplitudes ∝ sin(nπβ), hence displacement amplitudes ∝ sin(nπβ)/ωₙ ∝ sin(nπβ)/n. On the ideal monochord string struck over 2 cm at β = 1/5 (400 segments), the simulated mode amplitudes relative to the first are 0, −1.9, −5.5, −12.3 dB for n = 1…4 and −15.4 dB for n = 6, against 0, −1.8, −5.4, −12.0 and −15.6 dB from sin(nπβ)/n; the fifth mode is absent in both. A pluck at the same point gives 0, −7.9, −14.9, −24.1 and −31.1 dB. A struck string is brighter than a plucked one by a factor n in amplitude, 6 dB per octave: one reason a piano does not sound like a harp. At the bridge the factor n appears once more, so the force spectrum of an ideal strike is flat up to the hammer's width.
-
★ A string against a curved bridge. Model a string that meets a curved bridge as it swings (a sitar's or a tanpura's), with a scheme whose energy balance is exact, and compare its spectrum over time with the instrument's.
What is known. A string that wraps and unwraps round a curved bridge changes its sounding length within each cycle, and energy is fed continually into its high partials: the instrument's buzz (jawari). Raman (1921) noted that the usual rule for a plucked string's missing partials fails on these instruments. Burridge, Kappraff and Morshedi (1982) analysed the sitar string as a string against a rigid, inelastic obstacle. Naive contact schemes are unstable. Stable ones treat the contact as a stiff one-sided spring whose potential is included in a conserved discrete energy (Bilbao, Torin and Chatziioannou, 2015), or work in modal coordinates with a penalty force (Issanchou et al., 2017).
How to attack it. Add to the string's energy a term Σ (K/(α + 1)) [b(xᵢ) − uᵢ]₊^(α+1) for a barrier of shape b(x); derive the update from the discrete energy balance, so that the scheme is implicit only at the beads in contact; verify that energy is conserved to rounding when losses are off; then compare the spectral centroid over the first second with a measurement of a tanpura string. Open questions include how the bridge's own compliance and the cotton thread under the string (the jiva) should enter, and which features listeners actually use.
Where to start.
simulateandenergyinexplainer/music/monochord/physics/string.py; the series needs the result in Part 34.
Notes and sources
Sources
Textbooks. N. H. Fletcher and T. D. Rossing, The Physics of Musical Instruments (2nd ed., Springer, 1998), ch. 2 (the string), sec. 2.11–2.18 (damping, stiffness, nonlinearity). A. H. Benade, Fundamentals of Musical Acoustics (Oxford, 1976). S. Bilbao, Numerical Sound Synthesis (Wiley, 2009), ch. 6–8 (the schemes used here, their stability and their energy). J. W. S. Rayleigh, The Theory of Sound (1877), ch. 6. H. von Helmholtz, On the Sensations of Tone (1863; tr. Ellis), part II (beats and consonance).
History. H. F. Cohen, Quantifying Music: The Science of Music at the First Stage of the Scientific Revolution, 1580–1650 (Reidel, 1984), on Vincenzo Galilei and Mersenne. Galilei's experiments with weights are usually dated to about 1588 and were printed in his Discorso of 1589; the film says "the fifteen-eighties". The legend of the hammers is in Nicomachus, Manual of Harmonics (c. 100 CE), ch. 6, and Boethius, De institutione musica (c. 510), I.10. M. Mersenne, Harmonie universelle (1636). J. Wallis, letter in Philosophical Transactions 12 (1677), on the nodes. J. Sauveur, "Système général des intervalles des sons" (1701). B. Taylor (1713). J. le Rond d'Alembert, "Recherches sur la courbe que forme une corde tendue mise en vibration" (1747). L. Euler, "Sur la vibration des cordes" (1748). D. Bernoulli, "Réflexions et éclaircissements sur les nouvelles vibrations des cordes" (1753). J.-L. Lagrange, "Recherches sur la nature et la propagation du son" (1759). J. Fourier's memoir of 1807 and Théorie analytique de la chaleur (1822). For the quarrel as a whole: C. Truesdell, The Rational Mechanics of Flexible or Elastic Bodies, 1638–1788 (1960).
The frontier. C. V. Raman, "On some Indian stringed instruments", Proc. Indian Assoc. Cultiv. Sci. 7 (1921). R. Burridge, J. Kappraff and C. Morshedi, "The sitar string, a vibrating string with a one-sided inelastic constraint", SIAM J. Appl. Math. 42 (1982). G. Kirchhoff, Vorlesungen über Mechanik (1883); G. F. Carrier, "On the non-linear vibration problem of the elastic string", Quart. Appl. Math. 3 (1945). K. A. Legge and N. H. Fletcher, "Nonlinear generation of missing modes on a vibrating string", J. Acoust. Soc. Am. 76 (1984) 5–12. S. Bilbao, A. Torin and V. Chatziioannou, "Numerical modeling of collisions in musical instruments", Acta Acustica united with Acustica 101 (2015) 155–173. C. Issanchou, S. Bilbao, J.-L. Le Carrou, C. Touzé and O. Doaré, "A modal-based approach to the nonlinear vibration of strings against a unilateral obstacle", J. Sound Vib. 393 (2017) 229–251.
Not claimed. The film does not give lengths or counts for Mersenne's long strings, and it calls its estimate of the pitch rise from stretching what it is, an estimate (the simulation gives about a fifth more).
About this partfrom its README
Part 1 of a sixty-eight-part course in music (see the series plan and
the syllabus). The founding legend of music theory, Pythagoras and the blacksmith's hammers, is
false; the monochord is true. This part asks why a string has a pitch at all, answers it from Newton's law, and
ends with the discovery that one string is already a chord. Every string in it is simulated by the series' own
instrument, Monochord (explainer/music/monochord), in compute.py; every sound is that simulation, played. Dates
and attributions are the published ones, listed under Sources.
- The hammers. The Tune's first phrase on one string; the legend (weights 12, 9, 8, 6; octave, fifth, fourth) as Nicomachus and Boethius tell it; why it is false twice (an anvil's ring belongs to the anvil; a string under twice the weight rises by half an octave, 600 cents, measured on the simulated string); Vincenzo Galilei's weights (4 : 1 for the octave); the monochord, where the ratios do hold; the two questions of the part and the series.
- 1. One string, four numbers. The monochord (the kanon); the open string and its stops at 1/2, 2/3 and 3/4, each simulated and its frequency measured; frequency ratio = 1 / length ratio; an interval is a ratio, and intervals multiply (a fifth and a fourth make an octave; their difference is the tone, 9 : 8); the tetractys; a first question for the ear (which pair is the fifth?).
- 2. What sets the pitch. Length, tension and mass, one at a time, on the simulated string; Mersenne's laws (Harmonie universelle, 1636) and Mersenne's count of a slow string's swings; the test: twenty-four random strings, pitch measured from the motion alone, exponents fitted (−1, 1/2, −1/2) and the constant (1/2); a worked example (a guitar's top string carries 72.6 N; an octave from the peg alone would take four times that, and the wire breaks first, which is why a guitar's strings differ in thickness).
- 3. A wave on a string. A bump on a rope: it keeps its shape, travels at a steady speed, reflects upside down; the reflection as an image wave on an imaginary rope; superposition; the speed √(T/μ), timed in the simulation; the pitch of a string as the number of round trips per second, f = c / 2L, heard and seen in slow motion.
- 4. The wave equation. The string as beads on a thread (Johann Bernoulli, Lagrange); the force on one bead,
(T/h)(u₊ − 2u + u₋): each bead is pulled towards the midpoint of its neighbours; Newton's law for the bead is the
simulation's whole physics (two lines of
physics/string.py); 5, 15 and 199 beads, heard (the partials of a few beads are flat); the limit h → 0: ∂²u/∂t² = c² ∂²u/∂x² (d'Alembert, 1747); acceleration = c² × curvature, and why a plucked string can only start moving at its corner. - 5. Two travelling waves. f(x − ct) solves the equation for any f; d'Alembert's solution; a string released from rest is two half-height copies of its shape going opposite ways; the plucked string as straight lines and two running corners; the bead simulation against d'Alembert's formula (they differ by rounding error); the period 2L/c, so f = (1/2L)√(T/μ): Mersenne's law derived, and independent of the shape.
- 6. Standing waves. Shapes that swing in place: sin(nπx/L), frequencies n f₁; the first eight modes, their nodes, and each as a tone; the monochord's ratios are the ratios between neighbouring modes; a standing wave is two travelling waves; the touched harmonic, simulated (a finger at 1/2 leaves the even modes, at 1/3 modes 3, 6, 9); Wallis's paper riders.
- 7. The quarrel. d'Alembert (1747), Euler (1748), Daniel Bernoulli (1753), Lagrange (1759): can a sum of smooth sines make a corner?; the sum, added up and heard (1, 2, 3, 5, 10, 30 modes; the largest gap falls like 1/N); Fourier (1807) and Dirichlet (1829); thirty standing modes against two travelling shapes: one motion.
- 8. The plucked string. Fourier's recipe as a question put to a shape (multiply by the mode, take the area); the result, aₙ ∝ sin(nπβ)/n²; modes with a node at the plucking point are missing; what the bridge feels, sin(nπβ)/n; four plucking points, simulated against the formula and heard; sul tasto and sul ponticello.
- 9. One string is a chord. Mersenne's overtones and Sauveur's explanation; the spectrogram; one pluck taken apart, partial by partial: C, C, G, C, E, G, a flat B♭, C; partials 4, 5, 6 are a major chord; hearing one partial inside the whole; partial, fundamental, harmonic, overtone, timbre; how long each partial lasts.
- 10. Why the ratios? Two strings as two ladders of partials: at 2 : 1 every partial of the upper meets one of the lower; at 3 : 2 and 4 : 3 fewer; at the tritone none, and near misses; beats (a fifth mistuned by 12 cents); a first answer to Pythagoras after Helmholtz (1863), and the three things it leaves out.
- 11. Real strings. The ideal string never stops; where the energy goes; two loss terms, and each partial's decay rate, simulated against the model; stiffness, fₙ = n f_flex √(1 + Bn²), where f_flex = c/(2L) is the flexible-string reference rather than the stiff string's actual first partial; what greater bending rigidity sounds like (κ × 6 means rigidity × 36 at fixed mass).
- 12. Frontier: when the string stretches. The tension is not constant (Kirchhoff, 1883; Carrier, 1945): a hard pluck starts sharp and glides down, simulated and heard; the ideal linear scheme's conserved discrete energy, positive on a stable grid (a separate check from the nonlinear glide); what the model cannot do (Legge and Fletcher's missing modes that return), and what is open: strings that hit things.
- 13. What we will build. Six answers to "why do simple ratios sound good?" in twenty-five centuries; Monochord and its layers; the Chain; the Tune and the Variations; the series' three rules.
- Variation 1, recap and problems. The Tune on one simulated string with one bridge in six positions; the ledger's first row; the recap; five problems; where this comes back; in practice; the reading list; Part 2.
What is computed and built
python -m videos.music.music1.compute (under a minute) fills .cache/music1/. The string is the monochord's:
one metre of 0.5 mm steel wire, tuned to C3 (130.81 Hz), with the stiffness of that wire and losses chosen so that
its brightness fades before its pitch does (explainer/music/monochord/instruments/plucked.py).
| Item | What it computes | Checked against |
|---|---|---|
hammers |
the legend's weights on a string: √2 for 12 : 6, measured on the simulated string | the square-root law |
ratios |
the stops at 1/2, 2/3, 3/4: frequency measured from the motion | 2, 3/2, 4/3 (to 0.2 cents) |
mersenne |
pitch against L, T, μ; a power law fitted to 24 random strings | exponents −1, 1/2, −1/2; constant 1/2 |
pulse |
travelling, reflected and crossing pulses; the wave speed, timed | √(T/μ) |
beads |
the modes of 5, 15 and 199 beads | (cN/πL) sin(nπ/2N) |
dalembert |
the plucked ideal string by finite differences | d'Alembert's formula (10⁻¹⁵) |
modes |
a finger at 1/2 and 1/3 of a ringing string (a point damper) | which modes have a node there |
fourier |
partial sums of the pluck and their error | the 1/N law |
pluck |
partial levels of the bridge force at four plucking points | sin(nπβ)/n (to 0.4 dB) |
coincide |
the partials two strings share at 2 : 1, 3 : 2, 4 : 3 and the tritone; the band round 392 Hz filtered out of the mistuned fifth | 6, 4, 3, 0 of twelve; beats at f₂ − f₁ = 2.73 Hz (2.74 measured in the clip) |
real |
each partial's decay, and its sharpening by stiffness | σ₀ + σ₁(nπ/L)²; n f₁√(1 + Bn²) |
nonlinear |
the stretching string (Kirchhoff–Carrier); the scheme's energy | √(mean tension) as a lower estimate; exact conservation |
tune |
Variation 1, and each note's interval above the open string | its ratio (to 0.6 cents) |
The three routes to the string's motion (beads, d'Alembert's formula, the sum of modes) are held against each other
in tests/music/test_string.py. The loudness meter that sets every clip's level is checked against ffmpeg's
ebur128 in tests/music/test_audio.py.
Sounds. Thirty-odd clips, all labelled on screen: physical model (the bridge force of the simulated string,
by the sum of its modes or by finite differences) or synthesized (pure tones). There are no recordings. The only
composition rendered is the Tune, Ah! vous dirai-je, maman (anonymous, France, 18th century; public domain).
Clips that place two strings left and right are marked as needing headphones for the split; nothing in the part
depends on stereo.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: the hammers, and what happens when you actually weigh them. The Tune's first two notes, a fifth.
- The monochord: stopping the string at 1/2, 2/3, 3/4. Ratios of length, heard and drawn.
- What vibrates: tension, mass, length. Mersenne's laws (1636), verified on our string.
- A wave on a string: the travelling pulse, reflection at a fixed end, superposition.
- Deriving the wave equation from Newton's law on one small piece.
- d'Alembert's solution (1747): two travelling waves. The simulation and the formula, overlaid.
- Standing waves: two travelling waves make a mode. Nodes, and the harmonic touched on a guitar.
- The quarrel: Bernoulli says every motion is a sum of modes; Euler and d'Alembert object. Fourier settles it sixty years later (Part 3).
- The plucked string: its shape as a sum of modes, amplitudes falling as 1/n², and the harmonics missing at the plucking point.
- Sauveur (1701): the overtones are in the sound. One string, heard as a chord, partial by partial.
- Why the ratios: the octave shares every second partial, the fifth every third. A first, incomplete answer.
- Damping and stiffness: why real strings decay and are slightly sharp in their upper partials (paid off in Part 7).
- Monochord, the series' instrument, introduced; the Tune, the Variations and the Chain.
- Frontier: nonlinear strings (tension modulation, pitch glide, whirling); energy-conserving schemes.
- Variation 1: the Tune on one simulated string. Outro: problems, payoffs. What carries the sound to the ear?
Built and computed: a finite-difference string (numba), checked against d'Alembert and against the modal sum to a tolerance; Mersenne's three laws recovered by regression; pluck-position spectra. Heard and seen: the monochord's ratios; one mode at a time; the pluck moved along the string. In practice: instrument makers' string scaling; every physical-modelling synthesizer starts here. Reading: Mersenne, Harmonie universelle (1636); Fletcher & Rossing ch. 2; Benade; Bilbao, Numerical Sound Synthesis; Cohen, Quantifying Music.
Build the film
python -m videos.music.music1.compute # the part's numbers, into .cache/music1
python tools/build.py music1 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py music1 Hook # one chapter, silent, with a contact sheet
Scenes: videos/music/music1. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.music.music1.compute # numbers and sounds (under a minute)
EXPLAINER_TTS=silent python tools/build.py music1 -q l --fps 15 # a silent-narration preview, with the sounds
python tools/qa_sound.py music1 --sync # the sound gates
python tools/dead_air.py renders/music1_480p.mp4 --sound music1 # no empty screen; no sound over a still one
python tools/lecture_length.py music1 # 30 to 60 minutes, listening included
python tools/build.py music1 # 1080p30, narrated
python -m pytest -q tests/music # Monochord against its references; this part's claims and clips
python -m videos.music.labs 1 # the lab (writes a figure and a short WAV)