Skip to main content

Module meta_view

Module meta_view 

Source
Expand description

Typed views over raw MetaBucket payloads.

These helpers interpret the common Standard MIDI File meta types (text, track name, marker, SMPTE offset) and build the matching buckets, without the core model needing a variant per meta type.

Functions§

as_marker
Returns the bucket’s UTF-8 text if it is a marker meta event (type 0x06).
as_smpte_offset
Returns the SmpteOffset if the bucket is a 5-byte SMPTE-offset meta event (type 0x54).
as_text
Returns the bucket’s UTF-8 text if it is a text meta event (type 0x01).
as_track_name
Returns the bucket’s UTF-8 text if it is a track-name meta event (type 0x03).
make_marker
Builds a marker meta bucket (type 0x06) from value.
make_smpte_offset
Builds a SMPTE-offset meta bucket (type 0x54) from offset.
make_text
Builds a text meta bucket (type 0x01) from value.
make_track_name
Builds a track-name meta bucket (type 0x03) from value.