13e8c5c4d9
Trigger's fade pair folds into the AHD (and goes live); the release anchors right; Preserve rings its synthetic tail out instead of cutting it. Payload v10.
22 lines
863 B
C++
22 lines
863 B
C++
// 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 <cstdint>
|
|
|
|
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
|