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

    Function ornamentBy

    • How much decoration a figure keeps.

      A decorated note — a ghost, a flam, anything the figure marks as ornament — survives on its own draw, so raising the dial only ever brings more of them back and never disturbs the ones already sounding. Notes that are not decoration are untouched.

      Type Parameters

      Parameters

      • events: readonly T[]

        The figure.

      • isOrnament: (event: T) => boolean

        Which events count as decoration.

      • amount: number

        The ornament dial, in [0, 1].

      • draw: Draw

        The position-addressed sampler.

      • ...path: readonly (string | number)[]

        Where the figure sits.

      Returns T[]

      The figure with the surviving decoration.