import { bpm, ppqn, seconds, TempoMap, ValueEvent } from "@opendaw/lib-dsp"; import { Observer, Subscription, Terminable } from "@opendaw/lib-std"; import { TimelineBoxAdapter } from "./timeline/TimelineBoxAdapter"; /** * Allocation-free cursor that walks the TempoChangeGrid as a step function: tempo is constant within * each grid cell and sampled at the cell's grid-aligned start (matching BlockRenderer). Tracks the * current segment and the recurrence coefficients m, q so a step of exactly TempoChangeGrid within the * same zone resolves as v = m * v + q. Because every cell is sampled at its grid origin, the walk is * additive: integrate(a, c) === integrate(a, b) + integrate(b, c) for any b. */ export declare class TempoGridCursor { #private; /** * Integrates the seconds elapsed across [fromPPQN, toPPQN] by stepping the TempoChangeGrid. */ integrate(events: ReadonlyArray, fromPPQN: ppqn, toPPQN: ppqn, storageBpm: bpm): seconds; /** * Walks the TempoChangeGrid forward from fromPPQN, accumulating seconds starting at fromSeconds, * until targetSeconds is reached. */ advance(events: ReadonlyArray, fromPPQN: ppqn, fromSeconds: seconds, targetSeconds: seconds, storageBpm: bpm): ppqn; } /** * TempoMap implementation that handles varying tempo (tempo automation). * Steps through at TempoChangeGrid intervals to match BlockRenderer behavior. */ export declare class VaryingTempoMap implements TempoMap, Terminable { #private; constructor(adapter: TimelineBoxAdapter); terminate(): void; getTempoAt(position: ppqn): bpm; ppqnToSeconds(position: ppqn): seconds; secondsToPPQN(time: seconds): ppqn; intervalToSeconds(fromPPQN: ppqn, toPPQN: ppqn): seconds; intervalToPPQN(fromSeconds: seconds, toSeconds: seconds): ppqn; subscribe(observer: Observer): Subscription; } //# sourceMappingURL=VaryingTempoMap.d.ts.map