Skip to content

A web page that plays a distractingly irregular tick-tock sound, mimicking Vetinari’s clock in Discworld.

License

Notifications You must be signed in to change notification settings

roryokane/vetinari-clock-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vetinari Clock Simulator

A web page that plays a distractingly irregular tick-tock sound, mimicking Vetinari’s clock from Terry Pratchett’s Discworld series.

The clock in Lord Vetinari’s anteroom didn’t tick right. Sometimes the tick was just a fraction late, sometimes the tock was early. Occasionally, one or the other didn’t happen at all. This wasn’t really noticeable until you’d been in there for five minutes, by which time small but significant parts of the brain were going crazy.

Going Postal by Terry Pratchett, page 321

Visit the page and click “Start Ticking”. Does your thinking turn to porridge?

Someone very clever—certainly someone much cleverer than whoever had trained that imp—must have made the clock for the Patrician’s waiting room. It went tick-tock like any other clock. But somehow, and against all usual horological practice, the tick and the tock were irregular. Tick tock tick…and then the merest fraction of a second longer before…tock tick tock…and then a tick a fraction of a second earlier than the mind’s ear was now prepared for. The effect was enough, after ten minutes, to reduce the thinking processes of even the best-prepared to a sort of porridge. The Patrician must have paid the clockmaker quite highly.

Feet of Clay by Terry Pratchett, page 91

How it ticks

The clock ticks roughly every second. The sound alternates between “tick” and “tock” most of the time, but sometimes repeats the same type of sound to confuse you.

Every tick, the program randomly decides to either tick perfectly on time, or skew its tick slightly off. When it chooses to skew its tick, it randomly chooses how far to skew, and in which direction.

The total skew over time is restricted. If the clock starts getting too far ahead or behind the actual time, the clock starts skewing in the opposite direction, so that it stays roughly accurate.

When the total skew is far enough behind the actual time, there is some probability that the clock will skip a single tick. When it does this, the played tick is still randomly skewed. Normal ticks are more likely to be skewed negative than positive, so that tick skips can happen often enough to be noticeable.

On slow computers, sometimes the browser delays the next tick unexpectedly, such as by two seconds instead of one second. Thankfully, this lag just adds to the effect.

Related works

  • schematics for building a physical clock like this and a video of one, by Akafugu Corporation
  • a video of a physical clock built like this and comments on it, by rdmiller3

About

A web page that plays a distractingly irregular tick-tock sound, mimicking Vetinari’s clock in Discworld.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published