Skip to main content

loop_offset

Function loop_offset 

Source
pub fn loop_offset(
    sender_abs: u64,
    now: u64,
    loop_frames: u64,
    delay: u64,
    margin: u64,
) -> i64
Expand description

Whole loops to add to a sender’s absolute position so that, delay frames (the bar delay) later, it still lies at least margin frames ahead of now. The two transports run the same grid but started at different times, so this keeps the position on the loop and picks the next time round that can still be played.