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

    Function beatsPerBarAt

    • Length in quarter-note beats of the bar containing a beat.

      The meter-map counterpart of beatsPerBar, which answers for one signature and so cannot be asked about a piece that changes meter.

      The bar the beat is in, not the bar its signature nominally has: a change of meter starts a new bar, so a bar interrupted by one is shorter than its own signature says. Reading the signature's own length there would put the end of the bar past where the next one begins, and every span measured in bars from that point on would be counted against a bar length the music never had.

      Parameters

      • beatInQuarters: number

        Absolute position in quarter-note beats.

      • meter: MeterLike

        A single signature, or the piece's meter map.

      Returns number

      The bar length in quarter notes.