Skip to main content

Crate sim_lib_stream_clock

Crate sim_lib_stream_clock 

Source
Expand description

Clock charts and tick conversion helpers for SIM streams.

The crate keeps clock math in library space. Kernel events still carry only kernel Tick values, with clock indexes interned as datum content refs.

Re-exports§

pub use cookbook::tempo_chart_demo;

Modules§

cookbook
Deterministic cookbook builders for stream-clock recipes.

Structs§

Clock
Named clock with a ClockDomain and a ClockChart, the unit of clock math in this crate.
ClockIndex
Position on a clock timeline, counted in that clock’s own units (frames for frame clocks, ticks for MIDI clocks).
IndexConversion
Result of converting an Instant to a ClockIndex, paired with any diagnostics raised by the conversion.
Instant
Exact, non-negative point in time held as a reduced rational number of seconds.
StreamClockDescriptor
Citizen wrapper that carries a Clock as a self-describing stream/Clock value.
TempoMap
Ordered list of TempoSegments describing how MIDI tempo changes over a timeline.
TempoSegment
One constant-tempo span of a MIDI TempoMap, starting at a tick offset.

Enums§

ClockChart
Timing law that maps a clock’s indexes to Instants and back.

Statics§

RECIPES
Cookbook recipes for this lib, embedded at build time.

Functions§

stream_clock_class_symbol
Returns the stream/Clock class symbol for registering and looking up StreamClockDescriptor values.