How it works
Winchester has no recordings of a hard disk. It has a model of one — its geometry, its arm, its buffer, its file system — and it listens to what that model does. This page follows a request from the file system down to the speaker.
The chain
Five stages, and nothing recorded in between.
- A volume, generated from a history Years of use replayed through the allocator of the disk’s file system: which files exist, and exactly which clusters each one holds.
- A planner A boot, an installation, a day of use or a defragmentation decides which files to read or write, in which order, and how long the computer computes between two requests.
- Block requests, one at a time A date, a logical block address, a number of sectors, read or write — what an operating system actually sends a disk.
- The drive’s mechanics Buffer and bus, the block address turned into cylinder, head and sector on a zoned platter, the seek, the rotational latency, the transfer. Out comes a timeline of seeks, head switches, track steps and transfers.
- Sound, map and haptics That timeline drives the head synthesiser, the spindle voice, the Taptic Engine and the cluster map — all on one clock.
A history
Fragmentation is not a setting. It is a residue.
Nobody asks for “a disk at 23 % fragmentation”. A disk is written as a story — an installation, builds, downloads, documents saved over and over, updates, and the day someone finally tidies up — and the story is replayed through the allocator of the file system it lives on. The same story on three file systems gives three volumes that have nothing in common:
- MS-DOS FAT serves the first free cluster from the start of the volume, at every write: holes are plugged at once, and recent files are chopped up.
- VFAT and FAT32 resume at the last cluster allocated: writing is clean while the cursor advances, then it wraps round and fragmentation arrives in waves.
- NTFS picks the hole that fits rather than the first one it meets, and reserves a zone for its master file table: files stay in one piece far longer. On a volume formatted by Windows XP, the allocator follows the driver’s own code: the smallest free run that fits, taken from its cache of free runs; a file whose size is not known in advance grows as it is written, and its first cluster lands in the smallest hole that holds it.
Directories exist and grow like files. The swap file is open and never moves. And a defragmentation works on the clusters the allocator actually handed out, not on an approximation of them.
The system
Windows XP, as its own source code does it.
Between the files and the disk sits an operating system, and for
everything dated Windows XP the model follows the XP SP1 source
code rather than a description of it: where FORMAT
lays out an NTFS volume, how the driver allocates clusters, how the
defragmenter moves files, how a boot is prefetched, and how the
cache writes behind.
- The boot is read back by the prefetcher in the order it was first used, in large batches issued at once — MFT records first, then data, then executable images.
- The IDE driver serves what is waiting in increasing block order from its current position, so a batch is heard as one sweep of the arm.
- The cache’s lazy writer wakes once a second, three seconds after the first page is dirtied, and writes an eighth of the dirty pages, stream by stream, the log first.
- The defragmenter first lays out the boot files, pulls the MFT back together, repairs files in pieces into the smallest hole that holds them, empties a region when none does, then packs everything towards the start, in 64 KB blocks, each a transaction.
Windows 95 and 98, Vista and 7 are not in that code: they keep the
model they had, and the project’s README.md says so,
point by point.
The drive
Deduced from real datasheets, and from the year.
A capacity alone does not describe a disk: the same gigabyte is a whole drive in 1996 and a corner of a platter, read five times faster, in 2003. So the model interpolates in time between eight drives that were really sold, whose datasheets it carries — the number of tracks per surface, which sets the arm’s stroke and so the whole acoustics of a seek, and the capacity of a surface, which sets the number of platters.
| Drive | Year | Buffer | Bearing |
|---|---|---|---|
| Conner CFA170A | 1993 | 64 KB | ball |
| Quantum Fireball 1080AT | 1996 | 128 KB | ball |
| Seagate U8 | 1999 | 512 KB | ball |
| Seagate Barracuda ATA IV | 2001 | 2 MB | fluid |
| Seagate Barracuda 7200.7 | 2003 | 2 MB | fluid |
| Seagate Barracuda 7200.10 | 2006 | 16 MB | fluid |
| Seagate Barracuda 7200.11 | 2008 | 32 MB | fluid |
| Seagate Barracuda 7200.14 | 2012 | 64 MB | fluid |
A 10,000 rpm drive is not a 7,200 rpm one spun faster. The VelociRaptor put 2.5-inch platters in a 3.5-inch heatsink, so that the air at the edge moves no faster than on a desktop drive. From 2008 on, a 10,000 rpm disk takes its mechanics — smaller platters, fewer tracks per surface, its track-to-track seek, its ramp — at the density of its year, and in 2012 lands exactly on the datasheets of the WD1000DHTZ and WD5000HHTZ.
- The seek follows the two-regime law of Ruemmler and Wilkes (IEEE Computer, 1994) — a square root of the distance for short seeks, a straight line beyond — split into speed-up, coast, slow-down and settle. A seek before a write settles longer, as the datasheets publish.
- Rotation and transfer are simulated sector by sector, with track steps and head switches at the end of a cylinder.
- The buffer reads ahead after a read, and the write cache acknowledges a write at once and lays it down later, in elevator order — so the disk works while the computer computes, as a real one did.
- Power-on is in three stages: the motor spins up, the heads unstick from the platter, and the drive seeks its track 0. At power-off the platter spins down and the heads land. Drives of 2012 park their heads on a ramp instead: they never touch the platter, so they neither unstick nor land.
- Drives from before 1997 recalibrate two minutes after they are ready, then every four minutes: a second of crackle, the signature sound of that generation.
The sound
Resonators that do not change pitch, excited by a moving arm.
The head. A bank of resonators at fixed frequencies — modes near 4.5 kHz (the arm’s sway) and 5.5 kHz, and five more — is excited by a current profile drawn from the four phases of each seek. The structural resonances of an actuator do not transpose with seek speed: only the excitation changes. A short seek has no coasting phase, so the shape of the sound changes with the distance, not only its loudness. Its loudness follows the drive’s manual: the seek sound power it publishes, the idle level subtracted, heard at half its decibels, like the spindle.
Trains. Two seeks close together never fire two separate sounds. They are merged into one continuous render passed once through the resonators — a rule borrowed from MAME’s floppy-drive emulation, where retriggering the step sample sounded “much too loud”. Head switches and track steps less than 30 ms apart are treated the same way, which is why a long sequential read is heard as a pitch rather than a string of ticks.
The spindle is filtered noise shaped by three figures taken from the datasheets: spindle speed, number of platters, and bearing. Ball bearings, until 2000, whistle and beat once per revolution; fluid bearings leave the smooth breath of air around the platters.
Haptics receive the same cues as the audio. A single seek is played as its four phases; a dense train becomes one continuous event, because at 150 seeks a second a burst of transients is mush to the hand.
Live
Nothing is computed in advance.
The planner runs on its own thread and emits its requests one by one instead of stacking them up; each goes straight through the drive simulation and into a buffer, and the thread sleeps as soon as it is about eight seconds ahead of what you hear. The screen, the sound and the haptics only ever read the present moment. That is why a pass has no known length before it ends, why there is no rewind, and why a map block changes colour exactly when its write is heard.
The platter on screen comes out of the same timeline. The one licence is the angle: a platter turning 120 times a second cannot be drawn at 60 frames a second, so it is slowed down a hundredfold — the same factor for every disk, so a 3,600 rpm drive still turns half as fast as a 7,200 rpm one.
Estimates
What is measured, and what is tuned by ear.
Geometry, seek times, buffers, spindle speeds and bearings come from manufacturers’ manuals. The timbre does not: no manual publishes the spectrum of its drive, so the frequencies of the spindle bands, the depth of the bearing’s beat and the way the head’s modes are dosed with distance are estimates, set by listening. The hum is the weakest link — computed from the spindle speed, for lack of a recording.
The project’s README.md goes through the figures with
their sources, and says which ones are estimates.
- Source code
- github.com/glandais/winchester
- Questions and bug reports
- github.com/glandais/winchester/issues