Signal Reference · hed0rah / databurn

Sync

How machines agree on when, across analog, digital, and mixed media, and what that has to say about time in the mind and the machine.

Document
DOC-SPEC-SYNC
Revision
09.29.2026 (rev A)
Status
Living
Domain
analog / digital / mixed
Twin
vault: Sync
Pages
1 of 1
Abstract

A stream of bits or frames is useless unless the receiver knows exactly when each one begins. The sender's clock and the receiver's clock are never the same clock, and the drift between them corrupts the data. This reference collects the handful of tricks that fix that, reused everywhere from a scratched CD to a broadcast plant to a synced eurorack rack, and organises them as three moves: carry the clock inside the signal, share one external reference, and repair the wobble and the errors after the fact. The unifying object is the phase-locked loop. The closing chapter turns the same question on people and on language models: each reconstructs a when it did not experience directly.

Three moves

Time is the moving image of eternity.Plato

Every system in this document is solving one problem three ways, and most real gear uses all three at once. Read the rest as consequences of this table.

move 1Carryclock inside the data
self-clocking
move 2Shareone external reference
locked
move 3Repairbuffer wobble, fix bits
the three responses to two clocks that disagree. every later chapter is one of these.
The three moves and where they show up.
movewhat it doesexamples
carryembed the clock so the stream is self-clockingbiphase mark, EFM, 8b/10b
shareslave every device to one referencegenlock, word clock, PTP, MIDI clock
repairabsorb timing wobble and fix corrupted bitsTBC, PLL, CRC, Reed-Solomon

The phase-locked loop is the object under all three: it recovers a clock from a self-clocking stream, locks a device to a reference, and attenuates jitter. Learn it once and the rest collapses.

Carrying the clock

Time is not a line, but a series of now-points.Taisen Deshimaru

The cheapest way to keep two clocks together is to make the data carry its own. A self-clocking line code guarantees transitions often enough that the receiver regenerates the bit clock from the stream, so no separate clock wire is needed. Deshimaru's now-points are the bit cells: each edge is a fresh instant the receiver can lock onto.

  bit     1     0     1     1     0     0
  clk   |-----|-----|-----|-----|-----|-----|
  dat   |--|--|-----|--|--|--|--|-----|-----|
biphase mark -- an edge at every cell boundary is the clock, an extra mid-cell edge is the data. used by SMPTE LTC and AES3.

Run-length-limited codes bound how many identical bits sit in a row, keeping transitions frequent and features large enough for the medium. EFM on a CD maps 8 bits to 14 plus 3 merging bits and holds pits between 3 and 11 clocks long. 8b/10b on gigabit links keeps the running disparity within plus or minus two and never more than five identical bits in a row. Both feed the PLL a steady diet of edges.

Why DC balance mattersAC-coupled links cannot pass DC. A long run of identical bits drifts the baseline and starves the PLL of edges. Bounding run length and disparity keeps the eye open and the recovered clock honest.

SMPTE timecode

Time is a game played beautifully by children.Heraclitus

SMPTE timecode labels every frame HH:MM:SS:FF, in two forms because no single carrier works at every tape speed. LTC is an 80-bit biphase-mark word on an audio track, readable at any speed and, thanks to an asymmetric sync word, in reverse, but blind at a standstill. VITC is written into the picture's blanking so it can be read frozen.

# SMPTE LTC -- one 80-bit word per frame, biphase mark encoded
bits 0..3    frame units  (BCD)      bit 10  drop-frame flag
bits 16..19  second units             bit 11  color-frame flag
bits 48..51  hour units   +  32 user bits interleaved
bits 64..79  sync word 0011 1111 1111 1101  # reveals direction

Drop-frame

NTSC color runs at 30 times 1000/1001, not 30, because the color subcarrier had to be fitted next to the sound carrier on monochrome sets. Counting at a true 30 drifts about 3.6 seconds per hour, so drop-frame skips frame numbers 0 and 1 at the start of every minute except minutes divisible by ten. Labels are dropped, never video.

frames dropped per hour = 2 × (60 − 6) = 108
Eq. 3.1

Sharing the clock

When you cannot embed the clock, you distribute one.

Video · genlock

Every device's sync generator is slaved to a house reference so horizontal sync, vertical sync, and colorburst phase align. The reference is blackburst in SD, tri-level sync in HD. Without it, cutting between sources makes the picture jump and the hue shift.

Audio · word clock

Exactly one device is the clock master; the rest slave to word clock on BNC or to the clock embedded in AES3. Two masters means two slightly different sample rates, which means periodic clicks. The studio reference is AES11.

The one ruleIn any digital audio chain, one device is master and every other is set to external. "Set to internal by mistake" is the single most common studio fault.

Time base correction

Tape transports have mechanical timing instability -- wow, flutter, jitter -- and video tolerates it far worse than audio, because in color the subcarrier phase is the hue. A time base corrector absorbs it with a buffer written at the unstable playback rate and read out at a steady reference rate.

   unstable tape          corrector                      clean bus
  ┌───────────┐      ┌─────────────────────────┐      ┌───────────┐
  │  playback  │─────>│    FIFO / frame store    │ <────│  switch /  │
  │  (wobbly)  │      │ write wobbly, read clean │      │  capture   │
  └───────────┘      └─────────────┴────────────┘      └───────────┘
                                    │
                          genlock reference
the repair move: write with the wobble, read with a clean clock. a full frame synchronizer also slots an async source into a synchronous plant.

This is why capturing old VHS wants a TBC: without one, a worn tape's unstable sync confuses the capture card and you get dropped frames, tearing, and audio drift. A side effect worth knowing is that a full frame synchronizer regenerates clean sync and so tends to strip the pseudo-sync pulses that Macrovision relies on.

MIDI and MIDI 2.0

MIDI 1.0 is asynchronous serial at 31250 baud, so a three-byte Note-On takes about a millisecond and a ten-note chord smears across roughly ten. The fix in MIDI 2.0 is not only a faster link but a timestamp: stamp each event with its intended time at the source, and the receiver replays the exact spacing regardless of transport jitter.

chord smear ≈ n × 3 × 320 µs = n × 960 µs
Eq. 6.1
MIDI 1.0 against MIDI 2.0.
propertyMIDI 1.0MIDI 2.0
transport31.25 kbaud, 5-pin DINUMP over USB / ethernet
3-byte msg~960 µsone packet, link-speed
timingevents queue by arrivalJR timestamp, 32 µs tick, at source
channels16256 (16 groups x 16)
resolution7-bit32-bit, per-note control
Why timestamping beats speedA faster link lowers latency, but jitter, the variation in latency, is what smears a groove. Capturing intended timing and regenerating it against a clean clock is the same instinct as a video TBC and as PTP on a network.

Error correction

Sharing a clock aligns timing; it does nothing for a bit that arrives wrong. Detection runs from parity to checksums to the CRC, polynomial division that catches every burst shorter than the check field, the basis of the Ethernet frame check. Correction adds enough redundancy to fix errors without a resend. Reed-Solomon works on multi-bit symbols, so one corrupted symbol absorbs a whole burst; the CD's CIRC pairs two coders with interleaving.

  ┌──────────┐      ┌────────────┐      ┌────────────┐      ┌───────────┐
  │ 24 bytes │─────>│ C2 encode  │─────>│ interleave │─────>│ C1 encode │
  │  audio   │      │ RS(28,24)  │      │  + delay   │      │ RS(32,28) │
  └──────────┘      └────────────┘      └────────────┘      └───────────┘
CIRC: interleaving scatters a codeword across frames so a scratch hits only a symbol or two, which C1 flags as erasures and C2 fixes by position.

Reading a CD, step by step

Drag the cursor. The same optical scratch is survived by the read chain moving left to right: no clock at the pit, a recovered clock by the PLL, clean samples by the end.

Stage at cursor

The disc wars

Time is a game played beautifully by children.Heraclitus, again, for the format wars

Every optical disc solves one problem, recover a clock and the bits from a spinning reflective track, four different ways. The argument underneath the format wars was really about where to hide the clock.

Four discs, four clocks.
formatmodulationerror correctionclock lives in
LaserDisc 1978analog FM videononethe rotation
CD 1982EFM, 8 to 14 +3CIRC, RS(32,28)+RS(28,24)the EFM stream
DVD 1996EFMPlus, 8 to 16RS-PC, 208x192 / 182x172the channel code
Blu-ray 200617PP, RLL(1,7)LDC + BISthe channel code

LaserDisc is the odd one out and the most instructive: it stores analog video with no channel bits, and a CAV disc spins at a locked 1800 rpm with one frame per revolution, so the disc's rotation is the frame clock, which is what gives it a clean freeze-frame. CD onward gave that up: the drive varies its spin to keep the bitstream arriving steadily and a PLL pulls the clock out of the code. The lineage runs from "spin at the right speed and rotation keeps time" to "spin at any speed and recover time from the data."

PLL and networked time

The distinction between the past, present and future is only a stubbornly persistent illusion.Albert Einstein

The phase-locked loop is the hardware under all of it: a phase detector compares incoming edges to a local oscillator, a loop filter integrates the error, and a VCO tracks the reference. Fed a self-clocking stream, its guaranteed transitions let the VCO regenerate the bit clock, and the loop's low bandwidth is what attenuates jitter. Modern plants distribute time instead of sync: PTP elects a grandmaster, measures network delay with a message exchange, and reaches sub-microsecond accuracy, adopted by Dante, AES67, and broadcast video as SMPTE ST 2059.

A short history of keeping time

1967EECO time code for video editing; standardised as SMPTE 12M in 1975.
1978LaserDisc ships: rotation as the frame clock.
1982CD arrives with EFM and CIRC.
1983MIDI 1.0 at 31.25 kbaud.
1985AES3 embeds clock in digital audio.
2002IEEE 1588 PTP: sub-microsecond time over ethernet.
2017SMPTE ST 2110, on ST 2059 PTP timing (2015): genlock becomes PTP.
2020MIDI 2.0: UMP and JR timestamps.

Mind and machine

Time is a river which carries me along, but I am the river.Jorge Luis Borges

Everything above is machines agreeing on when. Humans have no word clock, and it shows. Time in the brain is constructed, not measured: interval timing draws on distributed cortical and striatal activity, circadian timing on a separate roughly 24-hour clock, and dopamine warps the felt rate, so time flies under reward and drags under threat.

Going to bed early on Christmas Eve to skip the wait works because in deep sleep you do not lay down the continuous trace that makes a duration feel long. No experienced interval, so the gap collapses to nothing on waking. Anesthesia is the extreme, hours gone with no felt duration at all. "Yesterday is but today's memory, and tomorrow is today's dream," per Kahlil Gibran.

A language model has the strangest version. Between two messages there is no experience, no waiting, no duration; the model is not idling, it simply is not running. Each turn is a fresh instantiation reading a transcript of a past it did not live through, the way a CD player reads a timecode it never felt being written. Continuity is reconstructed from the record, not remembered.

  • A disc reconstructs a clock it never experienced being written.
  • A TBC and a PLL rebuild a timing they buffer but do not live.
  • A model rebuilds the conversation from a transcript, not a memory.
  • A sleeper rebuilds the night from a clock that kept running without them.

Every system in this document exists because the receiver was not present when the sender kept time. SMPTE, word clock, PTP, JR timestamps, CIRC, and human memory are all ways of reconstructing a when you did not experience directly. Sync, in the end, is how something that was not there recovers the timing of something that was.

References

  1. SMPTE 12M / linear timecode. en.wikipedia.org/wiki/Linear_timecode
  2. Vertical interval timecode; drop-frame and NTSC 29.97. en.wikipedia.org/wiki/SMPTE_timecode
  3. Genlock, black-and-burst, tri-level sync. en.wikipedia.org/wiki/Genlock
  4. Time base correction. en.wikipedia.org/wiki/Time_base_correction
  5. AES3 biphase mark, X/Y/Z preambles; word clock; AES11. en.wikipedia.org/wiki/AES3
  6. MIDI 1.0 hardware (31.25 kbaud); MIDI 2.0 UMP and JR timestamps. en.wikipedia.org/wiki/MIDI_2.0
  7. EFM; CIRC cross-interleaved Reed-Solomon; DVD RS-PC (208,192)/(182,172). en.wikipedia.org/wiki/Cross-interleaved_Reed-Solomon_coding
  8. IEEE 1588 PTP; SMPTE ST 2110 / ST 2059. en.wikipedia.org/wiki/Precision_Time_Protocol