Zongzi.Score.Record (zongzi v0.3.0)

Copy Markdown

General record abstraction based on tick/bar.

Record event model:

  • Every record is an event on the timeline at a specific location (tick or bar)
  • Records are compiled by RecordMap into interval tuples for binary search

Summary

Types

Marks the end boundary of the score.

A record's position, a non-negative integer starting from 0.

A list of records.

t()

An event at a position.

Payload contained within a record.

Types

end_position()

@type end_position() :: position() | :open_end

Marks the end boundary of the score.

Either a known position or :open_end for an unbound end.

position()

@type position() :: non_neg_integer()

A record's position, a non-negative integer starting from 0.

For Tempo this is a tick; for TimeSig this is a bar number.

records()

@type records() :: [t()] | {[t()], last :: Zongzi.Score.Tick.t()}

A list of records.

May be a plain list or a pair {records, last} with a dynamic end. Use Tick.dynamic_tick() for last when the final segment has no fixed end position.

t()

@type t() :: {position(), value()}

An event at a position.

value()

@type value() :: term()

Payload contained within a record.

Functions

open_end()