pub struct Loop {
pub start: usize,
pub end: usize,
pub crossfade: f64,
}Expand description
A sustain loop, in source frames.
The container stores a loop as two things and nothing else: the stroke stops at
end, and the record the loop starts at carries the mark bit. Loop
detune, loop decay, and whether the editor called this a short loop or a long one
are not stored anywhere, so a caller that needs them cannot have them.
Fields§
§start: usizeFirst frame of the loop.
end: usizeOne past its last frame. Audio after it is not encoded.
crossfade: f64Frames of the loop’s tail that fade into the frames before start.
The fade is applied to the samples here, because that is where the instrument
reads it from. Fractional, because a project can state it as a percentage of the
loop rather than a frame count, and dropping the fraction moves the fade a field.
Inferred from specimens; not confirmed on hardware.