@tspro/web-music-score
    Preparing search index...

    Class TimeSignature

    Time signature class.

    Index

    Constructors

    • Create new time signature instance.

      Parameters

      • timeSignature: "2/4" | "3/4" | "4/4" | "5/8" | "6/8" | "7/8" | "9/8" | "12/8" | TimeSignatures

        For example "4/4".

      • OptionalbeamGrouping: "2-3" | "3-2" | "2-2-3" | "3-2-2" | BeamGrouping

        Beam grouping (e.g. "3-2" for time signature "5/8").

      Returns TimeSignature

    • Create new time signature instance.

      Parameters

      • beatCount: number

        Measure beat count.

      • beatSize: number

        Size value: whole-note=1, half-note=2, quarter-note=4, etc.

      • OptionalbeamGrouping: "2-3" | "3-2" | "2-2-3" | "3-2-2" | BeamGrouping

        Beam grouping (e.g. "3-2" for time signature "5/8").

      Returns TimeSignature

    Properties

    beamGroupSizes: number[][] = []

    Beam groups (e.g. [[2], [2]] or [[2, 2], [2, 2]] (first try as [[4], [4]])).

    beatCount: number

    Number of beats in measure, upper value (e.g. "3" in "3/4").

    beatLength: NoteLength

    Beat length.

    beatSize: number

    Beat size of time signature, lower value (e.g. "4" in "3/4").

    measureTicks: number

    Number of ticks in measure.

    Methods

    • Test whether this time signature has given beat count and size.

      Parameters

      • beatCount: number

        Beat count.

      • beatSize: number

        Beat size.

      Returns boolean

      • Boolean whether this time signature match given beat count and size.
    • Get string representation of this time signature (e.g. "3/4").

      Returns string

      • String representation.