fix frme rte things

This commit is contained in:
Olive Vaughn 2026-10-10 15:13:21 -04:00
parent 9af21c5d10
commit a10d7b2d9f
44 changed files with 889 additions and 716 deletions

View file

@ -1,41 +1,43 @@
# Time selection
# Time
Project `:fps` is the playback and export grid. Each symbol has its own native
`:fps` and `:frames`; keys, spans, trace choices and corrections stay in that
native space. A symbol without an explicit rate inherits the document rate;
changing project fps first records that rate so its existing timing stays put.
The untouched symbol in a new document is deliberately different: it has no
authored timing to preserve, so it stays on the project grid and its empty frame
extent is rescaled to keep the same duration. This makes changing fps before
authoring establish the editor's grid instead of preserving the 30fps default.
A document has ONE rate, `:fps`, and a symbol has none. A symbol is a bag of
frames: frame n of anything plays for one tick of the document's clock, at any
depth of nesting. This is Flash's model — a MovieClip has no frame rate of its
own — and it is what makes "one frame" mean the same thing wherever you are
drawing. New documents are 12fps.
An output frame selects the latest native frame at or before its time:
`floor(output-frame * native-fps / output-fps)`. Thus 30fps content in a 12fps
project reads source frames 0, 2, 5, 7, 10… and retains its duration. A partial
last output frame is included. Changing back to 30 restores the original grid.
Nothing rewrites or discards the dense measurements.
## Footage
The same boundary selection runs when entering a placed symbol. Placement and
artistic speed are applied before selection; the stored `:time :rate` and
`:playback :speed` never contain a frame-rate conversion. The derived maps used
by timeline rows, picking and editing account for the units of each symbol.
`clip/frames` is a native length; `clip/output-frames` is a transport/export
length. Resolver frame queries return native frames for edits.
Footage is the one thing that really has its own rate. A tracing symbol's frames
are the footage's frames and a take's measured faces are the camera's, so they
keep them, and the PLACEMENT plays them at the speed that makes them real time:
30fps footage in a 12fps project is an instance with `:playback :speed 2.5`.
It is an ordinary, visible retime. Output frame f shows source frame
`floor(f · speed)`, the latest at or before its instant; the preserve-snap
(`domain/pose`) is what recovers a one-frame closure that speed skips.
There is one fps control. The old transient picture-fps control and node
sample-fps fields are gone. Existing exposure, trace choices and per-instance
pose tracks remain available: a pose track can hold a chosen closed-mouth frame
without deleting its neighboring measurements. Those choices stay in native
frames when output fps changes. Automatic content-aware frame selection is not
implemented; [frame-selection.md](frame-selection.md) is how it should be. An
event between output frames appears on the next output frame; it cannot create
an extra frame in a 12fps output.
A sound counts in its source's own rate (`:source :fps`), and the audio mix
cancels the document's rate out, so only deliberate speed changes affect pitch
and duration.
Audio uses continuous time through the same derived placement maps, without
picture floors or holds. Frame-rate units cancel before Web Audio playbackRate
is set, so only deliberate speed changes affect pitch and duration. Export and
playback use the same output count and resolver.
## Changing the rate
Earlier imports with frame-rate conversion baked into stored retimes must be
re-imported. There is no second reader for that representation. Source video
presentation timestamps are still future work; this model assumes constant fps.
The rate is changed through a dialog, not typed over, because there are two
honest meanings and they are Animate's two (`domain/retime`):
* **keep frames** — `(assoc clip :fps rate)`. Every frame stays where it is and
plays for the new tick, so the animation runs faster or slower. Sounds still
play in seconds.
* **keep timing** — `retime/scale-spans`, Animate's "scale spans". Every frame
number in every symbol is multiplied by `new/old` and rounded: keys, spans,
`:time :at`, holds, exposure, a symbol's `:frames`. Keys that land on one frame
keep the later one. A symbol of camera frames (footage, dense measurements)
cannot be rewritten frame by frame, so its factor is 1 and its placements
absorb the change — an instance's speed becomes `speed · child/host`, the same
rule read the other way round.
Bringing symbols in from a document at another rate (a take, another project)
keeps their timing the same way.
Source video presentation timestamps are still future work; this model assumes
constant fps.