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

    Function withinCeiling

    • Whether a figure is inside the difficulty ceiling at this tempo.

      The ceiling is measured against the closest pair of onsets the figure asks one player for, which is the thing that actually stops a hand — so the pairs are counted within a stream (the limb, else the voice) rather than across the whole kit, because a hi-hat and a kick a sixteenth apart are two limbs and not one hand playing twice. A figure that fails is rejected — never quietly simplified, because a simplified figure is a different figure and the caller asked for this one.

      Parameters

      • events: readonly GridEvent[]

        The figure.

      • bpm: number | undefined

        Tempo, or undefined when the caller gave none.

      • difficulty: number | undefined

        The ceiling, or undefined for no ceiling.

      Returns boolean

      True when the figure is playable at the ceiling, and whenever either the ceiling or the tempo is unknown.