Class: Tuplet

music21.duration. Tuplet

new Tuplet(numberNotesActual, numberNotesNormal, durationActual, durationNormal)

Represents a Tuplet; found in music21.duration.Duration#tuplets

Parameters:
Name Type Description
numberNotesActual number

numerator of the tuplet, default 3

numberNotesNormal number

denominator of the tuplet, default 2

durationActual music21.duration.Duration | number

duration or quarterLength of duration type, default music21.duration.Duration(0.5)

durationNormal music21.duration.Duration | number

unused; see music21p for description

Source:

Extends

Members

bracket :Boolean

Show a bracket above the tuplet

Type:
  • Boolean
Default Value:
  • true
Source:

placement :String

Bracket placement. Options are above or below.

Type:
  • String
Default Value:
  • 'above'
Source:

tupletActualShow :String

What to show above the Tuplet. Options are number, type, or (string) none.

Type:
  • String
Default Value:
  • 'number'
Source:

Methods

<static> Tuplet#setDurationType(type) → {music21.duration.Duration}

Set both durationActual and durationNormal for the tuplet.

Parameters:
Name Type Description
type string

a duration type, such as half, quarter

Source:
Returns:

A converted music21.duration.Duration matching type

Type
music21.duration.Duration

<static> Tuplet#setRatio(actual, normal) → {undefined}

Sets the tuplet ratio.

Parameters:
Name Type Description
actual Number

number of notes in actual (e.g., 3)

normal Number

number of notes in normal (e.g., 2)

Source:
Returns:
Type
undefined

<static> Tuplet#totalTupletLength() → {Number}

Get the quarterLength corresponding to the total length that
the completed tuplet (i.e., 3 notes in a triplet) would occupy.

Source:
Returns:

A quarter length.

Type
Number

<static> Tuplet#tupletMultiplier() → {Number}

The amount by which each quarter length is multiplied to get
the tuplet. For instance, in a normal triplet, this is 0.666

Source:
Returns:

A float of the multiplier

Type
Number
Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.