wave-roll
Version:
JavaScript Library for Comparative MIDI Piano-Roll Visualization
20 lines • 692 B
TypeScript
export interface NoteInterval {
/** Start time in seconds (inclusive) */
start: number;
/** End time in seconds (exclusive) */
end: number;
}
export interface Track {
id: string;
/** Array of time intervals belonging to this track */
intervals: NoteInterval[];
/** Whether this track is visible in the current piano-roll view */
visible?: boolean;
}
/**
* Returns merged segments where **two or more visible tracks** overlap.
* The implementation runs in O(N log N) using a sweep-line that counts
* active intervals (+1 on start, -1 on end).
*/
export declare function overlapping(tracks: Track[]): NoteInterval[];
//# sourceMappingURL=overlap.d.ts.map