Tavim · how it works
Nobody plays in time: how Tavim finds the bar line
A score is exact. A player never is. That gap is the whole problem of writing music down from sound.
A pianist slows into a cadence, lingers on a high note, rushes a run. None of it is a mistake. But a machine that writes down exactly when each note sounded produces a page nobody can read: a quarter note becomes a dotted eighth tied to a thirty-second.
The usual fix, and why it fails
The usual fix is to find the beat and snap every note to the nearest grid line. It works for a drum machine. With a human it puts a late note in the next slot and an early one in the previous.
What Tavim does instead
Tavim was trained to answer two questions about every note at once: where is it written, and when was it played. It learned this from performances whose scores were known. So it does not snap. It reads a late note as a late note and writes it where the composer put it.

The part we keep
The difference between written and played is not thrown away. It is stored beside the score, note by note, to about 3 ms. That is the performance, and it is why Tavim's replay breathes like the original.
When the first reading is wrong
A piece in three can be heard in six; a slow four can be heard as a fast two. If Tavim's first reading of the metre is not yours, you change it once and the whole score is rewritten around it.