UNPKG

wave-roll

Version:

JavaScript Library for Comparative MIDI Piano-Roll Visualization

13 lines 780 B
/** Clamp value to [0,1] */ export declare function clamp01(x: number): number; /** Convert linear gain [0,1] to dB; clamps input to [0,1]. */ export declare function toDb(linear: number): number; /** Convert dB to linear gain [0,1+]; result is not clamped. */ export declare function fromDb(db: number): number; /** Whether a dB value is at or below the silence threshold. */ export declare function isSilentDb(db: number, threshold?: number): boolean; /** Apply mute flag to a linear volume, returning 0 when muted. */ export declare function effectiveVolume(linear: number, muted?: boolean): number; /** Multiply master and channel linear volumes with clamping. */ export declare function mixLinear(master: number, channel: number): number; //# sourceMappingURL=volume.d.ts.map