Five bells, no recordings: how Horologe's bells are computed
None of Horologe's five bells is a recording. Each strike is computed the moment it sounds, from a table of the bell's own partials: the frequencies a real bronze bell rings at, how loud each one starts, and how long each one takes to die. The whole app, four faces and five bells, weighs about three and a half megabytes. A single recorded bell, done properly, weighs more than that.
This is the post about how that works. It's a bit longer than the others, and there are two bells partway down that you can strike yourself.
A bell isn't a note
Press a piano key and you get one pitch and its harmonics: two times, three times, four times the fundamental, all lined up. A bell refuses to line up. Strike a tuned English bell and you hear, at the same time, a hum at half the strike note, the prime at the strike note, a tierce a flat minor third above it, a quint, and the nominal an octave up, which is the loudest of the lot. The minor third is why church bells sound sad. It's cast into the shape.
Above those five come the ones a campanologist can still name, and above those a dense family nobody names: in our Westminster voice, twenty-five more modes between three and a half and forty-one times the prime. That family is the clang. It's loud for a tenth of a second and then, because those modes radiate badly, it fades slowly and leaves a bright shimmer over the ring for a second and a half. Leave it out and you don't get a bell. You get an organ pedal.
So the table for one bell is thirty-three rows. Each row is a ratio, a starting level, and a time to silence. The hum in Westminster takes nine seconds to fall sixty decibels. The nominal takes about two and a half. The highest mode is gone in a fifth of a second. Mix them and you have most of a bell. Most, not all.
What makes it bronze rather than a synthesiser
Adding sines to a table is the easy part, and it's where nearly every synthesised bell stops, which is why nearly every synthesised bell sounds like a doorbell. Five things in ours are there to stop that.
- The onset has a speed limit. A clapper is a lump of metal that deforms on contact, so the force ramps up over a millisecond or two. Measured on real bells the strike takes two to five milliseconds to go from a tenth of its peak to nine tenths. Slower is a swell. Faster is worse: nothing made of metal hitting metal rises in a quarter of a millisecond, and a quarter-millisecond edge is the single most machine-like thing a bell can do.
- The clapper is two noises. Under the ringing there's a broad low thud, the clapper deforming the rim, that dies in about forty milliseconds, and above it a thin bronze-on-bronze chip that lasts two or three times longer. Leave the chip out and the bell sounds recorded through a blanket.
- Every mode dies at its own rate, and the high ones die slowly. The tuned partials lose energy to the air, so the higher they are the faster they go. The clang family doesn't couple to the air well at all. It's damped by friction inside the alloy, which barely cares about frequency, so a real casting's shimmer at three kilohertz lasts seconds, not a third of a second. Let the low-mode rule run all the way up and the bell collapses into a sine drone inside a second. A recording never does that.
- Each mode is really two. No casting is perfectly round, so every mode splits into a pair a few cents apart, and the clapper hits one harder than the other. The pair beats, but unevenly, a two to six decibel undulation rather than a full null, and every pair beats at its own rate, between half a hertz and three and a half. One global rate makes the whole bell swell and dip in lockstep, which no bell has ever done. The warble of a real bell is several unrelated rates drifting through each other.
- No two blows land the same. Where the clapper meets the rim, how hard, how glancing: each of those moves individual modes by several decibels on every strike. Identical strikes read as a machine gun. In Horologe each blow in a count gets its own draw, so the twelve strokes of midnight are twelve different blows, spaced a few milliseconds off the beat the way a train of levers and cams would space them.
After that, the sum runs into a soft-knee limiter that only touches the transient peak, the same trade every microphone preamp that has ever recorded a bell makes. Below the knee the signal path is linear. Put the output through a spectrum analyser and you see exactly the partials the table asked for, and nothing else.
Strike one
These two are the Westminster hour bell, the big one an octave below the quarters, and the Grandfather, which isn't a bell at all but the chime rods of a longcase clock, struck by a felted hammer. They're rendered in your browser from the same tables the app uses, ported to JavaScript, and they're dry: no room around them. The app and the front page put each in one. Turn it up, and press a button twice. The second blow isn't the first one played again.
E, about 165 Hz. Thirty-three modes, hum nine seconds.
C, about 262 Hz. A rod, not a bell: fewer modes, and the fundamental is the loud one.
Why not just record one
Because a recorded bell is a hundred takes, several hundred megabytes, a licence agreement, and the same tenth stroke forever. Loop it and there's a seam. Play it twelve times and it's the same blow twelve times. The other reason is smaller and we like it more: a computed bell can be struck at any pitch. The four notes of the Westminster quarters are one casting, scaled. That's how a real founder would do it too.
The honest cost is on our side of the counter. A new bell isn't a recording session, it's a tuning problem: the ratios and the decay rates have to be found and argued over until the thing rings true, and most attempts along the way sound like a doorbell. Five voices ship. Westminster and Whittington are tower bells in the minor-third family, one on E and one on G. Ship's Bell is small brass, high and short. Temple Bowl is a struck standing bowl on G, one note that takes a long time leaving. Grandfather is the rods.
If you'd rather hear them in a room, the front page strikes three. If you'd rather have one on your desk, it's $5.99, paid once, on the Mac App Store. And if you'd like to know what to do with the thing once it's there, start with the hour strike only.
Read next: How to make your Mac chime on the hour