pub struct AcidChunk {
pub flags: u32,
pub root_note: u16,
pub reserved: [u8; 6],
pub num_beats: u32,
pub meter: u32,
pub tempo: f32,
}Expand description
Typed view of the Acidizer acid chunk body (loop/tempo metadata
written by loop-authoring tools). Field offsets and flag-bit
semantics per
docs/container/riff/metadata/exiftool-riff-tags.html § “RIFF
Acidizer Tags” (byte-indexed table: flags at 0, root note at 4,
beats at 12, meter at 16, tempo at 20):
<acid-ck> -> acid( <Flags:u32> <RootNote:u16> <Reserved:[u8;6]>
<Beats:u32> <Meter:u32> <Tempo:f32> ) // 24 bytesAll integer fields are little-endian. The staged reference
enumerates the field offsets; the widths follow from the offset
deltas (flags 0..4, beats 12..16, meter 16..20, tempo 20..24).
Within the 8-byte span between the root-note offset (4) and the
beats offset (12) only the leading 16 bits are enumerated (root
note, value range 48..=71 per the table) — the remaining 6 bytes
are not described, so they are carried verbatim in Self::reserved
and round-trip losslessly. tempo is the 32-bit field at offset
20, interpreted as an IEEE-754 little-endian beats-per-minute
value (the only 32-bit reading under which musically plausible
tempos are representable with fractional precision).
Fields§
§flags: u32Bit-field at offset 0 — see the ACID_FLAG_* constants.
root_note: u16Root note at offset 4. 48 = C up to 71 = High B per the staged
table; meaningful only when Self::root_note_set is true.
reserved: [u8; 6]Bytes 6..12 — not enumerated by the staged reference; preserved verbatim so a read→write pass is byte-lossless.
num_beats: u32Number of beats in the clip (offset 12).
meter: u32Meter field at offset 16 (single 32-bit field in the staged table; carried raw).
tempo: f32Tempo in beats per minute (offset 20).
Implementations§
Source§impl AcidChunk
impl AcidChunk
Sourcepub fn root_note_set(&self) -> bool
pub fn root_note_set(&self) -> bool
Bit 1 — root_note carries a meaningful value.
Sourcepub fn disk_based(&self) -> bool
pub fn disk_based(&self) -> bool
Bit 3 — disk-based (streamed).
Sourcepub fn high_octave(&self) -> bool
pub fn high_octave(&self) -> bool
Bit 4 — high-octave root-note interpretation.
Sourcepub fn root_note_name(&self) -> Option<&'static str>
pub fn root_note_name(&self) -> Option<&'static str>
Note name for Self::root_note per the staged value table
(48 = C … 59 = B, 60 = High C … 71 = High B). None outside
the enumerated 48..=71 range.