// trigger_seam — the shared Trigger play-span formula: how the stored %-length becomes the // source-frame span the voice plays and the overlay draws over. One home so the engine's // note-on resolve and the editor's overlay pack cannot disagree about where a Trigger note // ends. // // playLengthFrames = round(lengthFraction * (frameCount - startFrame)) #pragma once #include namespace reasampler::instrument::map { // postStart = max(0, frameCount - startFrame); playLength = round(lengthFraction * postStart). // `startFrame` is the effective start point (0 when absent). Returns 0 when postStart == 0 // or lengthFraction <= 0. std::int64_t triggerPlayLength(double lengthFraction, std::int64_t frameCount, std::int64_t startFrame); } // namespace reasampler::instrument::map