Zongzi.Score.TempoMap (zongzi v0.3.0)

Copy Markdown

Compiled tempo map from tempo change events.

Delegates to RecordMap for compilation and tick-based binary search.

Summary

Types

compiled_event()

@type compiled_event() :: %{
  start_pos: Zongzi.Score.Tick.numeric_tick(),
  end_pos: Zongzi.Score.Tick.t(),
  start_sec: Zongzi.Score.Tempo.physical_time(),
  strategy: Zongzi.Score.Tempo.Segment.segment()
}

t()

@type t() :: tuple()

Functions

compile(events, opts \\ [])

@spec compile(
  Zongzi.Score.Tempo.tempo_events(),
  keyword()
) :: {:ok, t()} | {:error, term()}

sec_to_tick(compiled_tuple, target_sec, tpqn)

slice(compiled_tuple, start_tick, end_tick)

tick_to_sec(compiled_tuple, target_tick, tpqn)