@stringsync/vexml
Version:
MusicXML to Vexflow
36 lines (35 loc) • 1.39 kB
TypeScript
import * as rendering from '../rendering';
import { Config } from '../config';
import { Rect } from '../spatial';
import { Logger } from '../debug';
import { Part } from './part';
import { Fraction } from '../util';
export declare class Fragment {
private config;
private log;
private document;
private fragmentRender;
private parts;
private constructor();
static create(config: Config, log: Logger, document: rendering.Document, fragmentRender: rendering.FragmentRender): Fragment;
/** The name of the element, which can be used as a type discriminant. */
readonly name = "fragment";
/** Returns the bounding box of the element. */
rect(): Rect;
/** Returns the parts of the fragment. */
getParts(): Part[];
/** Returns the system index for the fragment. */
getSystemIndex(): number;
/** Returns the absolute measure index for the fragment. */
getAbsoluteMeasureIndex(): number;
/** Returns the start measure beat for the fragment. */
getStartMeasureBeat(): Fraction;
/** Returns the bpm of the fragment. */
getBpm(): number;
/** Returns the max number of parts in this score. */
getPartCount(): number;
/** Returns whether the fragment is a non-musical gap. */
isNonMusicalGap(): boolean;
/** Returns the non-musical duration of the gap. */
getNonMusicalDurationMs(): number;
}