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

    Class Polymeter

    Polymeter: multiple time signatures cycling simultaneously.

    Index

    Constructors

    • Parameters

      • meters: TimeSignature[]

        Two or more time signatures cycling simultaneously.

      • OptionalcycleBeats: number

        Optional fixed cycle length in beats. If omitted, the cycle ends at the LCM of all meter lengths (naturalCycle). Providing a shorter value truncates the cycle before the meters naturally realign.

      Returns Polymeter

    Accessors

    • get cycleLength(): number

      Effective cycle length: cycleBeats if set, otherwise naturalCycle.

      Returns number

    • get naturalCycle(): number

      Beat at which all meters realign naturally (LCM of all meter lengths).

      Returns number

    Methods

    • Returns all downbeats for each meter within one full cycle, sorted by beat.

      Returns { beat: number; meterIndex: number }[]

      • beat: number

        Beat of the downbeat within the cycle, from 0.

      • meterIndex: number

        Index of the meter in the constructor's list.

    • Returns the meter and position within that meter at a given absolute beat, wrapped at cycleLength.

      Parameters

      • beat: number

      Returns { meter: TimeSignature; positionInMeter: number }[]

      • meter: TimeSignature

        One of the meters.

      • positionInMeter: number

        Beat within that meter's measure, from 0.