@libraz/libcantus - v1.1.0
    Preparing search index...

    Function assertMeterMap

    • Validate a meter map: a non-empty run of time signatures, each with the beat it takes effect at, in strictly increasing beat order.

      The first entry also governs everything before it, so a map need not start at beat 0 — that is what lets a pickup at a negative beat be read in the signature the piece opens in. Where the first entry is written does not move the bar lines: the opening signature counts its bars from beat 0 either way, so beat 0 is the downbeat of bar 0 and the pickup before it is bar -1.

      The map is also bounded, the way an event array is: a map is consulted once per analysed slot, so its length is a per-slot cost and not only a one-time one.

      Parameters

      • meters: MeterMap
      • name: string = 'meters'

      Returns MeterMap