@stringsync/vexml
Version:
MusicXML to Vexflow
38 lines (37 loc) • 1.56 kB
TypeScript
import * as rendering from '../rendering';
import { Config } from '../config';
import { Logger } from '../debug';
import { Rect } from '../spatial';
import { Fraction } from '../util';
import { Pitch } from './types';
export declare class Note {
private config;
private log;
private document;
private noteRender;
private constructor();
static create(config: Config, log: Logger, document: rendering.Document, noteRender: rendering.NoteRender): Note;
/** The name of the element, which can be used as a type discriminant. */
readonly name = "note";
/** Returns the bounding box of the element. */
rect(): Rect;
/** Returns the subtype of the note. */
getSubtype(): 'note' | 'chord';
/** Returns the pitches of the note. */
getPitches(): Pitch[];
/** Returns whether the note contains an equivalent pitch to another note. */
containsEquivalentPitch(otherNote: Note): boolean;
/** Returns whether the note is connected to another note via a curve (tie or slur). */
sharesACurveWith(otherNote: Note): boolean;
/** Returns the measure beat that this note starts on. */
getStartMeasureBeat(): Fraction;
/** Returns the number of beats that this note takes. */
getBeatCount(): Fraction;
/** Returns the system index that this note resides in. */
getSystemIndex(): number;
/** Returns the absolute measure index that this note resides in. */
getAbsoluteMeasureIndex(): number;
private getNotePitches;
private getChordPitches;
private isPitchEqivalent;
}