sonic-weave
    Preparing search index...

    Function createTag

    • Create a tag for templates literals to evaluate SonicWeave programs inside JavaScript code.

      Parameters

      • expression: boolean = true

        Whether or not this tag is intended for evaluation single expressions or full scales producing arrays of Interval instances.

      • includePrelude: boolean = true

        Whether or not to include the extended standard library. Passing in false results in a faster start-up time.

      • OptionalextraBuiltins: Record<string, SonicWeaveValue>

        Custom builtins callable inside the SonicWeave program.

      • escapeStrings: boolean = false

        If true all escape sequences are evaluated before interpreting the literal as a SonicWeave program.

      Returns (strings: TemplateStringsArray, ...args: any[]) => SonicWeaveValue

      A template tag that evaluates to either the final SonicWeave expression value or the resulting scale, depending on expression.