Tuplet()

Class representing a Tuplet modification.

A Tuplet modification causes a note to play for only 1/N of the duration of the next longest standard note duration. For example, three eighth notes in a triplet would take the same amount of time to play as a single quarter note. As an alternate formulation, an N-tuplet-modified note would play for 2/N of its printed duration.

new Tuplet()

Constructs a new Tuplet modification object.

Extends

Classes

Tuplet

Members

key :Key

Overrides:

tempo :Tempo

Overrides:

unmodifiedDetails :NoteDetails

Overrides:

Methods

getModifiedNoteDetails(details) → {Array.<NoteDetails>}

Returns a list of all modified notes, durations, and velocities as generated by the corresponding modification class.

The details variable must contain the following two keys:

numNotes: Number of notes taking part in the tuplet intoNumNotes: Number of notes of the same duration that should total the full duration of the tuplet

Parameters:
Name Type Description
details Object.<string, number>

Timing information about the triplet

Returns:
Array.<NoteDetails> -

List of NoteDetails to replace the original note

Overrides:

static canModifySequence() → {boolean}

Returns whether this modification can be used to modify a sequence of notes.

Returns:
boolean -

Whether this modification can be used to modify a sequence of notes

static getParameters() → {Object.<string, Object.<string, Array.<string>>>}

Returns a list of all parameters available for use in this modification, including whether the parameter is required or optional when playing back either a "sequence" or just a single "note".

Returns:
Object.<string, Object.<string, Array.<string>>> -

List of modification-specific parameter keys and when they are required