Commit Graph
17 Commits
Author SHA1 Message Date
BFlat 38e743bc4d Merge pull request #2627 from dotCooCoo/feat/time-format-clock
craft-time: format_clock prints a tick as an elapsed-time clock
2026-11-26 10:06:46 +07:00
BFlat 05fb40d43a Merge pull request #2625 from dotCooCoo/fix/craft-time-sample-width
craft-time: the Audio Samples display keeps one width at 192 kHz
2026-11-26 10:06:23 +07:00
BFlat 18a0d3aa69 Merge pull request #2623 from dotCooCoo/feat/time-duration
craft-time: Tick converts to and from std::time::Duration
2026-11-26 10:06:01 +07:00
dotCooCoo c510d8dc60 craft-time: format_clock prints a tick as an elapsed-time clock
format_clock formats a Tick as H:MM:SS for recording timers and other
readouts that count time rather than frames or samples. ClockStyle pads
the hours to two digits and adds tenths, hundredths or milliseconds
(ClockFraction). The value is truncated at the last printed digit, hours
do not wrap, and a negative value that truncates to zero prints without
a sign.
2026-11-20 10:53:32 -08:00
dotCooCoo 70e3c64cb6 craft-time: the Audio Samples display keeps one width at 192 kHz
format_time padded the sample field of TimeDisplay::AudioSamples to five
digits. At 192 kHz the field runs to 191999, so positions in the first
100000 samples of each second printed one character narrower than the
rest, and a fixed-width readout shifted as the time advanced.

The field is now as wide as the digit count of sample_rate - 1, with at
least five digits. Output at 32 to 96 kHz does not change.
2026-11-20 10:51:07 -08:00
dotCooCoo 22319e7a22 craft-time: Tick converts to and from std::time::Duration
Tick::from_duration floors to the tick and saturates at i64::MAX ticks.
Tick::to_duration rounds to the nearest nanosecond and returns None for a
negative tick, so a Duration survives the round trip unchanged.
2026-11-20 10:50:20 -08:00
FredApps a941f6475f Consolidate related time and evm tests 2026-11-19 13:07:39 +01:00
aiongg bb277cc3ac Lints: doc links, ungate the click event helper, api map entry for AppPaint, test allowances 2026-11-14 02:51:47 +00:00
aiongg 328af6782e craft-timeline: craft-time is the one time model
craft-timeline's Tick, TimeRange, FrameRate, TimeDisplay, SMPTE field conversion and timecode
formatting are craft-time's, re-exported from time.rs as storytold's 5e24ea380 does, so
craft_timeline::time::* paths keep working. The timeline keeps what is about a timeline: TimeView
and VIEW_EXTENT_PAST_END, and TimeFormat as its time display (frame offset, compact feet + frames,
the audio samples and seconds readers) over craft-time's formatters and parsers. FrameRate's
locale-digit menu label is rates::frame_rate_label.

captions and edl use craft-time's field tuples, as storytold's do. The time trials that repeat
craft-time's own tests go; five that test craft-time code it did not test yet are in
crates/time/tests/timeline.rs.
2026-11-13 17:44:40 +00:00
Dylan M. Taylor 87b406d709 Preserve unsupported session sample rates on decode 2026-11-13 10:50:15 +00:00
Dylan M. Taylor 2f281a419c Align frame grid lines with typed position rounding 2026-11-13 09:22:49 +00:00
Dylan M. Taylor f16d99f71c fix time parsing and frame boundary edge cases 2026-11-13 07:57:51 +00:00
Dylan M. Taylor 5e24ea380e Avoid duplicated timeline time primitives 2026-11-13 07:47:44 +00:00
Dylan M. Taylor f29cb7076f Merge remote-tracking branch 'origin/main' into codex/craft-time-soundcraft
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	README.md
2026-11-13 03:46:49 +00:00
Dylan M. Taylor ae0f0488dc craft-time: preserve SoundCraft time API and serialization 2026-11-13 03:44:51 +00:00
Zach Shallbetter 5416121e09 Address review findings in craft-time (fixes #15)
- Clarify Tick(i64::MIN) overflow documentation in division/remainder contracts.
- Format negative audio sample timestamps with absolute components and leading minus sign.
- Parse 4-field negative timecodes as absolute positions rather than relative offsets.
- Reject signed values inside multi-field timecode components.
2026-10-20 17:14:16 -07:00
Zach Shallbetter d2dc637c77 Add craft-time: exact media timebase and SMPTE timecode (refs #2)
Implements the shared exact media timebase crate (craft-time) for FilmCraft,
SoundCraft, EffectCraft, and animation timeline consumers:

- Exact Signed Timebase: Tick represents exact media time across [Tick::MIN, Tick::MAX]
  using TICKS_PER_SECOND = 254_016_000_000, supporting exact integer conversions for
  standard film, broadcast, audio, and high-framerate rates.
- Total Arithmetic Contract: All operations are strictly panic-free under
  #![deny(clippy::panic)], providing checked_* methods and monotonic saturating
  division.
- Timecode and Film Footage: Full SMPTE 12M drop-frame and non-drop-frame formatting,
  35mm and 16mm feet+frames, broadcast zero-padded hours, and EffectCraft unpadded hours.
- Differential Testing: 15 test suites incorporating full FilmCraft and EffectCraft
  parity vectors, boundary saturation tests, and proptest monotonicity invariants.
2026-10-18 14:06:33 -07:00