UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

59 lines (58 loc) 2.09 kB
import * as util from '../util'; import * as elements from '../elements'; import { Logger } from '../debug'; import { DurationRange } from './durationrange'; import { CursorFrameHint, CursorVerticalSpan, PlaybackElement, TimelineMoment } from './types'; import { Timeline } from './timeline'; type TRangeSource = { moment: TimelineMoment; }; type XRangeSource = { type: 'system'; system: elements.System; bound: 'left' | 'right'; } | { type: 'measure'; measure: elements.Measure; bound: 'left' | 'right'; } | { type: 'element'; element: PlaybackElement; bound: 'left' | 'right'; }; type YRangeSource = { part: elements.Part; bound: 'top' | 'bottom'; }; export declare class CursorFrame { private tRangeSources; private xRangeSources; private yRangeSources; private activeElements; private describer; constructor(tRangeSources: [TRangeSource, TRangeSource], xRangeSources: [XRangeSource, XRangeSource], yRangeSources: [YRangeSource, YRangeSource], activeElements: PlaybackElement[], describer: CursorFrameDescriber); static create(log: Logger, score: elements.Score, timeline: Timeline, span: CursorVerticalSpan): CursorFrame[]; get tRange(): DurationRange; get xRange(): util.NumberRange; get yRange(): util.NumberRange; getHints(previousFrame: CursorFrame): CursorFrameHint[]; getActiveElements(): PlaybackElement[]; toHumanReadable(): string[]; private toXRangeBound; private getXRangeRect; private getYRangeBound; private getRetriggerHints; private getSustainHints; private isPitchEqual; } declare class CursorFrameDescriber { private elements; private constructor(); static create(score: elements.Score, partIndex: number): CursorFrameDescriber; describeTRange(tRangeSources: [TRangeSource, TRangeSource]): string; describeXRange(xRangeSources: [XRangeSource, XRangeSource]): string; describeYRange(yRangeSources: [YRangeSource, YRangeSource]): string; private describeXRangeSource; private describeYRangeSource; } export {};