Universal Music Theory Library - v0.12.0
    Preparing search index...

    Class Duration

    A note duration expressed as a fraction of a whole note, with optional augmentation dots.

    Index

    Constructors

    • Parameters

      • value: number

        Fraction of a whole note (e.g., 0.25 for a quarter note)

      • dots: number = 0

        Number of augmentation dots

      Returns Duration

    Properties

    dots: number = 0

    Number of augmentation dots

    value: number

    Fraction of a whole note (e.g., 0.25 for a quarter note)

    Eighth: Duration = ...

    Eighth note (1/8).

    Half: Duration = ...

    Half note (1/2).

    Quarter: Duration = ...

    Quarter note (1/4).

    Sixteenth: Duration = ...

    Sixteenth note (1/16).

    ThirtySecond: Duration = ...

    Thirty-second note (1/32).

    Whole: Duration = ...

    Whole note (1).

    Accessors

    • get totalValue(): number

      Length as a fraction of a whole note, dots included (a dotted quarter is 0.375).

      Returns number

    Methods

    • Applies a tuplet ratio to this duration.

      Parameters

      • fit: number

        How many notes we are fitting (e.g., 3 in a triplet)

      • inSpaceOf: number

        The space of how many normal notes (e.g., 2 in a triplet)

      Returns Duration