@stringsync/vexml
Version:
MusicXML to Vexflow
46 lines (45 loc) • 1.89 kB
TypeScript
import * as rendering from '../rendering';
import * as data from '../data';
import { Config } from '../config';
import { Rect } from '../spatial';
import { Logger } from '../debug';
import { Fraction } from '../util';
import { Fragment } from './fragment';
export declare class Measure {
private config;
private log;
private document;
private measureRender;
private fragments;
private constructor();
static create(config: Config, log: Logger, document: rendering.Document, measureRender: rendering.MeasureRender): Measure;
/** The name of the element, which can be used as a type discriminant. */
readonly name = "measure";
/** Returns the bounding box of the element. */
rect(): Rect;
/** Returns whether this measure is the last in the system. */
isLastMeasureInSystem(): boolean;
/** Returns the system index of the measure. */
getSystemIndex(): number;
/** Returns whether the measure is a multimeasure. */
isMultiMeasure(): boolean;
/** Returns the fragments of the measure. */
getFragments(): Fragment[];
/** Returns the max number of parts in this score. */
getPartCount(): number;
/** Returns the jumps that occur in this measure. */
getJumps(): data.Jump[];
/** Returns the absolute measure index. */
getAbsoluteMeasureIndex(): number;
/**
* Sometimes document measures are folded into one (e.g. multimeasure rest). This method returns the [start, end]
* _absolute_ index range that the measure covers.
*/
includesAbsoluteMeasureIndex(absoluteMeasureIndex: number): boolean;
/** Always returns zero. This is used for sequencing with other playback elements. */
getStartMeasureBeat(): Fraction;
/** Returns how many beats are in this measure. */
getBeatCount(): Fraction;
/** Returns the BPM of the measure. */
getBpm(): number;
}