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

    Function pickVocabulary

    • Choose one entry from a dictionary at a position.

      The choice is addressed by the path, not by how many choices came before it, so the figure at bar 12 does not move because the figure at bar 3 changed.

      Type Parameters

      • T

      Parameters

      • dictionary: readonly Vocabulary<T>[]

        The entries to choose from.

      • query: VocabularyQuery

        What the generator knows about the moment.

      • draw: Draw

        The position-addressed sampler.

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

        Where the choice is being made.

      Returns Vocabulary<T> | undefined

      The chosen entry, or undefined when nothing fits.