@mcqj/vexflow 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +208 -0
- package/build/cjs/vexflow-bravura.js +2 -0
- package/build/cjs/vexflow-bravura.js.map +1 -0
- package/build/cjs/vexflow-core.js +2 -0
- package/build/cjs/vexflow-core.js.map +1 -0
- package/build/cjs/vexflow-debug-with-tests.js +43475 -0
- package/build/cjs/vexflow-debug-with-tests.js.map +1 -0
- package/build/cjs/vexflow-debug.js +19194 -0
- package/build/cjs/vexflow-debug.js.map +1 -0
- package/build/cjs/vexflow.js +2 -0
- package/build/cjs/vexflow.js.map +1 -0
- package/build/esm/entry/vexflow-bravura.js +17 -0
- package/build/esm/entry/vexflow-core.js +4 -0
- package/build/esm/entry/vexflow-debug-with-tests.js +38 -0
- package/build/esm/entry/vexflow-debug.js +31 -0
- package/build/esm/entry/vexflow.js +31 -0
- package/build/esm/package.json +3 -0
- package/build/esm/src/accidental.js +330 -0
- package/build/esm/src/annotation.js +231 -0
- package/build/esm/src/articulation.js +281 -0
- package/build/esm/src/barnote.js +56 -0
- package/build/esm/src/beam.js +644 -0
- package/build/esm/src/bend.js +186 -0
- package/build/esm/src/boundingbox.js +59 -0
- package/build/esm/src/canvascontext.js +216 -0
- package/build/esm/src/chordsymbol.js +325 -0
- package/build/esm/src/clef.js +120 -0
- package/build/esm/src/clefnote.js +35 -0
- package/build/esm/src/crescendo.js +78 -0
- package/build/esm/src/curve.js +126 -0
- package/build/esm/src/dot.js +129 -0
- package/build/esm/src/easyscore.js +374 -0
- package/build/esm/src/element.js +409 -0
- package/build/esm/src/factory.js +463 -0
- package/build/esm/src/flag.js +22 -0
- package/build/esm/src/font.js +237 -0
- package/build/esm/src/fonts/academico.js +1 -0
- package/build/esm/src/fonts/academicobold.js +1 -0
- package/build/esm/src/fonts/bravura.js +1 -0
- package/build/esm/src/fonts/gonville.js +1 -0
- package/build/esm/src/fonts/petaluma.js +1 -0
- package/build/esm/src/fonts/petalumascript.js +1 -0
- package/build/esm/src/formatter.js +610 -0
- package/build/esm/src/fraction.js +170 -0
- package/build/esm/src/frethandfinger.js +141 -0
- package/build/esm/src/ghostnote.js +50 -0
- package/build/esm/src/glyphnote.js +44 -0
- package/build/esm/src/glyphs.js +2936 -0
- package/build/esm/src/gracenote.js +106 -0
- package/build/esm/src/gracenotegroup.js +138 -0
- package/build/esm/src/gracetabnote.js +11 -0
- package/build/esm/src/index.js +86 -0
- package/build/esm/src/keymanager.js +99 -0
- package/build/esm/src/keysignature.js +220 -0
- package/build/esm/src/keysignote.js +28 -0
- package/build/esm/src/metrics.js +237 -0
- package/build/esm/src/modifier.js +121 -0
- package/build/esm/src/modifiercontext.js +110 -0
- package/build/esm/src/multimeasurerest.js +127 -0
- package/build/esm/src/music.js +322 -0
- package/build/esm/src/note.js +383 -0
- package/build/esm/src/notehead.js +89 -0
- package/build/esm/src/notesubgroup.js +59 -0
- package/build/esm/src/ornament.js +192 -0
- package/build/esm/src/parenthesis.js +61 -0
- package/build/esm/src/parser.js +164 -0
- package/build/esm/src/pedalmarking.js +168 -0
- package/build/esm/src/registry.js +81 -0
- package/build/esm/src/rendercontext.js +20 -0
- package/build/esm/src/renderer.js +112 -0
- package/build/esm/src/repeatnote.js +17 -0
- package/build/esm/src/stave.js +579 -0
- package/build/esm/src/stavebarline.js +237 -0
- package/build/esm/src/staveconnector.js +180 -0
- package/build/esm/src/stavehairpin.js +115 -0
- package/build/esm/src/staveline.js +199 -0
- package/build/esm/src/stavemodifier.js +56 -0
- package/build/esm/src/stavenote.js +861 -0
- package/build/esm/src/staverepetition.js +120 -0
- package/build/esm/src/stavesection.js +36 -0
- package/build/esm/src/stavetempo.js +110 -0
- package/build/esm/src/stavetext.js +55 -0
- package/build/esm/src/stavetie.js +186 -0
- package/build/esm/src/stavevolta.js +53 -0
- package/build/esm/src/stem.js +133 -0
- package/build/esm/src/stemmablenote.js +193 -0
- package/build/esm/src/stringnumber.js +228 -0
- package/build/esm/src/strokes.js +164 -0
- package/build/esm/src/svgcontext.js +402 -0
- package/build/esm/src/system.js +166 -0
- package/build/esm/src/tables.js +696 -0
- package/build/esm/src/tabnote.js +278 -0
- package/build/esm/src/tabslide.js +68 -0
- package/build/esm/src/tabstave.js +17 -0
- package/build/esm/src/tabtie.js +19 -0
- package/build/esm/src/textbracket.js +128 -0
- package/build/esm/src/textdynamics.js +53 -0
- package/build/esm/src/textnote.js +116 -0
- package/build/esm/src/tickable.js +224 -0
- package/build/esm/src/tickcontext.js +189 -0
- package/build/esm/src/timesignature.js +169 -0
- package/build/esm/src/timesignote.js +30 -0
- package/build/esm/src/tremolo.js +30 -0
- package/build/esm/src/tuning.js +55 -0
- package/build/esm/src/tuplet.js +258 -0
- package/build/esm/src/typeguard.js +30 -0
- package/build/esm/src/util.js +67 -0
- package/build/esm/src/version.js +3 -0
- package/build/esm/src/vexflow.js +309 -0
- package/build/esm/src/vibrato.js +68 -0
- package/build/esm/src/vibratobracket.js +44 -0
- package/build/esm/src/voice.js +178 -0
- package/build/esm/src/web.js +15 -0
- package/build/esm/tests/accidental_tests.js +1055 -0
- package/build/esm/tests/annotation_tests.js +381 -0
- package/build/esm/tests/articulation_tests.js +432 -0
- package/build/esm/tests/auto_beam_formatting_tests.js +551 -0
- package/build/esm/tests/barline_tests.js +52 -0
- package/build/esm/tests/beam_tests.js +669 -0
- package/build/esm/tests/bend_tests.js +223 -0
- package/build/esm/tests/boundingbox_tests.js +53 -0
- package/build/esm/tests/browser_test_runner.js +128 -0
- package/build/esm/tests/chordsymbol_tests.js +405 -0
- package/build/esm/tests/clef_tests.js +141 -0
- package/build/esm/tests/crossbeam_tests.js +306 -0
- package/build/esm/tests/curve_tests.js +152 -0
- package/build/esm/tests/demo_petzold_tests.js +335 -0
- package/build/esm/tests/dot_tests.js +119 -0
- package/build/esm/tests/easyscore_tests.js +488 -0
- package/build/esm/tests/factory_tests.js +44 -0
- package/build/esm/tests/font_tests.js +134 -0
- package/build/esm/tests/formatter/framestack.js +61 -0
- package/build/esm/tests/formatter/tests.js +251 -0
- package/build/esm/tests/formatter_tests.js +759 -0
- package/build/esm/tests/fraction_tests.js +72 -0
- package/build/esm/tests/ghostnote_tests.js +77 -0
- package/build/esm/tests/glyphnote_tests.js +119 -0
- package/build/esm/tests/gracenote_tests.js +414 -0
- package/build/esm/tests/gracetabnote_tests.js +79 -0
- package/build/esm/tests/index.js +68 -0
- package/build/esm/tests/key_clef_tests.js +106 -0
- package/build/esm/tests/keymanager_tests.js +68 -0
- package/build/esm/tests/keysignature_tests.js +322 -0
- package/build/esm/tests/mocks.js +70 -0
- package/build/esm/tests/modifier_tests.js +24 -0
- package/build/esm/tests/multimeasurerest_tests.js +141 -0
- package/build/esm/tests/music_tests.js +161 -0
- package/build/esm/tests/node_test_runner.js +31 -0
- package/build/esm/tests/notehead_tests.js +224 -0
- package/build/esm/tests/notesubgroup_tests.js +149 -0
- package/build/esm/tests/offscreencanvas_tests.js +47 -0
- package/build/esm/tests/ornament_tests.js +333 -0
- package/build/esm/tests/parser_tests.js +122 -0
- package/build/esm/tests/pedalmarking_tests.js +91 -0
- package/build/esm/tests/percussion_tests.js +184 -0
- package/build/esm/tests/playwright/flow.spec.js +127 -0
- package/build/esm/tests/playwright/visual_helpers.js +30 -0
- package/build/esm/tests/registry_tests.js +64 -0
- package/build/esm/tests/renderer_tests.js +113 -0
- package/build/esm/tests/rests_tests.js +266 -0
- package/build/esm/tests/rhythm_tests.js +357 -0
- package/build/esm/tests/stave_tests.js +570 -0
- package/build/esm/tests/staveconnector_tests.js +402 -0
- package/build/esm/tests/stavehairpin_tests.js +90 -0
- package/build/esm/tests/staveline_tests.js +123 -0
- package/build/esm/tests/stavemodifier_tests.js +51 -0
- package/build/esm/tests/stavenote_tests.js +936 -0
- package/build/esm/tests/stavetie_tests.js +137 -0
- package/build/esm/tests/stringnumber_tests.js +283 -0
- package/build/esm/tests/strokes_tests.js +289 -0
- package/build/esm/tests/style_tests.js +96 -0
- package/build/esm/tests/tabnote_tests.js +462 -0
- package/build/esm/tests/tabslide_tests.js +133 -0
- package/build/esm/tests/tabstave_tests.js +24 -0
- package/build/esm/tests/tabtie_tests.js +171 -0
- package/build/esm/tests/test_runner.js +23 -0
- package/build/esm/tests/textbracket_tests.js +100 -0
- package/build/esm/tests/textnote_tests.js +216 -0
- package/build/esm/tests/threevoice_tests.js +132 -0
- package/build/esm/tests/tickcontext_tests.js +36 -0
- package/build/esm/tests/timesignature_tests.js +173 -0
- package/build/esm/tests/tremolo_tests.js +34 -0
- package/build/esm/tests/tuning_tests.js +56 -0
- package/build/esm/tests/tuplet_tests.js +711 -0
- package/build/esm/tests/typeguard_tests.js +82 -0
- package/build/esm/tests/unison_tests.js +74 -0
- package/build/esm/tests/vexflow_test_helpers.js +318 -0
- package/build/esm/tests/vf_prefix_tests.js +101 -0
- package/build/esm/tests/vibrato_tests.js +93 -0
- package/build/esm/tests/vibratobracket_tests.js +45 -0
- package/build/esm/tests/vitest/job-0.test.js +2 -0
- package/build/esm/tests/vitest/job-1.test.js +2 -0
- package/build/esm/tests/vitest/job-2.test.js +2 -0
- package/build/esm/tests/vitest/job-3.test.js +2 -0
- package/build/esm/tests/vitest/run.js +5 -0
- package/build/esm/tests/vitest.setup.js +44 -0
- package/build/esm/tests/voice_tests.js +69 -0
- package/build/types/entry/vexflow-bravura.d.ts +3 -0
- package/build/types/entry/vexflow-core.d.ts +3 -0
- package/build/types/entry/vexflow-debug.d.ts +3 -0
- package/build/types/entry/vexflow.d.ts +3 -0
- package/build/types/src/accidental.d.ts +60 -0
- package/build/types/src/annotation.d.ts +58 -0
- package/build/types/src/articulation.d.ts +78 -0
- package/build/types/src/barnote.d.ts +29 -0
- package/build/types/src/beam.d.ts +158 -0
- package/build/types/src/bend.d.ts +67 -0
- package/build/types/src/boundingbox.d.ts +42 -0
- package/build/types/src/canvascontext.d.ts +93 -0
- package/build/types/src/chordsymbol.d.ts +109 -0
- package/build/types/src/clef.d.ts +38 -0
- package/build/types/src/clefnote.d.ts +17 -0
- package/build/types/src/crescendo.d.ts +26 -0
- package/build/types/src/curve.d.ts +42 -0
- package/build/types/src/dot.d.ts +19 -0
- package/build/types/src/easyscore.d.ts +152 -0
- package/build/types/src/element.d.ts +278 -0
- package/build/types/src/factory.d.ts +273 -0
- package/build/types/src/flag.d.ts +12 -0
- package/build/types/src/font.d.ts +96 -0
- package/build/types/src/fonts/academico.d.ts +1 -0
- package/build/types/src/fonts/academicobold.d.ts +1 -0
- package/build/types/src/fonts/bravura.d.ts +1 -0
- package/build/types/src/fonts/gonville.d.ts +1 -0
- package/build/types/src/fonts/petaluma.d.ts +1 -0
- package/build/types/src/fonts/petalumascript.d.ts +1 -0
- package/build/types/src/formatter.d.ts +226 -0
- package/build/types/src/fraction.d.ts +65 -0
- package/build/types/src/frethandfinger.d.ts +19 -0
- package/build/types/src/ghostnote.d.ts +16 -0
- package/build/types/src/glyphnote.d.ts +14 -0
- package/build/types/src/glyphs.d.ts +2935 -0
- package/build/types/src/gracenote.d.ts +17 -0
- package/build/types/src/gracenotegroup.d.ts +33 -0
- package/build/types/src/gracetabnote.d.ts +5 -0
- package/build/types/src/index.d.ts +86 -0
- package/build/types/src/keymanager.d.ts +25 -0
- package/build/types/src/keysignature.d.ts +50 -0
- package/build/types/src/keysignote.d.ts +11 -0
- package/build/types/src/metrics.d.ts +25 -0
- package/build/types/src/modifier.d.ts +90 -0
- package/build/types/src/modifiercontext.d.ts +48 -0
- package/build/types/src/multimeasurerest.d.ts +61 -0
- package/build/types/src/music.d.ts +91 -0
- package/build/types/src/note.d.ts +232 -0
- package/build/types/src/notehead.d.ts +50 -0
- package/build/types/src/notesubgroup.d.ts +18 -0
- package/build/types/src/ornament.d.ts +71 -0
- package/build/types/src/parenthesis.d.ts +21 -0
- package/build/types/src/parser.d.ts +45 -0
- package/build/types/src/pedalmarking.d.ts +63 -0
- package/build/types/src/registry.d.ts +40 -0
- package/build/types/src/rendercontext.d.ts +59 -0
- package/build/types/src/renderer.d.ts +35 -0
- package/build/types/src/repeatnote.d.ts +6 -0
- package/build/types/src/stave.d.ts +181 -0
- package/build/types/src/stavebarline.d.ts +38 -0
- package/build/types/src/staveconnector.d.ts +53 -0
- package/build/types/src/stavehairpin.d.ts +56 -0
- package/build/types/src/staveline.d.ts +49 -0
- package/build/types/src/stavemodifier.d.ts +35 -0
- package/build/types/src/stavenote.d.ts +150 -0
- package/build/types/src/staverepetition.d.ts +30 -0
- package/build/types/src/stavesection.d.ts +8 -0
- package/build/types/src/stavetempo.d.ts +43 -0
- package/build/types/src/stavetext.d.ts +11 -0
- package/build/types/src/stavetie.d.ts +104 -0
- package/build/types/src/stavevolta.d.ts +15 -0
- package/build/types/src/stem.d.ts +58 -0
- package/build/types/src/stemmablenote.d.ts +39 -0
- package/build/types/src/stringnumber.d.ts +26 -0
- package/build/types/src/strokes.d.ts +35 -0
- package/build/types/src/svgcontext.d.ts +135 -0
- package/build/types/src/system.d.ts +121 -0
- package/build/types/src/tables.d.ts +86 -0
- package/build/types/src/tabnote.d.ts +45 -0
- package/build/types/src/tabslide.d.ts +36 -0
- package/build/types/src/tabstave.d.ts +7 -0
- package/build/types/src/tabtie.d.ts +18 -0
- package/build/types/src/textbracket.d.ts +45 -0
- package/build/types/src/textdynamics.d.ts +34 -0
- package/build/types/src/textnote.d.ts +48 -0
- package/build/types/src/tickable.d.ts +149 -0
- package/build/types/src/tickcontext.d.ts +112 -0
- package/build/types/src/timesignature.d.ts +75 -0
- package/build/types/src/timesignote.d.ts +11 -0
- package/build/types/src/tremolo.d.ts +12 -0
- package/build/types/src/tuning.d.ts +23 -0
- package/build/types/src/tuplet.d.ts +98 -0
- package/build/types/src/typeguard.d.ts +100 -0
- package/build/types/src/util.d.ts +42 -0
- package/build/types/src/version.d.ts +3 -0
- package/build/types/src/vexflow.d.ts +261 -0
- package/build/types/src/vibrato.d.ts +20 -0
- package/build/types/src/vibratobracket.d.ts +28 -0
- package/build/types/src/voice.d.ts +109 -0
- package/build/types/src/web.d.ts +2 -0
- package/package.json +145 -0
- package/tests/flow.html +256 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vexflow-core.js","names":[],"sources":["../../src/typeguard.ts","../../src/util.ts","../../src/fraction.ts","../../src/metrics.ts","../../src/boundingbox.ts","../../src/font.ts","../../src/registry.ts","../../src/element.ts","../../src/modifier.ts","../../src/music.ts","../../src/glyphs.ts","../../src/tables.ts","../../src/accidental.ts","../../src/stem.ts","../../src/annotation.ts","../../src/articulation.ts","../../src/rendercontext.ts","../../src/tickable.ts","../../src/note.ts","../../src/stavemodifier.ts","../../src/stavebarline.ts","../../src/barnote.ts","../../src/bend.ts","../../src/chordsymbol.ts","../../src/dot.ts","../../src/frethandfinger.ts","../../src/notehead.ts","../../src/flag.ts","../../src/stemmablenote.ts","../../src/stavenote.ts","../../src/stavetie.ts","../../src/tabtie.ts","../../src/voice.ts","../../src/gracenotegroup.ts","../../src/notesubgroup.ts","../../src/ornament.ts","../../src/parenthesis.ts","../../src/web.ts","../../src/canvascontext.ts","../../src/svgcontext.ts","../../src/renderer.ts","../../src/stringnumber.ts","../../src/strokes.ts","../../src/vibrato.ts","../../src/modifiercontext.ts","../../src/clef.ts","../../src/keysignature.ts","../../src/staverepetition.ts","../../src/stavesection.ts","../../src/stavetempo.ts","../../src/textnote.ts","../../src/stavetext.ts","../../src/stavevolta.ts","../../src/timesignature.ts","../../src/stave.ts","../../src/staveconnector.ts","../../src/tickcontext.ts","../../src/formatter.ts","../../src/tuplet.ts","../../src/beam.ts","../../src/clefnote.ts","../../src/crescendo.ts","../../src/curve.ts","../../src/parser.ts","../../src/easyscore.ts","../../src/ghostnote.ts","../../src/glyphnote.ts","../../src/gracenote.ts","../../src/keysignote.ts","../../src/multimeasurerest.ts","../../src/pedalmarking.ts","../../src/repeatnote.ts","../../src/staveline.ts","../../src/system.ts","../../src/tabnote.ts","../../src/tabstave.ts","../../src/textbracket.ts","../../src/textdynamics.ts","../../src/timesignote.ts","../../src/vibratobracket.ts","../../src/factory.ts","../../src/gracetabnote.ts","../../src/keymanager.ts","../../src/stavehairpin.ts","../../src/tabslide.ts","../../src/tremolo.ts","../../src/tuning.ts","../../src/version.ts","../../src/vexflow.ts","../../entry/vexflow-core.ts"],"sourcesContent":["// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Ron B. Yeh\n// MIT License\n\nimport { Accidental } from './accidental';\nimport { Annotation } from './annotation';\nimport { Dot } from './dot';\nimport { GraceNote } from './gracenote';\nimport { GraceNoteGroup } from './gracenotegroup';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { Barline } from './stavebarline';\nimport { StaveNote } from './stavenote';\nimport { StemmableNote } from './stemmablenote';\nimport { TabNote } from './tabnote';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Use instead of `instanceof` as a more flexible type guard.\n * @param obj check if this object's CATEGORY matches the provided category.\n * @param category a string representing a category of VexFlow objects.\n * @param checkAncestors defaults to `true`, so we walk up the prototype chain to look for a matching `CATEGORY`.\n * If `false`, we do not check the superclass or other ancestors.\n * @returns true if `obj` has a static `CATEGORY` property that matches `category`.\n */\nexport function isCategory<T>(obj: any, category: string, checkAncestors: boolean = true): obj is T {\n // obj is undefined, a number, a primitive string, or null.\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n // `obj.constructor` is a reference to the constructor function that created the `obj` instance.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor\n let constructorFcn = obj.constructor;\n\n // Check if the object's static .CATEGORY matches the provided category.\n\n if (checkAncestors) {\n // Walk up the prototype chain to look for a matching obj.constructor.CATEGORY.\n while (obj !== null) {\n constructorFcn = obj.constructor;\n if ('CATEGORY' in constructorFcn && constructorFcn.CATEGORY === category) {\n return true;\n }\n obj = Object.getPrototypeOf(obj);\n }\n return false;\n } else {\n // Do not walk up the prototype chain. Just check this particular object's static .CATEGORY string.\n return 'CATEGORY' in constructorFcn && constructorFcn.CATEGORY === category;\n }\n}\n\nexport const isAccidental = (obj: unknown): obj is Accidental => isCategory(obj, Category.Accidental);\nexport const isAnnotation = (obj: unknown): obj is Annotation => isCategory(obj, Category.Annotation);\nexport const isBarline = (obj: unknown): obj is Barline => isCategory(obj, Category.Barline);\nexport const isDot = (obj: unknown): obj is Dot => isCategory(obj, Category.Dot);\nexport const isGraceNote = (obj: unknown): obj is GraceNote => isCategory(obj, Category.GraceNote);\nexport const isGraceNoteGroup = (obj: unknown): obj is GraceNoteGroup => isCategory(obj, Category.GraceNoteGroup);\nexport const isNote = (obj: unknown): obj is Note => isCategory(obj, Category.Note);\nexport const isRenderContext = (obj: unknown): obj is RenderContext => isCategory(obj, Category.RenderContext);\nexport const isStaveNote = (obj: unknown): obj is StaveNote => isCategory(obj, Category.StaveNote);\nexport const isStemmableNote = (obj: unknown): obj is StemmableNote => isCategory(obj, Category.StemmableNote);\nexport const isTabNote = (obj: unknown): obj is TabNote => isCategory(obj, Category.TabNote);\n\n// 'const' enums are erased by the TypeScript compiler. The string values are inlined at all the use sites.\n// See: https://www.typescriptlang.org/docs/handbook/enums.html#const-enums\nexport const enum Category {\n Accidental = 'Accidental',\n Annotation = 'Annotation',\n Articulation = 'Articulation',\n Barline = 'Barline',\n BarNote = 'BarNote',\n Beam = 'Beam',\n Bend = 'Bend',\n ChordSymbol = 'ChordSymbol',\n Clef = 'Clef',\n ClefNote = 'ClefNote',\n Crescendo = 'Crescendo',\n Curve = 'Curve',\n Dot = 'Dot',\n Element = 'Element',\n Flag = 'Flag',\n Fraction = 'Fraction',\n FretHandFinger = 'FretHandFinger',\n GhostNote = 'GhostNote',\n Glyph = 'Glyph',\n GlyphNote = 'GlyphNote',\n GraceNote = 'GraceNote',\n GraceNoteGroup = 'GraceNoteGroup',\n GraceTabNote = 'GraceTabNote',\n KeySignature = 'KeySignature',\n KeySigNote = 'KeySigNote',\n Modifier = 'Modifier',\n MultiMeasureRest = 'MultiMeasureRest',\n Note = 'Note',\n NoteHead = 'NoteHead',\n NoteSubGroup = 'NoteSubGroup',\n Ornament = 'Ornament',\n Parenthesis = 'Parenthesis',\n PedalMarking = 'PedalMarking',\n RenderContext = 'RenderContext',\n RepeatNote = 'RepeatNote',\n Repetition = 'Repetition',\n Stave = 'Stave',\n StaveConnector = 'StaveConnector',\n StaveHairpin = 'StaveHairpin',\n StaveLine = 'StaveLine',\n StaveModifier = 'StaveModifier',\n StaveNote = 'StaveNote',\n StaveSection = 'StaveSection',\n StaveTempo = 'StaveTempo',\n StaveText = 'StaveText',\n StaveTie = 'StaveTie',\n Stem = 'Stem',\n StemmableNote = 'StemmableNote',\n StringNumber = 'StringNumber',\n Stroke = 'Stroke',\n System = 'System',\n TabNote = 'TabNote',\n TabSlide = 'TabSlide',\n TabStave = 'TabStave',\n TabTie = 'TabTie',\n TextBracket = 'TextBracket',\n TextDynamics = 'TextDynamics',\n TextNote = 'TextNote',\n Tickable = 'Tickable',\n TimeSignature = 'TimeSignature',\n TimeSigNote = 'TimeSigNote',\n Tremolo = 'Tremolo',\n Tuplet = 'Tuplet',\n Vibrato = 'Vibrato',\n VibratoBracket = 'VibratoBracket',\n Voice = 'Voice',\n Volta = 'Volta',\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nexport const structuredClone = globalThis.structuredClone;\n\n// Note: Keep this module free of imports to reduce the chance of circular dependencies.\n\n/** `RuntimeError` will be thrown by VexFlow classes in case of error. */\nexport class RuntimeError extends Error {\n code: string;\n constructor(code: string, message: string = \"\") {\n super(\"[RuntimeError] \" + code + \": \" + message);\n this.code = code;\n }\n}\n\n/** VexFlow can be used outside of the browser (e.g., Node) where `window` may not be defined. */\n// eslint-disable-next-line\nexport function globalObject(): typeof globalThis & any {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n return Function(\"return this\")();\n}\n\n/**\n * Check that `x` is of type `T` and not `undefined`.\n * If `x` is `undefined`, throw a RuntimeError with the optionally provided error code and message.\n */\nexport function defined<T>(\n x?: T,\n code: string = \"undefined\",\n message: string = \"\",\n): T {\n if (x === undefined) {\n throw new RuntimeError(code, message);\n }\n return x;\n}\n\n/** Default log function sends all arguments to console. */\n// eslint-disable-next-line\nexport function log(block: string, ...args: any[]): void {\n if (!args) return;\n const line = Array.prototype.slice.call(args).join(\" \");\n globalObject().console.log(block + \": \" + line);\n}\n\n/** Dump warning to console. */\n// eslint-disable-next-line\nexport function warn(...args: any[]): void {\n const line = args.join(\" \");\n const err = new Error();\n globalObject().console.log(\"Warning: \", line, err.stack);\n}\n\n/** Round number to nearest fractional value (`.5`, `.25`, etc.) */\nfunction roundN(x: number, n: number): number {\n return x % n >= n / 2\n ? parseInt(`${x / n}`, 10) * n + n\n : parseInt(`${x / n}`, 10) * n;\n}\n\n/** Locate the mid point between stave lines. Returns a fractional line if a space. */\nexport function midLine(a: number, b: number): number {\n let midLine = b + (a - b) / 2;\n if (midLine % 2 > 0) {\n midLine = roundN(midLine * 10, 5) / 10;\n }\n return midLine;\n}\n\n/**\n * Used by various classes (e.g., SVGContext) to provide a\n * unique prefix to element names (or other keys in shared namespaces).\n */\nexport function prefix(text: string): string {\n return `vf-${text}`;\n}\n\n/**\n * @param s\n * @returns `s` with the first letter capitalized.\n */\nexport function upperFirst(s: string = \"\"): string {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\n/**\n * Convert an arbitrary angle in radians to the equivalent one in the range [0, pi).\n */\nexport function normalizeAngle(a: number): number {\n a = a % (2 * Math.PI);\n if (a < 0) {\n a += 2 * Math.PI;\n }\n return a;\n}\n\n/**\n * Return the sum of an array of numbers.\n */\nexport function sumArray(arr: number[]): number {\n return arr.reduce((a, b) => a + b, 0);\n}\n\n//////////////////////////////////////////////////////////////////////////////////////////////////\n// Moved from vex.ts to util.ts.\n\n/**\n * Take `arr` and return a new array consisting of the sorted, unique'd,\n * contents of arr. Does not modify `arr`.\n */\n\n/*\n static sortAndUnique(arr: any[], cmp: any, eq: any): any[] {\n if (arr.length > 1) {\n const newArr = [];\n let last;\n arr.sort(cmp);\n\n for (let i = 0; i < arr.length; ++i) {\n if (i === 0 || !eq(arr[i], last)) {\n newArr.push(arr[i]);\n }\n last = arr[i];\n }\n\n return newArr;\n } else {\n return [].concat(arr); // \n }\n }\n */\n\n// Get the 2D Canvas context from DOM element with id `canvasId`.\n/*\n static getCanvasContext(canvasId: string): RenderingContext {\n if (!canvasId) {\n throw new RuntimeError('BadArgument', 'Invalid canvas selector: ' + canvasId);\n }\n\n const canvas = document.getElementById(canvasId) as HTMLCanvasElement;\n if (!(canvas && canvas.getContext)) {\n throw new RuntimeError('UnsupportedBrowserError', 'This browser does not support HTML5 Canvas');\n }\n\n return canvas.getContext('2d') as RenderingContext;\n }\n */\n\n/** Benchmark. Run function `f` once and report time elapsed shifted by `s` milliseconds. */\n/*\n static benchmark(s: any, f: any): void {\n const startTime = new Date().getTime();\n f();\n const elapsed = new Date().getTime() - startTime;\n log(s, elapsed + 'ms');\n }\n */\n\n// Get stack trace.\n/*\n static stackTrace(): string | undefined {\n const err = new Error();\n return err.stack;\n }\n */\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n//\n// @author Joshua Koo / @zz85\n// @author @incompleteopus\n\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\n/** Fraction represents a rational number. */\nexport class Fraction {\n static get CATEGORY(): string {\n return Category.Fraction;\n }\n\n // Cached objects for comparisons.\n private static fractionA = new Fraction();\n private static fractionB = new Fraction();\n\n /**\n * GCD: Greatest common divisor using the Euclidean algorithm.\n * Note: GCD(0, 0) => 0 and GCD(0, n) => n.\n */\n static GCD(a: number, b: number): number {\n if (typeof a !== 'number' || Number.isNaN(a) || typeof b !== 'number' || Number.isNaN(b)) {\n throw new RuntimeError('BadArgument', `Invalid numbers: ${a}, ${b}`);\n }\n\n let t;\n\n while (b !== 0) {\n t = b;\n b = a % b;\n a = t;\n }\n\n return a;\n }\n\n /** LCM: Lowest common multiple. */\n static LCM(a: number, b: number): number {\n return (a * b) / Fraction.GCD(a, b);\n }\n\n /** Lowest common multiple for more than two numbers.\n *\n * Note that the `args` array will be manipulated and shortened recursively during\n * computation.\n */\n static LCMM(args: number[]): number {\n if (args.length === 0) {\n return 0;\n } else if (args.length === 1) {\n return args[0];\n } else if (args.length === 2) {\n return Fraction.LCM(args[0], args[1]);\n } else {\n // args.shift() removes the first number.\n // LCM the first number with the rest of the numbers.\n return Fraction.LCM(args.shift() as number, Fraction.LCMM(args));\n }\n }\n\n numerator: number = 1;\n denominator: number = 1;\n\n /** Set the numerator and denominator. */\n constructor(numerator?: number, denominator?: number) {\n this.set(numerator, denominator);\n }\n\n /** Set the numerator and denominator. */\n set(numerator: number = 1, denominator: number = 1): this {\n this.numerator = numerator;\n this.denominator = denominator;\n return this;\n }\n\n /** Return the value of the fraction. */\n value(): number {\n return this.numerator / this.denominator;\n }\n\n /** Simplify numerator and denominator using GCD. */\n simplify(): this {\n let u = this.numerator;\n let d = this.denominator;\n\n const gcd = Fraction.GCD(u, d);\n u /= gcd;\n d /= gcd;\n\n if (d < 0) {\n d = -d;\n u = -u;\n }\n return this.set(u, d);\n }\n\n /** Add value of another fraction. */\n add(param1: Fraction | number = 0, param2: number = 1): this {\n const [otherNumerator, otherDenominator] = getNumeratorAndDenominator(param1, param2);\n const lcm = Fraction.LCM(this.denominator, otherDenominator);\n const a = lcm / this.denominator;\n const b = lcm / otherDenominator;\n const u = this.numerator * a + otherNumerator * b;\n return this.set(u, lcm);\n }\n\n /** Subtract value of another fraction. */\n subtract(param1: Fraction | number = 0, param2: number = 1): this {\n const [otherNumerator, otherDenominator] = getNumeratorAndDenominator(param1, param2);\n const lcm = Fraction.LCM(this.denominator, otherDenominator);\n const a = lcm / this.denominator;\n const b = lcm / otherDenominator;\n const u = this.numerator * a - otherNumerator * b;\n return this.set(u, lcm);\n }\n\n /** Multiply by value of another fraction. */\n multiply(param1: Fraction | number = 1, param2: number = 1): this {\n const [otherNumerator, otherDenominator] = getNumeratorAndDenominator(param1, param2);\n return this.set(this.numerator * otherNumerator, this.denominator * otherDenominator);\n }\n\n /** Divide by value of another Fraction. */\n divide(param1: Fraction | number = 1, param2: number = 1): this {\n const [otherNumerator, otherDenominator] = getNumeratorAndDenominator(param1, param2);\n return this.set(this.numerator * otherDenominator, this.denominator * otherNumerator);\n }\n\n /** Simplify both sides and check if they are equal. */\n equals(compare: Fraction | number): boolean {\n const a = Fraction.fractionA.copy(compare).simplify();\n const b = Fraction.fractionB.copy(this).simplify();\n\n return a.numerator === b.numerator && a.denominator === b.denominator;\n }\n\n /** Greater than operator. */\n greaterThan(compare: Fraction | number): boolean {\n const a = Fraction.fractionA.copy(this);\n a.subtract(compare);\n return a.numerator > 0;\n }\n\n /** Greater than or equals operator. */\n greaterThanEquals(compare: Fraction | number): boolean {\n const a = Fraction.fractionA.copy(this);\n a.subtract(compare);\n return a.numerator >= 0;\n }\n\n /** Less than operator. */\n lessThan(compare: Fraction | number): boolean {\n return !this.greaterThanEquals(compare);\n }\n\n /** Less than or equals operator. */\n lessThanEquals(compare: Fraction | number): boolean {\n return !this.greaterThan(compare);\n }\n\n /** Return a new copy with current values. */\n clone(): Fraction {\n return new Fraction(this.numerator, this.denominator);\n }\n\n /** Copy value of another fraction. */\n copy(other: Fraction | number): this {\n if (typeof other === 'number') {\n return this.set(other);\n } else {\n return this.set(other.numerator, other.denominator);\n }\n }\n\n /** Return the integer component (e.g. 5/2 => 2). */\n quotient(): number {\n return Math.floor(this.numerator / this.denominator);\n }\n\n /** Return the remainder component (e.g. 5/2 => 1). */\n remainder(): number {\n return this.numerator % this.denominator;\n }\n\n /** Calculate absolute value. */\n makeAbs(): this {\n this.denominator = Math.abs(this.denominator);\n this.numerator = Math.abs(this.numerator);\n return this;\n }\n\n /** Return a raw string representation (e.g. \"5/2\"). */\n toString(): string {\n return `${this.numerator}/${this.denominator}`;\n }\n\n /** Return a simplified string representation. */\n toSimplifiedString(): string {\n return Fraction.fractionA.copy(this).simplify().toString();\n }\n\n /** Return string representation in mixed form. */\n toMixedString(): string {\n let s = '';\n const q = this.quotient();\n const f = Fraction.fractionA.copy(this);\n\n if (q < 0) {\n f.makeAbs();\n }\n\n if (q !== 0) {\n s += q;\n\n if (f.numerator !== 0) {\n s += ` ${f.toSimplifiedString()}`;\n }\n } else if (f.numerator === 0) {\n s = '0';\n } else {\n s = f.toSimplifiedString();\n }\n\n return s;\n }\n\n /** Parse a fraction string. */\n parse(str: string): this {\n const i = str.split('/');\n const n = parseInt(i[0], 10);\n const d = i[1] ? parseInt(i[1], 10) : 1;\n\n return this.set(n, d);\n }\n}\n\n/** Helper function to extract the numerator and denominator from another fraction. */\nfunction getNumeratorAndDenominator(n: Fraction | number, d: number = 1): [number, number] {\n if (typeof n === 'number') {\n // Both params are numbers, so we return them as [numerator, denominator].\n return [n, d];\n } else {\n // First param is a Fraction object. We ignore the second param.\n return [n.numerator, n.denominator];\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n\nimport { ElementStyle } from \"./element\";\nimport { FontInfo } from \"./font\";\n\nexport class Metrics {\n protected static cacheStyle = new Map<string, ElementStyle>();\n protected static cacheFont = new Map<string, Required<FontInfo>>();\n /** Use the provided key to look up a FontInfo in CommonMetrics. **/\n static clear(key?: string) {\n if (key) {\n this.cacheFont.delete(key);\n this.cacheStyle.delete(key);\n } else {\n this.cacheFont.clear();\n this.cacheStyle.clear();\n }\n }\n\n static getFontInfo(key: string): Required<FontInfo> {\n let font = this.cacheFont.get(key);\n if (!font) {\n font = {\n family: Metrics.get(`${key}.fontFamily`),\n size: Metrics.get(`${key}.fontSize`) * Metrics.get(`${key}.fontScale`),\n weight: Metrics.get(`${key}.fontWeight`),\n style: Metrics.get(`${key}.fontStyle`),\n };\n this.cacheFont.set(key, font);\n }\n return structuredClone(font);\n }\n\n static getStyle(key: string): ElementStyle {\n let style = this.cacheStyle.get(key);\n if (!style) {\n style = {\n fillStyle: Metrics.get(`${key}.fillStyle`),\n strokeStyle: Metrics.get(`${key}.strokeStyle`),\n lineWidth: Metrics.get(`${key}.lineWidth`),\n lineDash: Metrics.get(`${key}.lineDash`),\n shadowBlur: Metrics.get(`${key}.shadowBlur`),\n shadowColor: Metrics.get(`${key}.shadowColor`),\n };\n this.cacheStyle.set(key, style);\n }\n return structuredClone(style);\n }\n\n /**\n * Use the provided key to look up a value in CommonMetrics.\n *\n * @param key is a string separated by periods (e.g., `Stroke.text.fontFamily`).\n * @param defaultValue is returned if the lookup fails.\n * @returns the retrieved value (or `defaultValue` if the lookup fails).\n *\n * For the key `Stroke.text.fontFamily`, check all of the following in order:\n * 1) CommonMetrics.fontFamily\n * 2) CommonMetrics.Stroke.fontFamily\n * 3) CommonMetrics.Stroke.text.fontFamily\n * Retrieve the value from the most specific key (i.e., prefer #3 over #2 over #1 in the above example).\n */\n // eslint-disable-next-line\n static get(key: string, defaultValue?: any): any {\n const keyParts = key.split(\".\");\n const lastKeyPart = keyParts.pop()!; // Use ! because keyParts is not empty, since ''.split('.') still returns [''].\n\n // Start from root of CommonMetrics and go down as far as possible.\n let curr = MetricsDefaults;\n let retVal = defaultValue;\n\n while (curr) {\n // Update retVal whenever we find a value assigned to a more specific key.\n retVal = curr[lastKeyPart] ?? retVal;\n const keyPart = keyParts.shift();\n if (keyPart) {\n curr = curr[keyPart]; // Go down one level.\n } else {\n break;\n }\n }\n\n return retVal;\n }\n}\n\n// eslint-disable-next-line\nexport const MetricsDefaults: Record<string, any> = {\n pointerRect: false,\n fontFamily: \"Bravura,Academico\",\n fontSize: 30,\n fontScale: 1.0,\n fontWeight: \"normal\",\n fontStyle: \"normal\",\n\n Accidental: {\n cautionary: {\n fontSize: 20,\n },\n grace: {\n fontSize: 20,\n },\n noteheadAccidentalPadding: 1,\n leftPadding: 2,\n accidentalSpacing: 3,\n },\n\n Annotation: {\n fontSize: 10,\n },\n\n Bend: {\n fontSize: 10,\n line: {\n strokeStyle: \"#777777\",\n lineWidth: 1,\n },\n },\n\n ChordSymbol: {\n fontSize: 12,\n spacing: 0.05,\n subscriptOffset: 0.2,\n superscriptOffset: -0.4,\n superSubRatio: 0.6,\n },\n\n FretHandFinger: {\n fontSize: 9,\n fontWeight: \"bold\",\n },\n\n GraceNote: {\n fontScale: 2 / 3,\n },\n\n GraceTabNote: {\n fontScale: 2 / 3,\n },\n\n NoteHead: {\n minPadding: 2,\n },\n\n PedalMarking: {\n text: {\n fontSize: 12,\n fontStyle: \"italic\",\n },\n },\n\n Repetition: {\n text: {\n fontSize: 12,\n fontWeight: \"bold\",\n offsetX: 12,\n offsetY: 25,\n spacing: 5,\n },\n coda: {\n offsetY: 25,\n },\n segno: {\n offsetY: 10,\n },\n },\n\n Stave: {\n strokeStyle: \"#999999\",\n fontSize: 8,\n padding: 12,\n endPaddingMax: 10,\n endPaddingMin: 5,\n unalignedNotePadding: 10,\n },\n\n StaveConnector: {\n text: {\n fontSize: 16,\n },\n },\n\n StaveLine: {\n fontSize: 10,\n },\n\n StaveNote: {\n pointerRect: true,\n },\n\n StaveSection: {\n fontSize: 10,\n fontWeight: \"bold\",\n lineWidth: 2,\n padding: 2,\n strokeStyle: \"black\",\n },\n\n StaveTempo: {\n fontSize: 14,\n glyph: {\n fontSize: 25,\n },\n name: {\n fontWeight: \"bold\",\n },\n },\n\n StaveText: {\n fontSize: 16,\n },\n\n StaveTie: {\n fontSize: 10,\n },\n\n Stem: {\n strokeStyle: \"black\",\n },\n\n StringNumber: {\n fontSize: 10,\n fontWeight: \"bold\",\n verticalPadding: 8,\n stemPadding: 2,\n leftPadding: 5,\n rightPadding: 6,\n },\n\n Stroke: {\n text: {\n fontSize: 10,\n fontStyle: \"italic\",\n fontWeight: \"bold\",\n },\n },\n\n TabNote: {\n text: {\n fontSize: 9,\n },\n },\n\n TabSlide: {\n fontSize: 10,\n fontStyle: \"italic\",\n fontWeight: \"bold\",\n },\n\n TabStave: {\n strokeStyle: \"#999999\",\n fontSize: 8,\n },\n\n TabTie: {\n fontSize: 10,\n },\n\n TextBracket: {\n fontSize: 15,\n fontStyle: \"italic\",\n },\n\n TextNote: {\n text: {\n fontSize: 12,\n },\n },\n\n Tremolo: {\n spacing: 7,\n },\n\n Tuplet: {\n pointerRect: true,\n yOffset: 0,\n textYOffset: 2,\n bracket: {\n padding: 5,\n lineWidth: 1,\n legLength: 10,\n },\n suffix: {\n fontScale: 1 / 2,\n extraSpacing: 1,\n suffixOffsetY: -3,\n },\n },\n\n Volta: {\n fontSize: 9,\n fontWeight: \"bold\",\n },\n};\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\n// Bounding boxes for interactive notation.\n\nexport interface Bounds {\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\nexport class BoundingBox implements Bounds {\n x: number;\n y: number;\n w: number;\n h: number;\n\n /**\n * Create a new copy.\n */\n static copy(that: BoundingBox): BoundingBox {\n return new BoundingBox(that.x, that.y, that.w, that.h);\n }\n\n constructor(x: number, y: number, w: number, h: number) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }\n\n /** Get x position. */\n getX(): number {\n return this.x;\n }\n\n /** Get y position. */\n getY(): number {\n return this.y;\n }\n\n /** Get width. */\n getW(): number {\n return this.w;\n }\n\n /** Get height. */\n getH(): number {\n return this.h;\n }\n\n /** Set x position. */\n setX(x: number): this {\n this.x = x;\n return this;\n }\n\n /** Set y position. */\n setY(y: number): this {\n this.y = y;\n return this;\n }\n\n /** Set width. */\n setW(w: number): this {\n this.w = w;\n return this;\n }\n\n /** Set height. */\n setH(h: number): this {\n this.h = h;\n return this;\n }\n\n /** Move to position. */\n move(x: number, y: number): this {\n this.x += x;\n this.y += y;\n return this;\n }\n\n /** Clone. */\n clone(): BoundingBox {\n return BoundingBox.copy(this);\n }\n\n /**\n * Merge my box with given box. Creates a bigger bounding box unless\n * the given box is contained in this one.\n */\n mergeWith(boundingBox: BoundingBox): this {\n const that = boundingBox;\n\n const newX = this.x < that.x ? this.x : that.x;\n const newY = this.y < that.y ? this.y : that.y;\n const newW = Math.max(this.x + this.w, that.x + that.w) - newX;\n const newH = Math.max(this.y + this.h, that.y + that.h) - newY;\n\n this.x = newX;\n this.y = newY;\n this.w = newW;\n this.h = newH;\n\n return this;\n }\n}\n","import { Metrics } from './metrics';\n\nexport interface FontInfo {\n /** CSS font-family, e.g., 'Arial', 'Helvetica Neue, Arial, sans-serif', 'Times, serif' */\n family?: string;\n\n /**\n * CSS font-size (e.g., '10pt', '12px').\n * For backwards compatibility with 3.0.9, plain numbers are assumed to be specified in 'pt'.\n */\n size?: number | string;\n\n /** `bold` or a number (e.g., 900) as inspired by CSS font-weight. */\n weight?: string | number;\n\n /** `italic` as inspired by CSS font-style. */\n style?: string;\n}\n\nexport enum FontWeight {\n NORMAL = 'normal',\n BOLD = 'bold',\n}\n\nexport enum FontStyle {\n NORMAL = 'normal',\n ITALIC = 'italic',\n}\n\n// Internal <span></span> element for parsing CSS font shorthand strings.\nlet fontParser: HTMLSpanElement;\n\nexport class Font {\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // STATIC MEMBERS\n\n // CSS Font Sizes: 36pt == 48px == 3em == 300% == 0.5in\n /** Given a length (for units: pt, px, em, %, in, mm, cm) what is the scale factor to convert it to px? */\n static scaleToPxFrom: Record<string, number> = {\n pt: 4 / 3,\n px: 1,\n em: 16,\n '%': 4 / 25,\n in: 96,\n mm: 96 / 25.4,\n cm: 96 / 2.54,\n };\n\n /**\n * @param fontSize a font size to convert. Can be specified as a CSS length string (e.g., '16pt', '1em')\n * or as a number (the unit is assumed to be 'pt'). See `Font.scaleToPxFrom` for the supported\n * units (e.g., pt, em, %).\n * @returns the number of pixels that is equivalent to `fontSize`\n */\n static convertSizeToPixelValue(fontSize: string | number): number {\n if (typeof fontSize === 'number') {\n // Assume the numeric fontSize is specified in pt.\n return fontSize * Font.scaleToPxFrom.pt;\n } else {\n const value = parseFloat(fontSize);\n if (isNaN(value)) {\n return 0;\n }\n const unit = fontSize.replace(/[\\d.\\s]/g, '').toLowerCase(); // Extract the unit by removing all numbers, dots, spaces.\n const conversionFactor = Font.scaleToPxFrom[unit] ?? 1;\n return value * conversionFactor;\n }\n }\n\n /**\n * @param fontSize a font size to convert. Can be specified as a CSS length string (e.g., '16pt', '1em')\n * or as a number (the unit is assumed to be 'pt'). See `Font.scaleToPxFrom` for the supported\n * units (e.g., pt, em, %).\n * @returns the number of points that is equivalent to `fontSize`\n */\n static convertSizeToPointValue(fontSize: string | number): number {\n if (typeof fontSize === 'number') {\n // Assume the numeric fontSize is specified in pt.\n return fontSize;\n } else {\n const value = parseFloat(fontSize);\n if (isNaN(value)) {\n return 0;\n }\n const unit = fontSize.replace(/[\\d.\\s]/g, '').toLowerCase(); // Extract the unit by removing all numbers, dots, spaces.\n const conversionFactor = (Font.scaleToPxFrom[unit] ?? 1) / Font.scaleToPxFrom.pt;\n return value * conversionFactor;\n }\n }\n\n /**\n * @param f\n * @param size\n * @param weight\n * @param style\n * @returns the `size` field will include the units (e.g., '12pt', '16px').\n */\n static validate(\n f?: string | FontInfo,\n size?: string | number,\n weight?: string | number,\n style?: string\n ): Required<FontInfo> {\n // If f is a string but all other arguments are undefined, we assume that\n // f is CSS font shorthand (e.g., 'italic bold 10pt Arial').\n if (typeof f === 'string' && size === undefined && weight === undefined && style === undefined) {\n return Font.fromCSSString(f);\n }\n\n let family: string | undefined;\n if (typeof f === 'object') {\n // f is a FontInfo object, so we extract its fields.\n family = f.family;\n size = f.size;\n weight = f.weight;\n style = f.style;\n } else {\n // f is a string representing the font family name or undefined.\n family = f;\n }\n\n family = family ?? (Metrics.get('fontFamily') as string);\n size = size ?? Metrics.get('fontSize') + 'pt';\n weight = weight ?? FontWeight.NORMAL;\n style = style ?? FontStyle.NORMAL;\n\n if (weight === '') {\n weight = FontWeight.NORMAL;\n }\n if (style === '') {\n style = FontStyle.NORMAL;\n }\n\n // If size is a number, we assume the unit is `pt`.\n if (typeof size === 'number') {\n size = `${size}pt`;\n }\n\n // If weight is a number (e.g., 900), turn it into a string representation of that number.\n if (typeof weight === 'number') {\n weight = weight.toString();\n }\n\n // At this point, `family`, `size`, `weight`, and `style` are all strings.\n return { family, size, weight, style };\n }\n\n /**\n * @param cssFontShorthand a string formatted as CSS font shorthand (e.g., 'italic bold 15pt Arial').\n */\n static fromCSSString(cssFontShorthand: string): Required<FontInfo> {\n // Let the browser parse this string for us.\n // First, create a span element.\n // Then, set its style.font and extract it back out.\n if (!fontParser) {\n fontParser = document.createElement('span');\n }\n fontParser.style.font = cssFontShorthand;\n const { fontFamily, fontSize, fontWeight, fontStyle } = fontParser.style;\n return { family: fontFamily, size: fontSize, weight: fontWeight, style: fontStyle };\n }\n\n /**\n * @returns a CSS font shorthand string of the form `italic bold 16pt Arial`.\n */\n static toCSSString(fontInfo?: FontInfo): string {\n if (!fontInfo) {\n return '';\n }\n\n let style: string;\n const st = fontInfo.style;\n if (st === FontStyle.NORMAL || st === '' || st === undefined) {\n style = ''; // no space! Omit the style section.\n } else {\n style = st.trim() + ' ';\n }\n\n let weight: string;\n const wt = fontInfo.weight;\n if (wt === FontWeight.NORMAL || wt === '' || wt === undefined) {\n weight = ''; // no space! Omit the weight section.\n } else if (typeof wt === 'number') {\n weight = wt + ' ';\n } else {\n weight = wt.trim() + ' ';\n }\n\n let size: string;\n const sz = fontInfo.size;\n if (sz === undefined) {\n size = Metrics.get('fontSize') + 'pt';\n } else if (typeof sz === 'number') {\n size = sz + 'pt ';\n } else {\n // size is already a string.\n size = sz.trim() + ' ';\n }\n\n const family: string = fontInfo.family ?? Metrics.get('fontFamily');\n\n return `${style}${weight}${size}${family}`;\n }\n\n /**\n * @param fontSize a number representing a font size, or a string font size with units.\n * @param scaleFactor multiply the size by this factor.\n * @returns size * scaleFactor (e.g., 16pt * 3 = 48pt, 8px * 0.5 = 4px, 24 * 2 = 48).\n * If the fontSize argument was a number, the return value will be a number.\n * If the fontSize argument was a string, the return value will be a string.\n */\n static scaleSize<T extends number | string>(fontSize: T, scaleFactor: number): T {\n if (typeof fontSize === 'number') {\n return (fontSize * scaleFactor) as T;\n } else {\n const value = parseFloat(fontSize);\n const unit = fontSize.replace(/[\\d.\\s]/g, ''); // Remove all numbers, dots, spaces.\n return `${value * scaleFactor}${unit}` as T;\n }\n }\n\n /**\n * @param weight a string (e.g., 'bold') or a number (e.g., 600 / semi-bold in the OpenType spec).\n * @returns true if the font weight indicates bold.\n */\n static isBold(weight?: string | number): boolean {\n if (!weight) {\n return false;\n } else if (typeof weight === 'number') {\n return weight >= 600;\n } else {\n // a string can be 'bold' or '700'\n const parsedWeight = parseInt(weight, 10);\n if (isNaN(parsedWeight)) {\n return weight.toLowerCase() === 'bold';\n } else {\n return parsedWeight >= 600;\n }\n }\n }\n\n /**\n * @param style\n * @returns true if the font style indicates 'italic'.\n */\n static isItalic(style?: string): boolean {\n if (!style) {\n return false;\n } else {\n return style.toLowerCase() === FontStyle.ITALIC;\n }\n }\n\n /**\n * Customize this field to specify a different CDN for delivering web fonts.\n * Discussion on GDPR concerns:\n * https://www.jsdelivr.com/blog/how-the-german-courts-ruling-on-google-fonts-affects-jsdelivr-and-why-it-is-safe-to-use/\n *\n * You can also self host, and specify your own server URL here.\n */\n static HOST_URL = 'https://cdn.jsdelivr.net/npm/@vexflow-fonts/';\n\n /**\n * These font files will be loaded from the CDN specified by `Font.HOST_URL`.\n * `await VexFlow.loadFonts()` loads all of the fonts below. Useful during debugging.\n * `await VexFlow.loadFonts(FontName1, FontName2)` loads only the specified fonts.\n */\n static FILES: Record<string /* fontName */, string /* fontPath */> = {\n Academico: 'academico/academico.woff2',\n Bravura: 'bravura/bravura.woff2',\n 'Bravura Text': 'bravuratext/bravuratext.woff2',\n Edwin: 'edwin/edwin-roman.woff2',\n 'Finale Ash': 'finaleash/finaleash.woff2',\n 'Finale Ash Text': 'finaleashtext/finaleashtext.woff2',\n 'Finale Broadway': 'finalebroadway/finalebroadway.woff2',\n 'Finale Broadway Text': 'finalebroadwaytext/finalebroadwaytext.woff2',\n 'Finale Jazz': 'finalejazz/finalejazz.woff2',\n 'Finale Jazz Text': 'finalejazztext/finalejazztext.woff2',\n 'Finale Maestro': 'finalemaestro/finalemaestro.woff2',\n 'Finale Maestro Text': 'finalemaestrotext/finalemaestrotext-regular.woff2',\n Gonville: 'gonville/gonville.woff2',\n Gootville: 'gootville/gootville.woff2',\n 'Gootville Text': 'gootvilletext/gootvilletext.woff2',\n Leipzig: 'leipzig/leipzig.woff2',\n Leland: 'leland/leland.woff2',\n 'Leland Text': 'lelandtext/lelandtext.woff2',\n MuseJazz: 'musejazz/musejazz.woff2',\n 'MuseJazz Text': 'musejazztext/musejazztext.woff2',\n Nepomuk: 'nepomuk/nepomuk.woff2',\n Petaluma: 'petaluma/petaluma.woff2',\n 'Petaluma Script': 'petalumascript/petalumascript.woff2',\n 'Petaluma Text': 'petalumatext/petalumatext.woff2',\n 'Roboto Slab': 'robotoslab/robotoslab-regular-400.woff2',\n Sebastian: 'sebastian/sebastian.woff2',\n 'Sebastian Text': 'sebastiantext/sebastiantext.woff2',\n };\n\n /**\n * This method is asynchronous, so you should use await or .then() to wait for the fonts to load before proceeding.\n *\n * @param fontName\n * @param url The absolute or relative URL to the woff2/otf file. It can also be a data URI.\n * @param descriptors See: https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace#descriptors\n */\n static async load(fontName: string, url?: string, descriptors?: Record<string, string>): Promise<FontFace> {\n if (typeof FontFace === 'undefined') {\n return Promise.reject(new Error('FontFace API is not available in this environment. Cannot load fonts.'));\n }\n\n // If url is not specified, we load the font from the jsDelivr CDN.\n if (url === undefined) {\n const files = Font.FILES;\n if (!(fontName in files)) {\n return Promise.reject(new Error(`Font ${fontName} not found in Font.FILES`));\n }\n url = Font.HOST_URL + files[fontName];\n }\n\n const fontFace = new FontFace(fontName, `url(${url})`, descriptors);\n const fontFaceLoadPromise = fontFace.load();\n\n // https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet\n let fontFaceSet;\n if (typeof document !== 'undefined') {\n fontFaceSet = document.fonts;\n } else if (typeof self !== 'undefined' && 'fonts' in self) {\n // Workers do not have a document object.\n // https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/fonts\n // eslint-disable-next-line\n fontFaceSet = self.fonts as any;\n }\n fontFaceSet?.add(fontFace);\n return fontFaceLoadPromise;\n }\n\n static getURLForFont(fontName: string): string | undefined {\n const files = Font.FILES;\n if (!(fontName in files)) {\n return undefined;\n }\n return Font.HOST_URL + files[fontName];\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n// @author Mohit Cheppudira\n//\n// ## Description\n//\n// This file implements a registry for VexFlow elements. It allows users\n// to track, query, and manage some subset of generated elements, and\n// dynamically get and set attributes.\n//\n// There are two ways to register with a registry:\n//\n// 1) Explicitly call `registry.register(elem:Element, id?:string)`, or,\n// 2) Call `Registry.enableDefaultRegistry(registry)` when ready, and all future\n// elements will automatically register with it.\n//\n// Once an element is registered, selected attributes are tracked and indexed by\n// the registry. This allows fast look up of elements by attributes like id, type,\n// and class.\n\nimport { Element } from './element';\nimport { RuntimeError } from './util';\n\n// Indexes are represented as maps of maps of maps. This allows\n// for both multi-labeling (e.g., an element can have multiple classes)\n// and efficient lookup.\nclass Index {\n // [attributeName][attributeValue][elementId] => Element\n [key: string]: { [key: string]: { [key: string]: Element } };\n constructor() {\n this.id = {};\n this.type = {};\n this.class = {};\n }\n}\n\nexport interface RegistryUpdate {\n id: string;\n name: string;\n value: string | undefined;\n oldValue: string | undefined;\n}\n\nexport class Registry {\n protected static defaultRegistry?: Registry;\n\n static getDefaultRegistry(): Registry | undefined {\n return Registry.defaultRegistry;\n }\n\n // If you call `enableDefaultRegistry`, any new elements will auto-register with\n // the provided registry as soon as they're constructed.\n static enableDefaultRegistry(registry: Registry): void {\n Registry.defaultRegistry = registry;\n }\n\n static disableDefaultRegistry(): void {\n Registry.defaultRegistry = undefined;\n }\n\n protected index: Index;\n\n constructor() {\n this.index = new Index();\n }\n\n clear(): this {\n this.index = new Index();\n return this;\n }\n\n setIndexValue(name: string, value: string, id: string, elem: Element): void {\n const index = this.index;\n if (!index[name][value]) {\n index[name][value] = {};\n }\n index[name][value][id] = elem;\n }\n\n // Updates the indexes for element 'id'. If an element's attribute changes\n // from A -> B, make sure to remove the element from A.\n updateIndex({ id, name, value, oldValue }: RegistryUpdate): void {\n const elem = this.getElementById(id);\n if (oldValue !== undefined && this.index[name][oldValue]) {\n delete this.index[name][oldValue][id];\n }\n if (value && elem) {\n this.setIndexValue(name, value, elem.getAttribute('id'), elem);\n }\n }\n\n /**\n * Register element `elem` with this registry.\n * This adds the element to its index and watches it for attribute changes.\n * @param elem\n * @param id\n * @returns this\n */\n register(elem: Element, id?: string): this {\n id = id || elem.getAttribute('id');\n if (!id) {\n throw new RuntimeError(\"Can't add element without `id` attribute to registry\");\n }\n\n // Manually add id to index, then update other indexes.\n elem.setAttribute('id', id);\n this.setIndexValue('id', id, id, elem);\n this.updateIndex({ id, name: 'type', value: elem.getAttribute('type'), oldValue: undefined });\n elem.onRegister(this);\n return this;\n }\n\n getElementById(id: string): Element | undefined {\n return this.index.id?.[id]?.[id]; // return undefined if the id is not found.\n }\n\n getElementsByAttribute(attribute: string, value: string): Element[] {\n const indexAttr = this.index[attribute];\n if (indexAttr) {\n const indexAttrVal = indexAttr[value];\n if (indexAttrVal) {\n const keys = Object.keys(indexAttrVal);\n return keys.map((k) => indexAttrVal[k]);\n }\n }\n return [];\n }\n\n getElementsByType(type: string): Element[] {\n return this.getElementsByAttribute('type', type);\n }\n\n getElementsByClass(className: string): Element[] {\n return this.getElementsByAttribute('class', className);\n }\n\n // This is called by the element when an attribute value changes. If an indexed\n // attribute changes, then update the local index.\n onUpdate(info: RegistryUpdate): this {\n const allowedNames = ['id', 'type', 'class'];\n if (allowedNames.includes(info.name)) {\n this.updateIndex(info);\n }\n return this;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n// @author Mohit Cheppudira\n\nimport { BoundingBox } from './boundingbox';\nimport { Font, FontInfo } from './font';\nimport { Metrics } from './metrics';\nimport { Registry } from './registry';\nimport { RenderContext } from './rendercontext';\nimport { Category } from './typeguard';\nimport { defined, prefix, RuntimeError } from './util';\n\n/** Element attributes. */\nexport interface ElementAttributes {\n [name: string]: string | undefined;\n id: string;\n type: string;\n class: string;\n}\n\n/** Element style. */\nexport interface ElementStyle {\n /**\n * CSS color used for the shadow.\n *\n * Examples: 'red', '#ff0000', '#ff000010', 'rgb(255,0,0)'\n *\n * See [CSS Legal Color Values](https://www.w3schools.com/cssref/css_colors_legal.asp)\n */\n shadowColor?: string;\n /**\n * Level of blur applied to shadows.\n *\n * Values that are not finite numbers greater than or equal to zero are ignored.\n */\n shadowBlur?: number;\n /**\n * CSS color used with context fill command.\n *\n * Examples: 'red', '#ff0000', '#ff000010', 'rgb(255,0,0)'\n *\n * See [CSS Legal Color Values](https://www.w3schools.com/cssref/css_colors_legal.asp)\n */\n fillStyle?: string;\n /**\n * CSS color used with context stroke command.\n *\n * Examples: 'red', '#ff0000', '#ff000010', 'rgb(255,0,0)'\n *\n * See [CSS Legal Color Values](https://www.w3schools.com/cssref/css_colors_legal.asp)\n */\n strokeStyle?: string;\n /**\n * Line width, 1.0 by default.\n */\n lineWidth?: number;\n /**\n * See: [SVG `stroke-dasharray` attribute](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray)\n */\n lineDash?: string;\n}\n\n/**\n * Element implements a generic base class for VexFlow, with implementations\n * of general functions and properties that can be inherited by all VexFlow elements.\n *\n * The Element handles style and font properties for the Element and any child\n * elements, along with working with the Registry to create unique ids.\n *\n * The `text` is a series of unicode characters (including SMuFL codes).\n * The `textFont` property contains information required to style the text (i.e., font family, size, weight, and style).\n * This font family is a comma separated list of fonts.\n * The method `measureText` calculates the `textMetrics`, `boundingBox`, `height` and `width` of the `text`.\n * The method `renderText(...)` will render the text using the provided context and coordinates,\n * taking `xShift` and `yShift` into account.\n */\nexport class Element {\n static get CATEGORY(): string {\n return Category.Element;\n }\n\n // Element objects keep a list of children that they are responsible for.\n // Children inherit the style from their parents (see: setGroupStyle(s)).\n protected parent?: Element;\n protected children: Element[] = [];\n protected static ID: number = 1000;\n protected static newID(): string {\n return `auto${Element.ID++}`;\n }\n\n /** Canvas used to measure text. See measureText(): TextMetrics. */\n private static txtCanvas?: HTMLCanvasElement | OffscreenCanvas;\n\n // Note: Canvas is node-canvas.\n // https://www.npmjs.com/package/canvas\n static setTextMeasurementCanvas(canvas: HTMLCanvasElement | OffscreenCanvas /* | Canvas */): void {\n Element.txtCanvas = canvas;\n }\n\n static getTextMeasurementCanvas(): HTMLCanvasElement | OffscreenCanvas | undefined {\n let txtCanvas: HTMLCanvasElement | OffscreenCanvas | undefined = Element.txtCanvas;\n // Create the canvas element that will be used to measure text.\n if (!txtCanvas) {\n if (typeof document !== 'undefined') {\n txtCanvas = document.createElement('canvas'); // Defaults to 300 x 150. See: https://www.w3.org/TR/2012/WD-html5-author-20120329/the-canvas-element.html#the-canvas-element\n } else if (typeof OffscreenCanvas !== 'undefined') {\n txtCanvas = new OffscreenCanvas(300, 150);\n }\n Element.txtCanvas = txtCanvas;\n }\n return txtCanvas;\n }\n\n private context?: RenderContext;\n protected attrs: ElementAttributes;\n protected shouldDrawPointerRect: boolean;\n\n protected rendered: boolean;\n protected style: ElementStyle = {};\n protected registry?: Registry;\n\n protected _fontInfo: Required<FontInfo>;\n protected fontScale: number;\n protected _text = '';\n protected metricsValid = false;\n protected _textMetrics: TextMetrics = {\n fontBoundingBoxAscent: 0,\n fontBoundingBoxDescent: 0,\n actualBoundingBoxAscent: 0,\n actualBoundingBoxDescent: 0,\n actualBoundingBoxLeft: 0,\n actualBoundingBoxRight: 0,\n width: 0,\n alphabeticBaseline: 0,\n emHeightAscent: 0,\n emHeightDescent: 0,\n hangingBaseline: 0,\n ideographicBaseline: 0,\n };\n\n protected _height: number = 0;\n protected _width: number = 0;\n protected xShift: number = 0;\n protected yShift: number = 0;\n protected x: number = 0;\n protected y: number = 0;\n\n constructor(category?: string) {\n this.attrs = {\n id: Element.newID(),\n type: category ?? (<typeof Element>this.constructor).CATEGORY,\n class: '',\n };\n\n this.rendered = false;\n this._fontInfo = Metrics.getFontInfo(this.attrs.type);\n this.style = Metrics.getStyle(this.attrs.type);\n this.fontScale = Metrics.get(`${this.attrs.type}.fontScale`);\n this.shouldDrawPointerRect = Metrics.get(`${this.attrs.type}.pointerRect`);\n\n // If a default registry exist, then register with it right away.\n Registry.getDefaultRegistry()?.register(this);\n }\n\n /**\n * Adds a child to the Element, which lets it inherit the\n * same style as the parent when setGroupStyle() is called.\n *\n * Examples of children are noteheads and stems. Modifiers such\n * as Accidentals are generally not set as children.\n *\n * Note that StaveNote calls setGroupStyle() when setStyle() is called.\n */\n addChild(child: Element): this {\n if (child.parent) throw new RuntimeError('Element', 'Parent already defined');\n child.parent = this;\n this.children.push(child);\n return this;\n }\n\n getCategory(): string {\n return this.attrs.type;\n }\n\n /**\n * Set the element style used to render.\n *\n * Example:\n * ```typescript\n * element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });\n * element.drawWithStyle();\n * ```\n * Note: If the element draws additional sub-elements (i.e.: Modifiers in a Stave),\n * the style can be applied to all of them by means of the context:\n * ```typescript\n * element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });\n * element.getContext().setFillStyle('red');\n * element.getContext().setStrokeStyle('red');\n * element.drawWithStyle();\n * ```\n * or using drawWithStyle:\n * ```typescript\n * element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });\n * element.drawWithStyle();\n * ```\n */\n setStyle(style: ElementStyle): this {\n this.style = style;\n return this;\n }\n\n /** Set the element & associated children style used for rendering. */\n setGroupStyle(style: ElementStyle): this {\n this.style = style;\n this.children.forEach((child) => child.setGroupStyle(style));\n return this;\n }\n\n /** Get the element style used for rendering. */\n getStyle(): ElementStyle {\n return this.style;\n }\n\n /** Apply the element style to `context`. */\n applyStyle(context: RenderContext | undefined = this.context, style: ElementStyle = this.getStyle()): this {\n if (!context) return this;\n if (style.shadowColor) context.setShadowColor(style.shadowColor);\n if (style.shadowBlur) context.setShadowBlur(style.shadowBlur);\n if (style.fillStyle) context.setFillStyle(style.fillStyle);\n if (style.strokeStyle) context.setStrokeStyle(style.strokeStyle);\n if (style.lineWidth) context.setLineWidth(style.lineWidth);\n if (style.lineDash) context.setLineDash(style.lineDash.split(' ').map(Number));\n\n return this;\n }\n\n /**\n * Draw the element and all its sub-elements (i.e.: Modifiers in a Stave)\n * with the element's style (see `getStyle()` and `setStyle()`)\n */\n drawWithStyle(): this {\n const ctx = this.checkContext();\n ctx.save();\n this.applyStyle(ctx);\n this.draw();\n ctx.restore();\n return this;\n }\n\n /** Draw an element. */\n draw(): void {\n throw new RuntimeError('Element', 'Draw not defined');\n }\n\n /** Check if it has a class label (An element can have multiple class labels). */\n hasClass(className: string): boolean {\n if (!this.attrs.class) return false;\n return this.attrs.class?.split(' ').indexOf(className) !== -1;\n }\n\n /** Add a class label (An element can have multiple class labels). */\n addClass(className: string): this {\n if (this.hasClass(className)) return this;\n if (!this.attrs.class) this.attrs.class = `${className}`;\n else this.attrs.class = `${this.attrs.class} ${className}`;\n this.registry?.onUpdate({\n id: this.attrs.id,\n name: 'class',\n value: className,\n oldValue: undefined,\n });\n return this;\n }\n\n /** Remove a class label (An element can have multiple class labels). */\n removeClass(className: string): this {\n if (!this.hasClass(className)) return this;\n const arr = this.attrs.class?.split(' ');\n if (arr) {\n arr.splice(arr.indexOf(className));\n this.attrs.class = arr.join(' ');\n }\n this.registry?.onUpdate({\n id: this.attrs.id,\n name: 'class',\n value: undefined,\n oldValue: className,\n });\n return this;\n }\n\n /** Call back from registry after the element is registered. */\n onRegister(registry: Registry): this {\n this.registry = registry;\n return this;\n }\n\n /** Return the rendered status. */\n isRendered(): boolean {\n return this.rendered;\n }\n\n /** Set the rendered status. */\n setRendered(rendered = true): this {\n this.rendered = rendered;\n return this;\n }\n\n /** Return the element attributes. */\n getAttributes(): ElementAttributes {\n return this.attrs;\n }\n\n /** Return an attribute, such as 'id', 'type' or 'class'. */\n // eslint-disable-next-line\n getAttribute(name: string): any {\n return this.attrs[name];\n }\n\n /** Return associated SVGElement. */\n getSVGElement(suffix: string = ''): SVGElement | undefined {\n const id = prefix(this.attrs.id + suffix);\n const element = document.getElementById(id);\n if (element) return element as unknown as SVGElement;\n }\n\n /** Set an attribute such as 'id', 'class', or 'type'. */\n setAttribute(name: string, value: string | undefined): this {\n const oldID = this.attrs.id;\n const oldValue = this.attrs[name];\n this.attrs[name] = value;\n // Register with old id to support id changes.\n this.registry?.onUpdate({ id: oldID, name, value, oldValue });\n return this;\n }\n\n /** Get the boundingBox. */\n getBoundingBox(): BoundingBox {\n return new BoundingBox(\n this.x + this.xShift,\n this.y + this.yShift - this.textMetrics.actualBoundingBoxAscent,\n this.width,\n this.height\n );\n }\n\n /** Return the context, such as an SVGContext or CanvasContext object. */\n getContext(): RenderContext | undefined {\n return this.context;\n }\n\n /** Draw pointer rect. This allows mouse interaction with the element */\n drawPointerRect() {\n if (this.shouldDrawPointerRect) {\n const bb = this.getBoundingBox();\n this.context?.pointerRect(bb.getX(), bb.getY(), bb.getW(), bb.getH());\n }\n }\n\n /** Set the context to an SVGContext or CanvasContext object */\n setContext(context?: RenderContext): this {\n this.context = context;\n return this;\n }\n\n /** Validate and return the rendering context. */\n checkContext(): RenderContext {\n return defined(this.context, 'NoContext', 'No rendering context attached to instance.');\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // Font Handling\n\n /**\n * Provide a CSS compatible font string (e.g., 'bold 16px Arial') that will be applied\n * to text (not glyphs).\n */\n set font(f: string) {\n this.setFont(f);\n }\n\n /** Returns the CSS compatible font string for the text font. */\n get font(): string {\n return Font.toCSSString(this._fontInfo);\n }\n\n /**\n * Set the element's text font family, size, weight, style\n * (e.g., `Arial`, `10pt`, `bold`, `italic`).\n *\n * This attribute does not determine the font used for musical Glyphs like treble clefs.\n *\n * @param font is 1) a `FontInfo` object or\n * 2) a string formatted as CSS font shorthand (e.g., 'bold 10pt Arial') or\n * 3) a string representing the font family (at least one of `size`, `weight`, or `style` must also be provided).\n * @param size a string specifying the font size and unit (e.g., '16pt'), or a number (the unit is assumed to be 'pt').\n * @param weight is a string (e.g., 'bold', 'normal') or a number (100, 200, ... 900).\n * @param style is a string (e.g., 'italic', 'normal').\n * If no arguments are provided, then the font is set to the default font.\n * Each Element subclass may specify its own default by overriding the static `TEXT_FONT` property.\n */\n setFont(font?: string | FontInfo, size?: string | number, weight?: string | number, style?: string): this {\n const defaultTextFont: Required<FontInfo> = Metrics.getFontInfo(this.attrs.type);\n\n const fontIsObject = typeof font === 'object';\n const fontIsString = typeof font === 'string';\n const sizeWeightStyleAreUndefined = size === undefined && weight === undefined && style === undefined;\n\n this.metricsValid = false;\n if (fontIsObject) {\n // `font` is case 1) a FontInfo object\n this._fontInfo = { ...defaultTextFont, ...font };\n } else if (fontIsString && sizeWeightStyleAreUndefined) {\n // `font` is case 2) CSS font shorthand.\n this._fontInfo = Font.fromCSSString(font);\n } else {\n // `font` is case 3) a font family string (e.g., 'Times New Roman').\n // The other parameters represent the size, weight, and style.\n // It is okay for `font` to be undefined while one or more of the other arguments is provided.\n // Following CSS conventions, unspecified params are reset to the default.\n this._fontInfo = Font.validate(\n font ?? defaultTextFont.family,\n size ?? defaultTextFont.size,\n weight ?? defaultTextFont.weight,\n style ?? defaultTextFont.style\n );\n }\n return this;\n }\n\n /**\n * Get the css string describing this Element's text font. e.g.,\n * 'bold 10pt Arial'.\n */\n getFont(): string {\n return Font.toCSSString(this._fontInfo);\n }\n\n /** Return a copy of the current FontInfo object. */\n get fontInfo(): Required<FontInfo> {\n // We can cast to Required<FontInfo> here, because\n // we just called resetFont() above to ensure this.fontInfo is set.\n return this._fontInfo;\n }\n\n /** Set the current FontInfo object. */\n set fontInfo(fontInfo: FontInfo) {\n this.setFont(fontInfo);\n }\n\n /** Change the font size, while keeping everything else the same. */\n setFontSize(size?: string | number): this {\n const fontInfo = this.fontInfo;\n this.setFont(fontInfo.family, size, fontInfo.weight, fontInfo.style);\n return this;\n }\n\n /**\n * @returns a CSS font-size string (e.g., '18pt', '12px', '1em').\n * See Element.fontSizeInPixels or Element.fontSizeInPoints if you need to get a number for calculation purposes.\n */\n getFontSize(): string {\n return this.fontSize;\n }\n\n getFontScale(): number {\n return this.fontScale;\n }\n\n /**\n * The size is 1) a string of the form '10pt' or '16px', compatible with the CSS font-size property.\n * or 2) a number, which is interpreted as a point size (i.e. 12 == '12pt').\n */\n set fontSize(size: string | number) {\n this.setFontSize(size);\n }\n\n /** @returns a CSS font-size string (e.g., '18pt', '12px', '1em'). */\n get fontSize(): string {\n let size = this.fontInfo.size;\n if (typeof size === 'number') {\n size = `${size}pt`;\n }\n return size;\n }\n\n /** @returns the font size in `pt`. */\n get fontSizeInPoints(): number {\n return Font.convertSizeToPointValue(this.fontSize);\n }\n\n /** @returns the font size in `px`. */\n get fontSizeInPixels(): number {\n return Font.convertSizeToPixelValue(this.fontSize);\n }\n\n /** @returns a CSS font-style string (e.g., 'italic'). */\n get fontStyle(): string {\n return this.fontInfo.style;\n }\n\n /** Set the font style. */\n set fontStyle(style: string) {\n const fontInfo = this.fontInfo;\n this.setFont(fontInfo.family, fontInfo.size, fontInfo.weight, style);\n }\n\n /**\n * @returns a CSS font-weight string (e.g., 'bold').\n * As in CSS, font-weight is always returned as a string, even if it was set as a number.\n */\n get fontWeight(): string {\n return this.fontInfo.weight + '';\n }\n\n /** Set the font weight. */\n set fontWeight(weight: string | number) {\n const fontInfo = this.fontInfo;\n this.setFont(fontInfo.family, fontInfo.size, weight, fontInfo.style);\n }\n\n /** Get element width. */\n getWidth(): number {\n return this.width;\n }\n\n get width(): number {\n if (!this.metricsValid) this.measureText();\n return this._width;\n }\n\n /** Set element width. */\n setWidth(width: number): this {\n this.width = width;\n return this;\n }\n\n set width(width: number) {\n if (!this.metricsValid) this.measureText();\n this._width = width;\n }\n\n /** Set the X coordinate. */\n setX(x: number): this {\n this.x = x;\n return this;\n }\n\n /** Get the X coordinate. */\n getX(): number {\n return this.x;\n }\n /** Get the Y coordinate. */\n getY(): number {\n return this.y;\n }\n\n /** Set the Y coordinate. */\n setY(y: number): this {\n this.y = y;\n return this;\n }\n\n /** Shift element down `yShift` pixels. Negative values shift up. */\n setYShift(yShift: number): this {\n this.yShift = yShift;\n return this;\n }\n\n /** Get shift element `yShift`. */\n getYShift(): number {\n return this.yShift;\n }\n\n /** Set shift element right `xShift` pixels. Negative values shift left. */\n setXShift(xShift: number): this {\n this.xShift = xShift;\n return this;\n }\n\n /** Get shift element `xShift`. */\n getXShift(): number {\n return this.xShift;\n }\n\n /** Set element text. */\n setText(text: string): this {\n this.text = text;\n return this;\n }\n\n set text(text: string) {\n this.metricsValid = false;\n this._text = text;\n }\n\n /** Get element text. */\n getText(): string {\n return this._text;\n }\n\n get text(): string {\n return this._text;\n }\n\n /** Render the element text. */\n renderText(ctx: RenderContext, xPos: number, yPos: number): void {\n ctx.setFont(this._fontInfo);\n ctx.fillText(this._text, xPos + this.x + this.xShift, yPos + this.y + this.yShift);\n this.children.forEach((child) => {\n // changed -- do not look at private attributes of children.\n ctx.setFont(child.fontInfo);\n ctx.fillText(child.text, xPos + child.x + child.xShift, yPos + child.y + child.yShift);\n });\n }\n\n /** Measure the text using the textFont. */\n measureText(): TextMetrics {\n // TODO: What about SVG.getBBox()?\n // https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox\n const context = Element.getTextMeasurementCanvas()?.getContext('2d');\n if (!context) {\n // eslint-disable-next-line no-console\n console.warn('Element: No context for txtCanvas. Returning empty text metrics.');\n return this._textMetrics;\n }\n context.font = Font.toCSSString(Font.validate(this.fontInfo));\n this._textMetrics = context.measureText(this.text);\n this._height = this._textMetrics.actualBoundingBoxAscent + this._textMetrics.actualBoundingBoxDescent;\n this._width = this._textMetrics.width;\n this.metricsValid = true;\n return this._textMetrics;\n }\n\n /** Measure the text using the FontInfo related with key. */\n static measureWidth(text: string, key = ''): number {\n const context = Element.getTextMeasurementCanvas()?.getContext('2d');\n if (!context) {\n // eslint-disable-next-line no-console\n console.warn('Element: No context for txtCanvas. Returning empty text metrics.');\n return 0;\n }\n context.font = Font.toCSSString(Metrics.getFontInfo(key));\n return context.measureText(text).width;\n }\n\n /** Get the text metrics. */\n getTextMetrics(): TextMetrics {\n return this.textMetrics;\n }\n\n get textMetrics(): TextMetrics {\n if (!this.metricsValid) this.measureText();\n return this._textMetrics;\n }\n\n /** Get the text height. */\n getHeight() {\n return this.height;\n }\n\n get height() {\n if (!this.metricsValid) this.measureText();\n return this._height;\n }\n\n set height(height: number) {\n if (!this.metricsValid) this.measureText();\n this._height = height;\n }\n\n setOriginX(x: number): void {\n const bbox = this.getBoundingBox();\n const originX = Math.abs((bbox.getX() - this.xShift) / bbox.getW());\n const xShift = (x - originX) * bbox.getW();\n this.xShift = -xShift;\n }\n\n setOriginY(y: number): void {\n const bbox = this.getBoundingBox();\n const originY = Math.abs((bbox.getY() - this.yShift) / bbox.getH());\n const yShift = (y - originY) * bbox.getH();\n this.yShift = -yShift;\n }\n\n setOrigin(x: number, y: number): void {\n this.setOriginX(x);\n this.setOriginY(y);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { ModifierContext } from './modifiercontext';\nimport { Note } from './note';\nimport { Category } from './typeguard';\nimport { defined, RuntimeError } from './util';\n\nexport enum ModifierPosition {\n CENTER = 0,\n LEFT = 1,\n RIGHT = 2,\n ABOVE = 3,\n BELOW = 4,\n}\n\n// To enable logging for this class. Set `VexFlow.Modifier.DEBUG` to `true`.\n// function L(...args) { if (Modifier.DEBUG) log('VexFlow.Modifier', args); }\n\n/**\n * `Modifier` is an abstract interface for notational elements that modify\n * a `Note`. Examples of modifiers are `Accidental`, `Annotation`, `Stroke`, etc.\n *\n * For a `Modifier` instance to be positioned correctly, it must be part of\n * a `ModifierContext`. All modifiers in the same context are rendered relative to\n * one another.\n *\n * Typically, all modifiers to a note are part of the same `ModifierContext` instance. Also,\n * in multi-voice staves, all modifiers to notes on the same `tick` are part of the same\n * `ModifierContext`. This ensures that multiple voices don't trample all over each other.\n */\nexport class Modifier extends Element {\n /**\n * Modifiers category string. Every modifier has a different category.\n * The `ModifierContext` uses this to determine the type and order of the modifiers.\n */\n static override get CATEGORY(): string {\n return Category.Modifier;\n }\n\n /** Modifiers can be positioned almost anywhere, relative to a note. */\n static get Position(): typeof ModifierPosition {\n return ModifierPosition;\n }\n\n static get PositionString(): Record<string, number> {\n return {\n center: ModifierPosition.CENTER,\n above: ModifierPosition.ABOVE,\n below: ModifierPosition.BELOW,\n left: ModifierPosition.LEFT,\n right: ModifierPosition.RIGHT,\n };\n }\n\n // Modifiers are attached to a note and an index. An index is a specific head in a chord.\n protected note?: Note;\n protected index?: number;\n\n protected textLine: number;\n protected position: ModifierPosition;\n\n protected spacingFromNextModifier: number;\n protected modifierContext?: ModifierContext;\n\n constructor() {\n super();\n\n this.width = 0;\n\n // The `textLine` is reserved space above or below a stave.\n this.textLine = 0;\n this.position = Modifier.Position.LEFT;\n this.spacingFromNextModifier = 0;\n }\n\n /** Called when position changes. */\n protected reset(): void {\n // DO NOTHING.\n }\n\n /** Get attached note (`StaveNote`, `TabNote`, etc.) */\n getNote(): Note {\n return defined(this.note, 'NoNote', 'Modifier has no note.');\n }\n\n /**\n * Used in draw() to check and get the attached note (`StaveNote`, `TabNote`, etc.).\n * Also verifies that the index is valid.\n */\n checkAttachedNote(): Note {\n const category = this.getCategory();\n defined(this.index, 'NoIndex', `Can't draw ${category} without an index.`);\n return defined(this.note, 'NoNote', `Can't draw ${category} without a note.`);\n }\n\n /**\n * Set attached note.\n * @param note (`StaveNote`, `TabNote`, etc.)\n */\n setNote(note: Note): this {\n this.note = note;\n return this;\n }\n\n /** Get note index, which is a specific note in a chord. */\n getIndex(): number | undefined {\n return this.index;\n }\n\n /** Check and get note index, which is a specific note in a chord. */\n checkIndex(): number {\n return defined(this.index, 'NoIndex', 'Modifier has an invalid index.');\n }\n\n /** Set note index, which is a specific note in a chord. */\n setIndex(index: number): this {\n this.index = index;\n return this;\n }\n\n /** Get `ModifierContext`. */\n getModifierContext(): ModifierContext | undefined {\n return this.modifierContext;\n }\n\n /** Check and get `ModifierContext`. */\n checkModifierContext(): ModifierContext {\n return defined(this.modifierContext, 'NoModifierContext', 'Modifier Context Required');\n }\n\n /** Every modifier must be part of a `ModifierContext`. */\n setModifierContext(c: ModifierContext): this {\n this.modifierContext = c;\n return this;\n }\n\n /** Get position. */\n getPosition(): number {\n return this.position;\n }\n\n /**\n * Set position.\n * @param position CENTER | LEFT | RIGHT | ABOVE | BELOW\n */\n setPosition(position: string | number): this {\n this.position = typeof position === 'string' ? Modifier.PositionString[position] : position;\n this.reset();\n return this;\n }\n\n /** Set the `textLine` for the modifier. */\n setTextLine(line: number): this {\n this.textLine = line;\n return this;\n }\n\n /** Shift modifier down `y` pixels. Negative values shift up. */\n override setYShift(y: number): this {\n this.yShift = y;\n return this;\n }\n\n /** Set spacing from next modifier. */\n setSpacingFromNextModifier(x: number): void {\n this.spacingFromNextModifier = x;\n }\n\n /** Get spacing from next modifier. */\n getSpacingFromNextModifier(): number {\n return this.spacingFromNextModifier;\n }\n\n /**\n * Shift modifier `x` pixels in the direction of the modifier. Negative values\n * shift reverse.\n */\n override setXShift(x: number): this {\n this.xShift = 0;\n if (this.position === Modifier.Position.LEFT) {\n this.xShift -= x;\n } else {\n this.xShift += x;\n }\n return this;\n }\n\n /** Get shift modifier `x` */\n override getXShift(): number {\n return this.xShift;\n }\n\n /** Render the modifier onto the canvas. */\n override draw(): void {\n this.checkContext();\n throw new RuntimeError('NotImplemented', 'draw() not implemented for this modifier.');\n }\n\n // aligns sub notes of NoteSubGroup (or GraceNoteGroup) to the main note with correct x-offset\n alignSubNotesWithNote(subNotes: Note[], note: Note, position = Modifier.Position.LEFT): void {\n // Shift over the tick contexts of each note\n const tickContext = note.getTickContext();\n const metrics = tickContext.getMetrics();\n const stave = note.getStave();\n const subNoteXOffset =\n position === Modifier.Position.RIGHT\n ? tickContext.getX() + this.getSpacingFromNextModifier() * subNotes.length + 10\n : tickContext.getX() - metrics.modLeftPx - metrics.modRightPx + this.getSpacingFromNextModifier();\n\n subNotes.forEach((subNote) => {\n const subTickContext = subNote.getTickContext();\n if (stave) subNote.setStave(stave);\n subTickContext.setXOffset(subNoteXOffset); // don't touch baseX to avoid shift each render\n });\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { RuntimeError } from './util';\n\nexport interface NoteAccidental {\n note: number;\n accidental: AccidentalValue;\n}\n\nexport interface NoteParts {\n root: string;\n accidental: string;\n}\n\nexport interface KeyParts {\n root: string;\n accidental: string;\n type: string;\n}\n\nexport type KeyValue = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;\n\nexport type RootValue = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\nexport type AccidentalValue = -2 | -1 | 0 | 1 | 2;\n\nexport interface Key {\n rootIndex: RootValue;\n intVal: KeyValue;\n}\n\n/** Music implements some standard music theory routines. */\nexport class Music {\n /** Number of an canonical notes (12). */\n static get NUM_TONES(): number {\n return this.canonicalNotes.length;\n }\n\n /** Names of root notes ('c', 'd',...) */\n static get roots(): string[] {\n return ['c', 'd', 'e', 'f', 'g', 'a', 'b'];\n }\n\n /** Values of the root notes.*/\n static get rootValues(): KeyValue[] {\n return [0, 2, 4, 5, 7, 9, 11];\n }\n\n /** Indexes of the root notes.*/\n static get rootIndexes(): Record<string, RootValue> {\n return {\n c: 0,\n d: 1,\n e: 2,\n f: 3,\n g: 4,\n a: 5,\n b: 6,\n };\n }\n\n /** Names of canonical notes ('c', 'c#', 'd',...). */\n static get canonicalNotes(): string[] {\n return ['c', 'c#', 'd', 'd#', 'e', 'f', 'f#', 'g', 'g#', 'a', 'a#', 'b'];\n }\n\n /** Names of diatonic intervals ('unison', 'm2', 'M2',...). */\n static get diatonicIntervals(): string[] {\n return ['unison', 'm2', 'M2', 'm3', 'M3', 'p4', 'dim5', 'p5', 'm6', 'M6', 'b7', 'M7', 'octave'];\n }\n\n /** NoteAccidental associated to diatonic intervals. */\n static get diatonicAccidentals(): Record<string, NoteAccidental> {\n return {\n unison: { note: 0, accidental: 0 },\n m2: { note: 1, accidental: -1 },\n M2: { note: 1, accidental: 0 },\n m3: { note: 2, accidental: -1 },\n M3: { note: 2, accidental: 0 },\n p4: { note: 3, accidental: 0 },\n dim5: { note: 4, accidental: -1 },\n p5: { note: 4, accidental: 0 },\n m6: { note: 5, accidental: -1 },\n M6: { note: 5, accidental: 0 },\n b7: { note: 6, accidental: -1 },\n M7: { note: 6, accidental: 0 },\n octave: { note: 7, accidental: 0 },\n };\n }\n\n /** Semitones shift associated to intervals .*/\n static get intervals(): Record<string, number> {\n return {\n u: 0,\n unison: 0,\n m2: 1,\n b2: 1,\n min2: 1,\n S: 1,\n H: 1,\n 2: 2,\n M2: 2,\n maj2: 2,\n T: 2,\n W: 2,\n m3: 3,\n b3: 3,\n min3: 3,\n M3: 4,\n 3: 4,\n maj3: 4,\n 4: 5,\n p4: 5,\n '#4': 6,\n b5: 6,\n aug4: 6,\n dim5: 6,\n 5: 7,\n p5: 7,\n '#5': 8,\n b6: 8,\n aug5: 8,\n 6: 9,\n M6: 9,\n maj6: 9,\n b7: 10,\n m7: 10,\n min7: 10,\n dom7: 10,\n M7: 11,\n maj7: 11,\n 8: 12,\n octave: 12,\n };\n }\n\n /** Semitones shifts associated with scales. */\n static get scales(): Record<string, number[]> {\n return {\n major: [2, 2, 1, 2, 2, 2, 1],\n minor: [2, 1, 2, 2, 1, 2, 2],\n ionian: [2, 2, 1, 2, 2, 2, 1],\n dorian: [2, 1, 2, 2, 2, 1, 2],\n phyrgian: [1, 2, 2, 2, 1, 2, 2],\n lydian: [2, 2, 2, 1, 2, 2, 1],\n mixolydian: [2, 2, 1, 2, 2, 1, 2],\n aeolian: [2, 1, 2, 2, 1, 2, 2],\n locrian: [1, 2, 2, 1, 2, 2, 2],\n };\n }\n\n /** Scales associated with m (minor) and M (major). */\n static get scaleTypes(): Record<string, number[]> {\n return {\n M: Music.scales.major,\n m: Music.scales.minor,\n };\n }\n\n /** Accidentals abbreviations. */\n static get accidentals(): string[] {\n return ['bb', 'b', 'n', '#', '##'];\n }\n\n /** Note values. */\n static get noteValues(): Record<string, Key> {\n return {\n c: { rootIndex: 0, intVal: 0 },\n cn: { rootIndex: 0, intVal: 0 },\n 'c#': { rootIndex: 0, intVal: 1 },\n 'c##': { rootIndex: 0, intVal: 2 },\n cb: { rootIndex: 0, intVal: 11 },\n cbb: { rootIndex: 0, intVal: 10 },\n d: { rootIndex: 1, intVal: 2 },\n dn: { rootIndex: 1, intVal: 2 },\n 'd#': { rootIndex: 1, intVal: 3 },\n 'd##': { rootIndex: 1, intVal: 4 },\n db: { rootIndex: 1, intVal: 1 },\n dbb: { rootIndex: 1, intVal: 0 },\n e: { rootIndex: 2, intVal: 4 },\n en: { rootIndex: 2, intVal: 4 },\n 'e#': { rootIndex: 2, intVal: 5 },\n 'e##': { rootIndex: 2, intVal: 6 },\n eb: { rootIndex: 2, intVal: 3 },\n ebb: { rootIndex: 2, intVal: 2 },\n f: { rootIndex: 3, intVal: 5 },\n fn: { rootIndex: 3, intVal: 5 },\n 'f#': { rootIndex: 3, intVal: 6 },\n 'f##': { rootIndex: 3, intVal: 7 },\n fb: { rootIndex: 3, intVal: 4 },\n fbb: { rootIndex: 3, intVal: 3 },\n g: { rootIndex: 4, intVal: 7 },\n gn: { rootIndex: 4, intVal: 7 },\n 'g#': { rootIndex: 4, intVal: 8 },\n 'g##': { rootIndex: 4, intVal: 9 },\n gb: { rootIndex: 4, intVal: 6 },\n gbb: { rootIndex: 4, intVal: 5 },\n a: { rootIndex: 5, intVal: 9 },\n an: { rootIndex: 5, intVal: 9 },\n 'a#': { rootIndex: 5, intVal: 10 },\n 'a##': { rootIndex: 5, intVal: 11 },\n ab: { rootIndex: 5, intVal: 8 },\n abb: { rootIndex: 5, intVal: 7 },\n b: { rootIndex: 6, intVal: 11 },\n bn: { rootIndex: 6, intVal: 11 },\n 'b#': { rootIndex: 6, intVal: 0 },\n 'b##': { rootIndex: 6, intVal: 1 },\n bb: { rootIndex: 6, intVal: 10 },\n bbb: { rootIndex: 6, intVal: 9 },\n };\n }\n\n protected isValidNoteValue(note: number): boolean {\n return note >= 0 && note < Music.canonicalNotes.length;\n }\n\n protected isValidIntervalValue(interval: number): boolean {\n return interval >= 0 && interval < Music.diatonicIntervals.length;\n }\n\n /** Return root and accidental associated to a note. */\n getNoteParts(noteString: string): NoteParts {\n if (!noteString || noteString.length < 1) {\n throw new RuntimeError('BadArguments', 'Invalid note name: ' + noteString);\n }\n\n if (noteString.length > 3) {\n throw new RuntimeError('BadArguments', 'Invalid note name: ' + noteString);\n }\n\n const note = noteString.toLowerCase();\n\n const regex = /^([cdefgab])(b|bb|n|#|##)?$/;\n const match = regex.exec(note);\n\n if (match !== null) {\n const root = match[1];\n const accidental = match[2];\n\n return {\n root,\n accidental,\n };\n } else {\n throw new RuntimeError('BadArguments', 'Invalid note name: ' + noteString);\n }\n }\n\n /** Return root, accidental and type associated to a key. */\n getKeyParts(keyString: string): KeyParts {\n if (!keyString || keyString.length < 1) {\n throw new RuntimeError('BadArguments', 'Invalid key: ' + keyString);\n }\n\n const key = keyString.toLowerCase();\n\n // Support Major, Minor, Melodic Minor, and Harmonic Minor key types.\n const regex = /^([cdefgab])(b|#)?(mel|harm|m|M)?$/;\n const match = regex.exec(key);\n\n if (match !== null) {\n const root = match[1];\n const accidental = match[2];\n let type = match[3];\n\n // Unspecified type implies major\n if (!type) type = 'M';\n\n return {\n root,\n accidental,\n type,\n };\n } else {\n throw new RuntimeError('BadArguments', `Invalid key: ${keyString}`);\n }\n }\n\n /** Note value associated to a note name. */\n getNoteValue(noteString: string): number {\n const value = Music.noteValues[noteString];\n if (value === undefined) {\n throw new RuntimeError('BadArguments', `Invalid note name: ${noteString}`);\n }\n return value.intVal;\n }\n\n /** Interval value associated to an interval name. */\n getIntervalValue(intervalString: string): number {\n const value = Music.intervals[intervalString];\n if (value === undefined) {\n throw new RuntimeError('BadArguments', `Invalid interval name: ${intervalString}`);\n }\n return value;\n }\n\n /** Canonical note name associated to a value. */\n getCanonicalNoteName(noteValue: number): string {\n if (!this.isValidNoteValue(noteValue)) {\n throw new RuntimeError('BadArguments', `Invalid note value: ${noteValue}`);\n }\n return Music.canonicalNotes[noteValue];\n }\n\n /** Interval name associated to a value. */\n getCanonicalIntervalName(intervalValue: number): string {\n if (!this.isValidIntervalValue(intervalValue)) {\n throw new RuntimeError('BadArguments', `Invalid interval value: ${intervalValue}`);\n }\n return Music.diatonicIntervals[intervalValue];\n }\n\n /**\n * Given a note, interval, and interval direction, produce the relative note.\n */\n getRelativeNoteValue(noteValue: number, intervalValue: number, direction: number = 1): number {\n if (direction !== 1 && direction !== -1) {\n throw new RuntimeError('BadArguments', `Invalid direction: ${direction}`);\n }\n\n let sum = (noteValue + direction * intervalValue) % Music.NUM_TONES;\n if (sum < 0) sum += Music.NUM_TONES;\n\n return sum;\n }\n\n /**\n * Given a root and note value, produce the relative note name.\n */\n getRelativeNoteName(root: string, noteValue: number): string {\n const parts = this.getNoteParts(root);\n const rootValue = this.getNoteValue(parts.root);\n let interval = noteValue - rootValue;\n\n if (Math.abs(interval) > Music.NUM_TONES - 3) {\n let multiplier = 1;\n if (interval > 0) multiplier = -1;\n\n // Possibly wrap around. (Add +1 for modulo operator)\n const reverseInterval = ((noteValue + 1 + (rootValue + 1)) % Music.NUM_TONES) * multiplier;\n\n if (Math.abs(reverseInterval) > 2) {\n throw new RuntimeError('BadArguments', `Notes not related: ${root}, ${noteValue})`);\n } else {\n interval = reverseInterval;\n }\n }\n\n if (Math.abs(interval) > 2) {\n throw new RuntimeError('BadArguments', `Notes not related: ${root}, ${noteValue})`);\n }\n\n let relativeNoteName = parts.root;\n if (interval > 0) {\n for (let i = 1; i <= interval; ++i) {\n relativeNoteName += '#';\n }\n } else if (interval < 0) {\n for (let i = -1; i >= interval; --i) {\n relativeNoteName += 'b';\n }\n }\n\n return relativeNoteName;\n }\n\n /**\n * Return scale tones, given intervals. Each successive interval is\n * relative to the previous one, e.g., Major Scale:\n *\n * TTSTTTS = [2,2,1,2,2,2,1]\n *\n * When used with key = 0, returns C scale (which is isomorphic to\n * interval list).\n */\n getScaleTones(key: number, intervals: number[]): number[] {\n const tones = [key];\n\n let nextNote = key;\n for (let i = 0; i < intervals.length; i++) {\n nextNote = this.getRelativeNoteValue(nextNote, intervals[i]);\n if (nextNote !== key) tones.push(nextNote);\n }\n\n return tones;\n }\n\n /**\n * Return the interval of a note, given a diatonic scale.\n * e.g., given the scale C, and the note E, returns M3.\n */\n getIntervalBetween(note1: number, note2: number, direction: number = 1): number {\n if (direction !== 1 && direction !== -1) {\n throw new RuntimeError('BadArguments', `Invalid direction: ${direction}`);\n }\n\n if (!this.isValidNoteValue(note1) || !this.isValidNoteValue(note2)) {\n throw new RuntimeError('BadArguments', `Invalid notes: ${note1}, ${note2}`);\n }\n\n let difference = direction === 1 ? note2 - note1 : note1 - note2;\n\n if (difference < 0) difference += Music.NUM_TONES;\n\n return difference;\n }\n\n /**\n * Create a scale map that represents the pitch state for a\n * `keySignature`. For example, passing a `G` to `keySignature` would\n * return a scale map with every note naturalized except for `F` which\n * has an `F#` state.\n */\n createScaleMap(keySignature: string): Record<string, string> {\n const keySigParts = this.getKeyParts(keySignature);\n if (!keySigParts.type) throw new RuntimeError('BadArguments', 'Unsupported key type: undefined');\n const scaleName = Music.scaleTypes[keySigParts.type];\n\n let keySigString = keySigParts.root;\n if (keySigParts.accidental) keySigString += keySigParts.accidental;\n\n if (!scaleName) throw new RuntimeError('BadArguments', 'Unsupported key type: ' + keySignature);\n\n const scale = this.getScaleTones(this.getNoteValue(keySigString), scaleName);\n const noteLocation = Music.rootIndexes[keySigParts.root];\n\n const scaleMap = {} as Record<string, string>;\n for (let i = 0; i < Music.roots.length; ++i) {\n const index = (noteLocation + i) % Music.roots.length;\n const rootName = Music.roots[index];\n let noteName = this.getRelativeNoteName(rootName, scale[i]);\n\n if (noteName.length === 1) {\n noteName += 'n';\n }\n\n scaleMap[rootName] = noteName;\n }\n\n return scaleMap;\n }\n}\n","// This file was generated by `glyph_codes.js'\n// The enum includes all SMuFL glyphs, and a few others that VexFlow uses.\n// See the list of SMuFL glyphs:\n// https://w3c.github.io/smufl/latest/tables/\n// https://raw.githubusercontent.com/w3c/smufl/gh-pages/metadata/glyphnames.json\n// We renamed the two SMuFL names that start with a digit:\n// 4stringTabClef => fourStringTabClef\n// 6stringTabClef => sixStringTabClef\n//\nexport enum Glyphs {\n ////// SPECIAL GLYPHS ///////////////////////////////////////\n // Null character\n null = '\\0',\n\n ////// SMuFL GLYPHS /////////////////////////////////////////\n // U+E06E 4-string tab clef\n fourStringTabClef = '\\ue06e',\n // U+E06D 6-string tab clef\n sixStringTabClef = '\\ue06d',\n // U+E30D 11 large diesis down, 3° down [46 EDO]\n accSagittal11LargeDiesisDown = '\\ue30d',\n // U+E30C 11 large diesis up, (11L), (sharp less 11M), 3° up [46 EDO]\n accSagittal11LargeDiesisUp = '\\ue30c',\n // U+E30B 11 medium diesis down, 1°[17 31] 2°46 down, 1/4-tone down\n accSagittal11MediumDiesisDown = '\\ue30b',\n // U+E30A 11 medium diesis up, (11M), 1°[17 31] 2°46 up, 1/4-tone up\n accSagittal11MediumDiesisUp = '\\ue30a',\n // U+E3AB 11:19 large diesis down\n accSagittal11v19LargeDiesisDown = '\\ue3ab',\n // U+E3AA 11:19 large diesis up, (11:19L, apotome less 11:19M)\n accSagittal11v19LargeDiesisUp = '\\ue3aa',\n // U+E3A3 11:19 medium diesis down\n accSagittal11v19MediumDiesisDown = '\\ue3a3',\n // U+E3A2 11:19 medium diesis up, (11:19M, 11M plus 19s)\n accSagittal11v19MediumDiesisUp = '\\ue3a2',\n // U+E397 11:49 comma down\n accSagittal11v49CommaDown = '\\ue397',\n // U+E396 11:49 comma up, (11:49C, 11M less 49C)\n accSagittal11v49CommaUp = '\\ue396',\n // U+E395 143 comma down\n accSagittal143CommaDown = '\\ue395',\n // U+E394 143 comma up, (143C, 13L less 11M)\n accSagittal143CommaUp = '\\ue394',\n // U+E343 17 comma down\n accSagittal17CommaDown = '\\ue343',\n // U+E342 17 comma up, (17C)\n accSagittal17CommaUp = '\\ue342',\n // U+E393 17 kleisma down\n accSagittal17KleismaDown = '\\ue393',\n // U+E392 17 kleisma up, (17k)\n accSagittal17KleismaUp = '\\ue392',\n // U+E399 19 comma down\n accSagittal19CommaDown = '\\ue399',\n // U+E398 19 comma up, (19C)\n accSagittal19CommaUp = '\\ue398',\n // U+E391 19 schisma down\n accSagittal19SchismaDown = '\\ue391',\n // U+E390 19 schisma up, (19s)\n accSagittal19SchismaUp = '\\ue390',\n // U+E3F5 1 mina down, 1/(5⋅7⋅13)-schismina down, 0.42 cents down\n accSagittal1MinaDown = '\\ue3f5',\n // U+E3F4 1 mina up, 1/(5⋅7⋅13)-schismina up, 0.42 cents up\n accSagittal1MinaUp = '\\ue3f4',\n // U+E3F9 1 tina down, 7²⋅11⋅19/5-schismina down, 0.17 cents down\n accSagittal1TinaDown = '\\ue3f9',\n // U+E3F8 1 tina up, 7²⋅11⋅19/5-schismina up, 0.17 cents up\n accSagittal1TinaUp = '\\ue3f8',\n // U+E371 23 comma down, 2° down [96 EDO], 1/8-tone down\n accSagittal23CommaDown = '\\ue371',\n // U+E370 23 comma up, (23C), 2° up [96 EDO], 1/8-tone up\n accSagittal23CommaUp = '\\ue370',\n // U+E39F 23 small diesis down\n accSagittal23SmallDiesisDown = '\\ue39f',\n // U+E39E 23 small diesis up, (23S)\n accSagittal23SmallDiesisUp = '\\ue39e',\n // U+E307 25 small diesis down, 2° down [53 EDO]\n accSagittal25SmallDiesisDown = '\\ue307',\n // U+E306 25 small diesis up, (25S, ~5:13S, ~37S, 5C plus 5C), 2° up [53 EDO]\n accSagittal25SmallDiesisUp = '\\ue306',\n // U+E3F7 2 minas down, 65/77-schismina down, 0.83 cents down\n accSagittal2MinasDown = '\\ue3f7',\n // U+E3F6 2 minas up, 65/77-schismina up, 0.83 cents up\n accSagittal2MinasUp = '\\ue3f6',\n // U+E3FB 2 tinas down, 1/(7³⋅17)-schismina down, 0.30 cents down\n accSagittal2TinasDown = '\\ue3fb',\n // U+E3FA 2 tinas up, 1/(7³⋅17)-schismina up, 0.30 cents up\n accSagittal2TinasUp = '\\ue3fa',\n // U+E30F 35 large diesis down, 2° down [50 EDO], 5/18-tone down\n accSagittal35LargeDiesisDown = '\\ue30f',\n // U+E30E 35 large diesis up, (35L, ~13L, ~125L, sharp less 35M), 2°50 up\n accSagittal35LargeDiesisUp = '\\ue30e',\n // U+E309 35 medium diesis down, 1°[50] 2°[27] down, 2/9-tone down\n accSagittal35MediumDiesisDown = '\\ue309',\n // U+E308 35 medium diesis up, (35M, ~13M, ~125M, 5C plus 7C), 2/9-tone up\n accSagittal35MediumDiesisUp = '\\ue308',\n // U+E3FD 3 tinas down, 1 mina down, 1/(5⋅7⋅13)-schismina down, 0.42 cents down\n accSagittal3TinasDown = '\\ue3fd',\n // U+E3FC 3 tinas up, 1 mina up, 1/(5⋅7⋅13)-schismina up, 0.42 cents up\n accSagittal3TinasUp = '\\ue3fc',\n // U+E3A9 49 large diesis down\n accSagittal49LargeDiesisDown = '\\ue3a9',\n // U+E3A8 49 large diesis up, (49L, ~31L, apotome less 49M)\n accSagittal49LargeDiesisUp = '\\ue3a8',\n // U+E3A5 49 medium diesis down\n accSagittal49MediumDiesisDown = '\\ue3a5',\n // U+E3A4 49 medium diesis up, (49M, ~31M, 7C plus 7C)\n accSagittal49MediumDiesisUp = '\\ue3a4',\n // U+E39D 49 small diesis down\n accSagittal49SmallDiesisDown = '\\ue39d',\n // U+E39C 49 small diesis up, (49S, ~31S)\n accSagittal49SmallDiesisUp = '\\ue39c',\n // U+E3FF 4 tinas down, 5²⋅11²/7-schismina down, 0.57 cents down\n accSagittal4TinasDown = '\\ue3ff',\n // U+E3FE 4 tinas up, 5²⋅11²/7-schismina up, 0.57 cents up\n accSagittal4TinasUp = '\\ue3fe',\n // U+E345 55 comma down, 3° down [96 EDO], 3/16-tone down\n accSagittal55CommaDown = '\\ue345',\n // U+E344 55 comma up, (55C, 11M less 5C), 3°up [96 EDO], 3/16-tone up\n accSagittal55CommaUp = '\\ue344',\n // U+E303 5 comma down, 1° down [22 27 29 34 41 46 53 96 EDOs], 1/12-tone down\n accSagittal5CommaDown = '\\ue303',\n // U+E302 5 comma up, (5C), 1° up [22 27 29 34 41 46 53 96 EDOs], 1/12-tone up\n accSagittal5CommaUp = '\\ue302',\n // U+E401 5 tinas down, 7⁴/25-schismina down, 0.72 cents down\n accSagittal5TinasDown = '\\ue401',\n // U+E400 5 tinas up, 7⁴/25-schismina up, 0.72 cents up\n accSagittal5TinasUp = '\\ue400',\n // U+E349 5:11 small diesis down\n accSagittal5v11SmallDiesisDown = '\\ue349',\n // U+E348 5:11 small diesis up, (5:11S, ~7:13S, ~11:17S, 5:7k plus 7:11C)\n accSagittal5v11SmallDiesisUp = '\\ue348',\n // U+E3AD 5:13 large diesis down\n accSagittal5v13LargeDiesisDown = '\\ue3ad',\n // U+E3AC 5:13 large diesis up, (5:13L, ~37L, apotome less 5:13M)\n accSagittal5v13LargeDiesisUp = '\\ue3ac',\n // U+E3A1 5:13 medium diesis down\n accSagittal5v13MediumDiesisDown = '\\ue3a1',\n // U+E3A0 5:13 medium diesis up, (5:13M, ~37M, 5C plus 13C)\n accSagittal5v13MediumDiesisUp = '\\ue3a0',\n // U+E373 5:19 comma down, 1/20-tone down\n accSagittal5v19CommaDown = '\\ue373',\n // U+E372 5:19 comma up, (5:19C, 5C plus 19s), 1/20-tone up\n accSagittal5v19CommaUp = '\\ue372',\n // U+E375 5:23 small diesis down, 2° down [60 EDO], 1/5-tone down\n accSagittal5v23SmallDiesisDown = '\\ue375',\n // U+E374 5:23 small diesis up, (5:23S, 5C plus 23C), 2° up [60 EDO], 1/5-tone up\n accSagittal5v23SmallDiesisUp = '\\ue374',\n // U+E3A7 5:49 medium diesis down\n accSagittal5v49MediumDiesisDown = '\\ue3a7',\n // U+E3A6 5:49 medium diesis up, (5:49M, half apotome)\n accSagittal5v49MediumDiesisUp = '\\ue3a6',\n // U+E301 5:7 kleisma down\n accSagittal5v7KleismaDown = '\\ue301',\n // U+E300 5:7 kleisma up, (5:7k, ~11:13k, 7C less 5C)\n accSagittal5v7KleismaUp = '\\ue300',\n // U+E403 6 tinas down, 2 minas down, 65/77-schismina down, 0.83 cents down\n accSagittal6TinasDown = '\\ue403',\n // U+E402 6 tinas up, 2 minas up, 65/77-schismina up, 0.83 cents up\n accSagittal6TinasUp = '\\ue402',\n // U+E305 7 comma down, 1° down [43 EDO], 2° down [72 EDO], 1/6-tone down\n accSagittal7CommaDown = '\\ue305',\n // U+E304 7 comma up, (7C), 1° up [43 EDO], 2° up [72 EDO], 1/6-tone up\n accSagittal7CommaUp = '\\ue304',\n // U+E405 7 tinas down, 7/(5²⋅17)-schismina down, 1.02 cents down\n accSagittal7TinasDown = '\\ue405',\n // U+E404 7 tinas up, 7/(5²⋅17)-schismina up, 1.02 cents up\n accSagittal7TinasUp = '\\ue404',\n // U+E347 7:11 comma down, 1° down [60 EDO], 1/10-tone down\n accSagittal7v11CommaDown = '\\ue347',\n // U+E346 7:11 comma up, (7:11C, ~13:17S, ~29S, 11L less 7C), 1° up [60 EDO]\n accSagittal7v11CommaUp = '\\ue346',\n // U+E341 7:11 kleisma down\n accSagittal7v11KleismaDown = '\\ue341',\n // U+E340 7:11 kleisma up, (7:11k, ~29k)\n accSagittal7v11KleismaUp = '\\ue340',\n // U+E39B 7:19 comma down\n accSagittal7v19CommaDown = '\\ue39b',\n // U+E39A 7:19 comma up, (7:19C, 7C less 19s)\n accSagittal7v19CommaUp = '\\ue39a',\n // U+E407 8 tinas down, 11⋅17/(5²⋅7)-schismina down, 1.14 cents down\n accSagittal8TinasDown = '\\ue407',\n // U+E406 8 tinas up, 11⋅17/(5²⋅7)-schismina up, 1.14 cents up\n accSagittal8TinasUp = '\\ue406',\n // U+E409 9 tinas down, 1/(7²⋅11)-schismina down, 1.26 cents down\n accSagittal9TinasDown = '\\ue409',\n // U+E408 9 tinas up, 1/(7²⋅11)-schismina up, 1.26 cents up\n accSagittal9TinasUp = '\\ue408',\n // U+E3F2 Acute, 5 schisma up (5s), 2 cents up\n accSagittalAcute = '\\ue3f2',\n // U+E335 Double flat, (2 apotomes down)[almost all EDOs], whole-tone down\n accSagittalDoubleFlat = '\\ue335',\n // U+E3E9 Double flat 11:49C-up\n accSagittalDoubleFlat11v49CUp = '\\ue3e9',\n // U+E3EB Double flat 143C-up\n accSagittalDoubleFlat143CUp = '\\ue3eb',\n // U+E365 Double flat 17C-up\n accSagittalDoubleFlat17CUp = '\\ue365',\n // U+E3ED Double flat 17k-up\n accSagittalDoubleFlat17kUp = '\\ue3ed',\n // U+E3E7 Double flat 19C-up\n accSagittalDoubleFlat19CUp = '\\ue3e7',\n // U+E3EF Double flat 19s-up\n accSagittalDoubleFlat19sUp = '\\ue3ef',\n // U+E387 Double flat 23C-up, 14° down [96 EDO], 7/8-tone down\n accSagittalDoubleFlat23CUp = '\\ue387',\n // U+E3E1 Double flat 23S-up\n accSagittalDoubleFlat23SUp = '\\ue3e1',\n // U+E32D Double flat 25S-up, 8°down [53 EDO]\n accSagittalDoubleFlat25SUp = '\\ue32d',\n // U+E3E3 Double flat 49S-up\n accSagittalDoubleFlat49SUp = '\\ue3e3',\n // U+E363 Double flat 55C-up, 13° down [96 EDO], 13/16-tone down\n accSagittalDoubleFlat55CUp = '\\ue363',\n // U+E331 Double flat 5C-up, 5°[22 29] 7°[34 41] 9°53 down, 11/12 tone down\n accSagittalDoubleFlat5CUp = '\\ue331',\n // U+E35F Double flat 5:11S-up\n accSagittalDoubleFlat5v11SUp = '\\ue35f',\n // U+E385 Double flat 5:19C-up, 19/20-tone down\n accSagittalDoubleFlat5v19CUp = '\\ue385',\n // U+E383 Double flat 5:23S-up, 8° down [60 EDO], 4/5-tone down\n accSagittalDoubleFlat5v23SUp = '\\ue383',\n // U+E333 Double flat 5:7k-up\n accSagittalDoubleFlat5v7kUp = '\\ue333',\n // U+E32F Double flat 7C-up, 5° down [43 EDO], 10° down [72 EDO], 5/6-tone down\n accSagittalDoubleFlat7CUp = '\\ue32f',\n // U+E361 Double flat 7:11C-up, 9° down [60 EDO], 9/10-tone down\n accSagittalDoubleFlat7v11CUp = '\\ue361',\n // U+E367 Double flat 7:11k-up\n accSagittalDoubleFlat7v11kUp = '\\ue367',\n // U+E3E5 Double flat 7:19C-up\n accSagittalDoubleFlat7v19CUp = '\\ue3e5',\n // U+E334 Double sharp, (2 apotomes up)[almost all EDOs], whole-tone up\n accSagittalDoubleSharp = '\\ue334',\n // U+E3E8 Double sharp 11:49C-down\n accSagittalDoubleSharp11v49CDown = '\\ue3e8',\n // U+E3EA Double sharp 143C-down\n accSagittalDoubleSharp143CDown = '\\ue3ea',\n // U+E364 Double sharp 17C-down\n accSagittalDoubleSharp17CDown = '\\ue364',\n // U+E3EC Double sharp 17k-down\n accSagittalDoubleSharp17kDown = '\\ue3ec',\n // U+E3E6 Double sharp 19C-down\n accSagittalDoubleSharp19CDown = '\\ue3e6',\n // U+E3EE Double sharp 19s-down\n accSagittalDoubleSharp19sDown = '\\ue3ee',\n // U+E386 Double sharp 23C-down, 14°up [96 EDO], 7/8-tone up\n accSagittalDoubleSharp23CDown = '\\ue386',\n // U+E3E0 Double sharp 23S-down\n accSagittalDoubleSharp23SDown = '\\ue3e0',\n // U+E32C Double sharp 25S-down, 8°up [53 EDO]\n accSagittalDoubleSharp25SDown = '\\ue32c',\n // U+E3E2 Double sharp 49S-down\n accSagittalDoubleSharp49SDown = '\\ue3e2',\n // U+E362 Double sharp 55C-down, 13° up [96 EDO], 13/16-tone up\n accSagittalDoubleSharp55CDown = '\\ue362',\n // U+E330 Double sharp 5C-down, 5°[22 29] 7°[34 41] 9°53 up, 11/12 tone up\n accSagittalDoubleSharp5CDown = '\\ue330',\n // U+E35E Double sharp 5:11S-down\n accSagittalDoubleSharp5v11SDown = '\\ue35e',\n // U+E384 Double sharp 5:19C-down, 19/20-tone up\n accSagittalDoubleSharp5v19CDown = '\\ue384',\n // U+E382 Double sharp 5:23S-down, 8° up [60 EDO], 4/5-tone up\n accSagittalDoubleSharp5v23SDown = '\\ue382',\n // U+E332 Double sharp 5:7k-down\n accSagittalDoubleSharp5v7kDown = '\\ue332',\n // U+E32E Double sharp 7C-down, 5°[43] 10°[72] up, 5/6-tone up\n accSagittalDoubleSharp7CDown = '\\ue32e',\n // U+E360 Double sharp 7:11C-down, 9° up [60 EDO], 9/10-tone up\n accSagittalDoubleSharp7v11CDown = '\\ue360',\n // U+E366 Double sharp 7:11k-down\n accSagittalDoubleSharp7v11kDown = '\\ue366',\n // U+E3E4 Double sharp 7:19C-down\n accSagittalDoubleSharp7v19CDown = '\\ue3e4',\n // U+E319 Flat, (apotome down)[almost all EDOs], 1/2-tone down\n accSagittalFlat = '\\ue319',\n // U+E329 Flat 11L-down, 8° up [46 EDO]\n accSagittalFlat11LDown = '\\ue329',\n // U+E327 Flat 11M-down, 3° down [17 31 EDOs], 7° down [46 EDO], 3/4-tone down\n accSagittalFlat11MDown = '\\ue327',\n // U+E3DB Flat 11:19L-down\n accSagittalFlat11v19LDown = '\\ue3db',\n // U+E3D3 Flat 11:19M-down\n accSagittalFlat11v19MDown = '\\ue3d3',\n // U+E3C7 Flat 11:49C-down\n accSagittalFlat11v49CDown = '\\ue3c7',\n // U+E3B9 Flat 11:49C-up\n accSagittalFlat11v49CUp = '\\ue3b9',\n // U+E3C5 Flat 143C-down\n accSagittalFlat143CDown = '\\ue3c5',\n // U+E3BB Flat 143C-up\n accSagittalFlat143CUp = '\\ue3bb',\n // U+E357 Flat 17C-down\n accSagittalFlat17CDown = '\\ue357',\n // U+E351 Flat 17C-up\n accSagittalFlat17CUp = '\\ue351',\n // U+E3C3 Flat 17k-down\n accSagittalFlat17kDown = '\\ue3c3',\n // U+E3BD Flat 17k-up\n accSagittalFlat17kUp = '\\ue3bd',\n // U+E3C9 Flat 19C-down\n accSagittalFlat19CDown = '\\ue3c9',\n // U+E3B7 Flat 19C-up\n accSagittalFlat19CUp = '\\ue3b7',\n // U+E3C1 Flat 19s-down\n accSagittalFlat19sDown = '\\ue3c1',\n // U+E3BF Flat 19s-up\n accSagittalFlat19sUp = '\\ue3bf',\n // U+E37D Flat 23C-down, 10° down [96 EDO], 5/8-tone down\n accSagittalFlat23CDown = '\\ue37d',\n // U+E37B Flat 23C-up, 6° down [96 EDO], 3/8-tone down\n accSagittalFlat23CUp = '\\ue37b',\n // U+E3CF Flat 23S-down\n accSagittalFlat23SDown = '\\ue3cf',\n // U+E3B1 Flat 23S-up\n accSagittalFlat23SUp = '\\ue3b1',\n // U+E323 Flat 25S-down, 7° down [53 EDO]\n accSagittalFlat25SDown = '\\ue323',\n // U+E311 Flat 25S-up, 3° down [53 EDO]\n accSagittalFlat25SUp = '\\ue311',\n // U+E32B Flat 35L-down, 5° down [50 EDO]\n accSagittalFlat35LDown = '\\ue32b',\n // U+E325 Flat 35M-down, 4° down [50 EDO], 6° down [27 EDO], 13/18-tone down\n accSagittalFlat35MDown = '\\ue325',\n // U+E3D9 Flat 49L-down\n accSagittalFlat49LDown = '\\ue3d9',\n // U+E3D5 Flat 49M-down\n accSagittalFlat49MDown = '\\ue3d5',\n // U+E3CD Flat 49S-down\n accSagittalFlat49SDown = '\\ue3cd',\n // U+E3B3 Flat 49S-up\n accSagittalFlat49SUp = '\\ue3b3',\n // U+E359 Flat 55C-down, 11° down [96 EDO], 11/16-tone down\n accSagittalFlat55CDown = '\\ue359',\n // U+E34F Flat 55C-up, 5° down [96 EDO], 5/16-tone down\n accSagittalFlat55CUp = '\\ue34f',\n // U+E31F Flat 5C-down, 4°[22 29] 5°[27 34 41] 6°[39 46 53] down, 7/12-tone down\n accSagittalFlat5CDown = '\\ue31f',\n // U+E315 Flat 5C-up, 2°[22 29] 3°[27 34 41] 4°[39 46 53] 5°72 7°[96] down, 5/12-tone down\n accSagittalFlat5CUp = '\\ue315',\n // U+E35D Flat 5:11S-down\n accSagittalFlat5v11SDown = '\\ue35d',\n // U+E34B Flat 5:11S-up\n accSagittalFlat5v11SUp = '\\ue34b',\n // U+E3DD Flat 5:13L-down\n accSagittalFlat5v13LDown = '\\ue3dd',\n // U+E3D1 Flat 5:13M-down\n accSagittalFlat5v13MDown = '\\ue3d1',\n // U+E37F Flat 5:19C-down, 11/20-tone down\n accSagittalFlat5v19CDown = '\\ue37f',\n // U+E379 Flat 5:19C-up, 9/20-tone down\n accSagittalFlat5v19CUp = '\\ue379',\n // U+E381 Flat 5:23S-down, 7° down [60 EDO], 7/10-tone down\n accSagittalFlat5v23SDown = '\\ue381',\n // U+E377 Flat 5:23S-up, 3° down [60 EDO], 3/10-tone down\n accSagittalFlat5v23SUp = '\\ue377',\n // U+E3D7 Flat 5:49M-down\n accSagittalFlat5v49MDown = '\\ue3d7',\n // U+E31D Flat 5:7k-down\n accSagittalFlat5v7kDown = '\\ue31d',\n // U+E317 Flat 5:7k-up\n accSagittalFlat5v7kUp = '\\ue317',\n // U+E321 Flat 7C-down, 4° down [43 EDO], 8° down [72 EDO], 2/3-tone down\n accSagittalFlat7CDown = '\\ue321',\n // U+E313 Flat 7C-up, 2° down [43 EDO], 4° down [72 EDO], 1/3-tone down\n accSagittalFlat7CUp = '\\ue313',\n // U+E35B Flat 7:11C-down, 6° down [60 EDO], 3/5- tone down\n accSagittalFlat7v11CDown = '\\ue35b',\n // U+E34D Flat 7:11C-up, 4° down [60 EDO], 2/5-tone down\n accSagittalFlat7v11CUp = '\\ue34d',\n // U+E355 Flat 7:11k-down\n accSagittalFlat7v11kDown = '\\ue355',\n // U+E353 Flat 7:11k-up\n accSagittalFlat7v11kUp = '\\ue353',\n // U+E3CB Flat 7:19C-down\n accSagittalFlat7v19CDown = '\\ue3cb',\n // U+E3B5 Flat 7:19C-up\n accSagittalFlat7v19CUp = '\\ue3b5',\n // U+E40B Fractional tina down, 77/(5⋅37)-schismina down, 0.08 cents down\n accSagittalFractionalTinaDown = '\\ue40b',\n // U+E40A Fractional tina up, 77/(5⋅37)-schismina up, 0.08 cents up\n accSagittalFractionalTinaUp = '\\ue40a',\n // U+E3F3 Grave, 5 schisma down, 2 cents down\n accSagittalGrave = '\\ue3f3',\n // U+E3F1 Shaft down, (natural for use with only diacritics down)\n accSagittalShaftDown = '\\ue3f1',\n // U+E3F0 Shaft up, (natural for use with only diacritics up)\n accSagittalShaftUp = '\\ue3f0',\n // U+E318 Sharp, (apotome up)[almost all EDOs], 1/2-tone up\n accSagittalSharp = '\\ue318',\n // U+E328 Sharp 11L-up, 8° up [46 EDO]\n accSagittalSharp11LUp = '\\ue328',\n // U+E326 Sharp 11M-up, 3° up [17 31 EDOs], 7° up [46 EDO], 3/4-tone up\n accSagittalSharp11MUp = '\\ue326',\n // U+E3DA Sharp 11:19L-up\n accSagittalSharp11v19LUp = '\\ue3da',\n // U+E3D2 Sharp 11:19M-up\n accSagittalSharp11v19MUp = '\\ue3d2',\n // U+E3B8 Sharp 11:49C-down\n accSagittalSharp11v49CDown = '\\ue3b8',\n // U+E3C6 Sharp 11:49C-up\n accSagittalSharp11v49CUp = '\\ue3c6',\n // U+E3BA Sharp 143C-down\n accSagittalSharp143CDown = '\\ue3ba',\n // U+E3C4 Sharp 143C-up\n accSagittalSharp143CUp = '\\ue3c4',\n // U+E350 Sharp 17C-down\n accSagittalSharp17CDown = '\\ue350',\n // U+E356 Sharp 17C-up\n accSagittalSharp17CUp = '\\ue356',\n // U+E3BC Sharp 17k-down\n accSagittalSharp17kDown = '\\ue3bc',\n // U+E3C2 Sharp 17k-up\n accSagittalSharp17kUp = '\\ue3c2',\n // U+E3B6 Sharp 19C-down\n accSagittalSharp19CDown = '\\ue3b6',\n // U+E3C8 Sharp 19C-up\n accSagittalSharp19CUp = '\\ue3c8',\n // U+E3BE Sharp 19s-down\n accSagittalSharp19sDown = '\\ue3be',\n // U+E3C0 Sharp 19s-up\n accSagittalSharp19sUp = '\\ue3c0',\n // U+E37A Sharp 23C-down, 6° up [96 EDO], 3/8-tone up\n accSagittalSharp23CDown = '\\ue37a',\n // U+E37C Sharp 23C-up, 10° up [96 EDO], 5/8-tone up\n accSagittalSharp23CUp = '\\ue37c',\n // U+E3B0 Sharp 23S-down\n accSagittalSharp23SDown = '\\ue3b0',\n // U+E3CE Sharp 23S-up\n accSagittalSharp23SUp = '\\ue3ce',\n // U+E310 Sharp 25S-down, 3° up [53 EDO]\n accSagittalSharp25SDown = '\\ue310',\n // U+E322 Sharp 25S-up, 7° up [53 EDO]\n accSagittalSharp25SUp = '\\ue322',\n // U+E32A Sharp 35L-up, 5° up [50 EDO]\n accSagittalSharp35LUp = '\\ue32a',\n // U+E324 Sharp 35M-up, 4° up [50 EDO], 6° up [27 EDO], 13/18-tone up\n accSagittalSharp35MUp = '\\ue324',\n // U+E3D8 Sharp 49L-up\n accSagittalSharp49LUp = '\\ue3d8',\n // U+E3D4 Sharp 49M-up\n accSagittalSharp49MUp = '\\ue3d4',\n // U+E3B2 Sharp 49S-down\n accSagittalSharp49SDown = '\\ue3b2',\n // U+E3CC Sharp 49S-up\n accSagittalSharp49SUp = '\\ue3cc',\n // U+E34E Sharp 55C-down, 5° up [96 EDO], 5/16-tone up\n accSagittalSharp55CDown = '\\ue34e',\n // U+E358 Sharp 55C-up, 11° up [96 EDO], 11/16-tone up\n accSagittalSharp55CUp = '\\ue358',\n // U+E314 Sharp 5C-down, 2°[22 29] 3°[27 34 41] 4°[39 46 53] 5°[72] 7°[96] up, 5/12-tone up\n accSagittalSharp5CDown = '\\ue314',\n // U+E31E Sharp 5C-up, 4°[22 29] 5°[27 34 41] 6°[39 46 53] up, 7/12-tone up\n accSagittalSharp5CUp = '\\ue31e',\n // U+E34A Sharp 5:11S-down\n accSagittalSharp5v11SDown = '\\ue34a',\n // U+E35C Sharp 5:11S-up\n accSagittalSharp5v11SUp = '\\ue35c',\n // U+E3DC Sharp 5:13L-up\n accSagittalSharp5v13LUp = '\\ue3dc',\n // U+E3D0 Sharp 5:13M-up\n accSagittalSharp5v13MUp = '\\ue3d0',\n // U+E378 Sharp 5:19C-down, 9/20-tone up\n accSagittalSharp5v19CDown = '\\ue378',\n // U+E37E Sharp 5:19C-up, 11/20-tone up\n accSagittalSharp5v19CUp = '\\ue37e',\n // U+E376 Sharp 5:23S-down, 3° up [60 EDO], 3/10-tone up\n accSagittalSharp5v23SDown = '\\ue376',\n // U+E380 Sharp 5:23S-up, 7° up [60 EDO], 7/10-tone up\n accSagittalSharp5v23SUp = '\\ue380',\n // U+E3D6 Sharp 5:49M-up, (one and a half apotomes)\n accSagittalSharp5v49MUp = '\\ue3d6',\n // U+E316 Sharp 5:7k-down\n accSagittalSharp5v7kDown = '\\ue316',\n // U+E31C Sharp 5:7k-up\n accSagittalSharp5v7kUp = '\\ue31c',\n // U+E312 Sharp 7C-down, 2° up [43 EDO], 4° up [72 EDO], 1/3-tone up\n accSagittalSharp7CDown = '\\ue312',\n // U+E320 Sharp 7C-up, 4° up [43 EDO], 8° up [72 EDO], 2/3-tone up\n accSagittalSharp7CUp = '\\ue320',\n // U+E34C Sharp 7:11C-down, 4° up [60 EDO], 2/5-tone up\n accSagittalSharp7v11CDown = '\\ue34c',\n // U+E35A Sharp 7:11C-up, 6° up [60 EDO], 3/5- tone up\n accSagittalSharp7v11CUp = '\\ue35a',\n // U+E352 Sharp 7:11k-down\n accSagittalSharp7v11kDown = '\\ue352',\n // U+E354 Sharp 7:11k-up\n accSagittalSharp7v11kUp = '\\ue354',\n // U+E3B4 Sharp 7:19C-down\n accSagittalSharp7v19CDown = '\\ue3b4',\n // U+E3CA Sharp 7:19C-up\n accSagittalSharp7v19CUp = '\\ue3ca',\n // U+E31A Unused\n accSagittalUnused1 = '\\ue31a',\n // U+E31B Unused\n accSagittalUnused2 = '\\ue31b',\n // U+E3DE Unused\n accSagittalUnused3 = '\\ue3de',\n // U+E3DF Unused\n accSagittalUnused4 = '\\ue3df',\n // U+E8CA Combining accordion coupler dot\n accdnCombDot = '\\ue8ca',\n // U+E8C8 Combining left hand, 2 ranks, empty\n accdnCombLH2RanksEmpty = '\\ue8c8',\n // U+E8C9 Combining left hand, 3 ranks, empty (square)\n accdnCombLH3RanksEmptySquare = '\\ue8c9',\n // U+E8C6 Combining right hand, 3 ranks, empty\n accdnCombRH3RanksEmpty = '\\ue8c6',\n // U+E8C7 Combining right hand, 4 ranks, empty\n accdnCombRH4RanksEmpty = '\\ue8c7',\n // U+E079 Diatonic accordion clef\n accdnDiatonicClef = '\\ue079',\n // U+E8BC Left hand, 2 ranks, 16' stop (round)\n accdnLH2Ranks16Round = '\\ue8bc',\n // U+E8BD Left hand, 2 ranks, 8' stop + 16' stop (round)\n accdnLH2Ranks8Plus16Round = '\\ue8bd',\n // U+E8BB Left hand, 2 ranks, 8' stop (round)\n accdnLH2Ranks8Round = '\\ue8bb',\n // U+E8C0 Left hand, 2 ranks, full master (round)\n accdnLH2RanksFullMasterRound = '\\ue8c0',\n // U+E8BF Left hand, 2 ranks, master + 16' stop (round)\n accdnLH2RanksMasterPlus16Round = '\\ue8bf',\n // U+E8BE Left hand, 2 ranks, master (round)\n accdnLH2RanksMasterRound = '\\ue8be',\n // U+E8C4 Left hand, 3 ranks, 2' stop + 8' stop (square)\n accdnLH3Ranks2Plus8Square = '\\ue8c4',\n // U+E8C2 Left hand, 3 ranks, 2' stop (square)\n accdnLH3Ranks2Square = '\\ue8c2',\n // U+E8C1 Left hand, 3 ranks, 8' stop (square)\n accdnLH3Ranks8Square = '\\ue8c1',\n // U+E8C3 Left hand, 3 ranks, double 8' stop (square)\n accdnLH3RanksDouble8Square = '\\ue8c3',\n // U+E8C5 Left hand, 3 ranks, 2' stop + double 8' stop (tutti) (square)\n accdnLH3RanksTuttiSquare = '\\ue8c5',\n // U+E8CC Pull\n accdnPull = '\\ue8cc',\n // U+E8CB Push\n accdnPush = '\\ue8cb',\n // U+E8AC Right hand, 3 ranks, 8' stop + upper tremolo 8' stop + 16' stop (accordion)\n accdnRH3RanksAccordion = '\\ue8ac',\n // U+E8A8 Right hand, 3 ranks, lower tremolo 8' stop + 8' stop + upper tremolo 8' stop (authentic musette)\n accdnRH3RanksAuthenticMusette = '\\ue8a8',\n // U+E8AB Right hand, 3 ranks, 8' stop + 16' stop (bandoneón)\n accdnRH3RanksBandoneon = '\\ue8ab',\n // U+E8A4 Right hand, 3 ranks, 16' stop (bassoon)\n accdnRH3RanksBassoon = '\\ue8a4',\n // U+E8A1 Right hand, 3 ranks, 8' stop (clarinet)\n accdnRH3RanksClarinet = '\\ue8a1',\n // U+E8B1 Right hand, 3 ranks, lower tremolo 8' stop + 8' stop + upper tremolo 8' stop + 16' stop\n accdnRH3RanksDoubleTremoloLower8ve = '\\ue8b1',\n // U+E8B2 Right hand, 3 ranks, 4' stop + lower tremolo 8' stop + 8' stop + upper tremolo 8' stop\n accdnRH3RanksDoubleTremoloUpper8ve = '\\ue8b2',\n // U+E8B3 Right hand, 3 ranks, 4' stop + lower tremolo 8' stop + 8' stop + upper tremolo 8' stop + 16' stop\n accdnRH3RanksFullFactory = '\\ue8b3',\n // U+E8AA Right hand, 3 ranks, 4' stop + 8' stop + 16' stop (harmonium)\n accdnRH3RanksHarmonium = '\\ue8aa',\n // U+E8A7 Right hand, 3 ranks, 4' stop + 8' stop + upper tremolo 8' stop (imitation musette)\n accdnRH3RanksImitationMusette = '\\ue8a7',\n // U+E8A3 Right hand, 3 ranks, lower tremolo 8' stop\n accdnRH3RanksLowerTremolo8 = '\\ue8a3',\n // U+E8AD Right hand, 3 ranks, 4' stop + lower tremolo 8' stop + upper tremolo 8' stop + 16' stop (master)\n accdnRH3RanksMaster = '\\ue8ad',\n // U+E8A5 Right hand, 3 ranks, 4' stop + 8' stop (oboe)\n accdnRH3RanksOboe = '\\ue8a5',\n // U+E8A9 Right hand, 3 ranks, 4' stop + 16' stop (organ)\n accdnRH3RanksOrgan = '\\ue8a9',\n // U+E8A0 Right hand, 3 ranks, 4' stop (piccolo)\n accdnRH3RanksPiccolo = '\\ue8a0',\n // U+E8AF Right hand, 3 ranks, lower tremolo 8' stop + upper tremolo 8' stop + 16' stop\n accdnRH3RanksTremoloLower8ve = '\\ue8af',\n // U+E8B0 Right hand, 3 ranks, 4' stop + lower tremolo 8' stop + upper tremolo 8' stop\n accdnRH3RanksTremoloUpper8ve = '\\ue8b0',\n // U+E8AE Right hand, 3 ranks, lower tremolo 8' stop + upper tremolo 8' stop\n accdnRH3RanksTwoChoirs = '\\ue8ae',\n // U+E8A2 Right hand, 3 ranks, upper tremolo 8' stop\n accdnRH3RanksUpperTremolo8 = '\\ue8a2',\n // U+E8A6 Right hand, 3 ranks, 8' stop + upper tremolo 8' stop (violin)\n accdnRH3RanksViolin = '\\ue8a6',\n // U+E8B5 Right hand, 4 ranks, alto\n accdnRH4RanksAlto = '\\ue8b5',\n // U+E8BA Right hand, 4 ranks, bass/alto\n accdnRH4RanksBassAlto = '\\ue8ba',\n // U+E8B7 Right hand, 4 ranks, master\n accdnRH4RanksMaster = '\\ue8b7',\n // U+E8B8 Right hand, 4 ranks, soft bass\n accdnRH4RanksSoftBass = '\\ue8b8',\n // U+E8B9 Right hand, 4 ranks, soft tenor\n accdnRH4RanksSoftTenor = '\\ue8b9',\n // U+E8B4 Right hand, 4 ranks, soprano\n accdnRH4RanksSoprano = '\\ue8b4',\n // U+E8B6 Right hand, 4 ranks, tenor\n accdnRH4RanksTenor = '\\ue8b6',\n // U+E8CD Ricochet (2 tones)\n accdnRicochet2 = '\\ue8cd',\n // U+E8CE Ricochet (3 tones)\n accdnRicochet3 = '\\ue8ce',\n // U+E8CF Ricochet (4 tones)\n accdnRicochet4 = '\\ue8cf',\n // U+E8D0 Ricochet (5 tones)\n accdnRicochet5 = '\\ue8d0',\n // U+E8D1 Ricochet (6 tones)\n accdnRicochet6 = '\\ue8d1',\n // U+E8D2 Combining ricochet for stem (2 tones)\n accdnRicochetStem2 = '\\ue8d2',\n // U+E8D3 Combining ricochet for stem (3 tones)\n accdnRicochetStem3 = '\\ue8d3',\n // U+E8D4 Combining ricochet for stem (4 tones)\n accdnRicochetStem4 = '\\ue8d4',\n // U+E8D5 Combining ricochet for stem (5 tones)\n accdnRicochetStem5 = '\\ue8d5',\n // U+E8D6 Combining ricochet for stem (6 tones)\n accdnRicochetStem6 = '\\ue8d6',\n // U+E454 1-comma flat\n accidental1CommaFlat = '\\ue454',\n // U+E450 1-comma sharp\n accidental1CommaSharp = '\\ue450',\n // U+E455 2-comma flat\n accidental2CommaFlat = '\\ue455',\n // U+E451 2-comma sharp\n accidental2CommaSharp = '\\ue451',\n // U+E456 3-comma flat\n accidental3CommaFlat = '\\ue456',\n // U+E452 3-comma sharp\n accidental3CommaSharp = '\\ue452',\n // U+E457 4-comma flat\n accidental4CommaFlat = '\\ue457',\n // U+E453 5-comma sharp\n accidental5CommaSharp = '\\ue453',\n // U+E27B Arrow down (lower by one quarter-tone)\n accidentalArrowDown = '\\ue27b',\n // U+E27A Arrow up (raise by one quarter-tone)\n accidentalArrowUp = '\\ue27a',\n // U+E442 Bakiye (flat)\n accidentalBakiyeFlat = '\\ue442',\n // U+E445 Bakiye (sharp)\n accidentalBakiyeSharp = '\\ue445',\n // U+E26C Accidental bracket, left\n accidentalBracketLeft = '\\ue26c',\n // U+E26D Accidental bracket, right\n accidentalBracketRight = '\\ue26d',\n // U+E440 Büyük mücenneb (flat)\n accidentalBuyukMucennebFlat = '\\ue440',\n // U+E447 Büyük mücenneb (sharp)\n accidentalBuyukMucennebSharp = '\\ue447',\n // U+E2EF Combining close curly brace\n accidentalCombiningCloseCurlyBrace = '\\ue2ef',\n // U+E2E6 Combining lower by one 17-limit schisma\n accidentalCombiningLower17Schisma = '\\ue2e6',\n // U+E2E8 Combining lower by one 19-limit schisma\n accidentalCombiningLower19Schisma = '\\ue2e8',\n // U+E2EA Combining lower by one 23-limit comma\n accidentalCombiningLower23Limit29LimitComma = '\\ue2ea',\n // U+EE50 Combining lower by one 29-limit comma\n accidentalCombiningLower29LimitComma = '\\uee50',\n // U+E2EC Combining lower by one 31-limit schisma\n accidentalCombiningLower31Schisma = '\\ue2ec',\n // U+EE52 Combining lower by one 37-limit quartertone\n accidentalCombiningLower37Quartertone = '\\uee52',\n // U+EE54 Combining lower by one 41-limit comma\n accidentalCombiningLower41Comma = '\\uee54',\n // U+EE56 Combining lower by one 43-limit comma\n accidentalCombiningLower43Comma = '\\uee56',\n // U+EE58 Combining lower by one 47-limit quartertone\n accidentalCombiningLower47Quartertone = '\\uee58',\n // U+E2F7 Combining lower by one 53-limit comma\n accidentalCombiningLower53LimitComma = '\\ue2f7',\n // U+E2EE Combining open curly brace\n accidentalCombiningOpenCurlyBrace = '\\ue2ee',\n // U+E2E7 Combining raise by one 17-limit schisma\n accidentalCombiningRaise17Schisma = '\\ue2e7',\n // U+E2E9 Combining raise by one 19-limit schisma\n accidentalCombiningRaise19Schisma = '\\ue2e9',\n // U+E2EB Combining raise by one 23-limit comma\n accidentalCombiningRaise23Limit29LimitComma = '\\ue2eb',\n // U+EE51 Combining raise by one 29-limit comma\n accidentalCombiningRaise29LimitComma = '\\uee51',\n // U+E2ED Combining raise by one 31-limit schisma\n accidentalCombiningRaise31Schisma = '\\ue2ed',\n // U+EE53 Combining raise by one 37-limit quartertone\n accidentalCombiningRaise37Quartertone = '\\uee53',\n // U+EE55 Combining raise by one 41-limit comma\n accidentalCombiningRaise41Comma = '\\uee55',\n // U+EE57 Combining raise by one 43-limit comma\n accidentalCombiningRaise43Comma = '\\uee57',\n // U+EE59 Combining raise by one 47-limit quartertone\n accidentalCombiningRaise47Quartertone = '\\uee59',\n // U+E2F8 Combining raise by one 53-limit comma\n accidentalCombiningRaise53LimitComma = '\\ue2f8',\n // U+E47A Syntonic/Didymus comma (80:81) down (Bosanquet)\n accidentalCommaSlashDown = '\\ue47a',\n // U+E479 Syntonic/Didymus comma (80:81) up (Bosanquet)\n accidentalCommaSlashUp = '\\ue479',\n // U+E264 Double flat\n accidentalDoubleFlat = '\\ue264',\n // U+ED30 Arabic double flat\n accidentalDoubleFlatArabic = '\\ued30',\n // U+E2F0 Double flat equal tempered semitone\n accidentalDoubleFlatEqualTempered = '\\ue2f0',\n // U+E2C0 Double flat lowered by one syntonic comma\n accidentalDoubleFlatOneArrowDown = '\\ue2c0',\n // U+E2C5 Double flat raised by one syntonic comma\n accidentalDoubleFlatOneArrowUp = '\\ue2c5',\n // U+E483 Reversed double flat\n accidentalDoubleFlatReversed = '\\ue483',\n // U+E2D4 Double flat lowered by three syntonic commas\n accidentalDoubleFlatThreeArrowsDown = '\\ue2d4',\n // U+E2D9 Double flat raised by three syntonic commas\n accidentalDoubleFlatThreeArrowsUp = '\\ue2d9',\n // U+E485 Turned double flat\n accidentalDoubleFlatTurned = '\\ue485',\n // U+E2CA Double flat lowered by two syntonic commas\n accidentalDoubleFlatTwoArrowsDown = '\\ue2ca',\n // U+E2CF Double flat raised by two syntonic commas\n accidentalDoubleFlatTwoArrowsUp = '\\ue2cf',\n // U+E263 Double sharp\n accidentalDoubleSharp = '\\ue263',\n // U+ED38 Arabic double sharp\n accidentalDoubleSharpArabic = '\\ued38',\n // U+E2F4 Double sharp equal tempered semitone\n accidentalDoubleSharpEqualTempered = '\\ue2f4',\n // U+E2C4 Double sharp lowered by one syntonic comma\n accidentalDoubleSharpOneArrowDown = '\\ue2c4',\n // U+E2C9 Double sharp raised by one syntonic comma\n accidentalDoubleSharpOneArrowUp = '\\ue2c9',\n // U+E2D8 Double sharp lowered by three syntonic commas\n accidentalDoubleSharpThreeArrowsDown = '\\ue2d8',\n // U+E2DD Double sharp raised by three syntonic commas\n accidentalDoubleSharpThreeArrowsUp = '\\ue2dd',\n // U+E2CE Double sharp lowered by two syntonic commas\n accidentalDoubleSharpTwoArrowsDown = '\\ue2ce',\n // U+E2D3 Double sharp raised by two syntonic commas\n accidentalDoubleSharpTwoArrowsUp = '\\ue2d3',\n // U+E2FA Enharmonically reinterpret accidental almost equal to\n accidentalEnharmonicAlmostEqualTo = '\\ue2fa',\n // U+E2FB Enharmonically reinterpret accidental equals\n accidentalEnharmonicEquals = '\\ue2fb',\n // U+E2F9 Enharmonically reinterpret accidental tilde\n accidentalEnharmonicTilde = '\\ue2f9',\n // U+E296 Filled reversed flat and flat\n accidentalFilledReversedFlatAndFlat = '\\ue296',\n // U+E298 Filled reversed flat and flat with arrow down\n accidentalFilledReversedFlatAndFlatArrowDown = '\\ue298',\n // U+E297 Filled reversed flat and flat with arrow up\n accidentalFilledReversedFlatAndFlatArrowUp = '\\ue297',\n // U+E293 Filled reversed flat with arrow down\n accidentalFilledReversedFlatArrowDown = '\\ue293',\n // U+E292 Filled reversed flat with arrow up\n accidentalFilledReversedFlatArrowUp = '\\ue292',\n // U+E279 Five-quarter-tones flat\n accidentalFiveQuarterTonesFlatArrowDown = '\\ue279',\n // U+E276 Five-quarter-tones sharp\n accidentalFiveQuarterTonesSharpArrowUp = '\\ue276',\n // U+E260 Flat\n accidentalFlat = '\\ue260',\n // U+ED32 Arabic half-tone flat\n accidentalFlatArabic = '\\ued32',\n // U+E2F1 Flat equal tempered semitone\n accidentalFlatEqualTempered = '\\ue2f1',\n // U+ED53 Lowered flat (Stockhausen)\n accidentalFlatLoweredStockhausen = '\\ued53',\n // U+E2C1 Flat lowered by one syntonic comma\n accidentalFlatOneArrowDown = '\\ue2c1',\n // U+E2C6 Flat raised by one syntonic comma\n accidentalFlatOneArrowUp = '\\ue2c6',\n // U+ED52 Raised flat (Stockhausen)\n accidentalFlatRaisedStockhausen = '\\ued52',\n // U+ED5C Repeated flat, note on line (Stockhausen)\n accidentalFlatRepeatedLineStockhausen = '\\ued5c',\n // U+ED5B Repeated flat, note in space (Stockhausen)\n accidentalFlatRepeatedSpaceStockhausen = '\\ued5b',\n // U+E2D5 Flat lowered by three syntonic commas\n accidentalFlatThreeArrowsDown = '\\ue2d5',\n // U+E2DA Flat raised by three syntonic commas\n accidentalFlatThreeArrowsUp = '\\ue2da',\n // U+E484 Turned flat\n accidentalFlatTurned = '\\ue484',\n // U+E2CB Flat lowered by two syntonic commas\n accidentalFlatTwoArrowsDown = '\\ue2cb',\n // U+E2D0 Flat raised by two syntonic commas\n accidentalFlatTwoArrowsUp = '\\ue2d0',\n // U+EE65 Quarter-tone higher (Alois Hába)\n accidentalHabaFlatQuarterToneHigher = '\\uee65',\n // U+EE69 Three quarter-tones lower (Alois Hába)\n accidentalHabaFlatThreeQuarterTonesLower = '\\uee69',\n // U+EE64 Quarter-tone higher (Alois Hába)\n accidentalHabaQuarterToneHigher = '\\uee64',\n // U+EE67 Quarter-tone lower (Alois Hába)\n accidentalHabaQuarterToneLower = '\\uee67',\n // U+EE68 Quarter-tone lower (Alois Hába)\n accidentalHabaSharpQuarterToneLower = '\\uee68',\n // U+EE66 Three quarter-tones higher (Alois Hába)\n accidentalHabaSharpThreeQuarterTonesHigher = '\\uee66',\n // U+E29A Half sharp with arrow down\n accidentalHalfSharpArrowDown = '\\ue29a',\n // U+E299 Half sharp with arrow up\n accidentalHalfSharpArrowUp = '\\ue299',\n // U+E2B6 Thirteen (raise by 65:64)\n accidentalJohnston13 = '\\ue2b6',\n // U+E2B7 Inverted 13 (lower by 65:64)\n accidentalJohnston31 = '\\ue2b7',\n // U+E2B5 Down arrow (lower by 33:32)\n accidentalJohnstonDown = '\\ue2b5',\n // U+E2B2 Inverted seven (raise by 36:35)\n accidentalJohnstonEl = '\\ue2b2',\n // U+E2B1 Minus (lower by 81:80)\n accidentalJohnstonMinus = '\\ue2b1',\n // U+E2B0 Plus (raise by 81:80)\n accidentalJohnstonPlus = '\\ue2b0',\n // U+E2B3 Seven (lower by 36:35)\n accidentalJohnstonSeven = '\\ue2b3',\n // U+E2B4 Up arrow (raise by 33:32)\n accidentalJohnstonUp = '\\ue2b4',\n // U+E443 Koma (flat)\n accidentalKomaFlat = '\\ue443',\n // U+E444 Koma (sharp)\n accidentalKomaSharp = '\\ue444',\n // U+E460 Koron (quarter tone flat)\n accidentalKoron = '\\ue460',\n // U+E441 Küçük mücenneb (flat)\n accidentalKucukMucennebFlat = '\\ue441',\n // U+E446 Küçük mücenneb (sharp)\n accidentalKucukMucennebSharp = '\\ue446',\n // U+E47D Large double sharp\n accidentalLargeDoubleSharp = '\\ue47d',\n // U+E2DE Lower by one septimal comma\n accidentalLowerOneSeptimalComma = '\\ue2de',\n // U+E2E4 Lower by one tridecimal quartertone\n accidentalLowerOneTridecimalQuartertone = '\\ue2e4',\n // U+E2E2 Lower by one undecimal quartertone\n accidentalLowerOneUndecimalQuartertone = '\\ue2e2',\n // U+E2E0 Lower by two septimal commas\n accidentalLowerTwoSeptimalCommas = '\\ue2e0',\n // U+ED51 Lowered (Stockhausen)\n accidentalLoweredStockhausen = '\\ued51',\n // U+E284 Narrow reversed flat(quarter-tone flat)\n accidentalNarrowReversedFlat = '\\ue284',\n // U+E285 Narrow reversed flat and flat(three-quarter-tones flat)\n accidentalNarrowReversedFlatAndFlat = '\\ue285',\n // U+E261 Natural\n accidentalNatural = '\\ue261',\n // U+ED34 Arabic natural\n accidentalNaturalArabic = '\\ued34',\n // U+E2F2 Natural equal tempered semitone\n accidentalNaturalEqualTempered = '\\ue2f2',\n // U+E267 Natural flat\n accidentalNaturalFlat = '\\ue267',\n // U+ED55 Lowered natural (Stockhausen)\n accidentalNaturalLoweredStockhausen = '\\ued55',\n // U+E2C2 Natural lowered by one syntonic comma\n accidentalNaturalOneArrowDown = '\\ue2c2',\n // U+E2C7 Natural raised by one syntonic comma\n accidentalNaturalOneArrowUp = '\\ue2c7',\n // U+ED54 Raised natural (Stockhausen)\n accidentalNaturalRaisedStockhausen = '\\ued54',\n // U+E482 Reversed natural\n accidentalNaturalReversed = '\\ue482',\n // U+E268 Natural sharp\n accidentalNaturalSharp = '\\ue268',\n // U+E2D6 Natural lowered by three syntonic commas\n accidentalNaturalThreeArrowsDown = '\\ue2d6',\n // U+E2DB Natural raised by three syntonic commas\n accidentalNaturalThreeArrowsUp = '\\ue2db',\n // U+E2CC Natural lowered by two syntonic commas\n accidentalNaturalTwoArrowsDown = '\\ue2cc',\n // U+E2D1 Natural raised by two syntonic commas\n accidentalNaturalTwoArrowsUp = '\\ue2d1',\n // U+E29C One and a half sharps with arrow down\n accidentalOneAndAHalfSharpsArrowDown = '\\ue29c',\n // U+E29B One and a half sharps with arrow up\n accidentalOneAndAHalfSharpsArrowUp = '\\ue29b',\n // U+E48F One-quarter-tone flat (Ferneyhough)\n accidentalOneQuarterToneFlatFerneyhough = '\\ue48f',\n // U+ED59 One-quarter-tone flat (Stockhausen)\n accidentalOneQuarterToneFlatStockhausen = '\\ued59',\n // U+E48E One-quarter-tone sharp (Ferneyhough)\n accidentalOneQuarterToneSharpFerneyhough = '\\ue48e',\n // U+ED58 One-quarter-tone sharp (Stockhausen)\n accidentalOneQuarterToneSharpStockhausen = '\\ued58',\n // U+E48B One-third-tone flat (Ferneyhough)\n accidentalOneThirdToneFlatFerneyhough = '\\ue48b',\n // U+E48A One-third-tone sharp (Ferneyhough)\n accidentalOneThirdToneSharpFerneyhough = '\\ue48a',\n // U+E26A Accidental parenthesis, left\n accidentalParensLeft = '\\ue26a',\n // U+E26B Accidental parenthesis, right\n accidentalParensRight = '\\ue26b',\n // U+E2F5 Lower by one equal tempered quarter-tone\n accidentalQuarterFlatEqualTempered = '\\ue2f5',\n // U+E2F6 Raise by one equal tempered quarter tone\n accidentalQuarterSharpEqualTempered = '\\ue2f6',\n // U+E47F Quarter-tone flat\n accidentalQuarterToneFlat4 = '\\ue47f',\n // U+ED33 Arabic quarter-tone flat\n accidentalQuarterToneFlatArabic = '\\ued33',\n // U+E270 Quarter-tone flat\n accidentalQuarterToneFlatArrowUp = '\\ue270',\n // U+E480 Filled reversed flat (quarter-tone flat)\n accidentalQuarterToneFlatFilledReversed = '\\ue480',\n // U+E273 Quarter-tone flat\n accidentalQuarterToneFlatNaturalArrowDown = '\\ue273',\n // U+E478 Quarter tone flat (Penderecki)\n accidentalQuarterToneFlatPenderecki = '\\ue478',\n // U+E280 Reversed flat (quarter-tone flat) (Stein)\n accidentalQuarterToneFlatStein = '\\ue280',\n // U+E488 Quarter-tone flat (van Blankenburg)\n accidentalQuarterToneFlatVanBlankenburg = '\\ue488',\n // U+E47E Quarter-tone sharp\n accidentalQuarterToneSharp4 = '\\ue47e',\n // U+ED35 Arabic quarter-tone sharp\n accidentalQuarterToneSharpArabic = '\\ued35',\n // U+E275 Quarter-tone sharp\n accidentalQuarterToneSharpArrowDown = '\\ue275',\n // U+E472 Quarter tone sharp (Bussotti)\n accidentalQuarterToneSharpBusotti = '\\ue472',\n // U+E272 Quarter-tone sharp\n accidentalQuarterToneSharpNaturalArrowUp = '\\ue272',\n // U+E282 Half sharp (quarter-tone sharp) (Stein)\n accidentalQuarterToneSharpStein = '\\ue282',\n // U+E475 Quarter tone sharp with wiggly tail\n accidentalQuarterToneSharpWiggle = '\\ue475',\n // U+E2DF Raise by one septimal comma\n accidentalRaiseOneSeptimalComma = '\\ue2df',\n // U+E2E5 Raise by one tridecimal quartertone\n accidentalRaiseOneTridecimalQuartertone = '\\ue2e5',\n // U+E2E3 Raise by one undecimal quartertone\n accidentalRaiseOneUndecimalQuartertone = '\\ue2e3',\n // U+E2E1 Raise by two septimal commas\n accidentalRaiseTwoSeptimalCommas = '\\ue2e1',\n // U+ED50 Raised (Stockhausen)\n accidentalRaisedStockhausen = '\\ued50',\n // U+E295 Reversed flat and flat with arrow down\n accidentalReversedFlatAndFlatArrowDown = '\\ue295',\n // U+E294 Reversed flat and flat with arrow up\n accidentalReversedFlatAndFlatArrowUp = '\\ue294',\n // U+E291 Reversed flat with arrow down\n accidentalReversedFlatArrowDown = '\\ue291',\n // U+E290 Reversed flat with arrow up\n accidentalReversedFlatArrowUp = '\\ue290',\n // U+E262 Sharp\n accidentalSharp = '\\ue262',\n // U+ED36 Arabic half-tone sharp\n accidentalSharpArabic = '\\ued36',\n // U+E2F3 Sharp equal tempered semitone\n accidentalSharpEqualTempered = '\\ue2f3',\n // U+ED57 Lowered sharp (Stockhausen)\n accidentalSharpLoweredStockhausen = '\\ued57',\n // U+E2C3 Sharp lowered by one syntonic comma\n accidentalSharpOneArrowDown = '\\ue2c3',\n // U+E2C8 Sharp raised by one syntonic comma\n accidentalSharpOneArrowUp = '\\ue2c8',\n // U+E473 One or three quarter tones sharp\n accidentalSharpOneHorizontalStroke = '\\ue473',\n // U+ED56 Raised sharp (Stockhausen)\n accidentalSharpRaisedStockhausen = '\\ued56',\n // U+ED5E Repeated sharp, note on line (Stockhausen)\n accidentalSharpRepeatedLineStockhausen = '\\ued5e',\n // U+ED5D Repeated sharp, note in space (Stockhausen)\n accidentalSharpRepeatedSpaceStockhausen = '\\ued5d',\n // U+E481 Reversed sharp\n accidentalSharpReversed = '\\ue481',\n // U+E269 Sharp sharp\n accidentalSharpSharp = '\\ue269',\n // U+E2D7 Sharp lowered by three syntonic commas\n accidentalSharpThreeArrowsDown = '\\ue2d7',\n // U+E2DC Sharp raised by three syntonic commas\n accidentalSharpThreeArrowsUp = '\\ue2dc',\n // U+E2CD Sharp lowered by two syntonic commas\n accidentalSharpTwoArrowsDown = '\\ue2cd',\n // U+E2D2 Sharp raised by two syntonic commas\n accidentalSharpTwoArrowsUp = '\\ue2d2',\n // U+E2A0 1/12 tone low\n accidentalSims12Down = '\\ue2a0',\n // U+E2A3 1/12 tone high\n accidentalSims12Up = '\\ue2a3',\n // U+E2A2 1/4 tone low\n accidentalSims4Down = '\\ue2a2',\n // U+E2A5 1/4 tone high\n accidentalSims4Up = '\\ue2a5',\n // U+E2A1 1/6 tone low\n accidentalSims6Down = '\\ue2a1',\n // U+E2A4 1/6 tone high\n accidentalSims6Up = '\\ue2a4',\n // U+E461 Sori (quarter tone sharp)\n accidentalSori = '\\ue461',\n // U+E477 Byzantine-style Bakiye flat (Tavener)\n accidentalTavenerFlat = '\\ue477',\n // U+E476 Byzantine-style Büyük mücenneb sharp (Tavener)\n accidentalTavenerSharp = '\\ue476',\n // U+ED31 Arabic three-quarter-tones flat\n accidentalThreeQuarterTonesFlatArabic = '\\ued31',\n // U+E271 Three-quarter-tones flat\n accidentalThreeQuarterTonesFlatArrowDown = '\\ue271',\n // U+E278 Three-quarter-tones flat\n accidentalThreeQuarterTonesFlatArrowUp = '\\ue278',\n // U+E489 Three-quarter-tones flat (Couper)\n accidentalThreeQuarterTonesFlatCouper = '\\ue489',\n // U+E486 Three-quarter-tones flat (Grisey)\n accidentalThreeQuarterTonesFlatGrisey = '\\ue486',\n // U+E487 Three-quarter-tones flat (Tartini)\n accidentalThreeQuarterTonesFlatTartini = '\\ue487',\n // U+E281 Reversed flat and flat (three-quarter-tones flat) (Zimmermann)\n accidentalThreeQuarterTonesFlatZimmermann = '\\ue281',\n // U+ED37 Arabic three-quarter-tones sharp\n accidentalThreeQuarterTonesSharpArabic = '\\ued37',\n // U+E277 Three-quarter-tones sharp\n accidentalThreeQuarterTonesSharpArrowDown = '\\ue277',\n // U+E274 Three-quarter-tones sharp\n accidentalThreeQuarterTonesSharpArrowUp = '\\ue274',\n // U+E474 Three quarter tones sharp (Bussotti)\n accidentalThreeQuarterTonesSharpBusotti = '\\ue474',\n // U+E283 One and a half sharps (three-quarter-tones sharp) (Stein)\n accidentalThreeQuarterTonesSharpStein = '\\ue283',\n // U+ED5A Three-quarter-tones sharp (Stockhausen)\n accidentalThreeQuarterTonesSharpStockhausen = '\\ued5a',\n // U+E266 Triple flat\n accidentalTripleFlat = '\\ue266',\n // U+E265 Triple sharp\n accidentalTripleSharp = '\\ue265',\n // U+E48D Two-third-tones flat (Ferneyhough)\n accidentalTwoThirdTonesFlatFerneyhough = '\\ue48d',\n // U+E48C Two-third-tones sharp (Ferneyhough)\n accidentalTwoThirdTonesSharpFerneyhough = '\\ue48c',\n // U+EE61 Accidental down\n accidentalUpsAndDownsDown = '\\uee61',\n // U+EE63 Accidental less\n accidentalUpsAndDownsLess = '\\uee63',\n // U+EE62 Accidental more\n accidentalUpsAndDownsMore = '\\uee62',\n // U+EE60 Accidental up\n accidentalUpsAndDownsUp = '\\uee60',\n // U+E47C Wilson minus (5 comma down)\n accidentalWilsonMinus = '\\ue47c',\n // U+E47B Wilson plus (5 comma up)\n accidentalWilsonPlus = '\\ue47b',\n // U+E434 5/6 tone flat\n accidentalWyschnegradsky10TwelfthsFlat = '\\ue434',\n // U+E429 5/6 tone sharp\n accidentalWyschnegradsky10TwelfthsSharp = '\\ue429',\n // U+E435 11/12 tone flat\n accidentalWyschnegradsky11TwelfthsFlat = '\\ue435',\n // U+E42A 11/12 tone sharp\n accidentalWyschnegradsky11TwelfthsSharp = '\\ue42a',\n // U+E42B 1/12 tone flat\n accidentalWyschnegradsky1TwelfthsFlat = '\\ue42b',\n // U+E420 1/12 tone sharp\n accidentalWyschnegradsky1TwelfthsSharp = '\\ue420',\n // U+E42C 1/6 tone flat\n accidentalWyschnegradsky2TwelfthsFlat = '\\ue42c',\n // U+E421 1/6 tone sharp\n accidentalWyschnegradsky2TwelfthsSharp = '\\ue421',\n // U+E42D 1/4 tone flat\n accidentalWyschnegradsky3TwelfthsFlat = '\\ue42d',\n // U+E422 1/4 tone sharp\n accidentalWyschnegradsky3TwelfthsSharp = '\\ue422',\n // U+E42E 1/3 tone flat\n accidentalWyschnegradsky4TwelfthsFlat = '\\ue42e',\n // U+E423 1/3 tone sharp\n accidentalWyschnegradsky4TwelfthsSharp = '\\ue423',\n // U+E42F 5/12 tone flat\n accidentalWyschnegradsky5TwelfthsFlat = '\\ue42f',\n // U+E424 5/12 tone sharp\n accidentalWyschnegradsky5TwelfthsSharp = '\\ue424',\n // U+E430 1/2 tone flat\n accidentalWyschnegradsky6TwelfthsFlat = '\\ue430',\n // U+E425 1/2 tone sharp\n accidentalWyschnegradsky6TwelfthsSharp = '\\ue425',\n // U+E431 7/12 tone flat\n accidentalWyschnegradsky7TwelfthsFlat = '\\ue431',\n // U+E426 7/12 tone sharp\n accidentalWyschnegradsky7TwelfthsSharp = '\\ue426',\n // U+E432 2/3 tone flat\n accidentalWyschnegradsky8TwelfthsFlat = '\\ue432',\n // U+E427 2/3 tone sharp\n accidentalWyschnegradsky8TwelfthsSharp = '\\ue427',\n // U+E433 3/4 tone flat\n accidentalWyschnegradsky9TwelfthsFlat = '\\ue433',\n // U+E428 3/4 tone sharp\n accidentalWyschnegradsky9TwelfthsSharp = '\\ue428',\n // U+E470 One-third-tone sharp (Xenakis)\n accidentalXenakisOneThirdToneSharp = '\\ue470',\n // U+E471 Two-third-tones sharp (Xenakis)\n accidentalXenakisTwoThirdTonesSharp = '\\ue471',\n // U+E86A Choralmelodie (Berg)\n analyticsChoralmelodie = '\\ue86a',\n // U+E863 End of stimme\n analyticsEndStimme = '\\ue863',\n // U+E86B Hauptrhythmus (Berg)\n analyticsHauptrhythmus = '\\ue86b',\n // U+E860 Hauptstimme\n analyticsHauptstimme = '\\ue860',\n // U+E869 Inversion 1\n analyticsInversion1 = '\\ue869',\n // U+E861 Nebenstimme\n analyticsNebenstimme = '\\ue861',\n // U+E862 Start of stimme\n analyticsStartStimme = '\\ue862',\n // U+E864 Theme\n analyticsTheme = '\\ue864',\n // U+E868 Theme 1\n analyticsTheme1 = '\\ue868',\n // U+E867 Inversion of theme\n analyticsThemeInversion = '\\ue867',\n // U+E865 Retrograde of theme\n analyticsThemeRetrograde = '\\ue865',\n // U+E866 Retrograde inversion of theme\n analyticsThemeRetrogradeInversion = '\\ue866',\n // U+E63C Arpeggiato\n arpeggiato = '\\ue63c',\n // U+E635 Arpeggiato down\n arpeggiatoDown = '\\ue635',\n // U+E634 Arpeggiato up\n arpeggiatoUp = '\\ue634',\n // U+EB64 Black arrow down (S)\n arrowBlackDown = '\\ueb64',\n // U+EB65 Black arrow down-left (SW)\n arrowBlackDownLeft = '\\ueb65',\n // U+EB63 Black arrow down-right (SE)\n arrowBlackDownRight = '\\ueb63',\n // U+EB66 Black arrow left (W)\n arrowBlackLeft = '\\ueb66',\n // U+EB62 Black arrow right (E)\n arrowBlackRight = '\\ueb62',\n // U+EB60 Black arrow up (N)\n arrowBlackUp = '\\ueb60',\n // U+EB67 Black arrow up-left (NW)\n arrowBlackUpLeft = '\\ueb67',\n // U+EB61 Black arrow up-right (NE)\n arrowBlackUpRight = '\\ueb61',\n // U+EB74 Open arrow down (S)\n arrowOpenDown = '\\ueb74',\n // U+EB75 Open arrow down-left (SW)\n arrowOpenDownLeft = '\\ueb75',\n // U+EB73 Open arrow down-right (SE)\n arrowOpenDownRight = '\\ueb73',\n // U+EB76 Open arrow left (W)\n arrowOpenLeft = '\\ueb76',\n // U+EB72 Open arrow right (E)\n arrowOpenRight = '\\ueb72',\n // U+EB70 Open arrow up (N)\n arrowOpenUp = '\\ueb70',\n // U+EB77 Open arrow up-left (NW)\n arrowOpenUpLeft = '\\ueb77',\n // U+EB71 Open arrow up-right (NE)\n arrowOpenUpRight = '\\ueb71',\n // U+EB6C White arrow down (S)\n arrowWhiteDown = '\\ueb6c',\n // U+EB6D White arrow down-left (SW)\n arrowWhiteDownLeft = '\\ueb6d',\n // U+EB6B White arrow down-right (SE)\n arrowWhiteDownRight = '\\ueb6b',\n // U+EB6E White arrow left (W)\n arrowWhiteLeft = '\\ueb6e',\n // U+EB6A White arrow right (E)\n arrowWhiteRight = '\\ueb6a',\n // U+EB68 White arrow up (N)\n arrowWhiteUp = '\\ueb68',\n // U+EB6F White arrow up-left (NW)\n arrowWhiteUpLeft = '\\ueb6f',\n // U+EB69 White arrow up-right (NE)\n arrowWhiteUpRight = '\\ueb69',\n // U+EB7C Black arrowhead down (S)\n arrowheadBlackDown = '\\ueb7c',\n // U+EB7D Black arrowhead down-left (SW)\n arrowheadBlackDownLeft = '\\ueb7d',\n // U+EB7B Black arrowhead down-right (SE)\n arrowheadBlackDownRight = '\\ueb7b',\n // U+EB7E Black arrowhead left (W)\n arrowheadBlackLeft = '\\ueb7e',\n // U+EB7A Black arrowhead right (E)\n arrowheadBlackRight = '\\ueb7a',\n // U+EB78 Black arrowhead up (N)\n arrowheadBlackUp = '\\ueb78',\n // U+EB7F Black arrowhead up-left (NW)\n arrowheadBlackUpLeft = '\\ueb7f',\n // U+EB79 Black arrowhead up-right (NE)\n arrowheadBlackUpRight = '\\ueb79',\n // U+EB8C Open arrowhead down (S)\n arrowheadOpenDown = '\\ueb8c',\n // U+EB8D Open arrowhead down-left (SW)\n arrowheadOpenDownLeft = '\\ueb8d',\n // U+EB8B Open arrowhead down-right (SE)\n arrowheadOpenDownRight = '\\ueb8b',\n // U+EB8E Open arrowhead left (W)\n arrowheadOpenLeft = '\\ueb8e',\n // U+EB8A Open arrowhead right (E)\n arrowheadOpenRight = '\\ueb8a',\n // U+EB88 Open arrowhead up (N)\n arrowheadOpenUp = '\\ueb88',\n // U+EB8F Open arrowhead up-left (NW)\n arrowheadOpenUpLeft = '\\ueb8f',\n // U+EB89 Open arrowhead up-right (NE)\n arrowheadOpenUpRight = '\\ueb89',\n // U+EB84 White arrowhead down (S)\n arrowheadWhiteDown = '\\ueb84',\n // U+EB85 White arrowhead down-left (SW)\n arrowheadWhiteDownLeft = '\\ueb85',\n // U+EB83 White arrowhead down-right (SE)\n arrowheadWhiteDownRight = '\\ueb83',\n // U+EB86 White arrowhead left (W)\n arrowheadWhiteLeft = '\\ueb86',\n // U+EB82 White arrowhead right (E)\n arrowheadWhiteRight = '\\ueb82',\n // U+EB80 White arrowhead up (N)\n arrowheadWhiteUp = '\\ueb80',\n // U+EB87 White arrowhead up-left (NW)\n arrowheadWhiteUpLeft = '\\ueb87',\n // U+EB81 White arrowhead up-right (NE)\n arrowheadWhiteUpRight = '\\ueb81',\n // U+E4A0 Accent above\n articAccentAbove = '\\ue4a0',\n // U+E4A1 Accent below\n articAccentBelow = '\\ue4a1',\n // U+E4B0 Accent-staccato above\n articAccentStaccatoAbove = '\\ue4b0',\n // U+E4B1 Accent-staccato below\n articAccentStaccatoBelow = '\\ue4b1',\n // U+E4BA Laissez vibrer (l.v.) above\n articLaissezVibrerAbove = '\\ue4ba',\n // U+E4BB Laissez vibrer (l.v.) below\n articLaissezVibrerBelow = '\\ue4bb',\n // U+E4AC Marcato above\n articMarcatoAbove = '\\ue4ac',\n // U+E4AD Marcato below\n articMarcatoBelow = '\\ue4ad',\n // U+E4AE Marcato-staccato above\n articMarcatoStaccatoAbove = '\\ue4ae',\n // U+E4AF Marcato-staccato below\n articMarcatoStaccatoBelow = '\\ue4af',\n // U+E4BC Marcato-tenuto above\n articMarcatoTenutoAbove = '\\ue4bc',\n // U+E4BD Marcato-tenuto below\n articMarcatoTenutoBelow = '\\ue4bd',\n // U+ED40 Soft accent above\n articSoftAccentAbove = '\\ued40',\n // U+ED41 Soft accent below\n articSoftAccentBelow = '\\ued41',\n // U+ED42 Soft accent-staccato above\n articSoftAccentStaccatoAbove = '\\ued42',\n // U+ED43 Soft accent-staccato below\n articSoftAccentStaccatoBelow = '\\ued43',\n // U+ED44 Soft accent-tenuto above\n articSoftAccentTenutoAbove = '\\ued44',\n // U+ED45 Soft accent-tenuto below\n articSoftAccentTenutoBelow = '\\ued45',\n // U+ED46 Soft accent-tenuto-staccato above\n articSoftAccentTenutoStaccatoAbove = '\\ued46',\n // U+ED47 Soft accent-tenuto-staccato below\n articSoftAccentTenutoStaccatoBelow = '\\ued47',\n // U+E4A6 Staccatissimo above\n articStaccatissimoAbove = '\\ue4a6',\n // U+E4A7 Staccatissimo below\n articStaccatissimoBelow = '\\ue4a7',\n // U+E4AA Staccatissimo stroke above\n articStaccatissimoStrokeAbove = '\\ue4aa',\n // U+E4AB Staccatissimo stroke below\n articStaccatissimoStrokeBelow = '\\ue4ab',\n // U+E4A8 Staccatissimo wedge above\n articStaccatissimoWedgeAbove = '\\ue4a8',\n // U+E4A9 Staccatissimo wedge below\n articStaccatissimoWedgeBelow = '\\ue4a9',\n // U+E4A2 Staccato above\n articStaccatoAbove = '\\ue4a2',\n // U+E4A3 Staccato below\n articStaccatoBelow = '\\ue4a3',\n // U+E4B6 Stress above\n articStressAbove = '\\ue4b6',\n // U+E4B7 Stress below\n articStressBelow = '\\ue4b7',\n // U+E4A4 Tenuto above\n articTenutoAbove = '\\ue4a4',\n // U+E4B4 Tenuto-accent above\n articTenutoAccentAbove = '\\ue4b4',\n // U+E4B5 Tenuto-accent below\n articTenutoAccentBelow = '\\ue4b5',\n // U+E4A5 Tenuto below\n articTenutoBelow = '\\ue4a5',\n // U+E4B2 Louré (tenuto-staccato) above\n articTenutoStaccatoAbove = '\\ue4b2',\n // U+E4B3 Louré (tenuto-staccato) below\n articTenutoStaccatoBelow = '\\ue4b3',\n // U+E4B8 Unstress above\n articUnstressAbove = '\\ue4b8',\n // U+E4B9 Unstress below\n articUnstressBelow = '\\ue4b9',\n // U+E1E7 Augmentation dot\n augmentationDot = '\\ue1e7',\n // U+E036 Dashed barline\n barlineDashed = '\\ue036',\n // U+E037 Dotted barline\n barlineDotted = '\\ue037',\n // U+E031 Double barline\n barlineDouble = '\\ue031',\n // U+E032 Final barline\n barlineFinal = '\\ue032',\n // U+E034 Heavy barline\n barlineHeavy = '\\ue034',\n // U+E035 Heavy double barline\n barlineHeavyHeavy = '\\ue035',\n // U+E033 Reverse final barline\n barlineReverseFinal = '\\ue033',\n // U+E038 Short barline\n barlineShort = '\\ue038',\n // U+E030 Single barline\n barlineSingle = '\\ue030',\n // U+E039 Tick barline\n barlineTick = '\\ue039',\n // U+EAF4 Accel./rit. beam 1 (widest)\n beamAccelRit1 = '\\ueaf4',\n // U+EAFD Accel./rit. beam 10\n beamAccelRit10 = '\\ueafd',\n // U+EAFE Accel./rit. beam 11\n beamAccelRit11 = '\\ueafe',\n // U+EAFF Accel./rit. beam 12\n beamAccelRit12 = '\\ueaff',\n // U+EB00 Accel./rit. beam 13\n beamAccelRit13 = '\\ueb00',\n // U+EB01 Accel./rit. beam 14\n beamAccelRit14 = '\\ueb01',\n // U+EB02 Accel./rit. beam 15 (narrowest)\n beamAccelRit15 = '\\ueb02',\n // U+EAF5 Accel./rit. beam 2\n beamAccelRit2 = '\\ueaf5',\n // U+EAF6 Accel./rit. beam 3\n beamAccelRit3 = '\\ueaf6',\n // U+EAF7 Accel./rit. beam 4\n beamAccelRit4 = '\\ueaf7',\n // U+EAF8 Accel./rit. beam 5\n beamAccelRit5 = '\\ueaf8',\n // U+EAF9 Accel./rit. beam 6\n beamAccelRit6 = '\\ueaf9',\n // U+EAFA Accel./rit. beam 7\n beamAccelRit7 = '\\ueafa',\n // U+EAFB Accel./rit. beam 8\n beamAccelRit8 = '\\ueafb',\n // U+EAFC Accel./rit. beam 9\n beamAccelRit9 = '\\ueafc',\n // U+EB03 Accel./rit. beam terminating line\n beamAccelRitFinal = '\\ueb03',\n // U+E000 Brace\n brace = '\\ue000',\n // U+E002 Bracket\n bracket = '\\ue002',\n // U+E004 Bracket bottom\n bracketBottom = '\\ue004',\n // U+E003 Bracket top\n bracketTop = '\\ue003',\n // U+E5E3 Bend\n brassBend = '\\ue5e3',\n // U+E5D6 Doit, long\n brassDoitLong = '\\ue5d6',\n // U+E5D5 Doit, medium\n brassDoitMedium = '\\ue5d5',\n // U+E5D4 Doit, short\n brassDoitShort = '\\ue5d4',\n // U+E5D9 Lip fall, long\n brassFallLipLong = '\\ue5d9',\n // U+E5D8 Lip fall, medium\n brassFallLipMedium = '\\ue5d8',\n // U+E5D7 Lip fall, short\n brassFallLipShort = '\\ue5d7',\n // U+E5DF Rough fall, long\n brassFallRoughLong = '\\ue5df',\n // U+E5DE Rough fall, medium\n brassFallRoughMedium = '\\ue5de',\n // U+E5DD Rough fall, short\n brassFallRoughShort = '\\ue5dd',\n // U+E5DC Smooth fall, long\n brassFallSmoothLong = '\\ue5dc',\n // U+E5DB Smooth fall, medium\n brassFallSmoothMedium = '\\ue5db',\n // U+E5DA Smooth fall, short\n brassFallSmoothShort = '\\ue5da',\n // U+E5E1 Flip\n brassFlip = '\\ue5e1',\n // U+E5E8 Harmon mute, stem in\n brassHarmonMuteClosed = '\\ue5e8',\n // U+E5E9 Harmon mute, stem extended, left\n brassHarmonMuteStemHalfLeft = '\\ue5e9',\n // U+E5EA Harmon mute, stem extended, right\n brassHarmonMuteStemHalfRight = '\\ue5ea',\n // U+E5EB Harmon mute, stem out\n brassHarmonMuteStemOpen = '\\ue5eb',\n // U+E5E4 Jazz turn\n brassJazzTurn = '\\ue5e4',\n // U+E5D3 Lift, long\n brassLiftLong = '\\ue5d3',\n // U+E5D2 Lift, medium\n brassLiftMedium = '\\ue5d2',\n // U+E5D1 Lift, short\n brassLiftShort = '\\ue5d1',\n // U+E5EE Smooth lift, long\n brassLiftSmoothLong = '\\ue5ee',\n // U+E5ED Smooth lift, medium\n brassLiftSmoothMedium = '\\ue5ed',\n // U+E5EC Smooth lift, short\n brassLiftSmoothShort = '\\ue5ec',\n // U+E5E5 Muted (closed)\n brassMuteClosed = '\\ue5e5',\n // U+E5E6 Half-muted (half-closed)\n brassMuteHalfClosed = '\\ue5e6',\n // U+E5E7 Open\n brassMuteOpen = '\\ue5e7',\n // U+E5E0 Plop\n brassPlop = '\\ue5e0',\n // U+E5D0 Scoop\n brassScoop = '\\ue5d0',\n // U+E5E2 Smear\n brassSmear = '\\ue5e2',\n // U+E5EF Valve trill\n brassValveTrill = '\\ue5ef',\n // U+E4CE Breath mark (comma)\n breathMarkComma = '\\ue4ce',\n // U+E4D5 Breath mark (Salzedo)\n breathMarkSalzedo = '\\ue4d5',\n // U+E4CF Breath mark (tick-like)\n breathMarkTick = '\\ue4cf',\n // U+E4D0 Breath mark (upbow-like)\n breathMarkUpbow = '\\ue4d0',\n // U+E078 Bridge clef\n bridgeClef = '\\ue078',\n // U+E22A Buzz roll\n buzzRoll = '\\ue22a',\n // U+E05C C clef\n cClef = '\\ue05c',\n // U+E05D C clef ottava bassa\n cClef8vb = '\\ue05d',\n // U+E05F C clef, arrow down\n cClefArrowDown = '\\ue05f',\n // U+E05E C clef, arrow up\n cClefArrowUp = '\\ue05e',\n // U+E07B C clef change\n cClefChange = '\\ue07b',\n // U+E061 Combining C clef\n cClefCombining = '\\ue061',\n // U+E075 Reversed C clef\n cClefReversed = '\\ue075',\n // U+E060 C clef (19th century)\n cClefSquare = '\\ue060',\n // U+E4D1 Caesura\n caesura = '\\ue4d1',\n // U+E4D4 Curved caesura\n caesuraCurved = '\\ue4d4',\n // U+E4D3 Short caesura\n caesuraShort = '\\ue4d3',\n // U+E4D7 Single stroke caesura\n caesuraSingleStroke = '\\ue4d7',\n // U+E4D2 Thick caesura\n caesuraThick = '\\ue4d2',\n // U+E9D6 Accentus above\n chantAccentusAbove = '\\ue9d6',\n // U+E9D7 Accentus below\n chantAccentusBelow = '\\ue9d7',\n // U+E994 Punctum auctum, ascending\n chantAuctumAsc = '\\ue994',\n // U+E995 Punctum auctum, descending\n chantAuctumDesc = '\\ue995',\n // U+E9D9 Augmentum (mora)\n chantAugmentum = '\\ue9d9',\n // U+E8F8 Caesura\n chantCaesura = '\\ue8f8',\n // U+E906 Plainchant C clef\n chantCclef = '\\ue906',\n // U+E9D2 Circulus above\n chantCirculusAbove = '\\ue9d2',\n // U+E9D3 Circulus below\n chantCirculusBelow = '\\ue9d3',\n // U+E9BD Connecting line, ascending 2nd\n chantConnectingLineAsc2nd = '\\ue9bd',\n // U+E9BE Connecting line, ascending 3rd\n chantConnectingLineAsc3rd = '\\ue9be',\n // U+E9BF Connecting line, ascending 4th\n chantConnectingLineAsc4th = '\\ue9bf',\n // U+E9C0 Connecting line, ascending 5th\n chantConnectingLineAsc5th = '\\ue9c0',\n // U+E9C1 Connecting line, ascending 6th\n chantConnectingLineAsc6th = '\\ue9c1',\n // U+EA08 Plainchant custos, stem down, high position\n chantCustosStemDownPosHigh = '\\uea08',\n // U+EA09 Plainchant custos, stem down, highest position\n chantCustosStemDownPosHighest = '\\uea09',\n // U+EA07 Plainchant custos, stem down, middle position\n chantCustosStemDownPosMiddle = '\\uea07',\n // U+EA05 Plainchant custos, stem up, low position\n chantCustosStemUpPosLow = '\\uea05',\n // U+EA04 Plainchant custos, stem up, lowest position\n chantCustosStemUpPosLowest = '\\uea04',\n // U+EA06 Plainchant custos, stem up, middle position\n chantCustosStemUpPosMiddle = '\\uea06',\n // U+E9B3 Punctum deminutum, lower\n chantDeminutumLower = '\\ue9b3',\n // U+E9B2 Punctum deminutum, upper\n chantDeminutumUpper = '\\ue9b2',\n // U+E8F6 Divisio finalis\n chantDivisioFinalis = '\\ue8f6',\n // U+E8F4 Divisio maior\n chantDivisioMaior = '\\ue8f4',\n // U+E8F5 Divisio maxima\n chantDivisioMaxima = '\\ue8f5',\n // U+E8F3 Divisio minima\n chantDivisioMinima = '\\ue8f3',\n // U+E9B4 Entry line, ascending 2nd\n chantEntryLineAsc2nd = '\\ue9b4',\n // U+E9B5 Entry line, ascending 3rd\n chantEntryLineAsc3rd = '\\ue9b5',\n // U+E9B6 Entry line, ascending 4th\n chantEntryLineAsc4th = '\\ue9b6',\n // U+E9B7 Entry line, ascending 5th\n chantEntryLineAsc5th = '\\ue9b7',\n // U+E9B8 Entry line, ascending 6th\n chantEntryLineAsc6th = '\\ue9b8',\n // U+E9D8 Episema\n chantEpisema = '\\ue9d8',\n // U+E902 Plainchant F clef\n chantFclef = '\\ue902',\n // U+E9D0 Ictus above\n chantIctusAbove = '\\ue9d0',\n // U+E9D1 Ictus below\n chantIctusBelow = '\\ue9d1',\n // U+E9B9 Ligated stroke, descending 2nd\n chantLigaturaDesc2nd = '\\ue9b9',\n // U+E9BA Ligated stroke, descending 3rd\n chantLigaturaDesc3rd = '\\ue9ba',\n // U+E9BB Ligated stroke, descending 4th\n chantLigaturaDesc4th = '\\ue9bb',\n // U+E9BC Ligated stroke, descending 5th\n chantLigaturaDesc5th = '\\ue9bc',\n // U+E99C Oriscus ascending\n chantOriscusAscending = '\\ue99c',\n // U+E99D Oriscus descending\n chantOriscusDescending = '\\ue99d',\n // U+E99E Oriscus liquescens\n chantOriscusLiquescens = '\\ue99e',\n // U+E9B0 Podatus, lower\n chantPodatusLower = '\\ue9b0',\n // U+E9B1 Podatus, upper\n chantPodatusUpper = '\\ue9b1',\n // U+E990 Punctum\n chantPunctum = '\\ue990',\n // U+E998 Punctum cavum\n chantPunctumCavum = '\\ue998',\n // U+E9A1 Punctum deminutum\n chantPunctumDeminutum = '\\ue9a1',\n // U+E991 Punctum inclinatum\n chantPunctumInclinatum = '\\ue991',\n // U+E992 Punctum inclinatum auctum\n chantPunctumInclinatumAuctum = '\\ue992',\n // U+E993 Punctum inclinatum deminutum\n chantPunctumInclinatumDeminutum = '\\ue993',\n // U+E999 Punctum linea\n chantPunctumLinea = '\\ue999',\n // U+E99A Punctum linea cavum\n chantPunctumLineaCavum = '\\ue99a',\n // U+E996 Punctum virga\n chantPunctumVirga = '\\ue996',\n // U+E997 Punctum virga, reversed\n chantPunctumVirgaReversed = '\\ue997',\n // U+E99B Quilisma\n chantQuilisma = '\\ue99b',\n // U+E9D4 Semicirculus above\n chantSemicirculusAbove = '\\ue9d4',\n // U+E9D5 Semicirculus below\n chantSemicirculusBelow = '\\ue9d5',\n // U+E8F0 Plainchant staff\n chantStaff = '\\ue8f0',\n // U+E8F2 Plainchant staff (narrow)\n chantStaffNarrow = '\\ue8f2',\n // U+E8F1 Plainchant staff (wide)\n chantStaffWide = '\\ue8f1',\n // U+E99F Strophicus\n chantStrophicus = '\\ue99f',\n // U+E9A0 Strophicus auctus\n chantStrophicusAuctus = '\\ue9a0',\n // U+E9C2 Strophicus liquescens, 2nd\n chantStrophicusLiquescens2nd = '\\ue9c2',\n // U+E9C3 Strophicus liquescens, 3rd\n chantStrophicusLiquescens3rd = '\\ue9c3',\n // U+E9C4 Strophicus liquescens, 4th\n chantStrophicusLiquescens4th = '\\ue9c4',\n // U+E9C5 Strophicus liquescens, 5th\n chantStrophicusLiquescens5th = '\\ue9c5',\n // U+E8F7 Virgula\n chantVirgula = '\\ue8f7',\n // U+E07E 15 for clefs\n clef15 = '\\ue07e',\n // U+E07D 8 for clefs\n clef8 = '\\ue07d',\n // U+E07F Combining clef change\n clefChangeCombining = '\\ue07f',\n // U+E048 Coda\n coda = '\\ue048',\n // U+E049 Square coda\n codaSquare = '\\ue049',\n // U+E897 Beat 2, compound time\n conductorBeat2Compound = '\\ue897',\n // U+E894 Beat 2, simple time\n conductorBeat2Simple = '\\ue894',\n // U+E898 Beat 3, compound time\n conductorBeat3Compound = '\\ue898',\n // U+E895 Beat 3, simple time\n conductorBeat3Simple = '\\ue895',\n // U+E899 Beat 4, compound time\n conductorBeat4Compound = '\\ue899',\n // U+E896 Beat 4, simple time\n conductorBeat4Simple = '\\ue896',\n // U+E891 Left-hand beat or cue\n conductorLeftBeat = '\\ue891',\n // U+E892 Right-hand beat or cue\n conductorRightBeat = '\\ue892',\n // U+E890 Strong beat or cue\n conductorStrongBeat = '\\ue890',\n // U+E89A Unconducted/free passages\n conductorUnconducted = '\\ue89a',\n // U+E893 Weak beat or cue\n conductorWeakBeat = '\\ue893',\n // U+E8E0 Begin beam\n controlBeginBeam = '\\ue8e0',\n // U+E8E6 Begin phrase\n controlBeginPhrase = '\\ue8e6',\n // U+E8E4 Begin slur\n controlBeginSlur = '\\ue8e4',\n // U+E8E2 Begin tie\n controlBeginTie = '\\ue8e2',\n // U+E8E1 End beam\n controlEndBeam = '\\ue8e1',\n // U+E8E7 End phrase\n controlEndPhrase = '\\ue8e7',\n // U+E8E5 End slur\n controlEndSlur = '\\ue8e5',\n // U+E8E3 End tie\n controlEndTie = '\\ue8e3',\n // U+ED64 Double flat\n csymAccidentalDoubleFlat = '\\ued64',\n // U+ED63 Double sharp\n csymAccidentalDoubleSharp = '\\ued63',\n // U+ED60 Flat\n csymAccidentalFlat = '\\ued60',\n // U+ED61 Natural\n csymAccidentalNatural = '\\ued61',\n // U+ED62 Sharp\n csymAccidentalSharp = '\\ued62',\n // U+ED66 Triple flat\n csymAccidentalTripleFlat = '\\ued66',\n // U+ED65 Triple sharp\n csymAccidentalTripleSharp = '\\ued65',\n // U+E87B Slash for altered bass note\n csymAlteredBassSlash = '\\ue87b',\n // U+E872 Augmented\n csymAugmented = '\\ue872',\n // U+E877 Double-height left bracket\n csymBracketLeftTall = '\\ue877',\n // U+E878 Double-height right bracket\n csymBracketRightTall = '\\ue878',\n // U+E87C Slash for chord symbols arranged diagonally\n csymDiagonalArrangementSlash = '\\ue87c',\n // U+E870 Diminished\n csymDiminished = '\\ue870',\n // U+E871 Half-diminished\n csymHalfDiminished = '\\ue871',\n // U+E873 Major seventh\n csymMajorSeventh = '\\ue873',\n // U+E874 Minor\n csymMinor = '\\ue874',\n // U+E875 Double-height left parenthesis\n csymParensLeftTall = '\\ue875',\n // U+E879 Triple-height left parenthesis\n csymParensLeftVeryTall = '\\ue879',\n // U+E876 Double-height right parenthesis\n csymParensRightTall = '\\ue876',\n // U+E87A Triple-height right parenthesis\n csymParensRightVeryTall = '\\ue87a',\n // U+E4D6 Curlew (Britten)\n curlewSign = '\\ue4d6',\n // U+E046 Da capo\n daCapo = '\\ue046',\n // U+E045 Dal segno\n dalSegno = '\\ue045',\n // U+EA3C Daseian excellentes 1\n daseianExcellentes1 = '\\uea3c',\n // U+EA3D Daseian excellentes 2\n daseianExcellentes2 = '\\uea3d',\n // U+EA3E Daseian excellentes 3\n daseianExcellentes3 = '\\uea3e',\n // U+EA3F Daseian excellentes 4\n daseianExcellentes4 = '\\uea3f',\n // U+EA34 Daseian finales 1\n daseianFinales1 = '\\uea34',\n // U+EA35 Daseian finales 2\n daseianFinales2 = '\\uea35',\n // U+EA36 Daseian finales 3\n daseianFinales3 = '\\uea36',\n // U+EA37 Daseian finales 4\n daseianFinales4 = '\\uea37',\n // U+EA30 Daseian graves 1\n daseianGraves1 = '\\uea30',\n // U+EA31 Daseian graves 2\n daseianGraves2 = '\\uea31',\n // U+EA32 Daseian graves 3\n daseianGraves3 = '\\uea32',\n // U+EA33 Daseian graves 4\n daseianGraves4 = '\\uea33',\n // U+EA40 Daseian residua 1\n daseianResidua1 = '\\uea40',\n // U+EA41 Daseian residua 2\n daseianResidua2 = '\\uea41',\n // U+EA38 Daseian superiores 1\n daseianSuperiores1 = '\\uea38',\n // U+EA39 Daseian superiores 2\n daseianSuperiores2 = '\\uea39',\n // U+EA3A Daseian superiores 3\n daseianSuperiores3 = '\\uea3a',\n // U+EA3B Daseian superiores 4\n daseianSuperiores4 = '\\uea3b',\n // U+E234 Double lateral roll (Stevens)\n doubleLateralRollStevens = '\\ue234',\n // U+E5F0 Double-tongue above\n doubleTongueAbove = '\\ue5f0',\n // U+E5F1 Double-tongue below\n doubleTongueBelow = '\\ue5f1',\n // U+E546 Colon separator for combined dynamics\n dynamicCombinedSeparatorColon = '\\ue546',\n // U+E547 Hyphen separator for combined dynamics\n dynamicCombinedSeparatorHyphen = '\\ue547',\n // U+E549 Slash separator for combined dynamics\n dynamicCombinedSeparatorSlash = '\\ue549',\n // U+E548 Space separator for combined dynamics\n dynamicCombinedSeparatorSpace = '\\ue548',\n // U+E53E Crescendo\n dynamicCrescendoHairpin = '\\ue53e',\n // U+E53F Diminuendo\n dynamicDiminuendoHairpin = '\\ue53f',\n // U+E52F ff\n dynamicFF = '\\ue52f',\n // U+E530 fff\n dynamicFFF = '\\ue530',\n // U+E531 ffff\n dynamicFFFF = '\\ue531',\n // U+E532 fffff\n dynamicFFFFF = '\\ue532',\n // U+E533 ffffff\n dynamicFFFFFF = '\\ue533',\n // U+E522 Forte\n dynamicForte = '\\ue522',\n // U+E534 Forte-piano\n dynamicFortePiano = '\\ue534',\n // U+E535 Forzando\n dynamicForzando = '\\ue535',\n // U+E544 Left bracket (for hairpins)\n dynamicHairpinBracketLeft = '\\ue544',\n // U+E545 Right bracket (for hairpins)\n dynamicHairpinBracketRight = '\\ue545',\n // U+E542 Left parenthesis (for hairpins)\n dynamicHairpinParenthesisLeft = '\\ue542',\n // U+E543 Right parenthesis (for hairpins)\n dynamicHairpinParenthesisRight = '\\ue543',\n // U+E52D mf\n dynamicMF = '\\ue52d',\n // U+E52C mp\n dynamicMP = '\\ue52c',\n // U+E540 Messa di voce\n dynamicMessaDiVoce = '\\ue540',\n // U+E521 Mezzo\n dynamicMezzo = '\\ue521',\n // U+E526 Niente\n dynamicNiente = '\\ue526',\n // U+E541 Niente (for hairpins)\n dynamicNienteForHairpin = '\\ue541',\n // U+E52E pf\n dynamicPF = '\\ue52e',\n // U+E52B pp\n dynamicPP = '\\ue52b',\n // U+E52A ppp\n dynamicPPP = '\\ue52a',\n // U+E529 pppp\n dynamicPPPP = '\\ue529',\n // U+E528 ppppp\n dynamicPPPPP = '\\ue528',\n // U+E527 pppppp\n dynamicPPPPPP = '\\ue527',\n // U+E520 Piano\n dynamicPiano = '\\ue520',\n // U+E523 Rinforzando\n dynamicRinforzando = '\\ue523',\n // U+E53C Rinforzando 1\n dynamicRinforzando1 = '\\ue53c',\n // U+E53D Rinforzando 2\n dynamicRinforzando2 = '\\ue53d',\n // U+E524 Sforzando\n dynamicSforzando = '\\ue524',\n // U+E536 Sforzando 1\n dynamicSforzando1 = '\\ue536',\n // U+E538 Sforzando-pianissimo\n dynamicSforzandoPianissimo = '\\ue538',\n // U+E537 Sforzando-piano\n dynamicSforzandoPiano = '\\ue537',\n // U+E539 Sforzato\n dynamicSforzato = '\\ue539',\n // U+E53B Sforzatissimo\n dynamicSforzatoFF = '\\ue53b',\n // U+E53A Sforzato-piano\n dynamicSforzatoPiano = '\\ue53a',\n // U+E525 Z\n dynamicZ = '\\ue525',\n // U+EB46 Eight channels (7.1 surround)\n elecAudioChannelsEight = '\\ueb46',\n // U+EB43 Five channels\n elecAudioChannelsFive = '\\ueb43',\n // U+EB42 Four channels\n elecAudioChannelsFour = '\\ueb42',\n // U+EB3E One channel (mono)\n elecAudioChannelsOne = '\\ueb3e',\n // U+EB45 Seven channels\n elecAudioChannelsSeven = '\\ueb45',\n // U+EB44 Six channels (5.1 surround)\n elecAudioChannelsSix = '\\ueb44',\n // U+EB40 Three channels (frontal)\n elecAudioChannelsThreeFrontal = '\\ueb40',\n // U+EB41 Three channels (surround)\n elecAudioChannelsThreeSurround = '\\ueb41',\n // U+EB3F Two channels (stereo)\n elecAudioChannelsTwo = '\\ueb3f',\n // U+EB49 Audio in\n elecAudioIn = '\\ueb49',\n // U+EB3C Mono audio setup\n elecAudioMono = '\\ueb3c',\n // U+EB4A Audio out\n elecAudioOut = '\\ueb4a',\n // U+EB3D Stereo audio setup\n elecAudioStereo = '\\ueb3d',\n // U+EB1B Camera\n elecCamera = '\\ueb1b',\n // U+EB4D Data in\n elecDataIn = '\\ueb4d',\n // U+EB4E Data out\n elecDataOut = '\\ueb4e',\n // U+EB13 Disc\n elecDisc = '\\ueb13',\n // U+EB4F Download\n elecDownload = '\\ueb4f',\n // U+EB2B Eject\n elecEject = '\\ueb2b',\n // U+EB1F Fast-forward\n elecFastForward = '\\ueb1f',\n // U+EB11 Headphones\n elecHeadphones = '\\ueb11',\n // U+EB12 Headset\n elecHeadset = '\\ueb12',\n // U+EB47 Line in\n elecLineIn = '\\ueb47',\n // U+EB48 Line out\n elecLineOut = '\\ueb48',\n // U+EB23 Loop\n elecLoop = '\\ueb23',\n // U+EB1A Loudspeaker\n elecLoudspeaker = '\\ueb1a',\n // U+EB36 MIDI controller 0%\n elecMIDIController0 = '\\ueb36',\n // U+EB3B MIDI controller 100%\n elecMIDIController100 = '\\ueb3b',\n // U+EB37 MIDI controller 20%\n elecMIDIController20 = '\\ueb37',\n // U+EB38 MIDI controller 40%\n elecMIDIController40 = '\\ueb38',\n // U+EB39 MIDI controller 60%\n elecMIDIController60 = '\\ueb39',\n // U+EB3A MIDI controller 80%\n elecMIDIController80 = '\\ueb3a',\n // U+EB34 MIDI in\n elecMIDIIn = '\\ueb34',\n // U+EB35 MIDI out\n elecMIDIOut = '\\ueb35',\n // U+EB10 Microphone\n elecMicrophone = '\\ueb10',\n // U+EB28 Mute microphone\n elecMicrophoneMute = '\\ueb28',\n // U+EB29 Unmute microphone\n elecMicrophoneUnmute = '\\ueb29',\n // U+EB15 Mixing console\n elecMixingConsole = '\\ueb15',\n // U+EB18 Monitor\n elecMonitor = '\\ueb18',\n // U+EB26 Mute\n elecMute = '\\ueb26',\n // U+EB1E Pause\n elecPause = '\\ueb1e',\n // U+EB1C Play\n elecPlay = '\\ueb1c',\n // U+EB2A Power on/off\n elecPowerOnOff = '\\ueb2a',\n // U+EB19 Projector\n elecProjector = '\\ueb19',\n // U+EB24 Replay\n elecReplay = '\\ueb24',\n // U+EB20 Rewind\n elecRewind = '\\ueb20',\n // U+EB25 Shuffle\n elecShuffle = '\\ueb25',\n // U+EB22 Skip backwards\n elecSkipBackwards = '\\ueb22',\n // U+EB21 Skip forwards\n elecSkipForwards = '\\ueb21',\n // U+EB1D Stop\n elecStop = '\\ueb1d',\n // U+EB14 Tape\n elecTape = '\\ueb14',\n // U+EB16 USB connection\n elecUSB = '\\ueb16',\n // U+EB27 Unmute\n elecUnmute = '\\ueb27',\n // U+EB50 Upload\n elecUpload = '\\ueb50',\n // U+EB17 Video camera\n elecVideoCamera = '\\ueb17',\n // U+EB4B Video in\n elecVideoIn = '\\ueb4b',\n // U+EB4C Video out\n elecVideoOut = '\\ueb4c',\n // U+EB2C Combining volume fader\n elecVolumeFader = '\\ueb2c',\n // U+EB2D Combining volume fader thumb\n elecVolumeFaderThumb = '\\ueb2d',\n // U+EB2E Volume level 0%\n elecVolumeLevel0 = '\\ueb2e',\n // U+EB33 Volume level 100%\n elecVolumeLevel100 = '\\ueb33',\n // U+EB2F Volume level 20%\n elecVolumeLevel20 = '\\ueb2f',\n // U+EB30 Volume level 40%\n elecVolumeLevel40 = '\\ueb30',\n // U+EB31 Volume level 60%\n elecVolumeLevel60 = '\\ueb31',\n // U+EB32 Volume level 80%\n elecVolumeLevel80 = '\\ueb32',\n // U+E062 F clef\n fClef = '\\ue062',\n // U+E066 F clef quindicesima alta\n fClef15ma = '\\ue066',\n // U+E063 F clef quindicesima bassa\n fClef15mb = '\\ue063',\n // U+E065 F clef ottava alta\n fClef8va = '\\ue065',\n // U+E064 F clef ottava bassa\n fClef8vb = '\\ue064',\n // U+E068 F clef, arrow down\n fClefArrowDown = '\\ue068',\n // U+E067 F clef, arrow up\n fClefArrowUp = '\\ue067',\n // U+E07C F clef change\n fClefChange = '\\ue07c',\n // U+E076 Reversed F clef\n fClefReversed = '\\ue076',\n // U+E077 Turned F clef\n fClefTurned = '\\ue077',\n // U+E4C0 Fermata above\n fermataAbove = '\\ue4c0',\n // U+E4C1 Fermata below\n fermataBelow = '\\ue4c1',\n // U+E4C6 Long fermata above\n fermataLongAbove = '\\ue4c6',\n // U+E4C7 Long fermata below\n fermataLongBelow = '\\ue4c7',\n // U+E4CA Long fermata (Henze) above\n fermataLongHenzeAbove = '\\ue4ca',\n // U+E4CB Long fermata (Henze) below\n fermataLongHenzeBelow = '\\ue4cb',\n // U+E4C4 Short fermata above\n fermataShortAbove = '\\ue4c4',\n // U+E4C5 Short fermata below\n fermataShortBelow = '\\ue4c5',\n // U+E4CC Short fermata (Henze) above\n fermataShortHenzeAbove = '\\ue4cc',\n // U+E4CD Short fermata (Henze) below\n fermataShortHenzeBelow = '\\ue4cd',\n // U+E4C8 Very long fermata above\n fermataVeryLongAbove = '\\ue4c8',\n // U+E4C9 Very long fermata below\n fermataVeryLongBelow = '\\ue4c9',\n // U+E4C2 Very short fermata above\n fermataVeryShortAbove = '\\ue4c2',\n // U+E4C3 Very short fermata below\n fermataVeryShortBelow = '\\ue4c3',\n // U+EA50 Figured bass 0\n figbass0 = '\\uea50',\n // U+EA51 Figured bass 1\n figbass1 = '\\uea51',\n // U+EA52 Figured bass 2\n figbass2 = '\\uea52',\n // U+EA53 Figured bass 2 raised by half-step\n figbass2Raised = '\\uea53',\n // U+EA54 Figured bass 3\n figbass3 = '\\uea54',\n // U+EA55 Figured bass 4\n figbass4 = '\\uea55',\n // U+EA56 Figured bass 4 raised by half-step\n figbass4Raised = '\\uea56',\n // U+EA57 Figured bass 5\n figbass5 = '\\uea57',\n // U+EA58 Figured bass 5 raised by half-step\n figbass5Raised1 = '\\uea58',\n // U+EA59 Figured bass 5 raised by half-step 2\n figbass5Raised2 = '\\uea59',\n // U+EA5A Figured bass diminished 5\n figbass5Raised3 = '\\uea5a',\n // U+EA5B Figured bass 6\n figbass6 = '\\uea5b',\n // U+EA5C Figured bass 6 raised by half-step\n figbass6Raised = '\\uea5c',\n // U+EA6F Figured bass 6 raised by half-step 2\n figbass6Raised2 = '\\uea6f',\n // U+EA5D Figured bass 7\n figbass7 = '\\uea5d',\n // U+ECC0 Figured bass 7 diminished\n figbass7Diminished = '\\uecc0',\n // U+EA5E Figured bass 7 raised by half-step\n figbass7Raised1 = '\\uea5e',\n // U+EA5F Figured bass 7 lowered by a half-step\n figbass7Raised2 = '\\uea5f',\n // U+EA60 Figured bass 8\n figbass8 = '\\uea60',\n // U+EA61 Figured bass 9\n figbass9 = '\\uea61',\n // U+EA62 Figured bass 9 raised by half-step\n figbass9Raised = '\\uea62',\n // U+EA68 Figured bass [\n figbassBracketLeft = '\\uea68',\n // U+EA69 Figured bass ]\n figbassBracketRight = '\\uea69',\n // U+EA6E Combining lower\n figbassCombiningLowering = '\\uea6e',\n // U+EA6D Combining raise\n figbassCombiningRaising = '\\uea6d',\n // U+EA63 Figured bass double flat\n figbassDoubleFlat = '\\uea63',\n // U+EA67 Figured bass double sharp\n figbassDoubleSharp = '\\uea67',\n // U+EA64 Figured bass flat\n figbassFlat = '\\uea64',\n // U+EA65 Figured bass natural\n figbassNatural = '\\uea65',\n // U+EA6A Figured bass (\n figbassParensLeft = '\\uea6a',\n // U+EA6B Figured bass )\n figbassParensRight = '\\uea6b',\n // U+EA6C Figured bass +\n figbassPlus = '\\uea6c',\n // U+EA66 Figured bass sharp\n figbassSharp = '\\uea66',\n // U+ECC1 Figured bass triple flat\n figbassTripleFlat = '\\uecc1',\n // U+ECC2 Figured bass triple sharp\n figbassTripleSharp = '\\uecc2',\n // U+ED10 Fingering 0 (open string)\n fingering0 = '\\ued10',\n // U+ED80 Fingering 0 italic (open string)\n fingering0Italic = '\\ued80',\n // U+ED11 Fingering 1 (thumb)\n fingering1 = '\\ued11',\n // U+ED81 Fingering 1 italic (thumb)\n fingering1Italic = '\\ued81',\n // U+ED12 Fingering 2 (index finger)\n fingering2 = '\\ued12',\n // U+ED82 Fingering 2 italic (index finger)\n fingering2Italic = '\\ued82',\n // U+ED13 Fingering 3 (middle finger)\n fingering3 = '\\ued13',\n // U+ED83 Fingering 3 italic (middle finger)\n fingering3Italic = '\\ued83',\n // U+ED14 Fingering 4 (ring finger)\n fingering4 = '\\ued14',\n // U+ED84 Fingering 4 italic (ring finger)\n fingering4Italic = '\\ued84',\n // U+ED15 Fingering 5 (little finger)\n fingering5 = '\\ued15',\n // U+ED85 Fingering 5 italic (little finger)\n fingering5Italic = '\\ued85',\n // U+ED24 Fingering 6\n fingering6 = '\\ued24',\n // U+ED86 Fingering 6 italic\n fingering6Italic = '\\ued86',\n // U+ED25 Fingering 7\n fingering7 = '\\ued25',\n // U+ED87 Fingering 7 italic\n fingering7Italic = '\\ued87',\n // U+ED26 Fingering 8\n fingering8 = '\\ued26',\n // U+ED88 Fingering 8 italic\n fingering8Italic = '\\ued88',\n // U+ED27 Fingering 9\n fingering9 = '\\ued27',\n // U+ED89 Fingering 9 italic\n fingering9Italic = '\\ued89',\n // U+ED1B Fingering a (anular; right-hand ring finger for guitar)\n fingeringALower = '\\ued1b',\n // U+ED1C Fingering c (right-hand little finger for guitar)\n fingeringCLower = '\\ued1c',\n // U+ED1E Fingering e (right-hand little finger for guitar)\n fingeringELower = '\\ued1e',\n // U+ED19 Fingering i (indicio; right-hand index finger for guitar)\n fingeringILower = '\\ued19',\n // U+ED2A Fingering left bracket\n fingeringLeftBracket = '\\ued2a',\n // U+ED8C Fingering left bracket italic\n fingeringLeftBracketItalic = '\\ued8c',\n // U+ED28 Fingering left parenthesis\n fingeringLeftParenthesis = '\\ued28',\n // U+ED8A Fingering left parenthesis italic\n fingeringLeftParenthesisItalic = '\\ued8a',\n // U+ED1A Fingering m (medio; right-hand middle finger for guitar)\n fingeringMLower = '\\ued1a',\n // U+ED23 Multiple notes played by thumb or single finger\n fingeringMultipleNotes = '\\ued23',\n // U+ED1F Fingering o (right-hand little finger for guitar)\n fingeringOLower = '\\ued1f',\n // U+ED17 Fingering p (pulgar; right-hand thumb for guitar)\n fingeringPLower = '\\ued17',\n // U+ED8E Fingering q (right-hand little finger for guitar)\n fingeringQLower = '\\ued8e',\n // U+ED2B Fingering right bracket\n fingeringRightBracket = '\\ued2b',\n // U+ED8D Fingering right bracket italic\n fingeringRightBracketItalic = '\\ued8d',\n // U+ED29 Fingering right parenthesis\n fingeringRightParenthesis = '\\ued29',\n // U+ED8B Fingering right parenthesis italic\n fingeringRightParenthesisItalic = '\\ued8b',\n // U+ED8F Fingering s (right-hand little finger for guitar)\n fingeringSLower = '\\ued8f',\n // U+ED2C Fingering middle dot separator\n fingeringSeparatorMiddleDot = '\\ued2c',\n // U+ED2D Fingering white middle dot separator\n fingeringSeparatorMiddleDotWhite = '\\ued2d',\n // U+ED2E Fingering forward slash separator\n fingeringSeparatorSlash = '\\ued2e',\n // U+ED20 Finger substitution above\n fingeringSubstitutionAbove = '\\ued20',\n // U+ED21 Finger substitution below\n fingeringSubstitutionBelow = '\\ued21',\n // U+ED22 Finger substitution dash\n fingeringSubstitutionDash = '\\ued22',\n // U+ED18 Fingering t (right-hand thumb for guitar)\n fingeringTLower = '\\ued18',\n // U+ED16 Fingering T (left-hand thumb for guitar)\n fingeringTUpper = '\\ued16',\n // U+ED1D Fingering x (right-hand little finger for guitar)\n fingeringXLower = '\\ued1d',\n // U+E24F Combining flag 8 (1024th) below\n flag1024thDown = '\\ue24f',\n // U+E24E Combining flag 8 (1024th) above\n flag1024thUp = '\\ue24e',\n // U+E249 Combining flag 5 (128th) below\n flag128thDown = '\\ue249',\n // U+E248 Combining flag 5 (128th) above\n flag128thUp = '\\ue248',\n // U+E243 Combining flag 2 (16th) below\n flag16thDown = '\\ue243',\n // U+E242 Combining flag 2 (16th) above\n flag16thUp = '\\ue242',\n // U+E24B Combining flag 6 (256th) below\n flag256thDown = '\\ue24b',\n // U+E24A Combining flag 6 (256th) above\n flag256thUp = '\\ue24a',\n // U+E245 Combining flag 3 (32nd) below\n flag32ndDown = '\\ue245',\n // U+E244 Combining flag 3 (32nd) above\n flag32ndUp = '\\ue244',\n // U+E24D Combining flag 7 (512th) below\n flag512thDown = '\\ue24d',\n // U+E24C Combining flag 7 (512th) above\n flag512thUp = '\\ue24c',\n // U+E247 Combining flag 4 (64th) below\n flag64thDown = '\\ue247',\n // U+E246 Combining flag 4 (64th) above\n flag64thUp = '\\ue246',\n // U+E241 Combining flag 1 (8th) below\n flag8thDown = '\\ue241',\n // U+E240 Combining flag 1 (8th) above\n flag8thUp = '\\ue240',\n // U+E251 Internal combining flag below\n flagInternalDown = '\\ue251',\n // U+E250 Internal combining flag above\n flagInternalUp = '\\ue250',\n // U+E850 3-string fretboard\n fretboard3String = '\\ue850',\n // U+E851 3-string fretboard at nut\n fretboard3StringNut = '\\ue851',\n // U+E852 4-string fretboard\n fretboard4String = '\\ue852',\n // U+E853 4-string fretboard at nut\n fretboard4StringNut = '\\ue853',\n // U+E854 5-string fretboard\n fretboard5String = '\\ue854',\n // U+E855 5-string fretboard at nut\n fretboard5StringNut = '\\ue855',\n // U+E856 6-string fretboard\n fretboard6String = '\\ue856',\n // U+E857 6-string fretboard at nut\n fretboard6StringNut = '\\ue857',\n // U+E858 Fingered fret (filled circle)\n fretboardFilledCircle = '\\ue858',\n // U+E85A Open string (O)\n fretboardO = '\\ue85a',\n // U+E859 String not played (X)\n fretboardX = '\\ue859',\n // U+EA93 Function theory angle bracket left\n functionAngleLeft = '\\uea93',\n // U+EA94 Function theory angle bracket right\n functionAngleRight = '\\uea94',\n // U+EA8F Function theory bracket left\n functionBracketLeft = '\\uea8f',\n // U+EA90 Function theory bracket right\n functionBracketRight = '\\uea90',\n // U+EA81 Function theory dominant of dominant\n functionDD = '\\uea81',\n // U+EA80 Function theory minor dominant\n functionDLower = '\\uea80',\n // U+EA7F Function theory major dominant\n functionDUpper = '\\uea7f',\n // U+EA78 Function theory 8\n functionEight = '\\uea78',\n // U+EA99 Function theory F\n functionFUpper = '\\uea99',\n // U+EA75 Function theory 5\n functionFive = '\\uea75',\n // U+EA74 Function theory 4\n functionFour = '\\uea74',\n // U+EA84 Function theory g\n functionGLower = '\\uea84',\n // U+EA83 Function theory G\n functionGUpper = '\\uea83',\n // U+EA7C Function theory greater than\n functionGreaterThan = '\\uea7c',\n // U+EA9B Function theory i\n functionILower = '\\uea9b',\n // U+EA9A Function theory I\n functionIUpper = '\\uea9a',\n // U+EA9D Function theory k\n functionKLower = '\\uea9d',\n // U+EA9C Function theory K\n functionKUpper = '\\uea9c',\n // U+EA9F Function theory l\n functionLLower = '\\uea9f',\n // U+EA9E Function theory L\n functionLUpper = '\\uea9e',\n // U+EA7A Function theory less than\n functionLessThan = '\\uea7a',\n // U+ED01 Function theory m\n functionMLower = '\\ued01',\n // U+ED00 Function theory M\n functionMUpper = '\\ued00',\n // U+EA7B Function theory minus\n functionMinus = '\\uea7b',\n // U+EA86 Function theory n\n functionNLower = '\\uea86',\n // U+EA85 Function theory N\n functionNUpper = '\\uea85',\n // U+ED02 Function theory superscript N\n functionNUpperSuperscript = '\\ued02',\n // U+EA79 Function theory 9\n functionNine = '\\uea79',\n // U+EA71 Function theory 1\n functionOne = '\\uea71',\n // U+EA88 Function theory p\n functionPLower = '\\uea88',\n // U+EA87 Function theory P\n functionPUpper = '\\uea87',\n // U+EA91 Function theory parenthesis left\n functionParensLeft = '\\uea91',\n // U+EA92 Function theory parenthesis right\n functionParensRight = '\\uea92',\n // U+EA98 Function theory prefix plus\n functionPlus = '\\uea98',\n // U+ED03 Function theory r\n functionRLower = '\\ued03',\n // U+EA95 Function theory repetition 1\n functionRepetition1 = '\\uea95',\n // U+EA96 Function theory repetition 2\n functionRepetition2 = '\\uea96',\n // U+EA97 Function theory prefix ring\n functionRing = '\\uea97',\n // U+EA8A Function theory minor subdominant\n functionSLower = '\\uea8a',\n // U+EA7E Function theory minor subdominant of subdominant\n functionSSLower = '\\uea7e',\n // U+EA7D Function theory major subdominant of subdominant\n functionSSUpper = '\\uea7d',\n // U+EA89 Function theory major subdominant\n functionSUpper = '\\uea89',\n // U+EA77 Function theory 7\n functionSeven = '\\uea77',\n // U+EA76 Function theory 6\n functionSix = '\\uea76',\n // U+EA82 Function theory double dominant seventh\n functionSlashedDD = '\\uea82',\n // U+EA8C Function theory minor tonic\n functionTLower = '\\uea8c',\n // U+EA8B Function theory tonic\n functionTUpper = '\\uea8b',\n // U+EA73 Function theory 3\n functionThree = '\\uea73',\n // U+EA72 Function theory 2\n functionTwo = '\\uea72',\n // U+EA8E Function theory v\n functionVLower = '\\uea8e',\n // U+EA8D Function theory V\n functionVUpper = '\\uea8d',\n // U+EA70 Function theory 0\n functionZero = '\\uea70',\n // U+E050 G clef\n gClef = '\\ue050',\n // U+E054 G clef quindicesima alta\n gClef15ma = '\\ue054',\n // U+E051 G clef quindicesima bassa\n gClef15mb = '\\ue051',\n // U+E053 G clef ottava alta\n gClef8va = '\\ue053',\n // U+E052 G clef ottava bassa\n gClef8vb = '\\ue052',\n // U+E056 G clef ottava bassa with C clef\n gClef8vbCClef = '\\ue056',\n // U+E055 G clef ottava bassa (old style)\n gClef8vbOld = '\\ue055',\n // U+E057 G clef, optionally ottava bassa\n gClef8vbParens = '\\ue057',\n // U+E05B G clef, arrow down\n gClefArrowDown = '\\ue05b',\n // U+E05A G clef, arrow up\n gClefArrowUp = '\\ue05a',\n // U+E07A G clef change\n gClefChange = '\\ue07a',\n // U+E059 Combining G clef, number above\n gClefLigatedNumberAbove = '\\ue059',\n // U+E058 Combining G clef, number below\n gClefLigatedNumberBelow = '\\ue058',\n // U+E073 Reversed G clef\n gClefReversed = '\\ue073',\n // U+E074 Turned G clef\n gClefTurned = '\\ue074',\n // U+E586 Glissando down\n glissandoDown = '\\ue586',\n // U+E585 Glissando up\n glissandoUp = '\\ue585',\n // U+E561 Slashed grace note stem down\n graceNoteAcciaccaturaStemDown = '\\ue561',\n // U+E560 Slashed grace note stem up\n graceNoteAcciaccaturaStemUp = '\\ue560',\n // U+E563 Grace note stem down\n graceNoteAppoggiaturaStemDown = '\\ue563',\n // U+E562 Grace note stem up\n graceNoteAppoggiaturaStemUp = '\\ue562',\n // U+E565 Slash for stem down grace note\n graceNoteSlashStemDown = '\\ue565',\n // U+E564 Slash for stem up grace note\n graceNoteSlashStemUp = '\\ue564',\n // U+E848 Full barré\n guitarBarreFull = '\\ue848',\n // U+E849 Half barré\n guitarBarreHalf = '\\ue849',\n // U+E83F Closed wah/volume pedal\n guitarClosePedal = '\\ue83f',\n // U+E843 Fade in\n guitarFadeIn = '\\ue843',\n // U+E844 Fade out\n guitarFadeOut = '\\ue844',\n // U+E842 Golpe (tapping the pick guard)\n guitarGolpe = '\\ue842',\n // U+E83E Half-open wah/volume pedal\n guitarHalfOpenPedal = '\\ue83e',\n // U+E840 Left-hand tapping\n guitarLeftHandTapping = '\\ue840',\n // U+E83D Open wah/volume pedal\n guitarOpenPedal = '\\ue83d',\n // U+E841 Right-hand tapping\n guitarRightHandTapping = '\\ue841',\n // U+E832 Guitar shake\n guitarShake = '\\ue832',\n // U+E833 String number 0\n guitarString0 = '\\ue833',\n // U+E834 String number 1\n guitarString1 = '\\ue834',\n // U+E84A String number 10\n guitarString10 = '\\ue84a',\n // U+E84B String number 11\n guitarString11 = '\\ue84b',\n // U+E84C String number 12\n guitarString12 = '\\ue84c',\n // U+E84D String number 13\n guitarString13 = '\\ue84d',\n // U+E835 String number 2\n guitarString2 = '\\ue835',\n // U+E836 String number 3\n guitarString3 = '\\ue836',\n // U+E837 String number 4\n guitarString4 = '\\ue837',\n // U+E838 String number 5\n guitarString5 = '\\ue838',\n // U+E839 String number 6\n guitarString6 = '\\ue839',\n // U+E83A String number 7\n guitarString7 = '\\ue83a',\n // U+E83B String number 8\n guitarString8 = '\\ue83b',\n // U+E83C String number 9\n guitarString9 = '\\ue83c',\n // U+E847 Strum direction down\n guitarStrumDown = '\\ue847',\n // U+E846 Strum direction up\n guitarStrumUp = '\\ue846',\n // U+E831 Guitar vibrato bar dip\n guitarVibratoBarDip = '\\ue831',\n // U+E830 Guitar vibrato bar scoop\n guitarVibratoBarScoop = '\\ue830',\n // U+EAB2 Vibrato wiggle segment\n guitarVibratoStroke = '\\ueab2',\n // U+E845 Volume swell\n guitarVolumeSwell = '\\ue845',\n // U+EAB3 Wide vibrato wiggle segment\n guitarWideVibratoStroke = '\\ueab3',\n // U+E81F Belltree\n handbellsBelltree = '\\ue81f',\n // U+E81E Damp 3\n handbellsDamp3 = '\\ue81e',\n // U+E81B Echo\n handbellsEcho1 = '\\ue81b',\n // U+E81C Echo 2\n handbellsEcho2 = '\\ue81c',\n // U+E81D Gyro\n handbellsGyro = '\\ue81d',\n // U+E812 Hand martellato\n handbellsHandMartellato = '\\ue812',\n // U+E815 Mallet, bell on table\n handbellsMalletBellOnTable = '\\ue815',\n // U+E814 Mallet, bell suspended\n handbellsMalletBellSuspended = '\\ue814',\n // U+E816 Mallet lift\n handbellsMalletLft = '\\ue816',\n // U+E810 Martellato\n handbellsMartellato = '\\ue810',\n // U+E811 Martellato lift\n handbellsMartellatoLift = '\\ue811',\n // U+E813 Muted martellato\n handbellsMutedMartellato = '\\ue813',\n // U+E817 Pluck lift\n handbellsPluckLift = '\\ue817',\n // U+E81A Swing\n handbellsSwing = '\\ue81a',\n // U+E819 Swing down\n handbellsSwingDown = '\\ue819',\n // U+E818 Swing up\n handbellsSwingUp = '\\ue818',\n // U+E821 Table pair of handbells\n handbellsTablePairBells = '\\ue821',\n // U+E820 Table single handbell\n handbellsTableSingleBell = '\\ue820',\n // U+E68F Metal rod pictogram\n harpMetalRod = '\\ue68f',\n // U+E681 Harp pedal centered (natural)\n harpPedalCentered = '\\ue681',\n // U+E683 Harp pedal divider\n harpPedalDivider = '\\ue683',\n // U+E682 Harp pedal lowered (sharp)\n harpPedalLowered = '\\ue682',\n // U+E680 Harp pedal raised (flat)\n harpPedalRaised = '\\ue680',\n // U+E695 Ascending aeolian chords (Salzedo)\n harpSalzedoAeolianAscending = '\\ue695',\n // U+E696 Descending aeolian chords (Salzedo)\n harpSalzedoAeolianDescending = '\\ue696',\n // U+E69A Damp above (Salzedo)\n harpSalzedoDampAbove = '\\ue69a',\n // U+E699 Damp below (Salzedo)\n harpSalzedoDampBelow = '\\ue699',\n // U+E698 Damp with both hands (Salzedo)\n harpSalzedoDampBothHands = '\\ue698',\n // U+E697 Damp only low strings (Salzedo)\n harpSalzedoDampLowStrings = '\\ue697',\n // U+E68D Fluidic sounds, left hand (Salzedo)\n harpSalzedoFluidicSoundsLeft = '\\ue68d',\n // U+E68E Fluidic sounds, right hand (Salzedo)\n harpSalzedoFluidicSoundsRight = '\\ue68e',\n // U+E69C Isolated sounds (Salzedo)\n harpSalzedoIsolatedSounds = '\\ue69c',\n // U+E688 Metallic sounds (Salzedo)\n harpSalzedoMetallicSounds = '\\ue688',\n // U+E69B Metallic sounds, one string (Salzedo)\n harpSalzedoMetallicSoundsOneString = '\\ue69b',\n // U+E68C Muffle totally (Salzedo)\n harpSalzedoMuffleTotally = '\\ue68c',\n // U+E685 Oboic flux (Salzedo)\n harpSalzedoOboicFlux = '\\ue685',\n // U+E68A Play at upper end of strings (Salzedo)\n harpSalzedoPlayUpperEnd = '\\ue68a',\n // U+E684 Slide with suppleness (Salzedo)\n harpSalzedoSlideWithSuppleness = '\\ue684',\n // U+E69D Snare drum effect (Salzedo)\n harpSalzedoSnareDrum = '\\ue69d',\n // U+E689 Tam-tam sounds (Salzedo)\n harpSalzedoTamTamSounds = '\\ue689',\n // U+E686 Thunder effect (Salzedo)\n harpSalzedoThunderEffect = '\\ue686',\n // U+E68B Timpanic sounds (Salzedo)\n harpSalzedoTimpanicSounds = '\\ue68b',\n // U+E687 Whistling sounds (Salzedo)\n harpSalzedoWhistlingSounds = '\\ue687',\n // U+E694 Combining string noise for stem\n harpStringNoiseStem = '\\ue694',\n // U+E690 Tuning key pictogram\n harpTuningKey = '\\ue690',\n // U+E693 Retune strings for glissando\n harpTuningKeyGlissando = '\\ue693',\n // U+E691 Use handle of tuning key pictogram\n harpTuningKeyHandle = '\\ue691',\n // U+E692 Use shank of tuning key pictogram\n harpTuningKeyShank = '\\ue692',\n // U+ED70 Indian drum clef\n indianDrumClef = '\\ued70',\n // U+EDE2 Back-chug\n kahnBackChug = '\\uede2',\n // U+EDD8 Back-flap\n kahnBackFlap = '\\uedd8',\n // U+EDE1 Back-riff\n kahnBackRiff = '\\uede1',\n // U+EDDA Back-rip\n kahnBackRip = '\\uedda',\n // U+EDC6 Ball-change\n kahnBallChange = '\\uedc6',\n // U+EDCD Ball-dig\n kahnBallDig = '\\uedcd',\n // U+EDA7 Brush-backward\n kahnBrushBackward = '\\ueda7',\n // U+EDA6 Brush-forward\n kahnBrushForward = '\\ueda6',\n // U+EDDD Chug\n kahnChug = '\\ueddd',\n // U+EDB8 Clap\n kahnClap = '\\uedb8',\n // U+EDBA Double-snap\n kahnDoubleSnap = '\\uedba',\n // U+EDEB Double-wing\n kahnDoubleWing = '\\uedeb',\n // U+EDB2 Draw-step\n kahnDrawStep = '\\uedb2',\n // U+EDB3 Draw-tap\n kahnDrawTap = '\\uedb3',\n // U+EDCF Flam\n kahnFlam = '\\uedcf',\n // U+EDD5 Flap\n kahnFlap = '\\uedd5',\n // U+EDD7 Flap-step\n kahnFlapStep = '\\uedd7',\n // U+EDA9 Flat\n kahnFlat = '\\ueda9',\n // U+EDB0 Flea-hop\n kahnFleaHop = '\\uedb0',\n // U+EDB1 Flea-tap\n kahnFleaTap = '\\uedb1',\n // U+EDA8 Grace-tap\n kahnGraceTap = '\\ueda8',\n // U+EDD1 Grace-tap-change\n kahnGraceTapChange = '\\uedd1',\n // U+EDD0 Grace-tap-hop\n kahnGraceTapHop = '\\uedd0',\n // U+EDD3 Grace-tap-stamp\n kahnGraceTapStamp = '\\uedd3',\n // U+EDAA Heel\n kahnHeel = '\\uedaa',\n // U+EDC9 Heel-change\n kahnHeelChange = '\\uedc9',\n // U+EDBB Heel-click\n kahnHeelClick = '\\uedbb',\n // U+EDB6 Heel-drop\n kahnHeelDrop = '\\uedb6',\n // U+EDC4 Heel-step\n kahnHeelStep = '\\uedc4',\n // U+EDCB Heel-tap\n kahnHeelTap = '\\uedcb',\n // U+EDA2 Hop\n kahnHop = '\\ueda2',\n // U+EDA5 Jump-apart\n kahnJumpApart = '\\ueda5',\n // U+EDA4 Jump-together\n kahnJumpTogether = '\\ueda4',\n // U+EDAD Knee-inward\n kahnKneeInward = '\\uedad',\n // U+EDAC Knee-outward\n kahnKneeOutward = '\\uedac',\n // U+EDA3 Leap\n kahnLeap = '\\ueda3',\n // U+EDD2 Leap-flat-foot\n kahnLeapFlatFoot = '\\uedd2',\n // U+EDD4 Leap-heel-click\n kahnLeapHeelClick = '\\uedd4',\n // U+EDBF Left-catch\n kahnLeftCatch = '\\uedbf',\n // U+EDBD Left-cross\n kahnLeftCross = '\\uedbd',\n // U+EDEE Left-foot\n kahnLeftFoot = '\\uedee',\n // U+EDC1 Left-toe-strike\n kahnLeftToeStrike = '\\uedc1',\n // U+EDF0 Left-turn\n kahnLeftTurn = '\\uedf0',\n // U+EDEC Over-the-top\n kahnOverTheTop = '\\uedec',\n // U+EDED Over-the-top-tap\n kahnOverTheTopTap = '\\ueded',\n // U+EDE3 Pull\n kahnPull = '\\uede3',\n // U+EDDE Push\n kahnPush = '\\uedde',\n // U+EDE0 Riff\n kahnRiff = '\\uede0',\n // U+EDE7 Riffle\n kahnRiffle = '\\uede7',\n // U+EDC0 Right-catch\n kahnRightCatch = '\\uedc0',\n // U+EDBE Right-cross\n kahnRightCross = '\\uedbe',\n // U+EDEF Right-foot\n kahnRightFoot = '\\uedef',\n // U+EDC2 Right-toe-strike\n kahnRightToeStrike = '\\uedc2',\n // U+EDF1 Right-turn\n kahnRightTurn = '\\uedf1',\n // U+EDD6 Rip\n kahnRip = '\\uedd6',\n // U+EDE8 Ripple\n kahnRipple = '\\uede8',\n // U+EDAE Scrape\n kahnScrape = '\\uedae',\n // U+EDDC Scuff\n kahnScuff = '\\ueddc',\n // U+EDE6 Scuffle\n kahnScuffle = '\\uede6',\n // U+EDE5 Shuffle\n kahnShuffle = '\\uede5',\n // U+EDCE Slam\n kahnSlam = '\\uedce',\n // U+EDD9 Slap\n kahnSlap = '\\uedd9',\n // U+EDB4 Slide-step\n kahnSlideStep = '\\uedb4',\n // U+EDB5 Slide-tap\n kahnSlideTap = '\\uedb5',\n // U+EDB9 Snap\n kahnSnap = '\\uedb9',\n // U+EDC3 Stamp\n kahnStamp = '\\uedc3',\n // U+EDC8 Stamp-stamp\n kahnStampStamp = '\\uedc8',\n // U+EDA0 Step\n kahnStep = '\\ueda0',\n // U+EDC7 Step-stamp\n kahnStepStamp = '\\uedc7',\n // U+EDCA Stomp\n kahnStomp = '\\uedca',\n // U+EDDB Stomp-brush\n kahnStompBrush = '\\ueddb',\n // U+EDA1 Tap\n kahnTap = '\\ueda1',\n // U+EDAB Toe\n kahnToe = '\\uedab',\n // U+EDBC Toe-click\n kahnToeClick = '\\uedbc',\n // U+EDB7 Toe-drop\n kahnToeDrop = '\\uedb7',\n // U+EDC5 Toe-step\n kahnToeStep = '\\uedc5',\n // U+EDCC Toe-tap\n kahnToeTap = '\\uedcc',\n // U+EDAF Trench\n kahnTrench = '\\uedaf',\n // U+EDE9 Wing\n kahnWing = '\\uede9',\n // U+EDEA Wing-change\n kahnWingChange = '\\uedea',\n // U+EDE4 Zank\n kahnZank = '\\uede4',\n // U+EDDF Zink\n kahnZink = '\\ueddf',\n // U+E668 Clavichord bebung, 2 finger movements (above)\n keyboardBebung2DotsAbove = '\\ue668',\n // U+E669 Clavichord bebung, 2 finger movements (below)\n keyboardBebung2DotsBelow = '\\ue669',\n // U+E66A Clavichord bebung, 3 finger movements (above)\n keyboardBebung3DotsAbove = '\\ue66a',\n // U+E66B Clavichord bebung, 3 finger movements (below)\n keyboardBebung3DotsBelow = '\\ue66b',\n // U+E66C Clavichord bebung, 4 finger movements (above)\n keyboardBebung4DotsAbove = '\\ue66c',\n // U+E66D Clavichord bebung, 4 finger movements (below)\n keyboardBebung4DotsBelow = '\\ue66d',\n // U+E65E Left pedal pictogram\n keyboardLeftPedalPictogram = '\\ue65e',\n // U+E65F Middle pedal pictogram\n keyboardMiddlePedalPictogram = '\\ue65f',\n // U+E653 Pedal d\n keyboardPedalD = '\\ue653',\n // U+E654 Pedal dot\n keyboardPedalDot = '\\ue654',\n // U+E652 Pedal e\n keyboardPedalE = '\\ue652',\n // U+E656 Half-pedal mark\n keyboardPedalHalf = '\\ue656',\n // U+E65B Half pedal mark 1\n keyboardPedalHalf2 = '\\ue65b',\n // U+E65C Half pedal mark 2\n keyboardPedalHalf3 = '\\ue65c',\n // U+E661 Pedal heel 1\n keyboardPedalHeel1 = '\\ue661',\n // U+E662 Pedal heel 2\n keyboardPedalHeel2 = '\\ue662',\n // U+E663 Pedal heel 3 (Davis)\n keyboardPedalHeel3 = '\\ue663',\n // U+E674 Pedal heel to toe\n keyboardPedalHeelToToe = '\\ue674',\n // U+E666 Pedal heel or toe\n keyboardPedalHeelToe = '\\ue666',\n // U+E673 Pedal hook end\n keyboardPedalHookEnd = '\\ue673',\n // U+E672 Pedal hook start\n keyboardPedalHookStart = '\\ue672',\n // U+E658 Pedal hyphen\n keyboardPedalHyphen = '\\ue658',\n // U+E651 Pedal P\n keyboardPedalP = '\\ue651',\n // U+E676 Left parenthesis for pedal marking\n keyboardPedalParensLeft = '\\ue676',\n // U+E677 Right parenthesis for pedal marking\n keyboardPedalParensRight = '\\ue677',\n // U+E650 Pedal mark\n keyboardPedalPed = '\\ue650',\n // U+E65A Pedal S\n keyboardPedalS = '\\ue65a',\n // U+E659 Sostenuto pedal mark\n keyboardPedalSost = '\\ue659',\n // U+E664 Pedal toe 1\n keyboardPedalToe1 = '\\ue664',\n // U+E665 Pedal toe 2\n keyboardPedalToe2 = '\\ue665',\n // U+E675 Pedal toe to heel\n keyboardPedalToeToHeel = '\\ue675',\n // U+E655 Pedal up mark\n keyboardPedalUp = '\\ue655',\n // U+E657 Pedal up notch\n keyboardPedalUpNotch = '\\ue657',\n // U+E65D Pedal up special\n keyboardPedalUpSpecial = '\\ue65d',\n // U+E670 Play with left hand\n keyboardPlayWithLH = '\\ue670',\n // U+E671 Play with left hand (end)\n keyboardPlayWithLHEnd = '\\ue671',\n // U+E66E Play with right hand\n keyboardPlayWithRH = '\\ue66e',\n // U+E66F Play with right hand (end)\n keyboardPlayWithRHEnd = '\\ue66f',\n // U+E667 Pluck strings inside piano (Maderna)\n keyboardPluckInside = '\\ue667',\n // U+E660 Right pedal pictogram\n keyboardRightPedalPictogram = '\\ue660',\n // U+EC3E Kievan flat\n kievanAccidentalFlat = '\\uec3e',\n // U+EC3D Kievan sharp\n kievanAccidentalSharp = '\\uec3d',\n // U+EC3C Kievan augmentation dot\n kievanAugmentationDot = '\\uec3c',\n // U+EC30 Kievan C clef (tse-fa-ut)\n kievanCClef = '\\uec30',\n // U+EC31 Kievan ending symbol\n kievanEndingSymbol = '\\uec31',\n // U+EC3A Kievan eighth note, stem down\n kievanNote8thStemDown = '\\uec3a',\n // U+EC39 Kievan eighth note, stem up\n kievanNote8thStemUp = '\\uec39',\n // U+EC3B Kievan beam\n kievanNoteBeam = '\\uec3b',\n // U+EC35 Kievan half note (on staff line)\n kievanNoteHalfStaffLine = '\\uec35',\n // U+EC36 Kievan half note (in staff space)\n kievanNoteHalfStaffSpace = '\\uec36',\n // U+EC38 Kievan quarter note, stem down\n kievanNoteQuarterStemDown = '\\uec38',\n // U+EC37 Kievan quarter note, stem up\n kievanNoteQuarterStemUp = '\\uec37',\n // U+EC32 Kievan reciting note\n kievanNoteReciting = '\\uec32',\n // U+EC33 Kievan whole note\n kievanNoteWhole = '\\uec33',\n // U+EC34 Kievan final whole note\n kievanNoteWholeFinal = '\\uec34',\n // U+EC40 Do hand sign\n kodalyHandDo = '\\uec40',\n // U+EC43 Fa hand sign\n kodalyHandFa = '\\uec43',\n // U+EC45 La hand sign\n kodalyHandLa = '\\uec45',\n // U+EC42 Mi hand sign\n kodalyHandMi = '\\uec42',\n // U+EC41 Re hand sign\n kodalyHandRe = '\\uec41',\n // U+EC44 So hand sign\n kodalyHandSo = '\\uec44',\n // U+EC46 Ti hand sign\n kodalyHandTi = '\\uec46',\n // U+E04C Left repeat sign within bar\n leftRepeatSmall = '\\ue04c',\n // U+E022 Leger line\n legerLine = '\\ue022',\n // U+E024 Leger line (narrow)\n legerLineNarrow = '\\ue024',\n // U+E023 Leger line (wide)\n legerLineWide = '\\ue023',\n // U+EBA4 Lute tablature end repeat barline\n luteBarlineEndRepeat = '\\ueba4',\n // U+EBA5 Lute tablature final barline\n luteBarlineFinal = '\\ueba5',\n // U+EBA3 Lute tablature start repeat barline\n luteBarlineStartRepeat = '\\ueba3',\n // U+EBAB 16th note (semiquaver) duration sign\n luteDuration16th = '\\uebab',\n // U+EBAC 32nd note (demisemiquaver) duration sign\n luteDuration32nd = '\\uebac',\n // U+EBAA Eighth note (quaver) duration sign\n luteDuration8th = '\\uebaa',\n // U+EBA6 Double whole note (breve) duration sign\n luteDurationDoubleWhole = '\\ueba6',\n // U+EBA8 Half note (minim) duration sign\n luteDurationHalf = '\\ueba8',\n // U+EBA9 Quarter note (crotchet) duration sign\n luteDurationQuarter = '\\ueba9',\n // U+EBA7 Whole note (semibreve) duration sign\n luteDurationWhole = '\\ueba7',\n // U+EBAE Right-hand fingering, first finger\n luteFingeringRHFirst = '\\uebae',\n // U+EBAF Right-hand fingering, second finger\n luteFingeringRHSecond = '\\uebaf',\n // U+EBB0 Right-hand fingering, third finger\n luteFingeringRHThird = '\\uebb0',\n // U+EBAD Right-hand fingering, thumb\n luteFingeringRHThumb = '\\uebad',\n // U+EBD0 10th course (diapason)\n luteFrench10thCourse = '\\uebd0',\n // U+EBCD Seventh course (diapason)\n luteFrench7thCourse = '\\uebcd',\n // U+EBCE Eighth course (diapason)\n luteFrench8thCourse = '\\uebce',\n // U+EBCF Ninth course (diapason)\n luteFrench9thCourse = '\\uebcf',\n // U+EBD5 Appoggiatura from above\n luteFrenchAppoggiaturaAbove = '\\uebd5',\n // U+EBD4 Appoggiatura from below\n luteFrenchAppoggiaturaBelow = '\\uebd4',\n // U+EBC0 Open string (a)\n luteFrenchFretA = '\\uebc0',\n // U+EBC1 First fret (b)\n luteFrenchFretB = '\\uebc1',\n // U+EBC2 Second fret (c)\n luteFrenchFretC = '\\uebc2',\n // U+EBC3 Third fret (d)\n luteFrenchFretD = '\\uebc3',\n // U+EBC4 Fourth fret (e)\n luteFrenchFretE = '\\uebc4',\n // U+EBC5 Fifth fret (f)\n luteFrenchFretF = '\\uebc5',\n // U+EBC6 Sixth fret (g)\n luteFrenchFretG = '\\uebc6',\n // U+EBC7 Seventh fret (h)\n luteFrenchFretH = '\\uebc7',\n // U+EBC8 Eighth fret (i)\n luteFrenchFretI = '\\uebc8',\n // U+EBC9 Ninth fret (k)\n luteFrenchFretK = '\\uebc9',\n // U+EBCA 10th fret (l)\n luteFrenchFretL = '\\uebca',\n // U+EBCB 11th fret (m)\n luteFrenchFretM = '\\uebcb',\n // U+EBCC 12th fret (n)\n luteFrenchFretN = '\\uebcc',\n // U+EBD3 Inverted mordent\n luteFrenchMordentInverted = '\\uebd3',\n // U+EBD2 Mordent with lower auxiliary\n luteFrenchMordentLower = '\\uebd2',\n // U+EBD1 Mordent with upper auxiliary\n luteFrenchMordentUpper = '\\uebd1',\n // U+EC00 5th course, 1st fret (a)\n luteGermanALower = '\\uec00',\n // U+EC17 6th course, 1st fret (A)\n luteGermanAUpper = '\\uec17',\n // U+EC01 4th course, 1st fret (b)\n luteGermanBLower = '\\uec01',\n // U+EC18 6th course, 2nd fret (B)\n luteGermanBUpper = '\\uec18',\n // U+EC02 3rd course, 1st fret (c)\n luteGermanCLower = '\\uec02',\n // U+EC19 6th course, 3rd fret (C)\n luteGermanCUpper = '\\uec19',\n // U+EC03 2nd course, 1st fret (d)\n luteGermanDLower = '\\uec03',\n // U+EC1A 6th course, 4th fret (D)\n luteGermanDUpper = '\\uec1a',\n // U+EC04 1st course, 1st fret (e)\n luteGermanELower = '\\uec04',\n // U+EC1B 6th course, 5th fret (E)\n luteGermanEUpper = '\\uec1b',\n // U+EC05 5th course, 2nd fret (f)\n luteGermanFLower = '\\uec05',\n // U+EC1C 6th course, 6th fret (F)\n luteGermanFUpper = '\\uec1c',\n // U+EC06 4th course, 2nd fret (g)\n luteGermanGLower = '\\uec06',\n // U+EC1D 6th course, 7th fret (G)\n luteGermanGUpper = '\\uec1d',\n // U+EC07 3rd course, 2nd fret (h)\n luteGermanHLower = '\\uec07',\n // U+EC1E 6th course, 8th fret (H)\n luteGermanHUpper = '\\uec1e',\n // U+EC08 2nd course, 2nd fret (i)\n luteGermanILower = '\\uec08',\n // U+EC1F 6th course, 9th fret (I)\n luteGermanIUpper = '\\uec1f',\n // U+EC09 1st course, 2nd fret (k)\n luteGermanKLower = '\\uec09',\n // U+EC20 6th course, 10th fret (K)\n luteGermanKUpper = '\\uec20',\n // U+EC0A 5th course, 3rd fret (l)\n luteGermanLLower = '\\uec0a',\n // U+EC21 6th course, 11th fret (L)\n luteGermanLUpper = '\\uec21',\n // U+EC0B 4th course, 3rd fret (m)\n luteGermanMLower = '\\uec0b',\n // U+EC22 6th course, 12th fret (M)\n luteGermanMUpper = '\\uec22',\n // U+EC0C 3rd course, 3rd fret (n)\n luteGermanNLower = '\\uec0c',\n // U+EC23 6th course, 13th fret (N)\n luteGermanNUpper = '\\uec23',\n // U+EC0D 2nd course, 3rd fret (o)\n luteGermanOLower = '\\uec0d',\n // U+EC0E 1st course, 3rd fret (p)\n luteGermanPLower = '\\uec0e',\n // U+EC0F 5th course, 4th fret (q)\n luteGermanQLower = '\\uec0f',\n // U+EC10 4th course, 4th fret (r)\n luteGermanRLower = '\\uec10',\n // U+EC11 3rd course, 4th fret (s)\n luteGermanSLower = '\\uec11',\n // U+EC12 2nd course, 4th fret (t)\n luteGermanTLower = '\\uec12',\n // U+EC13 1st course, 4th fret (v)\n luteGermanVLower = '\\uec13',\n // U+EC14 5th course, 5th fret (x)\n luteGermanXLower = '\\uec14',\n // U+EC15 4th course, 5th fret (y)\n luteGermanYLower = '\\uec15',\n // U+EC16 3rd course, 5th fret (z)\n luteGermanZLower = '\\uec16',\n // U+EBF1 C sol fa ut clef\n luteItalianClefCSolFaUt = '\\uebf1',\n // U+EBF0 F fa ut clef\n luteItalianClefFFaUt = '\\uebf0',\n // U+EBE0 Open string (0)\n luteItalianFret0 = '\\uebe0',\n // U+EBE1 First fret (1)\n luteItalianFret1 = '\\uebe1',\n // U+EBE2 Second fret (2)\n luteItalianFret2 = '\\uebe2',\n // U+EBE3 Third fret (3)\n luteItalianFret3 = '\\uebe3',\n // U+EBE4 Fourth fret (4)\n luteItalianFret4 = '\\uebe4',\n // U+EBE5 Fifth fret (5)\n luteItalianFret5 = '\\uebe5',\n // U+EBE6 Sixth fret (6)\n luteItalianFret6 = '\\uebe6',\n // U+EBE7 Seventh fret (7)\n luteItalianFret7 = '\\uebe7',\n // U+EBE8 Eighth fret (8)\n luteItalianFret8 = '\\uebe8',\n // U+EBE9 Ninth fret (9)\n luteItalianFret9 = '\\uebe9',\n // U+EBF4 Hold finger in place\n luteItalianHoldFinger = '\\uebf4',\n // U+EBF3 Hold note\n luteItalianHoldNote = '\\uebf3',\n // U+EBF5 Release finger\n luteItalianReleaseFinger = '\\uebf5',\n // U+EBEA Fast tempo indication (de Mudarra)\n luteItalianTempoFast = '\\uebea',\n // U+EBEC Neither fast nor slow tempo indication (de Mudarra)\n luteItalianTempoNeitherFastNorSlow = '\\uebec',\n // U+EBED Slow tempo indication (de Mudarra)\n luteItalianTempoSlow = '\\uebed',\n // U+EBEB Somewhat fast tempo indication (de Narvaez)\n luteItalianTempoSomewhatFast = '\\uebeb',\n // U+EBEE Very slow indication (de Narvaez)\n luteItalianTempoVerySlow = '\\uebee',\n // U+EBEF Triple time indication\n luteItalianTimeTriple = '\\uebef',\n // U+EBF2 Single-finger tremolo or mordent\n luteItalianTremolo = '\\uebf2',\n // U+EBF6 Vibrato (verre cassé)\n luteItalianVibrato = '\\uebf6',\n // U+EBA0 Lute tablature staff, 6 courses\n luteStaff6Lines = '\\ueba0',\n // U+EBA2 Lute tablature staff, 6 courses (narrow)\n luteStaff6LinesNarrow = '\\ueba2',\n // U+EBA1 Lute tablature staff, 6 courses (wide)\n luteStaff6LinesWide = '\\ueba1',\n // U+E551 Elision\n lyricsElision = '\\ue551',\n // U+E550 Narrow elision\n lyricsElisionNarrow = '\\ue550',\n // U+E552 Wide elision\n lyricsElisionWide = '\\ue552',\n // U+E553 Baseline hyphen\n lyricsHyphenBaseline = '\\ue553',\n // U+E554 Non-breaking baseline hyphen\n lyricsHyphenBaselineNonBreaking = '\\ue554',\n // U+E555 Text repeats\n lyricsTextRepeat = '\\ue555',\n // U+E9E1 Flat, hard b (mi)\n medRenFlatHardB = '\\ue9e1',\n // U+E9E0 Flat, soft b (fa)\n medRenFlatSoftB = '\\ue9e0',\n // U+E9E4 Flat with dot\n medRenFlatWithDot = '\\ue9e4',\n // U+EA24 G clef (Corpus Monodicum)\n medRenGClefCMN = '\\uea24',\n // U+EA22 Liquescence\n medRenLiquescenceCMN = '\\uea22',\n // U+EA26 Liquescent ascending (Corpus Monodicum)\n medRenLiquescentAscCMN = '\\uea26',\n // U+EA27 Liquescent descending (Corpus Monodicum)\n medRenLiquescentDescCMN = '\\uea27',\n // U+E9E2 Natural\n medRenNatural = '\\ue9e2',\n // U+E9E5 Natural with interrupted cross\n medRenNaturalWithCross = '\\ue9e5',\n // U+EA2A Oriscus (Corpus Monodicum)\n medRenOriscusCMN = '\\uea2a',\n // U+EA23 Plica\n medRenPlicaCMN = '\\uea23',\n // U+EA25 Punctum (Corpus Monodicum)\n medRenPunctumCMN = '\\uea25',\n // U+EA28 Quilisma (Corpus Monodicum)\n medRenQuilismaCMN = '\\uea28',\n // U+E9E3 Croix\n medRenSharpCroix = '\\ue9e3',\n // U+EA29 Strophicus (Corpus Monodicum)\n medRenStrophicusCMN = '\\uea29',\n // U+EA10 Alteration sign\n mensuralAlterationSign = '\\uea10',\n // U+E952 Black mensural brevis\n mensuralBlackBrevis = '\\ue952',\n // U+E956 Black mensural void brevis\n mensuralBlackBrevisVoid = '\\ue956',\n // U+E95A Black mensural dragma\n mensuralBlackDragma = '\\ue95a',\n // U+E951 Black mensural longa\n mensuralBlackLonga = '\\ue951',\n // U+E950 Black mensural maxima\n mensuralBlackMaxima = '\\ue950',\n // U+E954 Black mensural minima\n mensuralBlackMinima = '\\ue954',\n // U+E958 Black mensural void minima\n mensuralBlackMinimaVoid = '\\ue958',\n // U+E953 Black mensural semibrevis\n mensuralBlackSemibrevis = '\\ue953',\n // U+E959 Black mensural semibrevis caudata\n mensuralBlackSemibrevisCaudata = '\\ue959',\n // U+E95B Black mensural oblique semibrevis\n mensuralBlackSemibrevisOblique = '\\ue95b',\n // U+E957 Black mensural void semibrevis\n mensuralBlackSemibrevisVoid = '\\ue957',\n // U+E955 Black mensural semiminima\n mensuralBlackSemiminima = '\\ue955',\n // U+E905 Mensural C clef\n mensuralCclef = '\\ue905',\n // U+E90A Petrucci C clef, high position\n mensuralCclefPetrucciPosHigh = '\\ue90a',\n // U+E90B Petrucci C clef, highest position\n mensuralCclefPetrucciPosHighest = '\\ue90b',\n // U+E908 Petrucci C clef, low position\n mensuralCclefPetrucciPosLow = '\\ue908',\n // U+E907 Petrucci C clef, lowest position\n mensuralCclefPetrucciPosLowest = '\\ue907',\n // U+E909 Petrucci C clef, middle position\n mensuralCclefPetrucciPosMiddle = '\\ue909',\n // U+EA0F Coloration end, round\n mensuralColorationEndRound = '\\uea0f',\n // U+EA0D Coloration end, square\n mensuralColorationEndSquare = '\\uea0d',\n // U+EA0E Coloration start, round\n mensuralColorationStartRound = '\\uea0e',\n // U+EA0C Coloration start, square\n mensuralColorationStartSquare = '\\uea0c',\n // U+E940 Combining stem diagonal\n mensuralCombStemDiagonal = '\\ue940',\n // U+E93F Combining stem down\n mensuralCombStemDown = '\\ue93f',\n // U+E948 Combining stem with extended flag down\n mensuralCombStemDownFlagExtended = '\\ue948',\n // U+E946 Combining stem with flared flag down\n mensuralCombStemDownFlagFlared = '\\ue946',\n // U+E94C Combining stem with fusa flag down\n mensuralCombStemDownFlagFusa = '\\ue94c',\n // U+E944 Combining stem with flag left down\n mensuralCombStemDownFlagLeft = '\\ue944',\n // U+E942 Combining stem with flag right down\n mensuralCombStemDownFlagRight = '\\ue942',\n // U+E94A Combining stem with semiminima flag down\n mensuralCombStemDownFlagSemiminima = '\\ue94a',\n // U+E93E Combining stem up\n mensuralCombStemUp = '\\ue93e',\n // U+E947 Combining stem with extended flag up\n mensuralCombStemUpFlagExtended = '\\ue947',\n // U+E945 Combining stem with flared flag up\n mensuralCombStemUpFlagFlared = '\\ue945',\n // U+E94B Combining stem with fusa flag up\n mensuralCombStemUpFlagFusa = '\\ue94b',\n // U+E943 Combining stem with flag left up\n mensuralCombStemUpFlagLeft = '\\ue943',\n // U+E941 Combining stem with flag right up\n mensuralCombStemUpFlagRight = '\\ue941',\n // U+E949 Combining stem with semiminima flag up\n mensuralCombStemUpFlagSemiminima = '\\ue949',\n // U+EA0A Checkmark custos\n mensuralCustosCheckmark = '\\uea0a',\n // U+EA03 Mensural custos down\n mensuralCustosDown = '\\uea03',\n // U+EA0B Turn-like custos\n mensuralCustosTurn = '\\uea0b',\n // U+EA02 Mensural custos up\n mensuralCustosUp = '\\uea02',\n // U+E903 Mensural F clef\n mensuralFclef = '\\ue903',\n // U+E904 Petrucci F clef\n mensuralFclefPetrucci = '\\ue904',\n // U+E900 Mensural G clef\n mensuralGclef = '\\ue900',\n // U+E901 Petrucci G clef\n mensuralGclefPetrucci = '\\ue901',\n // U+E92D Modus imperfectum, vertical\n mensuralModusImperfectumVert = '\\ue92d',\n // U+E92C Modus perfectum, vertical\n mensuralModusPerfectumVert = '\\ue92c',\n // U+E934 Longa/brevis notehead, black\n mensuralNoteheadLongaBlack = '\\ue934',\n // U+E936 Longa/brevis notehead, black and void\n mensuralNoteheadLongaBlackVoid = '\\ue936',\n // U+E935 Longa/brevis notehead, void\n mensuralNoteheadLongaVoid = '\\ue935',\n // U+E937 Longa/brevis notehead, white\n mensuralNoteheadLongaWhite = '\\ue937',\n // U+E930 Maxima notehead, black\n mensuralNoteheadMaximaBlack = '\\ue930',\n // U+E932 Maxima notehead, black and void\n mensuralNoteheadMaximaBlackVoid = '\\ue932',\n // U+E931 Maxima notehead, void\n mensuralNoteheadMaximaVoid = '\\ue931',\n // U+E933 Maxima notehead, white\n mensuralNoteheadMaximaWhite = '\\ue933',\n // U+E93C Minima notehead, white\n mensuralNoteheadMinimaWhite = '\\ue93c',\n // U+E938 Semibrevis notehead, black\n mensuralNoteheadSemibrevisBlack = '\\ue938',\n // U+E93A Semibrevis notehead, black and void\n mensuralNoteheadSemibrevisBlackVoid = '\\ue93a',\n // U+E93B Semibrevis notehead, black and void (turned)\n mensuralNoteheadSemibrevisBlackVoidTurned = '\\ue93b',\n // U+E939 Semibrevis notehead, void\n mensuralNoteheadSemibrevisVoid = '\\ue939',\n // U+E93D Semiminima/fusa notehead, white\n mensuralNoteheadSemiminimaWhite = '\\ue93d',\n // U+E970 Oblique form, ascending 2nd, black\n mensuralObliqueAsc2ndBlack = '\\ue970',\n // U+E972 Oblique form, ascending 2nd, black and void\n mensuralObliqueAsc2ndBlackVoid = '\\ue972',\n // U+E971 Oblique form, ascending 2nd, void\n mensuralObliqueAsc2ndVoid = '\\ue971',\n // U+E973 Oblique form, ascending 2nd, white\n mensuralObliqueAsc2ndWhite = '\\ue973',\n // U+E974 Oblique form, ascending 3rd, black\n mensuralObliqueAsc3rdBlack = '\\ue974',\n // U+E976 Oblique form, ascending 3rd, black and void\n mensuralObliqueAsc3rdBlackVoid = '\\ue976',\n // U+E975 Oblique form, ascending 3rd, void\n mensuralObliqueAsc3rdVoid = '\\ue975',\n // U+E977 Oblique form, ascending 3rd, white\n mensuralObliqueAsc3rdWhite = '\\ue977',\n // U+E978 Oblique form, ascending 4th, black\n mensuralObliqueAsc4thBlack = '\\ue978',\n // U+E97A Oblique form, ascending 4th, black and void\n mensuralObliqueAsc4thBlackVoid = '\\ue97a',\n // U+E979 Oblique form, ascending 4th, void\n mensuralObliqueAsc4thVoid = '\\ue979',\n // U+E97B Oblique form, ascending 4th, white\n mensuralObliqueAsc4thWhite = '\\ue97b',\n // U+E97C Oblique form, ascending 5th, black\n mensuralObliqueAsc5thBlack = '\\ue97c',\n // U+E97E Oblique form, ascending 5th, black and void\n mensuralObliqueAsc5thBlackVoid = '\\ue97e',\n // U+E97D Oblique form, ascending 5th, void\n mensuralObliqueAsc5thVoid = '\\ue97d',\n // U+E97F Oblique form, ascending 5th, white\n mensuralObliqueAsc5thWhite = '\\ue97f',\n // U+E980 Oblique form, descending 2nd, black\n mensuralObliqueDesc2ndBlack = '\\ue980',\n // U+E982 Oblique form, descending 2nd, black and void\n mensuralObliqueDesc2ndBlackVoid = '\\ue982',\n // U+E981 Oblique form, descending 2nd, void\n mensuralObliqueDesc2ndVoid = '\\ue981',\n // U+E983 Oblique form, descending 2nd, white\n mensuralObliqueDesc2ndWhite = '\\ue983',\n // U+E984 Oblique form, descending 3rd, black\n mensuralObliqueDesc3rdBlack = '\\ue984',\n // U+E986 Oblique form, descending 3rd, black and void\n mensuralObliqueDesc3rdBlackVoid = '\\ue986',\n // U+E985 Oblique form, descending 3rd, void\n mensuralObliqueDesc3rdVoid = '\\ue985',\n // U+E987 Oblique form, descending 3rd, white\n mensuralObliqueDesc3rdWhite = '\\ue987',\n // U+E988 Oblique form, descending 4th, black\n mensuralObliqueDesc4thBlack = '\\ue988',\n // U+E98A Oblique form, descending 4th, black and void\n mensuralObliqueDesc4thBlackVoid = '\\ue98a',\n // U+E989 Oblique form, descending 4th, void\n mensuralObliqueDesc4thVoid = '\\ue989',\n // U+E98B Oblique form, descending 4th, white\n mensuralObliqueDesc4thWhite = '\\ue98b',\n // U+E98C Oblique form, descending 5th, black\n mensuralObliqueDesc5thBlack = '\\ue98c',\n // U+E98E Oblique form, descending 5th, black and void\n mensuralObliqueDesc5thBlackVoid = '\\ue98e',\n // U+E98D Oblique form, descending 5th, void\n mensuralObliqueDesc5thVoid = '\\ue98d',\n // U+E98F Oblique form, descending 5th, white\n mensuralObliqueDesc5thWhite = '\\ue98f',\n // U+E910 Tempus perfectum cum prolatione perfecta (9/8)\n mensuralProlation1 = '\\ue910',\n // U+E919 Tempus imperfectum cum prolatione imperfecta diminution 4\n mensuralProlation10 = '\\ue919',\n // U+E91A Tempus imperfectum cum prolatione imperfecta diminution 5\n mensuralProlation11 = '\\ue91a',\n // U+E911 Tempus perfectum cum prolatione imperfecta (3/4)\n mensuralProlation2 = '\\ue911',\n // U+E912 Tempus perfectum cum prolatione imperfecta diminution 1 (3/8)\n mensuralProlation3 = '\\ue912',\n // U+E913 Tempus perfectum cum prolatione perfecta diminution 2 (9/16)\n mensuralProlation4 = '\\ue913',\n // U+E914 Tempus imperfectum cum prolatione perfecta (6/8)\n mensuralProlation5 = '\\ue914',\n // U+E915 Tempus imperfectum cum prolatione imperfecta (2/4)\n mensuralProlation6 = '\\ue915',\n // U+E916 Tempus imperfectum cum prolatione imperfecta diminution 1 (2/2)\n mensuralProlation7 = '\\ue916',\n // U+E917 Tempus imperfectum cum prolatione imperfecta diminution 2 (6/16)\n mensuralProlation8 = '\\ue917',\n // U+E918 Tempus imperfectum cum prolatione imperfecta diminution 3 (2/2)\n mensuralProlation9 = '\\ue918',\n // U+E920 Combining dot\n mensuralProlationCombiningDot = '\\ue920',\n // U+E924 Combining void dot\n mensuralProlationCombiningDotVoid = '\\ue924',\n // U+E925 Combining vertical stroke\n mensuralProlationCombiningStroke = '\\ue925',\n // U+E922 Combining three dots horizontal\n mensuralProlationCombiningThreeDots = '\\ue922',\n // U+E923 Combining three dots triangular\n mensuralProlationCombiningThreeDotsTri = '\\ue923',\n // U+E921 Combining two dots\n mensuralProlationCombiningTwoDots = '\\ue921',\n // U+E926 Mensural proportion 1\n mensuralProportion1 = '\\ue926',\n // U+E927 Mensural proportion 2\n mensuralProportion2 = '\\ue927',\n // U+E928 Mensural proportion 3\n mensuralProportion3 = '\\ue928',\n // U+E929 Mensural proportion 4\n mensuralProportion4 = '\\ue929',\n // U+EE90 Mensural proportion 5\n mensuralProportion5 = '\\uee90',\n // U+EE91 Mensural proportion 6\n mensuralProportion6 = '\\uee91',\n // U+EE92 Mensural proportion 7\n mensuralProportion7 = '\\uee92',\n // U+EE93 Mensural proportion 8\n mensuralProportion8 = '\\uee93',\n // U+EE94 Mensural proportion 9\n mensuralProportion9 = '\\uee94',\n // U+E92B Mensural proportion major\n mensuralProportionMajor = '\\ue92b',\n // U+E92A Mensural proportion minor\n mensuralProportionMinor = '\\ue92a',\n // U+E91C Proportio dupla 1\n mensuralProportionProportioDupla1 = '\\ue91c',\n // U+E91D Proportio dupla 2\n mensuralProportionProportioDupla2 = '\\ue91d',\n // U+E91F Proportio quadrupla\n mensuralProportionProportioQuadrupla = '\\ue91f',\n // U+E91E Proportio tripla\n mensuralProportionProportioTripla = '\\ue91e',\n // U+E91B Tempus perfectum\n mensuralProportionTempusPerfectum = '\\ue91b',\n // U+E9F3 Brevis rest\n mensuralRestBrevis = '\\ue9f3',\n // U+E9F7 Fusa rest\n mensuralRestFusa = '\\ue9f7',\n // U+E9F2 Longa imperfecta rest\n mensuralRestLongaImperfecta = '\\ue9f2',\n // U+E9F1 Longa perfecta rest\n mensuralRestLongaPerfecta = '\\ue9f1',\n // U+E9F0 Maxima rest\n mensuralRestMaxima = '\\ue9f0',\n // U+E9F5 Minima rest\n mensuralRestMinima = '\\ue9f5',\n // U+E9F4 Semibrevis rest\n mensuralRestSemibrevis = '\\ue9f4',\n // U+E9F8 Semifusa rest\n mensuralRestSemifusa = '\\ue9f8',\n // U+E9F6 Semiminima rest\n mensuralRestSemiminima = '\\ue9f6',\n // U+EA01 Signum congruentiae down\n mensuralSignumDown = '\\uea01',\n // U+EA00 Signum congruentiae up\n mensuralSignumUp = '\\uea00',\n // U+E92F Tempus imperfectum, horizontal\n mensuralTempusImperfectumHoriz = '\\ue92f',\n // U+E92E Tempus perfectum, horizontal\n mensuralTempusPerfectumHoriz = '\\ue92e',\n // U+E95E White mensural brevis\n mensuralWhiteBrevis = '\\ue95e',\n // U+E961 White mensural fusa\n mensuralWhiteFusa = '\\ue961',\n // U+E95D White mensural longa\n mensuralWhiteLonga = '\\ue95d',\n // U+E95C White mensural maxima\n mensuralWhiteMaxima = '\\ue95c',\n // U+E95F White mensural minima\n mensuralWhiteMinima = '\\ue95f',\n // U+E962 White mensural semibrevis\n mensuralWhiteSemibrevis = '\\ue962',\n // U+E960 White mensural semiminima\n mensuralWhiteSemiminima = '\\ue960',\n // U+ECB7 Augmentation dot\n metAugmentationDot = '\\uecb7',\n // U+ECB6 1024th note (semihemidemisemihemidemisemiquaver) stem down\n metNote1024thDown = '\\uecb6',\n // U+ECB5 1024th note (semihemidemisemihemidemisemiquaver) stem up\n metNote1024thUp = '\\uecb5',\n // U+ECB0 128th note (semihemidemisemiquaver) stem down\n metNote128thDown = '\\uecb0',\n // U+ECAF 128th note (semihemidemisemiquaver) stem up\n metNote128thUp = '\\uecaf',\n // U+ECAA 16th note (semiquaver) stem down\n metNote16thDown = '\\uecaa',\n // U+ECA9 16th note (semiquaver) stem up\n metNote16thUp = '\\ueca9',\n // U+ECB2 256th note (demisemihemidemisemiquaver) stem down\n metNote256thDown = '\\uecb2',\n // U+ECB1 256th note (demisemihemidemisemiquaver) stem up\n metNote256thUp = '\\uecb1',\n // U+ECAC 32nd note (demisemiquaver) stem down\n metNote32ndDown = '\\uecac',\n // U+ECAB 32nd note (demisemiquaver) stem up\n metNote32ndUp = '\\uecab',\n // U+ECB4 512th note (hemidemisemihemidemisemiquaver) stem down\n metNote512thDown = '\\uecb4',\n // U+ECB3 512th note (hemidemisemihemidemisemiquaver) stem up\n metNote512thUp = '\\uecb3',\n // U+ECAE 64th note (hemidemisemiquaver) stem down\n metNote64thDown = '\\uecae',\n // U+ECAD 64th note (hemidemisemiquaver) stem up\n metNote64thUp = '\\uecad',\n // U+ECA8 Eighth note (quaver) stem down\n metNote8thDown = '\\ueca8',\n // U+ECA7 Eighth note (quaver) stem up\n metNote8thUp = '\\ueca7',\n // U+ECA0 Double whole note (breve)\n metNoteDoubleWhole = '\\ueca0',\n // U+ECA1 Double whole note (square)\n metNoteDoubleWholeSquare = '\\ueca1',\n // U+ECA4 Half note (minim) stem down\n metNoteHalfDown = '\\ueca4',\n // U+ECA3 Half note (minim) stem up\n metNoteHalfUp = '\\ueca3',\n // U+ECA6 Quarter note (crotchet) stem down\n metNoteQuarterDown = '\\ueca6',\n // U+ECA5 Quarter note (crotchet) stem up\n metNoteQuarterUp = '\\ueca5',\n // U+ECA2 Whole note (semibreve)\n metNoteWhole = '\\ueca2',\n // U+EC63 Left-pointing arrow for metric modulation\n metricModulationArrowLeft = '\\uec63',\n // U+EC64 Right-pointing arrow for metric modulation\n metricModulationArrowRight = '\\uec64',\n // U+EC61 Do not copy\n miscDoNotCopy = '\\uec61',\n // U+EC60 Do not photocopy\n miscDoNotPhotocopy = '\\uec60',\n // U+EC62 Eyeglasses\n miscEyeglasses = '\\uec62',\n // U+E1E6 1024th note (semihemidemisemihemidemisemiquaver) stem down\n note1024thDown = '\\ue1e6',\n // U+E1E5 1024th note (semihemidemisemihemidemisemiquaver) stem up\n note1024thUp = '\\ue1e5',\n // U+E1E0 128th note (semihemidemisemiquaver) stem down\n note128thDown = '\\ue1e0',\n // U+E1DF 128th note (semihemidemisemiquaver) stem up\n note128thUp = '\\ue1df',\n // U+E1DA 16th note (semiquaver) stem down\n note16thDown = '\\ue1da',\n // U+E1D9 16th note (semiquaver) stem up\n note16thUp = '\\ue1d9',\n // U+E1E2 256th note (demisemihemidemisemiquaver) stem down\n note256thDown = '\\ue1e2',\n // U+E1E1 256th note (demisemihemidemisemiquaver) stem up\n note256thUp = '\\ue1e1',\n // U+E1DC 32nd note (demisemiquaver) stem down\n note32ndDown = '\\ue1dc',\n // U+E1DB 32nd note (demisemiquaver) stem up\n note32ndUp = '\\ue1db',\n // U+E1E4 512th note (hemidemisemihemidemisemiquaver) stem down\n note512thDown = '\\ue1e4',\n // U+E1E3 512th note (hemidemisemihemidemisemiquaver) stem up\n note512thUp = '\\ue1e3',\n // U+E1DE 64th note (hemidemisemiquaver) stem down\n note64thDown = '\\ue1de',\n // U+E1DD 64th note (hemidemisemiquaver) stem up\n note64thUp = '\\ue1dd',\n // U+E1D8 Eighth note (quaver) stem down\n note8thDown = '\\ue1d8',\n // U+E1D7 Eighth note (quaver) stem up\n note8thUp = '\\ue1d7',\n // U+E197 A (black note)\n noteABlack = '\\ue197',\n // U+E196 A flat (black note)\n noteAFlatBlack = '\\ue196',\n // U+E17F A flat (half note)\n noteAFlatHalf = '\\ue17f',\n // U+E168 A flat (whole note)\n noteAFlatWhole = '\\ue168',\n // U+E180 A (half note)\n noteAHalf = '\\ue180',\n // U+E198 A sharp (black note)\n noteASharpBlack = '\\ue198',\n // U+E181 A sharp (half note)\n noteASharpHalf = '\\ue181',\n // U+E16A A sharp (whole note)\n noteASharpWhole = '\\ue16a',\n // U+E169 A (whole note)\n noteAWhole = '\\ue169',\n // U+E19A B (black note)\n noteBBlack = '\\ue19a',\n // U+E199 B flat (black note)\n noteBFlatBlack = '\\ue199',\n // U+E182 B flat (half note)\n noteBFlatHalf = '\\ue182',\n // U+E16B B flat (whole note)\n noteBFlatWhole = '\\ue16b',\n // U+E183 B (half note)\n noteBHalf = '\\ue183',\n // U+E19B B sharp (black note)\n noteBSharpBlack = '\\ue19b',\n // U+E184 B sharp (half note)\n noteBSharpHalf = '\\ue184',\n // U+E16D B sharp (whole note)\n noteBSharpWhole = '\\ue16d',\n // U+E16C B (whole note)\n noteBWhole = '\\ue16c',\n // U+E19D C (black note)\n noteCBlack = '\\ue19d',\n // U+E19C C flat (black note)\n noteCFlatBlack = '\\ue19c',\n // U+E185 C flat (half note)\n noteCFlatHalf = '\\ue185',\n // U+E16E C flat (whole note)\n noteCFlatWhole = '\\ue16e',\n // U+E186 C (half note)\n noteCHalf = '\\ue186',\n // U+E19E C sharp (black note)\n noteCSharpBlack = '\\ue19e',\n // U+E187 C sharp (half note)\n noteCSharpHalf = '\\ue187',\n // U+E170 C sharp (whole note)\n noteCSharpWhole = '\\ue170',\n // U+E16F C (whole note)\n noteCWhole = '\\ue16f',\n // U+E1A0 D (black note)\n noteDBlack = '\\ue1a0',\n // U+E19F D flat (black note)\n noteDFlatBlack = '\\ue19f',\n // U+E188 D flat (half note)\n noteDFlatHalf = '\\ue188',\n // U+E171 D flat (whole note)\n noteDFlatWhole = '\\ue171',\n // U+E189 D (half note)\n noteDHalf = '\\ue189',\n // U+E1A1 D sharp (black note)\n noteDSharpBlack = '\\ue1a1',\n // U+E18A D sharp (half note)\n noteDSharpHalf = '\\ue18a',\n // U+E173 D sharp (whole note)\n noteDSharpWhole = '\\ue173',\n // U+E172 D (whole note)\n noteDWhole = '\\ue172',\n // U+EEF2 Di (black note)\n noteDiBlack = '\\ueef2',\n // U+EEE9 Di (half note)\n noteDiHalf = '\\ueee9',\n // U+EEE0 Di (whole note)\n noteDiWhole = '\\ueee0',\n // U+E160 Do (black note)\n noteDoBlack = '\\ue160',\n // U+E158 Do (half note)\n noteDoHalf = '\\ue158',\n // U+E150 Do (whole note)\n noteDoWhole = '\\ue150',\n // U+E1D0 Double whole note (breve)\n noteDoubleWhole = '\\ue1d0',\n // U+E1D1 Double whole note (square)\n noteDoubleWholeSquare = '\\ue1d1',\n // U+E1A3 E (black note)\n noteEBlack = '\\ue1a3',\n // U+E1A2 E flat (black note)\n noteEFlatBlack = '\\ue1a2',\n // U+E18B E flat (half note)\n noteEFlatHalf = '\\ue18b',\n // U+E174 E flat (whole note)\n noteEFlatWhole = '\\ue174',\n // U+E18C E (half note)\n noteEHalf = '\\ue18c',\n // U+E1A4 E sharp (black note)\n noteESharpBlack = '\\ue1a4',\n // U+E18D E sharp (half note)\n noteESharpHalf = '\\ue18d',\n // U+E176 E sharp (whole note)\n noteESharpWhole = '\\ue176',\n // U+E175 E (whole note)\n noteEWhole = '\\ue175',\n // U+E1AF Empty black note\n noteEmptyBlack = '\\ue1af',\n // U+E1AE Empty half note\n noteEmptyHalf = '\\ue1ae',\n // U+E1AD Empty whole note\n noteEmptyWhole = '\\ue1ad',\n // U+E1A6 F (black note)\n noteFBlack = '\\ue1a6',\n // U+E1A5 F flat (black note)\n noteFFlatBlack = '\\ue1a5',\n // U+E18E F flat (half note)\n noteFFlatHalf = '\\ue18e',\n // U+E177 F flat (whole note)\n noteFFlatWhole = '\\ue177',\n // U+E18F F (half note)\n noteFHalf = '\\ue18f',\n // U+E1A7 F sharp (black note)\n noteFSharpBlack = '\\ue1a7',\n // U+E190 F sharp (half note)\n noteFSharpHalf = '\\ue190',\n // U+E179 F sharp (whole note)\n noteFSharpWhole = '\\ue179',\n // U+E178 F (whole note)\n noteFWhole = '\\ue178',\n // U+E163 Fa (black note)\n noteFaBlack = '\\ue163',\n // U+E15B Fa (half note)\n noteFaHalf = '\\ue15b',\n // U+E153 Fa (whole note)\n noteFaWhole = '\\ue153',\n // U+EEF6 Fi (black note)\n noteFiBlack = '\\ueef6',\n // U+EEED Fi (half note)\n noteFiHalf = '\\ueeed',\n // U+EEE4 Fi (whole note)\n noteFiWhole = '\\ueee4',\n // U+E1A9 G (black note)\n noteGBlack = '\\ue1a9',\n // U+E1A8 G flat (black note)\n noteGFlatBlack = '\\ue1a8',\n // U+E191 G flat (half note)\n noteGFlatHalf = '\\ue191',\n // U+E17A G flat (whole note)\n noteGFlatWhole = '\\ue17a',\n // U+E192 G (half note)\n noteGHalf = '\\ue192',\n // U+E1AA G sharp (black note)\n noteGSharpBlack = '\\ue1aa',\n // U+E193 G sharp (half note)\n noteGSharpHalf = '\\ue193',\n // U+E17C G sharp (whole note)\n noteGSharpWhole = '\\ue17c',\n // U+E17B G (whole note)\n noteGWhole = '\\ue17b',\n // U+E1AB H (black note)\n noteHBlack = '\\ue1ab',\n // U+E194 H (half note)\n noteHHalf = '\\ue194',\n // U+E1AC H sharp (black note)\n noteHSharpBlack = '\\ue1ac',\n // U+E195 H sharp (half note)\n noteHSharpHalf = '\\ue195',\n // U+E17E H sharp (whole note)\n noteHSharpWhole = '\\ue17e',\n // U+E17D H (whole note)\n noteHWhole = '\\ue17d',\n // U+E1D4 Half note (minim) stem down\n noteHalfDown = '\\ue1d4',\n // U+E1D3 Half note (minim) stem up\n noteHalfUp = '\\ue1d3',\n // U+E165 La (black note)\n noteLaBlack = '\\ue165',\n // U+E15D La (half note)\n noteLaHalf = '\\ue15d',\n // U+E155 La (whole note)\n noteLaWhole = '\\ue155',\n // U+EEF9 Le (black note)\n noteLeBlack = '\\ueef9',\n // U+EEF0 Le (half note)\n noteLeHalf = '\\ueef0',\n // U+EEE7 Le (whole note)\n noteLeWhole = '\\ueee7',\n // U+EEF8 Li (black note)\n noteLiBlack = '\\ueef8',\n // U+EEEF Li (half note)\n noteLiHalf = '\\ueeef',\n // U+EEE6 Li (whole note)\n noteLiWhole = '\\ueee6',\n // U+EEF5 Me (black note)\n noteMeBlack = '\\ueef5',\n // U+EEEC Me (half note)\n noteMeHalf = '\\ueeec',\n // U+EEE3 Me (whole note)\n noteMeWhole = '\\ueee3',\n // U+E162 Mi (black note)\n noteMiBlack = '\\ue162',\n // U+E15A Mi (half note)\n noteMiHalf = '\\ue15a',\n // U+E152 Mi (whole note)\n noteMiWhole = '\\ue152',\n // U+E1D6 Quarter note (crotchet) stem down\n noteQuarterDown = '\\ue1d6',\n // U+E1D5 Quarter note (crotchet) stem up\n noteQuarterUp = '\\ue1d5',\n // U+EEF4 Ra (black note)\n noteRaBlack = '\\ueef4',\n // U+EEEB Ra (half note)\n noteRaHalf = '\\ueeeb',\n // U+EEE2 Ra (whole note)\n noteRaWhole = '\\ueee2',\n // U+E161 Re (black note)\n noteReBlack = '\\ue161',\n // U+E159 Re (half note)\n noteReHalf = '\\ue159',\n // U+E151 Re (whole note)\n noteReWhole = '\\ue151',\n // U+EEF3 Ri (black note)\n noteRiBlack = '\\ueef3',\n // U+EEEA Ri (half note)\n noteRiHalf = '\\ueeea',\n // U+EEE1 Ri (whole note)\n noteRiWhole = '\\ueee1',\n // U+EEF7 Se (black note)\n noteSeBlack = '\\ueef7',\n // U+EEEE Se (half note)\n noteSeHalf = '\\ueeee',\n // U+EEE5 Se (whole note)\n noteSeWhole = '\\ueee5',\n // U+E1C9 Arrowhead left black (Funk 7-shape re)\n noteShapeArrowheadLeftBlack = '\\ue1c9',\n // U+ECDC Arrowhead left double whole (Funk 7-shape re)\n noteShapeArrowheadLeftDoubleWhole = '\\uecdc',\n // U+E1C8 Arrowhead left white (Funk 7-shape re)\n noteShapeArrowheadLeftWhite = '\\ue1c8',\n // U+E1B9 Diamond black (4-shape mi; 7-shape mi)\n noteShapeDiamondBlack = '\\ue1b9',\n // U+ECD4 Diamond double whole (4-shape mi; 7-shape mi)\n noteShapeDiamondDoubleWhole = '\\uecd4',\n // U+E1B8 Diamond white (4-shape mi; 7-shape mi)\n noteShapeDiamondWhite = '\\ue1b8',\n // U+E1C5 Isosceles triangle black (Walker 7-shape ti)\n noteShapeIsoscelesTriangleBlack = '\\ue1c5',\n // U+ECDA Isosceles triangle double whole (Walker 7-shape ti)\n noteShapeIsoscelesTriangleDoubleWhole = '\\uecda',\n // U+E1C4 Isosceles triangle white (Walker 7-shape ti)\n noteShapeIsoscelesTriangleWhite = '\\ue1c4',\n // U+E1C1 Inverted keystone black (Walker 7-shape do)\n noteShapeKeystoneBlack = '\\ue1c1',\n // U+ECD8 Inverted keystone double whole (Walker 7-shape do)\n noteShapeKeystoneDoubleWhole = '\\uecd8',\n // U+E1C0 Inverted keystone white (Walker 7-shape do)\n noteShapeKeystoneWhite = '\\ue1c0',\n // U+E1BD Moon black (Aikin 7-shape re)\n noteShapeMoonBlack = '\\ue1bd',\n // U+ECD6 Moon double whole (Aikin 7-shape re)\n noteShapeMoonDoubleWhole = '\\uecd6',\n // U+E1C7 Moon left black (Funk 7-shape do)\n noteShapeMoonLeftBlack = '\\ue1c7',\n // U+ECDB Moon left double whole (Funk 7-shape do)\n noteShapeMoonLeftDoubleWhole = '\\uecdb',\n // U+E1C6 Moon left white (Funk 7-shape do)\n noteShapeMoonLeftWhite = '\\ue1c6',\n // U+E1BC Moon white (Aikin 7-shape re)\n noteShapeMoonWhite = '\\ue1bc',\n // U+E1C3 Quarter moon black (Walker 7-shape re)\n noteShapeQuarterMoonBlack = '\\ue1c3',\n // U+ECD9 Quarter moon double whole (Walker 7-shape re)\n noteShapeQuarterMoonDoubleWhole = '\\uecd9',\n // U+E1C2 Quarter moon white (Walker 7-shape re)\n noteShapeQuarterMoonWhite = '\\ue1c2',\n // U+E1B1 Round black (4-shape sol; 7-shape so)\n noteShapeRoundBlack = '\\ue1b1',\n // U+ECD0 Round double whole (4-shape sol; 7-shape so)\n noteShapeRoundDoubleWhole = '\\uecd0',\n // U+E1B0 Round white (4-shape sol; 7-shape so)\n noteShapeRoundWhite = '\\ue1b0',\n // U+E1B3 Square black (4-shape la; Aikin 7-shape la)\n noteShapeSquareBlack = '\\ue1b3',\n // U+ECD1 Square double whole (4-shape la; Aikin 7-shape la)\n noteShapeSquareDoubleWhole = '\\uecd1',\n // U+E1B2 Square white (4-shape la; Aikin 7-shape la)\n noteShapeSquareWhite = '\\ue1b2',\n // U+E1B7 Triangle left black (stem up; 4-shape fa; 7-shape fa)\n noteShapeTriangleLeftBlack = '\\ue1b7',\n // U+ECD3 Triangle left double whole (stem up; 4-shape fa; 7-shape fa)\n noteShapeTriangleLeftDoubleWhole = '\\uecd3',\n // U+E1B6 Triangle left white (stem up; 4-shape fa; 7-shape fa)\n noteShapeTriangleLeftWhite = '\\ue1b6',\n // U+E1B5 Triangle right black (stem down; 4-shape fa; 7-shape fa)\n noteShapeTriangleRightBlack = '\\ue1b5',\n // U+ECD2 Triangle right double whole (stem down; 4-shape fa; 7-shape fa)\n noteShapeTriangleRightDoubleWhole = '\\uecd2',\n // U+E1B4 Triangle right white (stem down; 4-shape fa; 7-shape fa)\n noteShapeTriangleRightWhite = '\\ue1b4',\n // U+E1BF Triangle-round black (Aikin 7-shape ti)\n noteShapeTriangleRoundBlack = '\\ue1bf',\n // U+ECD7 Triangle-round white (Aikin 7-shape ti)\n noteShapeTriangleRoundDoubleWhole = '\\uecd7',\n // U+E1CB Triangle-round left black (Funk 7-shape ti)\n noteShapeTriangleRoundLeftBlack = '\\ue1cb',\n // U+ECDD Triangle-round left double whole (Funk 7-shape ti)\n noteShapeTriangleRoundLeftDoubleWhole = '\\uecdd',\n // U+E1CA Triangle-round left white (Funk 7-shape ti)\n noteShapeTriangleRoundLeftWhite = '\\ue1ca',\n // U+E1BE Triangle-round white (Aikin 7-shape ti)\n noteShapeTriangleRoundWhite = '\\ue1be',\n // U+E1BB Triangle up black (Aikin 7-shape do)\n noteShapeTriangleUpBlack = '\\ue1bb',\n // U+ECD5 Triangle up double whole (Aikin 7-shape do)\n noteShapeTriangleUpDoubleWhole = '\\uecd5',\n // U+E1BA Triangle up white (Aikin 7-shape do)\n noteShapeTriangleUpWhite = '\\ue1ba',\n // U+E167 Si (black note)\n noteSiBlack = '\\ue167',\n // U+E15F Si (half note)\n noteSiHalf = '\\ue15f',\n // U+E157 Si (whole note)\n noteSiWhole = '\\ue157',\n // U+E164 So (black note)\n noteSoBlack = '\\ue164',\n // U+E15C So (half note)\n noteSoHalf = '\\ue15c',\n // U+E154 So (whole note)\n noteSoWhole = '\\ue154',\n // U+EEFA Te (black note)\n noteTeBlack = '\\ueefa',\n // U+EEF1 Te (half note)\n noteTeHalf = '\\ueef1',\n // U+EEE8 Te (whole note)\n noteTeWhole = '\\ueee8',\n // U+E166 Ti (black note)\n noteTiBlack = '\\ue166',\n // U+E15E Ti (half note)\n noteTiHalf = '\\ue15e',\n // U+E156 Ti (whole note)\n noteTiWhole = '\\ue156',\n // U+E1D2 Whole note (semibreve)\n noteWhole = '\\ue1d2',\n // U+E0A4 Black notehead\n noteheadBlack = '\\ue0a4',\n // U+E0F7 Circle slash notehead\n noteheadCircleSlash = '\\ue0f7',\n // U+E0B3 Circle X notehead\n noteheadCircleX = '\\ue0b3',\n // U+E0B0 Circle X double whole\n noteheadCircleXDoubleWhole = '\\ue0b0',\n // U+E0B2 Circle X half\n noteheadCircleXHalf = '\\ue0b2',\n // U+E0B1 Circle X whole\n noteheadCircleXWhole = '\\ue0b1',\n // U+E0E4 Circled black notehead\n noteheadCircledBlack = '\\ue0e4',\n // U+E0E8 Black notehead in large circle\n noteheadCircledBlackLarge = '\\ue0e8',\n // U+E0E7 Circled double whole notehead\n noteheadCircledDoubleWhole = '\\ue0e7',\n // U+E0EB Double whole notehead in large circle\n noteheadCircledDoubleWholeLarge = '\\ue0eb',\n // U+E0E5 Circled half notehead\n noteheadCircledHalf = '\\ue0e5',\n // U+E0E9 Half notehead in large circle\n noteheadCircledHalfLarge = '\\ue0e9',\n // U+E0E6 Circled whole notehead\n noteheadCircledWhole = '\\ue0e6',\n // U+E0EA Whole notehead in large circle\n noteheadCircledWholeLarge = '\\ue0ea',\n // U+E0EC Cross notehead in large circle\n noteheadCircledXLarge = '\\ue0ec',\n // U+E124 Double whole note cluster, 2nd\n noteheadClusterDoubleWhole2nd = '\\ue124',\n // U+E128 Double whole note cluster, 3rd\n noteheadClusterDoubleWhole3rd = '\\ue128',\n // U+E12E Combining double whole note cluster, bottom\n noteheadClusterDoubleWholeBottom = '\\ue12e',\n // U+E12D Combining double whole note cluster, middle\n noteheadClusterDoubleWholeMiddle = '\\ue12d',\n // U+E12C Combining double whole note cluster, top\n noteheadClusterDoubleWholeTop = '\\ue12c',\n // U+E126 Half note cluster, 2nd\n noteheadClusterHalf2nd = '\\ue126',\n // U+E12A Half note cluster, 3rd\n noteheadClusterHalf3rd = '\\ue12a',\n // U+E134 Combining half note cluster, bottom\n noteheadClusterHalfBottom = '\\ue134',\n // U+E133 Combining half note cluster, middle\n noteheadClusterHalfMiddle = '\\ue133',\n // U+E132 Combining half note cluster, top\n noteheadClusterHalfTop = '\\ue132',\n // U+E127 Quarter note cluster, 2nd\n noteheadClusterQuarter2nd = '\\ue127',\n // U+E12B Quarter note cluster, 3rd\n noteheadClusterQuarter3rd = '\\ue12b',\n // U+E137 Combining quarter note cluster, bottom\n noteheadClusterQuarterBottom = '\\ue137',\n // U+E136 Combining quarter note cluster, middle\n noteheadClusterQuarterMiddle = '\\ue136',\n // U+E135 Combining quarter note cluster, top\n noteheadClusterQuarterTop = '\\ue135',\n // U+E123 Cluster notehead black (round)\n noteheadClusterRoundBlack = '\\ue123',\n // U+E122 Cluster notehead white (round)\n noteheadClusterRoundWhite = '\\ue122',\n // U+E121 Cluster notehead black (square)\n noteheadClusterSquareBlack = '\\ue121',\n // U+E120 Cluster notehead white (square)\n noteheadClusterSquareWhite = '\\ue120',\n // U+E125 Whole note cluster, 2nd\n noteheadClusterWhole2nd = '\\ue125',\n // U+E129 Whole note cluster, 3rd\n noteheadClusterWhole3rd = '\\ue129',\n // U+E131 Combining whole note cluster, bottom\n noteheadClusterWholeBottom = '\\ue131',\n // U+E130 Combining whole note cluster, middle\n noteheadClusterWholeMiddle = '\\ue130',\n // U+E12F Combining whole note cluster, top\n noteheadClusterWholeTop = '\\ue12f',\n // U+EEAE 4/11 note (eleventh note series, Cowell)\n noteheadCowellEleventhNoteSeriesHalf = '\\ueeae',\n // U+EEAD 8/11 note (eleventh note series, Cowell)\n noteheadCowellEleventhNoteSeriesWhole = '\\ueead',\n // U+EEAF 2/11 note (eleventh note series, Cowell)\n noteheadCowellEleventhSeriesBlack = '\\ueeaf',\n // U+EEB5 2/15 note (fifteenth note series, Cowell)\n noteheadCowellFifteenthNoteSeriesBlack = '\\ueeb5',\n // U+EEB4 4/15 note (fifteenth note series, Cowell)\n noteheadCowellFifteenthNoteSeriesHalf = '\\ueeb4',\n // U+EEB3 8/15 note (fifteenth note series, Cowell)\n noteheadCowellFifteenthNoteSeriesWhole = '\\ueeb3',\n // U+EEA6 1/5 note (fifth note series, Cowell)\n noteheadCowellFifthNoteSeriesBlack = '\\ueea6',\n // U+EEA5 2/5 note (fifth note series, Cowell)\n noteheadCowellFifthNoteSeriesHalf = '\\ueea5',\n // U+EEA4 4/5 note (fifth note series, Cowell)\n noteheadCowellFifthNoteSeriesWhole = '\\ueea4',\n // U+EEAC 2/9 note (ninth note series, Cowell)\n noteheadCowellNinthNoteSeriesBlack = '\\ueeac',\n // U+EEAB 4/9 note (ninth note series, Cowell)\n noteheadCowellNinthNoteSeriesHalf = '\\ueeab',\n // U+EEAA 8/9 note (ninth note series, Cowell)\n noteheadCowellNinthNoteSeriesWhole = '\\ueeaa',\n // U+EEA9 1/7 note (seventh note series, Cowell)\n noteheadCowellSeventhNoteSeriesBlack = '\\ueea9',\n // U+EEA8 2/7 note (seventh note series, Cowell)\n noteheadCowellSeventhNoteSeriesHalf = '\\ueea8',\n // U+EEA7 4/7 note (seventh note series, Cowell)\n noteheadCowellSeventhNoteSeriesWhole = '\\ueea7',\n // U+EEA3 1/6 note (third note series, Cowell)\n noteheadCowellThirdNoteSeriesBlack = '\\ueea3',\n // U+EEA2 1/3 note (third note series, Cowell)\n noteheadCowellThirdNoteSeriesHalf = '\\ueea2',\n // U+EEA1 2/3 note (third note series, Cowell)\n noteheadCowellThirdNoteSeriesWhole = '\\ueea1',\n // U+EEB2 2/13 note (thirteenth note series, Cowell)\n noteheadCowellThirteenthNoteSeriesBlack = '\\ueeb2',\n // U+EEB1 4/13 note (thirteenth note series, Cowell)\n noteheadCowellThirteenthNoteSeriesHalf = '\\ueeb1',\n // U+EEB0 8/13 note (thirteenth note series, Cowell)\n noteheadCowellThirteenthNoteSeriesWhole = '\\ueeb0',\n // U+E0DB Diamond black notehead\n noteheadDiamondBlack = '\\ue0db',\n // U+E0E2 Diamond black notehead (old)\n noteheadDiamondBlackOld = '\\ue0e2',\n // U+E0DC Diamond black notehead (wide)\n noteheadDiamondBlackWide = '\\ue0dc',\n // U+E139 Black diamond cluster, 2nd\n noteheadDiamondClusterBlack2nd = '\\ue139',\n // U+E13B Black diamond cluster, 3rd\n noteheadDiamondClusterBlack3rd = '\\ue13b',\n // U+E141 Combining black diamond cluster, bottom\n noteheadDiamondClusterBlackBottom = '\\ue141',\n // U+E140 Combining black diamond cluster, middle\n noteheadDiamondClusterBlackMiddle = '\\ue140',\n // U+E13F Combining black diamond cluster, top\n noteheadDiamondClusterBlackTop = '\\ue13f',\n // U+E138 White diamond cluster, 2nd\n noteheadDiamondClusterWhite2nd = '\\ue138',\n // U+E13A White diamond cluster, 3rd\n noteheadDiamondClusterWhite3rd = '\\ue13a',\n // U+E13E Combining white diamond cluster, bottom\n noteheadDiamondClusterWhiteBottom = '\\ue13e',\n // U+E13D Combining white diamond cluster, middle\n noteheadDiamondClusterWhiteMiddle = '\\ue13d',\n // U+E13C Combining white diamond cluster, top\n noteheadDiamondClusterWhiteTop = '\\ue13c',\n // U+E0D7 Diamond double whole notehead\n noteheadDiamondDoubleWhole = '\\ue0d7',\n // U+E0DF Diamond double whole notehead (old)\n noteheadDiamondDoubleWholeOld = '\\ue0df',\n // U+E0D9 Diamond half notehead\n noteheadDiamondHalf = '\\ue0d9',\n // U+E0E3 Half-filled diamond notehead\n noteheadDiamondHalfFilled = '\\ue0e3',\n // U+E0E1 Diamond half notehead (old)\n noteheadDiamondHalfOld = '\\ue0e1',\n // U+E0DA Diamond half notehead (wide)\n noteheadDiamondHalfWide = '\\ue0da',\n // U+E0FC Open diamond notehead\n noteheadDiamondOpen = '\\ue0fc',\n // U+E0DD Diamond white notehead\n noteheadDiamondWhite = '\\ue0dd',\n // U+E0DE Diamond white notehead (wide)\n noteheadDiamondWhiteWide = '\\ue0de',\n // U+E0D8 Diamond whole notehead\n noteheadDiamondWhole = '\\ue0d8',\n // U+E0E0 Diamond whole notehead (old)\n noteheadDiamondWholeOld = '\\ue0e0',\n // U+E0A0 Double whole (breve) notehead\n noteheadDoubleWhole = '\\ue0a0',\n // U+E0A1 Double whole (breve) notehead (square)\n noteheadDoubleWholeSquare = '\\ue0a1',\n // U+E0B4 Double whole notehead with X\n noteheadDoubleWholeWithX = '\\ue0b4',\n // U+E0A3 Half (minim) notehead\n noteheadHalf = '\\ue0a3',\n // U+E0FB Filled half (minim) notehead\n noteheadHalfFilled = '\\ue0fb',\n // U+E0B6 Half notehead with X\n noteheadHalfWithX = '\\ue0b6',\n // U+E0F8 Heavy X notehead\n noteheadHeavyX = '\\ue0f8',\n // U+E0F9 Heavy X with hat notehead\n noteheadHeavyXHat = '\\ue0f9',\n // U+E0F4 Large arrow down (lowest pitch) black notehead\n noteheadLargeArrowDownBlack = '\\ue0f4',\n // U+E0F1 Large arrow down (lowest pitch) double whole notehead\n noteheadLargeArrowDownDoubleWhole = '\\ue0f1',\n // U+E0F3 Large arrow down (lowest pitch) half notehead\n noteheadLargeArrowDownHalf = '\\ue0f3',\n // U+E0F2 Large arrow down (lowest pitch) whole notehead\n noteheadLargeArrowDownWhole = '\\ue0f2',\n // U+E0F0 Large arrow up (highest pitch) black notehead\n noteheadLargeArrowUpBlack = '\\ue0f0',\n // U+E0ED Large arrow up (highest pitch) double whole notehead\n noteheadLargeArrowUpDoubleWhole = '\\ue0ed',\n // U+E0EF Large arrow up (highest pitch) half notehead\n noteheadLargeArrowUpHalf = '\\ue0ef',\n // U+E0EE Large arrow up (highest pitch) whole notehead\n noteheadLargeArrowUpWhole = '\\ue0ee',\n // U+E0CB Moon notehead black\n noteheadMoonBlack = '\\ue0cb',\n // U+E0CA Moon notehead white\n noteheadMoonWhite = '\\ue0ca',\n // U+EEA0 Sine notehead (Nancarrow)\n noteheadNancarrowSine = '\\ueea0',\n // U+E0A5 Null notehead\n noteheadNull = '\\ue0a5',\n // U+E0CE Parenthesis notehead\n noteheadParenthesis = '\\ue0ce',\n // U+E0F5 Opening parenthesis\n noteheadParenthesisLeft = '\\ue0f5',\n // U+E0F6 Closing parenthesis\n noteheadParenthesisRight = '\\ue0f6',\n // U+E0AF Plus notehead black\n noteheadPlusBlack = '\\ue0af',\n // U+E0AC Plus notehead double whole\n noteheadPlusDoubleWhole = '\\ue0ac',\n // U+E0AE Plus notehead half\n noteheadPlusHalf = '\\ue0ae',\n // U+E0AD Plus notehead whole\n noteheadPlusWhole = '\\ue0ad',\n // U+E144 Combining black rectangular cluster, bottom\n noteheadRectangularClusterBlackBottom = '\\ue144',\n // U+E143 Combining black rectangular cluster, middle\n noteheadRectangularClusterBlackMiddle = '\\ue143',\n // U+E142 Combining black rectangular cluster, top\n noteheadRectangularClusterBlackTop = '\\ue142',\n // U+E147 Combining white rectangular cluster, bottom\n noteheadRectangularClusterWhiteBottom = '\\ue147',\n // U+E146 Combining white rectangular cluster, middle\n noteheadRectangularClusterWhiteMiddle = '\\ue146',\n // U+E145 Combining white rectangular cluster, top\n noteheadRectangularClusterWhiteTop = '\\ue145',\n // U+E113 Round black notehead\n noteheadRoundBlack = '\\ue113',\n // U+E11C Round black notehead, double slashed\n noteheadRoundBlackDoubleSlashed = '\\ue11c',\n // U+E110 Large round black notehead\n noteheadRoundBlackLarge = '\\ue110',\n // U+E118 Round black notehead, slashed\n noteheadRoundBlackSlashed = '\\ue118',\n // U+E116 Large round black notehead, slashed\n noteheadRoundBlackSlashedLarge = '\\ue116',\n // U+E114 Round white notehead\n noteheadRoundWhite = '\\ue114',\n // U+E11D Round white notehead, double slashed\n noteheadRoundWhiteDoubleSlashed = '\\ue11d',\n // U+E111 Large round white notehead\n noteheadRoundWhiteLarge = '\\ue111',\n // U+E119 Round white notehead, slashed\n noteheadRoundWhiteSlashed = '\\ue119',\n // U+E117 Large round white notehead, slashed\n noteheadRoundWhiteSlashedLarge = '\\ue117',\n // U+E115 Round white notehead with dot\n noteheadRoundWhiteWithDot = '\\ue115',\n // U+E112 Large round white notehead with dot\n noteheadRoundWhiteWithDotLarge = '\\ue112',\n // U+E104 Large white diamond\n noteheadSlashDiamondWhite = '\\ue104',\n // U+E101 Slash with horizontal ends\n noteheadSlashHorizontalEnds = '\\ue101',\n // U+E108 Muted slash with horizontal ends\n noteheadSlashHorizontalEndsMuted = '\\ue108',\n // U+E100 Slash with vertical ends\n noteheadSlashVerticalEnds = '\\ue100',\n // U+E107 Muted slash with vertical ends\n noteheadSlashVerticalEndsMuted = '\\ue107',\n // U+E105 Small slash with vertical ends\n noteheadSlashVerticalEndsSmall = '\\ue105',\n // U+E10A White slash double whole\n noteheadSlashWhiteDoubleWhole = '\\ue10a',\n // U+E103 White slash half\n noteheadSlashWhiteHalf = '\\ue103',\n // U+E109 Muted white slash\n noteheadSlashWhiteMuted = '\\ue109',\n // U+E102 White slash whole\n noteheadSlashWhiteWhole = '\\ue102',\n // U+E106 Large X notehead\n noteheadSlashX = '\\ue106',\n // U+E0CF Slashed black notehead (bottom left to top right)\n noteheadSlashedBlack1 = '\\ue0cf',\n // U+E0D0 Slashed black notehead (top left to bottom right)\n noteheadSlashedBlack2 = '\\ue0d0',\n // U+E0D5 Slashed double whole notehead (bottom left to top right)\n noteheadSlashedDoubleWhole1 = '\\ue0d5',\n // U+E0D6 Slashed double whole notehead (top left to bottom right)\n noteheadSlashedDoubleWhole2 = '\\ue0d6',\n // U+E0D1 Slashed half notehead (bottom left to top right)\n noteheadSlashedHalf1 = '\\ue0d1',\n // U+E0D2 Slashed half notehead (top left to bottom right)\n noteheadSlashedHalf2 = '\\ue0d2',\n // U+E0D3 Slashed whole notehead (bottom left to top right)\n noteheadSlashedWhole1 = '\\ue0d3',\n // U+E0D4 Slashed whole notehead (top left to bottom right)\n noteheadSlashedWhole2 = '\\ue0d4',\n // U+E0B9 Square notehead black\n noteheadSquareBlack = '\\ue0b9',\n // U+E11A Large square black notehead\n noteheadSquareBlackLarge = '\\ue11a',\n // U+E11B Large square white notehead\n noteheadSquareBlackWhite = '\\ue11b',\n // U+E0B8 Square notehead white\n noteheadSquareWhite = '\\ue0b8',\n // U+E0C7 Triangle notehead down black\n noteheadTriangleDownBlack = '\\ue0c7',\n // U+E0C3 Triangle notehead down double whole\n noteheadTriangleDownDoubleWhole = '\\ue0c3',\n // U+E0C5 Triangle notehead down half\n noteheadTriangleDownHalf = '\\ue0c5',\n // U+E0C6 Triangle notehead down white\n noteheadTriangleDownWhite = '\\ue0c6',\n // U+E0C4 Triangle notehead down whole\n noteheadTriangleDownWhole = '\\ue0c4',\n // U+E0C0 Triangle notehead left black\n noteheadTriangleLeftBlack = '\\ue0c0',\n // U+E0BF Triangle notehead left white\n noteheadTriangleLeftWhite = '\\ue0bf',\n // U+E0C2 Triangle notehead right black\n noteheadTriangleRightBlack = '\\ue0c2',\n // U+E0C1 Triangle notehead right white\n noteheadTriangleRightWhite = '\\ue0c1',\n // U+E0CD Triangle-round notehead down black\n noteheadTriangleRoundDownBlack = '\\ue0cd',\n // U+E0CC Triangle-round notehead down white\n noteheadTriangleRoundDownWhite = '\\ue0cc',\n // U+E0BE Triangle notehead up black\n noteheadTriangleUpBlack = '\\ue0be',\n // U+E0BA Triangle notehead up double whole\n noteheadTriangleUpDoubleWhole = '\\ue0ba',\n // U+E0BC Triangle notehead up half\n noteheadTriangleUpHalf = '\\ue0bc',\n // U+E0C9 Triangle notehead up right black\n noteheadTriangleUpRightBlack = '\\ue0c9',\n // U+E0C8 Triangle notehead up right white\n noteheadTriangleUpRightWhite = '\\ue0c8',\n // U+E0BD Triangle notehead up white\n noteheadTriangleUpWhite = '\\ue0bd',\n // U+E0BB Triangle notehead up whole\n noteheadTriangleUpWhole = '\\ue0bb',\n // U+E0B7 Void notehead with X\n noteheadVoidWithX = '\\ue0b7',\n // U+E0A2 Whole (semibreve) notehead\n noteheadWhole = '\\ue0a2',\n // U+E0FA Filled whole (semibreve) notehead\n noteheadWholeFilled = '\\ue0fa',\n // U+E0B5 Whole notehead with X\n noteheadWholeWithX = '\\ue0b5',\n // U+E0A9 X notehead black\n noteheadXBlack = '\\ue0a9',\n // U+E0A6 X notehead double whole\n noteheadXDoubleWhole = '\\ue0a6',\n // U+E0A8 X notehead half\n noteheadXHalf = '\\ue0a8',\n // U+E0AA Ornate X notehead\n noteheadXOrnate = '\\ue0aa',\n // U+E0AB Ornate X notehead in ellipse\n noteheadXOrnateEllipse = '\\ue0ab',\n // U+E0A7 X notehead whole\n noteheadXWhole = '\\ue0a7',\n // U+EC91 a (baseline)\n octaveBaselineA = '\\uec91',\n // U+EC93 b (baseline)\n octaveBaselineB = '\\uec93',\n // U+EC95 m (baseline)\n octaveBaselineM = '\\uec95',\n // U+EC97 v (baseline)\n octaveBaselineV = '\\uec97',\n // U+E51F Bassa\n octaveBassa = '\\ue51f',\n // U+EC90 Loco\n octaveLoco = '\\uec90',\n // U+E51A Left parenthesis for octave signs\n octaveParensLeft = '\\ue51a',\n // U+E51B Right parenthesis for octave signs\n octaveParensRight = '\\ue51b',\n // U+EC92 a (superscript)\n octaveSuperscriptA = '\\uec92',\n // U+EC94 b (superscript)\n octaveSuperscriptB = '\\uec94',\n // U+EC96 m (superscript)\n octaveSuperscriptM = '\\uec96',\n // U+EC98 v (superscript)\n octaveSuperscriptV = '\\uec98',\n // U+E233 One-handed roll (Stevens)\n oneHandedRollStevens = '\\ue233',\n // U+EE2E Two Fusae\n organGerman2Fusae = '\\uee2e',\n // U+EE2C Two Minimae\n organGerman2Minimae = '\\uee2c',\n // U+EE19 Combining double octave line above\n organGerman2OctaveUp = '\\uee19',\n // U+EE2F Two Semifusae\n organGerman2Semifusae = '\\uee2f',\n // U+EE2D Two Semiminimae\n organGerman2Semiminimae = '\\uee2d',\n // U+EE32 Three Fusae\n organGerman3Fusae = '\\uee32',\n // U+EE30 Three Minimae\n organGerman3Minimae = '\\uee30',\n // U+EE33 Three Semifusae\n organGerman3Semifusae = '\\uee33',\n // U+EE31 Three Semiminimae\n organGerman3Semiminimae = '\\uee31',\n // U+EE36 Four Fusae\n organGerman4Fusae = '\\uee36',\n // U+EE34 Four Minimae\n organGerman4Minimae = '\\uee34',\n // U+EE37 Four Semifusae\n organGerman4Semifusae = '\\uee37',\n // U+EE35 Four Semiminimae\n organGerman4Semiminimae = '\\uee35',\n // U+EE3A Five Fusae\n organGerman5Fusae = '\\uee3a',\n // U+EE38 Five Minimae\n organGerman5Minimae = '\\uee38',\n // U+EE3B Five Semifusae\n organGerman5Semifusae = '\\uee3b',\n // U+EE39 Five Semiminimae\n organGerman5Semiminimae = '\\uee39',\n // U+EE3E Six Fusae\n organGerman6Fusae = '\\uee3e',\n // U+EE3C Six Minimae\n organGerman6Minimae = '\\uee3c',\n // U+EE3F Six Semifusae\n organGerman6Semifusae = '\\uee3f',\n // U+EE3D Six Semiminimae\n organGerman6Semiminimae = '\\uee3d',\n // U+EE15 German organ tablature small A\n organGermanALower = '\\uee15',\n // U+EE09 German organ tablature great A\n organGermanAUpper = '\\uee09',\n // U+EE1C Rhythm Dot\n organGermanAugmentationDot = '\\uee1c',\n // U+EE16 German organ tablature small B\n organGermanBLower = '\\uee16',\n // U+EE0A German organ tablature great B\n organGermanBUpper = '\\uee0a',\n // U+EE25 Brevis (Binary) Buxheimer Orgelbuch\n organGermanBuxheimerBrevis2 = '\\uee25',\n // U+EE24 Brevis (Ternary) Buxheimer Orgelbuch\n organGermanBuxheimerBrevis3 = '\\uee24',\n // U+EE1E Minima Rest Buxheimer Orgelbuch\n organGermanBuxheimerMinimaRest = '\\uee1e',\n // U+EE26 Semibrevis Buxheimer Orgelbuch\n organGermanBuxheimerSemibrevis = '\\uee26',\n // U+EE1D Semibrevis Rest Buxheimer Orgelbuch\n organGermanBuxheimerSemibrevisRest = '\\uee1d',\n // U+EE0C German organ tablature small C\n organGermanCLower = '\\uee0c',\n // U+EE00 German organ tablature great C\n organGermanCUpper = '\\uee00',\n // U+EE0D German organ tablature small Cis\n organGermanCisLower = '\\uee0d',\n // U+EE01 German organ tablature great Cis\n organGermanCisUpper = '\\uee01',\n // U+EE0E German organ tablature small D\n organGermanDLower = '\\uee0e',\n // U+EE02 German organ tablature great D\n organGermanDUpper = '\\uee02',\n // U+EE0F German organ tablature small Dis\n organGermanDisLower = '\\uee0f',\n // U+EE03 German organ tablature great Dis\n organGermanDisUpper = '\\uee03',\n // U+EE10 German organ tablature small E\n organGermanELower = '\\uee10',\n // U+EE04 German organ tablature great E\n organGermanEUpper = '\\uee04',\n // U+EE11 German organ tablature small F\n organGermanFLower = '\\uee11',\n // U+EE05 German organ tablature great F\n organGermanFUpper = '\\uee05',\n // U+EE12 German organ tablature small Fis\n organGermanFisLower = '\\uee12',\n // U+EE06 German organ tablature great Fis\n organGermanFisUpper = '\\uee06',\n // U+EE2A Fusa\n organGermanFusa = '\\uee2a',\n // U+EE22 Fusa Rest\n organGermanFusaRest = '\\uee22',\n // U+EE13 German organ tablature small G\n organGermanGLower = '\\uee13',\n // U+EE07 German organ tablature great G\n organGermanGUpper = '\\uee07',\n // U+EE14 German organ tablature small Gis\n organGermanGisLower = '\\uee14',\n // U+EE08 German organ tablature great Gis\n organGermanGisUpper = '\\uee08',\n // U+EE17 German organ tablature small H\n organGermanHLower = '\\uee17',\n // U+EE0B German organ tablature great H\n organGermanHUpper = '\\uee0b',\n // U+EE28 Minima\n organGermanMinima = '\\uee28',\n // U+EE20 Minima Rest\n organGermanMinimaRest = '\\uee20',\n // U+EE1A Combining single octave line below\n organGermanOctaveDown = '\\uee1a',\n // U+EE18 Combining single octave line above\n organGermanOctaveUp = '\\uee18',\n // U+EE27 Semibrevis\n organGermanSemibrevis = '\\uee27',\n // U+EE1F Semibrevis Rest\n organGermanSemibrevisRest = '\\uee1f',\n // U+EE2B Semifusa\n organGermanSemifusa = '\\uee2b',\n // U+EE23 Semifusa Rest\n organGermanSemifusaRest = '\\uee23',\n // U+EE29 Semiminima\n organGermanSemiminima = '\\uee29',\n // U+EE21 Semiminima Rest\n organGermanSemiminimaRest = '\\uee21',\n // U+EE1B Tie\n organGermanTie = '\\uee1b',\n // U+E59A Ornament bottom left concave stroke\n ornamentBottomLeftConcaveStroke = '\\ue59a',\n // U+E59B Ornament bottom left concave stroke, large\n ornamentBottomLeftConcaveStrokeLarge = '\\ue59b',\n // U+E59C Ornament bottom left convex stroke\n ornamentBottomLeftConvexStroke = '\\ue59c',\n // U+E5A7 Ornament bottom right concave stroke\n ornamentBottomRightConcaveStroke = '\\ue5a7',\n // U+E5A8 Ornament bottom right convex stroke\n ornamentBottomRightConvexStroke = '\\ue5a8',\n // U+E581 Comma\n ornamentComma = '\\ue581',\n // U+E57E Double oblique straight lines NW-SE\n ornamentDoubleObliqueLinesAfterNote = '\\ue57e',\n // U+E57D Double oblique straight lines SW-NE\n ornamentDoubleObliqueLinesBeforeNote = '\\ue57d',\n // U+E578 Curve below\n ornamentDownCurve = '\\ue578',\n // U+E56F Haydn ornament\n ornamentHaydn = '\\ue56f',\n // U+E592 Ornament high left concave stroke\n ornamentHighLeftConcaveStroke = '\\ue592',\n // U+E593 Ornament high left convex stroke\n ornamentHighLeftConvexStroke = '\\ue593',\n // U+E5A2 Ornament high right concave stroke\n ornamentHighRightConcaveStroke = '\\ue5a2',\n // U+E5A3 Ornament high right convex stroke\n ornamentHighRightConvexStroke = '\\ue5a3',\n // U+E576 Hook after note\n ornamentHookAfterNote = '\\ue576',\n // U+E575 Hook before note\n ornamentHookBeforeNote = '\\ue575',\n // U+E572 Left-facing half circle\n ornamentLeftFacingHalfCircle = '\\ue572',\n // U+E574 Left-facing hook\n ornamentLeftFacingHook = '\\ue574',\n // U+E597 Ornament left +\n ornamentLeftPlus = '\\ue597',\n // U+E596 Ornament left shake t\n ornamentLeftShakeT = '\\ue596',\n // U+E594 Ornament left vertical stroke\n ornamentLeftVerticalStroke = '\\ue594',\n // U+E595 Ornament left vertical stroke with cross (+)\n ornamentLeftVerticalStrokeWithCross = '\\ue595',\n // U+E598 Ornament low left concave stroke\n ornamentLowLeftConcaveStroke = '\\ue598',\n // U+E599 Ornament low left convex stroke\n ornamentLowLeftConvexStroke = '\\ue599',\n // U+E5A5 Ornament low right concave stroke\n ornamentLowRightConcaveStroke = '\\ue5a5',\n // U+E5A6 Ornament low right convex stroke\n ornamentLowRightConvexStroke = '\\ue5a6',\n // U+E59F Ornament middle vertical stroke\n ornamentMiddleVerticalStroke = '\\ue59f',\n // U+E56D Mordent\n ornamentMordent = '\\ue56d',\n // U+E57C Oblique straight line NW-SE\n ornamentObliqueLineAfterNote = '\\ue57c',\n // U+E57B Oblique straight line SW-NE\n ornamentObliqueLineBeforeNote = '\\ue57b',\n // U+E580 Oblique straight line tilted NW-SE\n ornamentObliqueLineHorizAfterNote = '\\ue580',\n // U+E57F Oblique straight line tilted SW-NE\n ornamentObliqueLineHorizBeforeNote = '\\ue57f',\n // U+EA21 Oriscus\n ornamentOriscus = '\\uea21',\n // U+E588 Pincé (Couperin)\n ornamentPinceCouperin = '\\ue588',\n // U+E570 Port de voix\n ornamentPortDeVoixV = '\\ue570',\n // U+E5B2 Supported appoggiatura trill\n ornamentPrecompAppoggTrill = '\\ue5b2',\n // U+E5B3 Supported appoggiatura trill with two-note suffix\n ornamentPrecompAppoggTrillSuffix = '\\ue5b3',\n // U+E5BE Cadence\n ornamentPrecompCadence = '\\ue5be',\n // U+E5C1 Cadence with upper prefix\n ornamentPrecompCadenceUpperPrefix = '\\ue5c1',\n // U+E5C2 Cadence with upper prefix and turn\n ornamentPrecompCadenceUpperPrefixTurn = '\\ue5c2',\n // U+E5BF Cadence with turn\n ornamentPrecompCadenceWithTurn = '\\ue5bf',\n // U+E5B1 Descending slide\n ornamentPrecompDescendingSlide = '\\ue5b1',\n // U+E5C0 Double cadence with lower prefix\n ornamentPrecompDoubleCadenceLowerPrefix = '\\ue5c0',\n // U+E5C3 Double cadence with upper prefix\n ornamentPrecompDoubleCadenceUpperPrefix = '\\ue5c3',\n // U+E5C4 Double cadence with upper prefix and turn\n ornamentPrecompDoubleCadenceUpperPrefixTurn = '\\ue5c4',\n // U+E5C7 Inverted mordent with upper prefix\n ornamentPrecompInvertedMordentUpperPrefix = '\\ue5c7',\n // U+E5C5 Mordent with release\n ornamentPrecompMordentRelease = '\\ue5c5',\n // U+E5C6 Mordent with upper prefix\n ornamentPrecompMordentUpperPrefix = '\\ue5c6',\n // U+E5BC Pre-beat port de voix followed by multiple mordent (Dandrieu)\n ornamentPrecompPortDeVoixMordent = '\\ue5bc',\n // U+E5B0 Slide\n ornamentPrecompSlide = '\\ue5b0',\n // U+E5B8 Slide-trill with two-note suffix (J.S. Bach)\n ornamentPrecompSlideTrillBach = '\\ue5b8',\n // U+E5B5 Slide-trill (D'Anglebert)\n ornamentPrecompSlideTrillDAnglebert = '\\ue5b5',\n // U+E5B6 Slide-trill with one-note suffix (Marpurg)\n ornamentPrecompSlideTrillMarpurg = '\\ue5b6',\n // U+E5B9 Slide-trill (Muffat)\n ornamentPrecompSlideTrillMuffat = '\\ue5b9',\n // U+E5BA Slide-trill with two-note suffix (Muffat)\n ornamentPrecompSlideTrillSuffixMuffat = '\\ue5ba',\n // U+E5C8 Trill with lower suffix\n ornamentPrecompTrillLowerSuffix = '\\ue5c8',\n // U+E5BB Trill with two-note suffix (Dandrieu)\n ornamentPrecompTrillSuffixDandrieu = '\\ue5bb',\n // U+E5BD Trill with mordent\n ornamentPrecompTrillWithMordent = '\\ue5bd',\n // U+E5B7 Turn-trill with two-note suffix (J.S. Bach)\n ornamentPrecompTurnTrillBach = '\\ue5b7',\n // U+E5B4 Turn-trill (D'Anglebert)\n ornamentPrecompTurnTrillDAnglebert = '\\ue5b4',\n // U+EA20 Quilisma\n ornamentQuilisma = '\\uea20',\n // U+E571 Right-facing half circle\n ornamentRightFacingHalfCircle = '\\ue571',\n // U+E573 Right-facing hook\n ornamentRightFacingHook = '\\ue573',\n // U+E5A4 Ornament right vertical stroke\n ornamentRightVerticalStroke = '\\ue5a4',\n // U+E587 Schleifer (long mordent)\n ornamentSchleifer = '\\ue587',\n // U+E582 Shake\n ornamentShake3 = '\\ue582',\n // U+E584 Shake (Muffat)\n ornamentShakeMuffat1 = '\\ue584',\n // U+E57A Short oblique straight line NW-SE\n ornamentShortObliqueLineAfterNote = '\\ue57a',\n // U+E579 Short oblique straight line SW-NE\n ornamentShortObliqueLineBeforeNote = '\\ue579',\n // U+E56C Short trill\n ornamentShortTrill = '\\ue56c',\n // U+E590 Ornament top left concave stroke\n ornamentTopLeftConcaveStroke = '\\ue590',\n // U+E591 Ornament top left convex stroke\n ornamentTopLeftConvexStroke = '\\ue591',\n // U+E5A0 Ornament top right concave stroke\n ornamentTopRightConcaveStroke = '\\ue5a0',\n // U+E5A1 Ornament top right convex stroke\n ornamentTopRightConvexStroke = '\\ue5a1',\n // U+E56E Tremblement\n ornamentTremblement = '\\ue56e',\n // U+E589 Tremblement appuyé (Couperin)\n ornamentTremblementCouperin = '\\ue589',\n // U+E566 Trill\n ornamentTrill = '\\ue566',\n // U+E567 Turn\n ornamentTurn = '\\ue567',\n // U+E568 Inverted turn\n ornamentTurnInverted = '\\ue568',\n // U+E569 Turn with slash\n ornamentTurnSlash = '\\ue569',\n // U+E56A Turn up\n ornamentTurnUp = '\\ue56a',\n // U+E56B Inverted turn up\n ornamentTurnUpS = '\\ue56b',\n // U+E577 Curve above\n ornamentUpCurve = '\\ue577',\n // U+E583 Vertical line\n ornamentVerticalLine = '\\ue583',\n // U+E59D Ornament zig-zag line without right-hand end\n ornamentZigZagLineNoRightEnd = '\\ue59d',\n // U+E59E Ornament zig-zag line with right-hand end\n ornamentZigZagLineWithRightEnd = '\\ue59e',\n // U+E510 Ottava\n ottava = '\\ue510',\n // U+E511 Ottava alta\n ottavaAlta = '\\ue511',\n // U+E512 Ottava bassa\n ottavaBassa = '\\ue512',\n // U+E513 Ottava bassa (ba)\n ottavaBassaBa = '\\ue513',\n // U+E51C Ottava bassa (8vb)\n ottavaBassaVb = '\\ue51c',\n // U+E22B Penderecki unmeasured tremolo\n pendereckiTremolo = '\\ue22b',\n // U+E717 Agogo\n pictAgogo = '\\ue717',\n // U+E712 Almglocken\n pictAlmglocken = '\\ue712',\n // U+E701 Anvil\n pictAnvil = '\\ue701',\n // U+E6C3 Bamboo tube chimes\n pictBambooChimes = '\\ue6c3',\n // U+E6FB Bamboo scraper\n pictBambooScraper = '\\ue6fb',\n // U+E6D4 Bass drum\n pictBassDrum = '\\ue6d4',\n // U+E6D5 Bass drum on side\n pictBassDrumOnSide = '\\ue6d5',\n // U+E7DE Bow\n pictBeaterBow = '\\ue7de',\n // U+E7EB Box for percussion beater\n pictBeaterBox = '\\ue7eb',\n // U+E7DA Brass mallets down\n pictBeaterBrassMalletsDown = '\\ue7da',\n // U+E7EE Brass mallets left\n pictBeaterBrassMalletsLeft = '\\ue7ee',\n // U+E7ED Brass mallets right\n pictBeaterBrassMalletsRight = '\\ue7ed',\n // U+E7D9 Brass mallets up\n pictBeaterBrassMalletsUp = '\\ue7d9',\n // U+E7EA Combining dashed circle for round beaters (plated)\n pictBeaterCombiningDashedCircle = '\\ue7ea',\n // U+E7E9 Combining parentheses for round beaters (padded)\n pictBeaterCombiningParentheses = '\\ue7e9',\n // U+E7A1 Double bass drum stick down\n pictBeaterDoubleBassDrumDown = '\\ue7a1',\n // U+E7A0 Double bass drum stick up\n pictBeaterDoubleBassDrumUp = '\\ue7a0',\n // U+E7E4 Finger\n pictBeaterFinger = '\\ue7e4',\n // U+E7E6 Fingernails\n pictBeaterFingernails = '\\ue7e6',\n // U+E7E5 Fist\n pictBeaterFist = '\\ue7e5',\n // U+E7DD Guiro scraper\n pictBeaterGuiroScraper = '\\ue7dd',\n // U+E7E1 Hammer\n pictBeaterHammer = '\\ue7e1',\n // U+E7D0 Metal hammer, down\n pictBeaterHammerMetalDown = '\\ue7d0',\n // U+E7CF Metal hammer, up\n pictBeaterHammerMetalUp = '\\ue7cf',\n // U+E7CE Plastic hammer, down\n pictBeaterHammerPlasticDown = '\\ue7ce',\n // U+E7CD Plastic hammer, up\n pictBeaterHammerPlasticUp = '\\ue7cd',\n // U+E7CC Wooden hammer, down\n pictBeaterHammerWoodDown = '\\ue7cc',\n // U+E7CB Wooden hammer, up\n pictBeaterHammerWoodUp = '\\ue7cb',\n // U+E7E3 Hand\n pictBeaterHand = '\\ue7e3',\n // U+E79D Hard bass drum stick down\n pictBeaterHardBassDrumDown = '\\ue79d',\n // U+E79C Hard bass drum stick up\n pictBeaterHardBassDrumUp = '\\ue79c',\n // U+E785 Hard glockenspiel stick down\n pictBeaterHardGlockenspielDown = '\\ue785',\n // U+E787 Hard glockenspiel stick left\n pictBeaterHardGlockenspielLeft = '\\ue787',\n // U+E786 Hard glockenspiel stick right\n pictBeaterHardGlockenspielRight = '\\ue786',\n // U+E784 Hard glockenspiel stick up\n pictBeaterHardGlockenspielUp = '\\ue784',\n // U+E791 Hard timpani stick down\n pictBeaterHardTimpaniDown = '\\ue791',\n // U+E793 Hard timpani stick left\n pictBeaterHardTimpaniLeft = '\\ue793',\n // U+E792 Hard timpani stick right\n pictBeaterHardTimpaniRight = '\\ue792',\n // U+E790 Hard timpani stick up\n pictBeaterHardTimpaniUp = '\\ue790',\n // U+E779 Hard xylophone stick down\n pictBeaterHardXylophoneDown = '\\ue779',\n // U+E77B Hard xylophone stick left\n pictBeaterHardXylophoneLeft = '\\ue77b',\n // U+E77A Hard xylophone stick right\n pictBeaterHardXylophoneRight = '\\ue77a',\n // U+E778 Hard xylophone stick up\n pictBeaterHardXylophoneUp = '\\ue778',\n // U+E7AB Hard yarn beater down\n pictBeaterHardYarnDown = '\\ue7ab',\n // U+E7AD Hard yarn beater left\n pictBeaterHardYarnLeft = '\\ue7ad',\n // U+E7AC Hard yarn beater right\n pictBeaterHardYarnRight = '\\ue7ac',\n // U+E7AA Hard yarn beater up\n pictBeaterHardYarnUp = '\\ue7aa',\n // U+E7D4 Jazz sticks down\n pictBeaterJazzSticksDown = '\\ue7d4',\n // U+E7D3 Jazz sticks up\n pictBeaterJazzSticksUp = '\\ue7d3',\n // U+E7E2 Knitting needle\n pictBeaterKnittingNeedle = '\\ue7e2',\n // U+E7DF Chime hammer up\n pictBeaterMallet = '\\ue7df',\n // U+E7EC Chime hammer down\n pictBeaterMalletDown = '\\ue7ec',\n // U+E79B Medium bass drum stick down\n pictBeaterMediumBassDrumDown = '\\ue79b',\n // U+E79A Medium bass drum stick up\n pictBeaterMediumBassDrumUp = '\\ue79a',\n // U+E78D Medium timpani stick down\n pictBeaterMediumTimpaniDown = '\\ue78d',\n // U+E78F Medium timpani stick left\n pictBeaterMediumTimpaniLeft = '\\ue78f',\n // U+E78E Medium timpani stick right\n pictBeaterMediumTimpaniRight = '\\ue78e',\n // U+E78C Medium timpani stick up\n pictBeaterMediumTimpaniUp = '\\ue78c',\n // U+E775 Medium xylophone stick down\n pictBeaterMediumXylophoneDown = '\\ue775',\n // U+E777 Medium xylophone stick left\n pictBeaterMediumXylophoneLeft = '\\ue777',\n // U+E776 Medium xylophone stick right\n pictBeaterMediumXylophoneRight = '\\ue776',\n // U+E774 Medium xylophone stick up\n pictBeaterMediumXylophoneUp = '\\ue774',\n // U+E7A7 Medium yarn beater down\n pictBeaterMediumYarnDown = '\\ue7a7',\n // U+E7A9 Medium yarn beater left\n pictBeaterMediumYarnLeft = '\\ue7a9',\n // U+E7A8 Medium yarn beater right\n pictBeaterMediumYarnRight = '\\ue7a8',\n // U+E7A6 Medium yarn beater up\n pictBeaterMediumYarnUp = '\\ue7a6',\n // U+E79F Metal bass drum stick down\n pictBeaterMetalBassDrumDown = '\\ue79f',\n // U+E79E Metal bass drum stick up\n pictBeaterMetalBassDrumUp = '\\ue79e',\n // U+E7C8 Metal beater down\n pictBeaterMetalDown = '\\ue7c8',\n // U+E7E0 Metal hammer\n pictBeaterMetalHammer = '\\ue7e0',\n // U+E7CA Metal beater, left\n pictBeaterMetalLeft = '\\ue7ca',\n // U+E7C9 Metal beater, right\n pictBeaterMetalRight = '\\ue7c9',\n // U+E7C7 Metal beater, up\n pictBeaterMetalUp = '\\ue7c7',\n // U+E7D2 Snare sticks down\n pictBeaterSnareSticksDown = '\\ue7d2',\n // U+E7D1 Snare sticks up\n pictBeaterSnareSticksUp = '\\ue7d1',\n // U+E799 Soft bass drum stick down\n pictBeaterSoftBassDrumDown = '\\ue799',\n // U+E798 Soft bass drum stick up\n pictBeaterSoftBassDrumUp = '\\ue798',\n // U+E781 Soft glockenspiel stick down\n pictBeaterSoftGlockenspielDown = '\\ue781',\n // U+E783 Soft glockenspiel stick left\n pictBeaterSoftGlockenspielLeft = '\\ue783',\n // U+E782 Soft glockenspiel stick right\n pictBeaterSoftGlockenspielRight = '\\ue782',\n // U+E780 Soft glockenspiel stick up\n pictBeaterSoftGlockenspielUp = '\\ue780',\n // U+E789 Soft timpani stick down\n pictBeaterSoftTimpaniDown = '\\ue789',\n // U+E78B Soft timpani stick left\n pictBeaterSoftTimpaniLeft = '\\ue78b',\n // U+E78A Soft timpani stick right\n pictBeaterSoftTimpaniRight = '\\ue78a',\n // U+E788 Soft timpani stick up\n pictBeaterSoftTimpaniUp = '\\ue788',\n // U+E7DB Soft xylophone beaters\n pictBeaterSoftXylophone = '\\ue7db',\n // U+E771 Soft xylophone stick down\n pictBeaterSoftXylophoneDown = '\\ue771',\n // U+E773 Soft xylophone stick left\n pictBeaterSoftXylophoneLeft = '\\ue773',\n // U+E772 Soft xylophone stick right\n pictBeaterSoftXylophoneRight = '\\ue772',\n // U+E770 Soft xylophone stick up\n pictBeaterSoftXylophoneUp = '\\ue770',\n // U+E7A3 Soft yarn beater down\n pictBeaterSoftYarnDown = '\\ue7a3',\n // U+E7A5 Soft yarn beater left\n pictBeaterSoftYarnLeft = '\\ue7a5',\n // U+E7A4 Soft yarn beater right\n pictBeaterSoftYarnRight = '\\ue7a4',\n // U+E7A2 Soft yarn beater up\n pictBeaterSoftYarnUp = '\\ue7a2',\n // U+E7DC Spoon-shaped wooden mallet\n pictBeaterSpoonWoodenMallet = '\\ue7dc',\n // U+E7AF Superball beater down\n pictBeaterSuperballDown = '\\ue7af',\n // U+E7B1 Superball beater left\n pictBeaterSuperballLeft = '\\ue7b1',\n // U+E7B0 Superball beater right\n pictBeaterSuperballRight = '\\ue7b0',\n // U+E7AE Superball beater up\n pictBeaterSuperballUp = '\\ue7ae',\n // U+E7D6 Triangle beater down\n pictBeaterTriangleDown = '\\ue7d6',\n // U+E7EF Triangle beater plain\n pictBeaterTrianglePlain = '\\ue7ef',\n // U+E7D5 Triangle beater up\n pictBeaterTriangleUp = '\\ue7d5',\n // U+E7D8 Wire brushes down\n pictBeaterWireBrushesDown = '\\ue7d8',\n // U+E7D7 Wire brushes up\n pictBeaterWireBrushesUp = '\\ue7d7',\n // U+E795 Wood timpani stick down\n pictBeaterWoodTimpaniDown = '\\ue795',\n // U+E797 Wood timpani stick left\n pictBeaterWoodTimpaniLeft = '\\ue797',\n // U+E796 Wood timpani stick right\n pictBeaterWoodTimpaniRight = '\\ue796',\n // U+E794 Wood timpani stick up\n pictBeaterWoodTimpaniUp = '\\ue794',\n // U+E77D Wood xylophone stick down\n pictBeaterWoodXylophoneDown = '\\ue77d',\n // U+E77F Wood xylophone stick left\n pictBeaterWoodXylophoneLeft = '\\ue77f',\n // U+E77E Wood xylophone stick right\n pictBeaterWoodXylophoneRight = '\\ue77e',\n // U+E77C Wood xylophone stick up\n pictBeaterWoodXylophoneUp = '\\ue77c',\n // U+E714 Bell\n pictBell = '\\ue714',\n // U+E72A Bell of cymbal\n pictBellOfCymbal = '\\ue72a',\n // U+E713 Bell plate\n pictBellPlate = '\\ue713',\n // U+E71A Bell tree\n pictBellTree = '\\ue71a',\n // U+E751 Bird whistle\n pictBirdWhistle = '\\ue751',\n // U+E6F7 Board clapper\n pictBoardClapper = '\\ue6f7',\n // U+E6DD Bongos\n pictBongos = '\\ue6dd',\n // U+E6E1 Brake drum\n pictBrakeDrum = '\\ue6e1',\n // U+E743 Cabasa\n pictCabasa = '\\ue743',\n // U+E761 Cannon\n pictCannon = '\\ue761',\n // U+E755 Car horn\n pictCarHorn = '\\ue755',\n // U+E6F8 Castanets\n pictCastanets = '\\ue6f8',\n // U+E6F9 Castanets with handle\n pictCastanetsWithHandle = '\\ue6f9',\n // U+E6B0 Celesta\n pictCelesta = '\\ue6b0',\n // U+E716 Cencerro\n pictCencerro = '\\ue716',\n // U+E7FE Center (Weinberg)\n pictCenter1 = '\\ue7fe',\n // U+E7FF Center (Ghent)\n pictCenter2 = '\\ue7ff',\n // U+E800 Center (Caltabiano)\n pictCenter3 = '\\ue800',\n // U+E748 Chain rattle\n pictChainRattle = '\\ue748',\n // U+E6C2 Chimes\n pictChimes = '\\ue6c2',\n // U+E726 Chinese cymbal\n pictChineseCymbal = '\\ue726',\n // U+E805 Choke (Weinberg)\n pictChokeCymbal = '\\ue805',\n // U+E6F2 Claves\n pictClaves = '\\ue6f2',\n // U+E7E7 Coins\n pictCoins = '\\ue7e7',\n // U+E6DE Conga\n pictConga = '\\ue6de',\n // U+E711 Cow bell\n pictCowBell = '\\ue711',\n // U+E720 Crash cymbals\n pictCrashCymbals = '\\ue720',\n // U+E6AE Crotales\n pictCrotales = '\\ue6ae',\n // U+E80C Combining crush for stem\n pictCrushStem = '\\ue80c',\n // U+E6E4 Cuica\n pictCuica = '\\ue6e4',\n // U+E728 Cymbal tongs\n pictCymbalTongs = '\\ue728',\n // U+E7F9 Damp\n pictDamp1 = '\\ue7f9',\n // U+E7FA Damp 2\n pictDamp2 = '\\ue7fa',\n // U+E7FB Damp 3\n pictDamp3 = '\\ue7fb',\n // U+E7FC Damp 4\n pictDamp4 = '\\ue7fc',\n // U+E80D Combining X for stem (dead note)\n pictDeadNoteStem = '\\ue80d',\n // U+E7E8 Drum stick\n pictDrumStick = '\\ue7e8',\n // U+E757 Duck call\n pictDuckCall = '\\ue757',\n // U+E729 Edge of cymbal\n pictEdgeOfCymbal = '\\ue729',\n // U+E6A9 Empty trapezoid\n pictEmptyTrap = '\\ue6a9',\n // U+E727 Finger cymbals\n pictFingerCymbals = '\\ue727',\n // U+E740 Flexatone\n pictFlexatone = '\\ue740',\n // U+E6F5 Football rattle\n pictFootballRatchet = '\\ue6f5',\n // U+E765 Glass harmonica\n pictGlassHarmonica = '\\ue765',\n // U+E764 Glass harp\n pictGlassHarp = '\\ue764',\n // U+E6C6 Glass plate chimes\n pictGlassPlateChimes = '\\ue6c6',\n // U+E6C5 Glass tube chimes\n pictGlassTubeChimes = '\\ue6c5',\n // U+E6A0 Glockenspiel\n pictGlsp = '\\ue6a0',\n // U+E6AA Glockenspiel (Smith Brindle)\n pictGlspSmithBrindle = '\\ue6aa',\n // U+E6E2 Goblet drum (djembe, dumbek)\n pictGobletDrum = '\\ue6e2',\n // U+E732 Gong\n pictGong = '\\ue732',\n // U+E733 Gong with button (nipple)\n pictGongWithButton = '\\ue733',\n // U+E6F3 Guiro\n pictGuiro = '\\ue6f3',\n // U+E7C4 Hard gum beater, down\n pictGumHardDown = '\\ue7c4',\n // U+E7C6 Hard gum beater, left\n pictGumHardLeft = '\\ue7c6',\n // U+E7C5 Hard gum beater, right\n pictGumHardRight = '\\ue7c5',\n // U+E7C3 Hard gum beater, up\n pictGumHardUp = '\\ue7c3',\n // U+E7C0 Medium gum beater, down\n pictGumMediumDown = '\\ue7c0',\n // U+E7C2 Medium gum beater, left\n pictGumMediumLeft = '\\ue7c2',\n // U+E7C1 Medium gum beater, right\n pictGumMediumRight = '\\ue7c1',\n // U+E7BF Medium gum beater, up\n pictGumMediumUp = '\\ue7bf',\n // U+E7BC Soft gum beater, down\n pictGumSoftDown = '\\ue7bc',\n // U+E7BE Soft gum beater, left\n pictGumSoftLeft = '\\ue7be',\n // U+E7BD Soft gum beater, right\n pictGumSoftRight = '\\ue7bd',\n // U+E7BB Soft gum beater, up\n pictGumSoftUp = '\\ue7bb',\n // U+E7F6 Half-open\n pictHalfOpen1 = '\\ue7f6',\n // U+E7F7 Half-open 2 (Weinberg)\n pictHalfOpen2 = '\\ue7f7',\n // U+E715 Handbell\n pictHandbell = '\\ue715',\n // U+E722 Hi-hat\n pictHiHat = '\\ue722',\n // U+E723 Hi-hat cymbals on stand\n pictHiHatOnStand = '\\ue723',\n // U+E767 Jaw harp\n pictJawHarp = '\\ue767',\n // U+E719 Jingle bells\n pictJingleBells = '\\ue719',\n // U+E756 Klaxon horn\n pictKlaxonHorn = '\\ue756',\n // U+E807 Right hand (Agostini)\n pictLeftHandCircle = '\\ue807',\n // U+E763 Lion's roar\n pictLionsRoar = '\\ue763',\n // U+E6B1 Lithophone\n pictLithophone = '\\ue6b1',\n // U+E6DF Log drum\n pictLogDrum = '\\ue6df',\n // U+E75A Lotus flute\n pictLotusFlute = '\\ue75a',\n // U+E6A6 Marimba\n pictMar = '\\ue6a6',\n // U+E6AC Marimba (Smith Brindle)\n pictMarSmithBrindle = '\\ue6ac',\n // U+E741 Maraca\n pictMaraca = '\\ue741',\n // U+E742 Maracas\n pictMaracas = '\\ue742',\n // U+E759 Megaphone\n pictMegaphone = '\\ue759',\n // U+E6C8 Metal plate chimes\n pictMetalPlateChimes = '\\ue6c8',\n // U+E6C7 Metal tube chimes\n pictMetalTubeChimes = '\\ue6c7',\n // U+E766 Musical saw\n pictMusicalSaw = '\\ue766',\n // U+E804 Normal position (Caltabiano)\n pictNormalPosition = '\\ue804',\n // U+E7F4 On rim\n pictOnRim = '\\ue7f4',\n // U+E7F8 Open\n pictOpen = '\\ue7f8',\n // U+E7F5 Closed / rim shot\n pictOpenRimShot = '\\ue7f5',\n // U+E760 Pistol shot\n pictPistolShot = '\\ue760',\n // U+E752 Police whistle\n pictPoliceWhistle = '\\ue752',\n // U+E6FA Quijada (jawbone)\n pictQuijada = '\\ue6fa',\n // U+E747 Rainstick\n pictRainstick = '\\ue747',\n // U+E6F4 Ratchet\n pictRatchet = '\\ue6f4',\n // U+E6FC Reco-reco\n pictRecoReco = '\\ue6fc',\n // U+E806 Left hand (Agostini)\n pictRightHandSquare = '\\ue806',\n // U+E801 Rim or edge (Weinberg)\n pictRim1 = '\\ue801',\n // U+E802 Rim (Ghent)\n pictRim2 = '\\ue802',\n // U+E803 Rim (Caltabiano)\n pictRim3 = '\\ue803',\n // U+E7FD Rim shot for stem\n pictRimShotOnStem = '\\ue7fd',\n // U+E762 Sandpaper blocks\n pictSandpaperBlocks = '\\ue762',\n // U+E7F3 Scrape around rim (counter-clockwise)\n pictScrapeAroundRim = '\\ue7f3',\n // U+E80E Scrape around rim (clockwise)\n pictScrapeAroundRimClockwise = '\\ue80e',\n // U+E7F1 Scrape from center to edge\n pictScrapeCenterToEdge = '\\ue7f1',\n // U+E7F2 Scrape from edge to center\n pictScrapeEdgeToCenter = '\\ue7f2',\n // U+E718 Shell bells\n pictShellBells = '\\ue718',\n // U+E6C4 Shell chimes\n pictShellChimes = '\\ue6c4',\n // U+E753 Siren\n pictSiren = '\\ue753',\n // U+E746 Sistrum\n pictSistrum = '\\ue746',\n // U+E724 Sizzle cymbal\n pictSizzleCymbal = '\\ue724',\n // U+E710 Sleigh bell\n pictSleighBell = '\\ue710',\n // U+E734 Slide brush on gong\n pictSlideBrushOnGong = '\\ue734',\n // U+E750 Slide whistle\n pictSlideWhistle = '\\ue750',\n // U+E6E0 Slit drum\n pictSlitDrum = '\\ue6e0',\n // U+E6D1 Snare drum\n pictSnareDrum = '\\ue6d1',\n // U+E6D3 Military snare drum\n pictSnareDrumMilitary = '\\ue6d3',\n // U+E6D2 Snare drum, snares off\n pictSnareDrumSnaresOff = '\\ue6d2',\n // U+E6AF Steel drums\n pictSteelDrums = '\\ue6af',\n // U+E7F0 Stick shot\n pictStickShot = '\\ue7f0',\n // U+E7B2 Superball\n pictSuperball = '\\ue7b2',\n // U+E721 Suspended cymbal\n pictSuspendedCymbal = '\\ue721',\n // U+E808 Combining swish for stem\n pictSwishStem = '\\ue808',\n // U+E6E3 Indian tabla\n pictTabla = '\\ue6e3',\n // U+E730 Tam-tam\n pictTamTam = '\\ue730',\n // U+E731 Tam-tam with beater (Smith Brindle)\n pictTamTamWithBeater = '\\ue731',\n // U+E6DB Tambourine\n pictTambourine = '\\ue6db',\n // U+E6F1 Temple blocks\n pictTempleBlocks = '\\ue6f1',\n // U+E6D6 Tenor drum\n pictTenorDrum = '\\ue6d6',\n // U+E744 Thundersheet\n pictThundersheet = '\\ue744',\n // U+E6DC Timbales\n pictTimbales = '\\ue6dc',\n // U+E6D0 Timpani\n pictTimpani = '\\ue6d0',\n // U+E6D7 Tom-tom\n pictTomTom = '\\ue6d7',\n // U+E6D8 Chinese tom-tom\n pictTomTomChinese = '\\ue6d8',\n // U+E6DA Indo-American tom tom\n pictTomTomIndoAmerican = '\\ue6da',\n // U+E6D9 Japanese tom-tom\n pictTomTomJapanese = '\\ue6d9',\n // U+E700 Triangle\n pictTriangle = '\\ue700',\n // U+E6B2 Tubaphone\n pictTubaphone = '\\ue6b2',\n // U+E6C0 Tubular bells\n pictTubularBells = '\\ue6c0',\n // U+E80A Combining turn left for stem\n pictTurnLeftStem = '\\ue80a',\n // U+E80B Combining turn left or right for stem\n pictTurnRightLeftStem = '\\ue80b',\n // U+E809 Combining turn right for stem\n pictTurnRightStem = '\\ue809',\n // U+E6A7 Vibraphone\n pictVib = '\\ue6a7',\n // U+E6A8 Metallophone (vibraphone motor off)\n pictVibMotorOff = '\\ue6a8',\n // U+E6AD Vibraphone (Smith Brindle)\n pictVibSmithBrindle = '\\ue6ad',\n // U+E745 Vibraslap\n pictVibraslap = '\\ue745',\n // U+E725 Vietnamese hat cymbal\n pictVietnameseHat = '\\ue725',\n // U+E6F6 Whip\n pictWhip = '\\ue6f6',\n // U+E6C1 Wind chimes (glass)\n pictWindChimesGlass = '\\ue6c1',\n // U+E754 Wind machine\n pictWindMachine = '\\ue754',\n // U+E758 Wind whistle (or mouth siren)\n pictWindWhistle = '\\ue758',\n // U+E6F0 Wood block\n pictWoodBlock = '\\ue6f0',\n // U+E7B4 Wound beater, hard core down\n pictWoundHardDown = '\\ue7b4',\n // U+E7B6 Wound beater, hard core left\n pictWoundHardLeft = '\\ue7b6',\n // U+E7B5 Wound beater, hard core right\n pictWoundHardRight = '\\ue7b5',\n // U+E7B3 Wound beater, hard core up\n pictWoundHardUp = '\\ue7b3',\n // U+E7B8 Wound beater, soft core down\n pictWoundSoftDown = '\\ue7b8',\n // U+E7BA Wound beater, soft core left\n pictWoundSoftLeft = '\\ue7ba',\n // U+E7B9 Wound beater, soft core right\n pictWoundSoftRight = '\\ue7b9',\n // U+E7B7 Wound beater, soft core up\n pictWoundSoftUp = '\\ue7b7',\n // U+E6A1 Xylophone\n pictXyl = '\\ue6a1',\n // U+E6A3 Bass xylophone\n pictXylBass = '\\ue6a3',\n // U+E6AB Xylophone (Smith Brindle)\n pictXylSmithBrindle = '\\ue6ab',\n // U+E6A2 Tenor xylophone\n pictXylTenor = '\\ue6a2',\n // U+E6A5 Trough tenor xylophone\n pictXylTenorTrough = '\\ue6a5',\n // U+E6A4 Trough xylophone\n pictXylTrough = '\\ue6a4',\n // U+E632 Buzz pizzicato\n pluckedBuzzPizzicato = '\\ue632',\n // U+E638 Damp\n pluckedDamp = '\\ue638',\n // U+E639 Damp all\n pluckedDampAll = '\\ue639',\n // U+E63B Damp for stem\n pluckedDampOnStem = '\\ue63b',\n // U+E637 Fingernail flick\n pluckedFingernailFlick = '\\ue637',\n // U+E633 Left-hand pizzicato\n pluckedLeftHandPizzicato = '\\ue633',\n // U+E63A Plectrum\n pluckedPlectrum = '\\ue63a',\n // U+E631 Snap pizzicato above\n pluckedSnapPizzicatoAbove = '\\ue631',\n // U+E630 Snap pizzicato below\n pluckedSnapPizzicatoBelow = '\\ue630',\n // U+E636 With fingernails\n pluckedWithFingernails = '\\ue636',\n // U+E514 Quindicesima\n quindicesima = '\\ue514',\n // U+E515 Quindicesima alta\n quindicesimaAlta = '\\ue515',\n // U+E516 Quindicesima bassa\n quindicesimaBassa = '\\ue516',\n // U+E51D Quindicesima bassa (mb)\n quindicesimaBassaMb = '\\ue51d',\n // U+E500 Repeat last bar\n repeat1Bar = '\\ue500',\n // U+E501 Repeat last two bars\n repeat2Bars = '\\ue501',\n // U+E502 Repeat last four bars\n repeat4Bars = '\\ue502',\n // U+E505 Repeat bar lower dot\n repeatBarLowerDot = '\\ue505',\n // U+E504 Repeat bar slash\n repeatBarSlash = '\\ue504',\n // U+E503 Repeat bar upper dot\n repeatBarUpperDot = '\\ue503',\n // U+E044 Single repeat dot\n repeatDot = '\\ue044',\n // U+E043 Repeat dots\n repeatDots = '\\ue043',\n // U+E040 Left (start) repeat sign\n repeatLeft = '\\ue040',\n // U+E041 Right (end) repeat sign\n repeatRight = '\\ue041',\n // U+E042 Right and left repeat sign\n repeatRightLeft = '\\ue042',\n // U+E4ED 1024th rest\n rest1024th = '\\ue4ed',\n // U+E4EA 128th (semihemidemisemiquaver) rest\n rest128th = '\\ue4ea',\n // U+E4E7 16th (semiquaver) rest\n rest16th = '\\ue4e7',\n // U+E4EB 256th rest\n rest256th = '\\ue4eb',\n // U+E4E8 32nd (demisemiquaver) rest\n rest32nd = '\\ue4e8',\n // U+E4EC 512th rest\n rest512th = '\\ue4ec',\n // U+E4E9 64th (hemidemisemiquaver) rest\n rest64th = '\\ue4e9',\n // U+E4E6 Eighth (quaver) rest\n rest8th = '\\ue4e6',\n // U+E4E2 Double whole (breve) rest\n restDoubleWhole = '\\ue4e2',\n // U+E4F3 Double whole rest on leger lines\n restDoubleWholeLegerLine = '\\ue4f3',\n // U+E4EE Multiple measure rest\n restHBar = '\\ue4ee',\n // U+E4EF H-bar, left half\n restHBarLeft = '\\ue4ef',\n // U+E4F0 H-bar, middle\n restHBarMiddle = '\\ue4f0',\n // U+E4F1 H-bar, right half\n restHBarRight = '\\ue4f1',\n // U+E4E4 Half (minim) rest\n restHalf = '\\ue4e4',\n // U+E4F5 Half rest on leger line\n restHalfLegerLine = '\\ue4f5',\n // U+E4E1 Longa rest\n restLonga = '\\ue4e1',\n // U+E4E0 Maxima rest\n restMaxima = '\\ue4e0',\n // U+E4E5 Quarter (crotchet) rest\n restQuarter = '\\ue4e5',\n // U+E4F2 Old-style quarter (crotchet) rest\n restQuarterOld = '\\ue4f2',\n // U+E4F6 Z-style quarter (crotchet) rest\n restQuarterZ = '\\ue4f6',\n // U+E4E3 Whole (semibreve) rest\n restWhole = '\\ue4e3',\n // U+E4F4 Whole rest on leger line\n restWholeLegerLine = '\\ue4f4',\n // U+E001 Reversed brace\n reversedBrace = '\\ue001',\n // U+E006 Reversed bracket bottom\n reversedBracketBottom = '\\ue006',\n // U+E005 Reversed bracket top\n reversedBracketTop = '\\ue005',\n // U+E04D Right repeat sign within bar\n rightRepeatSmall = '\\ue04d',\n // U+EF00 Scale degree 1\n scaleDegree1 = '\\uef00',\n // U+EF01 Scale degree 2\n scaleDegree2 = '\\uef01',\n // U+EF02 Scale degree 3\n scaleDegree3 = '\\uef02',\n // U+EF03 Scale degree 4\n scaleDegree4 = '\\uef03',\n // U+EF04 Scale degree 5\n scaleDegree5 = '\\uef04',\n // U+EF05 Scale degree 6\n scaleDegree6 = '\\uef05',\n // U+EF06 Scale degree 7\n scaleDegree7 = '\\uef06',\n // U+EF07 Scale degree 8\n scaleDegree8 = '\\uef07',\n // U+EF08 Scale degree 9\n scaleDegree9 = '\\uef08',\n // U+E06F Schäffer clef\n schaefferClef = '\\ue06f',\n // U+E072 Schäffer F clef to G clef change\n schaefferFClefToGClef = '\\ue072',\n // U+E071 Schäffer G clef to F clef change\n schaefferGClefToFClef = '\\ue071',\n // U+E070 Schäffer previous clef\n schaefferPreviousClef = '\\ue070',\n // U+E047 Segno\n segno = '\\ue047',\n // U+E04A Segno (serpent)\n segnoSerpent1 = '\\ue04a',\n // U+E04B Segno (serpent with vertical lines)\n segnoSerpent2 = '\\ue04b',\n // U+E06B Semi-pitched percussion clef 1\n semipitchedPercussionClef1 = '\\ue06b',\n // U+E06C Semi-pitched percussion clef 2\n semipitchedPercussionClef2 = '\\ue06c',\n // U+EC52 Flat\n smnFlat = '\\uec52',\n // U+EC53 Flat (white)\n smnFlatWhite = '\\uec53',\n // U+EC57 Double flat history sign\n smnHistoryDoubleFlat = '\\uec57',\n // U+EC55 Double sharp history sign\n smnHistoryDoubleSharp = '\\uec55',\n // U+EC56 Flat history sign\n smnHistoryFlat = '\\uec56',\n // U+EC54 Sharp history sign\n smnHistorySharp = '\\uec54',\n // U+EC58 Natural (N)\n smnNatural = '\\uec58',\n // U+EC50 Sharp stem up\n smnSharp = '\\uec50',\n // U+EC59 Sharp stem down\n smnSharpDown = '\\uec59',\n // U+EC51 Sharp (white) stem up\n smnSharpWhite = '\\uec51',\n // U+EC5A Sharp (white) stem down\n smnSharpWhiteDown = '\\uec5a',\n // U+E00A Split bar divider (bar spans a system break)\n splitBarDivider = '\\ue00a',\n // U+E010 1-line staff\n staff1Line = '\\ue010',\n // U+E01C 1-line staff (narrow)\n staff1LineNarrow = '\\ue01c',\n // U+E016 1-line staff (wide)\n staff1LineWide = '\\ue016',\n // U+E011 2-line staff\n staff2Lines = '\\ue011',\n // U+E01D 2-line staff (narrow)\n staff2LinesNarrow = '\\ue01d',\n // U+E017 2-line staff (wide)\n staff2LinesWide = '\\ue017',\n // U+E012 3-line staff\n staff3Lines = '\\ue012',\n // U+E01E 3-line staff (narrow)\n staff3LinesNarrow = '\\ue01e',\n // U+E018 3-line staff (wide)\n staff3LinesWide = '\\ue018',\n // U+E013 4-line staff\n staff4Lines = '\\ue013',\n // U+E01F 4-line staff (narrow)\n staff4LinesNarrow = '\\ue01f',\n // U+E019 4-line staff (wide)\n staff4LinesWide = '\\ue019',\n // U+E014 5-line staff\n staff5Lines = '\\ue014',\n // U+E020 5-line staff (narrow)\n staff5LinesNarrow = '\\ue020',\n // U+E01A 5-line staff (wide)\n staff5LinesWide = '\\ue01a',\n // U+E015 6-line staff\n staff6Lines = '\\ue015',\n // U+E021 6-line staff (narrow)\n staff6LinesNarrow = '\\ue021',\n // U+E01B 6-line staff (wide)\n staff6LinesWide = '\\ue01b',\n // U+E00B Staff divide arrow down\n staffDivideArrowDown = '\\ue00b',\n // U+E00C Staff divide arrow up\n staffDivideArrowUp = '\\ue00c',\n // U+E00D Staff divide arrows\n staffDivideArrowUpDown = '\\ue00d',\n // U+EB98 Lower 1 staff position\n staffPosLower1 = '\\ueb98',\n // U+EB99 Lower 2 staff positions\n staffPosLower2 = '\\ueb99',\n // U+EB9A Lower 3 staff positions\n staffPosLower3 = '\\ueb9a',\n // U+EB9B Lower 4 staff positions\n staffPosLower4 = '\\ueb9b',\n // U+EB9C Lower 5 staff positions\n staffPosLower5 = '\\ueb9c',\n // U+EB9D Lower 6 staff positions\n staffPosLower6 = '\\ueb9d',\n // U+EB9E Lower 7 staff positions\n staffPosLower7 = '\\ueb9e',\n // U+EB9F Lower 8 staff positions\n staffPosLower8 = '\\ueb9f',\n // U+EB90 Raise 1 staff position\n staffPosRaise1 = '\\ueb90',\n // U+EB91 Raise 2 staff positions\n staffPosRaise2 = '\\ueb91',\n // U+EB92 Raise 3 staff positions\n staffPosRaise3 = '\\ueb92',\n // U+EB93 Raise 4 staff positions\n staffPosRaise4 = '\\ueb93',\n // U+EB94 Raise 5 staff positions\n staffPosRaise5 = '\\ueb94',\n // U+EB95 Raise 6 staff positions\n staffPosRaise6 = '\\ueb95',\n // U+EB96 Raise 7 staff positions\n staffPosRaise7 = '\\ueb96',\n // U+EB97 Raise 8 staff positions\n staffPosRaise8 = '\\ueb97',\n // U+E210 Combining stem\n stem = '\\ue210',\n // U+E215 Combining bow on bridge stem\n stemBowOnBridge = '\\ue215',\n // U+E216 Combining bow on tailpiece stem\n stemBowOnTailpiece = '\\ue216',\n // U+E217 Combining buzz roll stem\n stemBuzzRoll = '\\ue217',\n // U+E218 Combining damp stem\n stemDamp = '\\ue218',\n // U+E21F Combining harp string noise stem\n stemHarpStringNoise = '\\ue21f',\n // U+E21A Combining multiphonics (black) stem\n stemMultiphonicsBlack = '\\ue21a',\n // U+E21C Combining multiphonics (black and white) stem\n stemMultiphonicsBlackWhite = '\\ue21c',\n // U+E21B Combining multiphonics (white) stem\n stemMultiphonicsWhite = '\\ue21b',\n // U+E213 Combining Penderecki unmeasured tremolo stem\n stemPendereckiTremolo = '\\ue213',\n // U+E21E Combining rim shot stem\n stemRimShot = '\\ue21e',\n // U+E211 Combining sprechgesang stem\n stemSprechgesang = '\\ue211',\n // U+E214 Combining sul ponticello (bow behind bridge) stem\n stemSulPonticello = '\\ue214',\n // U+E21D Combining sussurando stem\n stemSussurando = '\\ue21d',\n // U+E212 Combining swished stem\n stemSwished = '\\ue212',\n // U+E219 Combining vibrato pulse accent (Saunders) stem\n stemVibratoPulse = '\\ue219',\n // U+E232 Stockhausen irregular tremolo (\"Morsen\", like Morse code)\n stockhausenTremolo = '\\ue232',\n // U+E618 Bow behind bridge (sul ponticello)\n stringsBowBehindBridge = '\\ue618',\n // U+E62A Bow behind bridge on four strings\n stringsBowBehindBridgeFourStrings = '\\ue62a',\n // U+E627 Bow behind bridge on one string\n stringsBowBehindBridgeOneString = '\\ue627',\n // U+E629 Bow behind bridge on three strings\n stringsBowBehindBridgeThreeStrings = '\\ue629',\n // U+E628 Bow behind bridge on two strings\n stringsBowBehindBridgeTwoStrings = '\\ue628',\n // U+E619 Bow on top of bridge\n stringsBowOnBridge = '\\ue619',\n // U+E61A Bow on tailpiece\n stringsBowOnTailpiece = '\\ue61a',\n // U+E626 Change bow direction, indeterminate\n stringsChangeBowDirection = '\\ue626',\n // U+E610 Down bow\n stringsDownBow = '\\ue610',\n // U+EE82 Down bow, away from body\n stringsDownBowAwayFromBody = '\\uee82',\n // U+EE84 Down bow, beyond bridge\n stringsDownBowBeyondBridge = '\\uee84',\n // U+EE80 Down bow, towards body\n stringsDownBowTowardsBody = '\\uee80',\n // U+E611 Turned down bow\n stringsDownBowTurned = '\\ue611',\n // U+E622 Fouetté\n stringsFouette = '\\ue622',\n // U+E615 Half-harmonic\n stringsHalfHarmonic = '\\ue615',\n // U+E614 Harmonic\n stringsHarmonic = '\\ue614',\n // U+E620 Jeté (gettato) above\n stringsJeteAbove = '\\ue620',\n // U+E621 Jeté (gettato) below\n stringsJeteBelow = '\\ue621',\n // U+E617 Mute off\n stringsMuteOff = '\\ue617',\n // U+E616 Mute on\n stringsMuteOn = '\\ue616',\n // U+E61B Overpressure, down bow\n stringsOverpressureDownBow = '\\ue61b',\n // U+E61F Overpressure, no bow direction\n stringsOverpressureNoDirection = '\\ue61f',\n // U+E61D Overpressure possibile, down bow\n stringsOverpressurePossibileDownBow = '\\ue61d',\n // U+E61E Overpressure possibile, up bow\n stringsOverpressurePossibileUpBow = '\\ue61e',\n // U+E61C Overpressure, up bow\n stringsOverpressureUpBow = '\\ue61c',\n // U+EE88 Scrape, circular clockwise\n stringsScrapeCircularClockwise = '\\uee88',\n // U+EE89 Scrape, circular counter-clockwise\n stringsScrapeCircularCounterclockwise = '\\uee89',\n // U+EE86 Scrape, parallel inward\n stringsScrapeParallelInward = '\\uee86',\n // U+EE87 Scrape, parallel outward\n stringsScrapeParallelOutward = '\\uee87',\n // U+E624 Thumb position\n stringsThumbPosition = '\\ue624',\n // U+E625 Turned thumb position\n stringsThumbPositionTurned = '\\ue625',\n // U+EE8A Triple chop, inward\n stringsTripleChopInward = '\\uee8a',\n // U+EE8B Triple chop, outward\n stringsTripleChopOutward = '\\uee8b',\n // U+E612 Up bow\n stringsUpBow = '\\ue612',\n // U+EE83 Up bow, away from body\n stringsUpBowAwayFromBody = '\\uee83',\n // U+EE85 Up bow, beyond bridge\n stringsUpBowBeyondBridge = '\\uee85',\n // U+EE81 Up bow, towards body\n stringsUpBowTowardsBody = '\\uee81',\n // U+E613 Turned up bow\n stringsUpBowTurned = '\\ue613',\n // U+E623 Vibrato pulse accent (Saunders) for stem\n stringsVibratoPulse = '\\ue623',\n // U+EE72 Swiss rudiments doublé black notehead\n swissRudimentsNoteheadBlackDouble = '\\uee72',\n // U+EE70 Swiss rudiments flam black notehead\n swissRudimentsNoteheadBlackFlam = '\\uee70',\n // U+EE73 Swiss rudiments doublé half (minim) notehead\n swissRudimentsNoteheadHalfDouble = '\\uee73',\n // U+EE71 Swiss rudiments flam half (minim) notehead\n swissRudimentsNoteheadHalfFlam = '\\uee71',\n // U+E007 System divider\n systemDivider = '\\ue007',\n // U+E009 Extra long system divider\n systemDividerExtraLong = '\\ue009',\n // U+E008 Long system divider\n systemDividerLong = '\\ue008',\n // U+E1FC Augmentation dot\n textAugmentationDot = '\\ue1fc',\n // U+E1F5 Black note, fractional 16th beam, long stem\n textBlackNoteFrac16thLongStem = '\\ue1f5',\n // U+E1F4 Black note, fractional 16th beam, short stem\n textBlackNoteFrac16thShortStem = '\\ue1f4',\n // U+E1F6 Black note, fractional 32nd beam, long stem\n textBlackNoteFrac32ndLongStem = '\\ue1f6',\n // U+E1F3 Black note, fractional 8th beam, long stem\n textBlackNoteFrac8thLongStem = '\\ue1f3',\n // U+E1F2 Black note, fractional 8th beam, short stem\n textBlackNoteFrac8thShortStem = '\\ue1f2',\n // U+E1F1 Black note, long stem\n textBlackNoteLongStem = '\\ue1f1',\n // U+E1F0 Black note, short stem\n textBlackNoteShortStem = '\\ue1f0',\n // U+E1FA Continuing 16th beam for long stem\n textCont16thBeamLongStem = '\\ue1fa',\n // U+E1F9 Continuing 16th beam for short stem\n textCont16thBeamShortStem = '\\ue1f9',\n // U+E1FB Continuing 32nd beam for long stem\n textCont32ndBeamLongStem = '\\ue1fb',\n // U+E1F8 Continuing 8th beam for long stem\n textCont8thBeamLongStem = '\\ue1f8',\n // U+E1F7 Continuing 8th beam for short stem\n textCont8thBeamShortStem = '\\ue1f7',\n // U+E209 Headless black note, fractional 16th beam, long stem\n textHeadlessBlackNoteFrac16thLongStem = '\\ue209',\n // U+E208 Headless black note, fractional 16th beam, short stem\n textHeadlessBlackNoteFrac16thShortStem = '\\ue208',\n // U+E20A Headless black note, fractional 32nd beam, long stem\n textHeadlessBlackNoteFrac32ndLongStem = '\\ue20a',\n // U+E207 Headless black note, fractional 8th beam, long stem\n textHeadlessBlackNoteFrac8thLongStem = '\\ue207',\n // U+E206 Headless black note, fractional 8th beam, short stem\n textHeadlessBlackNoteFrac8thShortStem = '\\ue206',\n // U+E205 Headless black note, long stem\n textHeadlessBlackNoteLongStem = '\\ue205',\n // U+E204 Headless black note, short stem\n textHeadlessBlackNoteShortStem = '\\ue204',\n // U+E1FD Tie\n textTie = '\\ue1fd',\n // U+E202 Tuplet number 3 for long stem\n textTuplet3LongStem = '\\ue202',\n // U+E1FF Tuplet number 3 for short stem\n textTuplet3ShortStem = '\\ue1ff',\n // U+E203 Tuplet bracket end for long stem\n textTupletBracketEndLongStem = '\\ue203',\n // U+E200 Tuplet bracket end for short stem\n textTupletBracketEndShortStem = '\\ue200',\n // U+E201 Tuplet bracket start for long stem\n textTupletBracketStartLongStem = '\\ue201',\n // U+E1FE Tuplet bracket start for short stem\n textTupletBracketStartShortStem = '\\ue1fe',\n // U+E080 Time signature 0\n timeSig0 = '\\ue080',\n // U+ECF0 Reversed time signature 0\n timeSig0Reversed = '\\uecf0',\n // U+ECE0 Turned time signature 0\n timeSig0Turned = '\\uece0',\n // U+E081 Time signature 1\n timeSig1 = '\\ue081',\n // U+ECF1 Reversed time signature 1\n timeSig1Reversed = '\\uecf1',\n // U+ECE1 Turned time signature 1\n timeSig1Turned = '\\uece1',\n // U+E082 Time signature 2\n timeSig2 = '\\ue082',\n // U+ECF2 Reversed time signature 2\n timeSig2Reversed = '\\uecf2',\n // U+ECE2 Turned time signature 2\n timeSig2Turned = '\\uece2',\n // U+E083 Time signature 3\n timeSig3 = '\\ue083',\n // U+ECF3 Reversed time signature 3\n timeSig3Reversed = '\\uecf3',\n // U+ECE3 Turned time signature 3\n timeSig3Turned = '\\uece3',\n // U+E084 Time signature 4\n timeSig4 = '\\ue084',\n // U+ECF4 Reversed time signature 4\n timeSig4Reversed = '\\uecf4',\n // U+ECE4 Turned time signature 4\n timeSig4Turned = '\\uece4',\n // U+E085 Time signature 5\n timeSig5 = '\\ue085',\n // U+ECF5 Reversed time signature 5\n timeSig5Reversed = '\\uecf5',\n // U+ECE5 Turned time signature 5\n timeSig5Turned = '\\uece5',\n // U+E086 Time signature 6\n timeSig6 = '\\ue086',\n // U+ECF6 Reversed time signature 6\n timeSig6Reversed = '\\uecf6',\n // U+ECE6 Turned time signature 6\n timeSig6Turned = '\\uece6',\n // U+E087 Time signature 7\n timeSig7 = '\\ue087',\n // U+ECF7 Reversed time signature 7\n timeSig7Reversed = '\\uecf7',\n // U+ECE7 Turned time signature 7\n timeSig7Turned = '\\uece7',\n // U+E088 Time signature 8\n timeSig8 = '\\ue088',\n // U+ECF8 Reversed time signature 8\n timeSig8Reversed = '\\uecf8',\n // U+ECE8 Turned time signature 8\n timeSig8Turned = '\\uece8',\n // U+E089 Time signature 9\n timeSig9 = '\\ue089',\n // U+ECF9 Reversed time signature 9\n timeSig9Reversed = '\\uecf9',\n // U+ECE9 Turned time signature 9\n timeSig9Turned = '\\uece9',\n // U+EC80 Left bracket for whole time signature\n timeSigBracketLeft = '\\uec80',\n // U+EC82 Left bracket for numerator only\n timeSigBracketLeftSmall = '\\uec82',\n // U+EC81 Right bracket for whole time signature\n timeSigBracketRight = '\\uec81',\n // U+EC83 Right bracket for numerator only\n timeSigBracketRightSmall = '\\uec83',\n // U+E09F Control character for denominator digit\n timeSigCombDenominator = '\\ue09f',\n // U+E09E Control character for numerator digit\n timeSigCombNumerator = '\\ue09e',\n // U+E096 Time signature comma\n timeSigComma = '\\ue096',\n // U+E08A Common time\n timeSigCommon = '\\ue08a',\n // U+ECFA Reversed common time\n timeSigCommonReversed = '\\uecfa',\n // U+ECEA Turned common time\n timeSigCommonTurned = '\\uecea',\n // U+EC85 Cut time (Bach)\n timeSigCut2 = '\\uec85',\n // U+EC86 Cut triple time (9/8)\n timeSigCut3 = '\\uec86',\n // U+E08B Cut time\n timeSigCutCommon = '\\ue08b',\n // U+ECFB Reversed cut time\n timeSigCutCommonReversed = '\\uecfb',\n // U+ECEB Turned cut time\n timeSigCutCommonTurned = '\\ueceb',\n // U+E08F Time signature equals\n timeSigEquals = '\\ue08f',\n // U+E098 Time signature fraction ½\n timeSigFractionHalf = '\\ue098',\n // U+E09A Time signature fraction ⅓\n timeSigFractionOneThird = '\\ue09a',\n // U+E097 Time signature fraction ¼\n timeSigFractionQuarter = '\\ue097',\n // U+E099 Time signature fraction ¾\n timeSigFractionThreeQuarters = '\\ue099',\n // U+E09B Time signature fraction ⅔\n timeSigFractionTwoThirds = '\\ue09b',\n // U+E08E Time signature fraction slash\n timeSigFractionalSlash = '\\ue08e',\n // U+E090 Time signature minus\n timeSigMinus = '\\ue090',\n // U+E091 Time signature multiply\n timeSigMultiply = '\\ue091',\n // U+E09D Open time signature (Penderecki)\n timeSigOpenPenderecki = '\\ue09d',\n // U+E094 Left parenthesis for whole time signature\n timeSigParensLeft = '\\ue094',\n // U+E092 Left parenthesis for numerator only\n timeSigParensLeftSmall = '\\ue092',\n // U+E095 Right parenthesis for whole time signature\n timeSigParensRight = '\\ue095',\n // U+E093 Right parenthesis for numerator only\n timeSigParensRightSmall = '\\ue093',\n // U+E08C Time signature +\n timeSigPlus = '\\ue08c',\n // U+E08D Time signature + (for numerators)\n timeSigPlusSmall = '\\ue08d',\n // U+EC84 Time signature slash separator\n timeSigSlash = '\\uec84',\n // U+E09C Open time signature\n timeSigX = '\\ue09c',\n // U+E220 Combining tremolo 1\n tremolo1 = '\\ue220',\n // U+E221 Combining tremolo 2\n tremolo2 = '\\ue221',\n // U+E222 Combining tremolo 3\n tremolo3 = '\\ue222',\n // U+E223 Combining tremolo 4\n tremolo4 = '\\ue223',\n // U+E224 Combining tremolo 5\n tremolo5 = '\\ue224',\n // U+E22E Divide measured tremolo by 2\n tremoloDivisiDots2 = '\\ue22e',\n // U+E22F Divide measured tremolo by 3\n tremoloDivisiDots3 = '\\ue22f',\n // U+E230 Divide measured tremolo by 4\n tremoloDivisiDots4 = '\\ue230',\n // U+E231 Divide measured tremolo by 6\n tremoloDivisiDots6 = '\\ue231',\n // U+E225 Fingered tremolo 1\n tremoloFingered1 = '\\ue225',\n // U+E226 Fingered tremolo 2\n tremoloFingered2 = '\\ue226',\n // U+E227 Fingered tremolo 3\n tremoloFingered3 = '\\ue227',\n // U+E228 Fingered tremolo 4\n tremoloFingered4 = '\\ue228',\n // U+E229 Fingered tremolo 5\n tremoloFingered5 = '\\ue229',\n // U+E5F2 Triple-tongue above\n tripleTongueAbove = '\\ue5f2',\n // U+E5F3 Triple-tongue below\n tripleTongueBelow = '\\ue5f3',\n // U+E880 Tuplet 0\n tuplet0 = '\\ue880',\n // U+E881 Tuplet 1\n tuplet1 = '\\ue881',\n // U+E882 Tuplet 2\n tuplet2 = '\\ue882',\n // U+E883 Tuplet 3\n tuplet3 = '\\ue883',\n // U+E884 Tuplet 4\n tuplet4 = '\\ue884',\n // U+E885 Tuplet 5\n tuplet5 = '\\ue885',\n // U+E886 Tuplet 6\n tuplet6 = '\\ue886',\n // U+E887 Tuplet 7\n tuplet7 = '\\ue887',\n // U+E888 Tuplet 8\n tuplet8 = '\\ue888',\n // U+E889 Tuplet 9\n tuplet9 = '\\ue889',\n // U+E88A Tuplet colon\n tupletColon = '\\ue88a',\n // U+E22C Wieniawski unmeasured tremolo\n unmeasuredTremolo = '\\ue22c',\n // U+E22D Wieniawski unmeasured tremolo (simpler)\n unmeasuredTremoloSimple = '\\ue22d',\n // U+E069 Unpitched percussion clef 1\n unpitchedPercussionClef1 = '\\ue069',\n // U+E06A Unpitched percussion clef 2\n unpitchedPercussionClef2 = '\\ue06a',\n // U+E517 Ventiduesima\n ventiduesima = '\\ue517',\n // U+E518 Ventiduesima alta\n ventiduesimaAlta = '\\ue518',\n // U+E519 Ventiduesima bassa\n ventiduesimaBassa = '\\ue519',\n // U+E51E Ventiduesima bassa (mb)\n ventiduesimaBassaMb = '\\ue51e',\n // U+E649 Finger click (Stockhausen)\n vocalFingerClickStockhausen = '\\ue649',\n // U+E64B Halb gesungen (semi-sprechgesang)\n vocalHalbGesungen = '\\ue64b',\n // U+E640 Mouth closed\n vocalMouthClosed = '\\ue640',\n // U+E642 Mouth open\n vocalMouthOpen = '\\ue642',\n // U+E644 Mouth pursed\n vocalMouthPursed = '\\ue644',\n // U+E641 Mouth slightly open\n vocalMouthSlightlyOpen = '\\ue641',\n // U+E643 Mouth wide open\n vocalMouthWideOpen = '\\ue643',\n // U+E647 Nasal voice\n vocalNasalVoice = '\\ue647',\n // U+E645 Sprechgesang\n vocalSprechgesang = '\\ue645',\n // U+E648 Tongue click (Stockhausen)\n vocalTongueClickStockhausen = '\\ue648',\n // U+E64A Tongue and finger click (Stockhausen)\n vocalTongueFingerClickStockhausen = '\\ue64a',\n // U+E646 Combining sussurando for stem\n vocalsSussurando = '\\ue646',\n // U+EAAA Arpeggiato wiggle segment, downwards\n wiggleArpeggiatoDown = '\\ueaaa',\n // U+EAAE Arpeggiato arrowhead down\n wiggleArpeggiatoDownArrow = '\\ueaae',\n // U+EAAC Arpeggiato downward swash\n wiggleArpeggiatoDownSwash = '\\ueaac',\n // U+EAA9 Arpeggiato wiggle segment, upwards\n wiggleArpeggiatoUp = '\\ueaa9',\n // U+EAAD Arpeggiato arrowhead up\n wiggleArpeggiatoUpArrow = '\\ueaad',\n // U+EAAB Arpeggiato upward swash\n wiggleArpeggiatoUpSwash = '\\ueaab',\n // U+EAC9 Circular motion segment\n wiggleCircular = '\\ueac9',\n // U+EAC0 Constant circular motion segment\n wiggleCircularConstant = '\\ueac0',\n // U+EAC1 Constant circular motion segment (flipped)\n wiggleCircularConstantFlipped = '\\ueac1',\n // U+EAC3 Constant circular motion segment (flipped, large)\n wiggleCircularConstantFlippedLarge = '\\ueac3',\n // U+EAC2 Constant circular motion segment (large)\n wiggleCircularConstantLarge = '\\ueac2',\n // U+EACB Circular motion end\n wiggleCircularEnd = '\\ueacb',\n // U+EAC8 Circular motion segment, large\n wiggleCircularLarge = '\\ueac8',\n // U+EAC7 Circular motion segment, larger\n wiggleCircularLarger = '\\ueac7',\n // U+EAC6 Circular motion segment, larger still\n wiggleCircularLargerStill = '\\ueac6',\n // U+EAC5 Circular motion segment, largest\n wiggleCircularLargest = '\\ueac5',\n // U+EACA Circular motion segment, small\n wiggleCircularSmall = '\\ueaca',\n // U+EAC4 Circular motion start\n wiggleCircularStart = '\\ueac4',\n // U+EAAF Glissando wiggle segment\n wiggleGlissando = '\\ueaaf',\n // U+EABD Group glissando 1\n wiggleGlissandoGroup1 = '\\ueabd',\n // U+EABE Group glissando 2\n wiggleGlissandoGroup2 = '\\ueabe',\n // U+EABF Group glissando 3\n wiggleGlissandoGroup3 = '\\ueabf',\n // U+EAF0 Quasi-random squiggle 1\n wiggleRandom1 = '\\ueaf0',\n // U+EAF1 Quasi-random squiggle 2\n wiggleRandom2 = '\\ueaf1',\n // U+EAF2 Quasi-random squiggle 3\n wiggleRandom3 = '\\ueaf2',\n // U+EAF3 Quasi-random squiggle 4\n wiggleRandom4 = '\\ueaf3',\n // U+EABB Sawtooth line segment\n wiggleSawtooth = '\\ueabb',\n // U+EABA Narrow sawtooth line segment\n wiggleSawtoothNarrow = '\\ueaba',\n // U+EABC Wide sawtooth line segment\n wiggleSawtoothWide = '\\ueabc',\n // U+EAB8 Square wave line segment\n wiggleSquareWave = '\\ueab8',\n // U+EAB7 Narrow square wave line segment\n wiggleSquareWaveNarrow = '\\ueab7',\n // U+EAB9 Wide square wave line segment\n wiggleSquareWaveWide = '\\ueab9',\n // U+EAA4 Trill wiggle segment\n wiggleTrill = '\\ueaa4',\n // U+EAA3 Trill wiggle segment, fast\n wiggleTrillFast = '\\ueaa3',\n // U+EAA2 Trill wiggle segment, faster\n wiggleTrillFaster = '\\ueaa2',\n // U+EAA1 Trill wiggle segment, faster still\n wiggleTrillFasterStill = '\\ueaa1',\n // U+EAA0 Trill wiggle segment, fastest\n wiggleTrillFastest = '\\ueaa0',\n // U+EAA5 Trill wiggle segment, slow\n wiggleTrillSlow = '\\ueaa5',\n // U+EAA6 Trill wiggle segment, slower\n wiggleTrillSlower = '\\ueaa6',\n // U+EAA7 Trill wiggle segment, slower still\n wiggleTrillSlowerStill = '\\ueaa7',\n // U+EAA8 Trill wiggle segment, slowest\n wiggleTrillSlowest = '\\ueaa8',\n // U+EAEE Vibrato largest, slower\n wiggleVIbratoLargestSlower = '\\ueaee',\n // U+EAE0 Vibrato medium, slower\n wiggleVIbratoMediumSlower = '\\ueae0',\n // U+EAB0 Vibrato / shake wiggle segment\n wiggleVibrato = '\\ueab0',\n // U+EAE5 Vibrato large, fast\n wiggleVibratoLargeFast = '\\ueae5',\n // U+EAE4 Vibrato large, faster\n wiggleVibratoLargeFaster = '\\ueae4',\n // U+EAE3 Vibrato large, faster still\n wiggleVibratoLargeFasterStill = '\\ueae3',\n // U+EAE2 Vibrato large, fastest\n wiggleVibratoLargeFastest = '\\ueae2',\n // U+EAE6 Vibrato large, slow\n wiggleVibratoLargeSlow = '\\ueae6',\n // U+EAE7 Vibrato large, slower\n wiggleVibratoLargeSlower = '\\ueae7',\n // U+EAE8 Vibrato large, slowest\n wiggleVibratoLargeSlowest = '\\ueae8',\n // U+EAEC Vibrato largest, fast\n wiggleVibratoLargestFast = '\\ueaec',\n // U+EAEB Vibrato largest, faster\n wiggleVibratoLargestFaster = '\\ueaeb',\n // U+EAEA Vibrato largest, faster still\n wiggleVibratoLargestFasterStill = '\\ueaea',\n // U+EAE9 Vibrato largest, fastest\n wiggleVibratoLargestFastest = '\\ueae9',\n // U+EAED Vibrato largest, slow\n wiggleVibratoLargestSlow = '\\ueaed',\n // U+EAEF Vibrato largest, slowest\n wiggleVibratoLargestSlowest = '\\ueaef',\n // U+EADE Vibrato medium, fast\n wiggleVibratoMediumFast = '\\ueade',\n // U+EADD Vibrato medium, faster\n wiggleVibratoMediumFaster = '\\ueadd',\n // U+EADC Vibrato medium, faster still\n wiggleVibratoMediumFasterStill = '\\ueadc',\n // U+EADB Vibrato medium, fastest\n wiggleVibratoMediumFastest = '\\ueadb',\n // U+EADF Vibrato medium, slow\n wiggleVibratoMediumSlow = '\\ueadf',\n // U+EAE1 Vibrato medium, slowest\n wiggleVibratoMediumSlowest = '\\ueae1',\n // U+EAD7 Vibrato small, fast\n wiggleVibratoSmallFast = '\\uead7',\n // U+EAD6 Vibrato small, faster\n wiggleVibratoSmallFaster = '\\uead6',\n // U+EAD5 Vibrato small, faster still\n wiggleVibratoSmallFasterStill = '\\uead5',\n // U+EAD4 Vibrato small, fastest\n wiggleVibratoSmallFastest = '\\uead4',\n // U+EAD8 Vibrato small, slow\n wiggleVibratoSmallSlow = '\\uead8',\n // U+EAD9 Vibrato small, slower\n wiggleVibratoSmallSlower = '\\uead9',\n // U+EADA Vibrato small, slowest\n wiggleVibratoSmallSlowest = '\\ueada',\n // U+EAD0 Vibrato smallest, fast\n wiggleVibratoSmallestFast = '\\uead0',\n // U+EACF Vibrato smallest, faster\n wiggleVibratoSmallestFaster = '\\ueacf',\n // U+EACE Vibrato smallest, faster still\n wiggleVibratoSmallestFasterStill = '\\ueace',\n // U+EACD Vibrato smallest, fastest\n wiggleVibratoSmallestFastest = '\\ueacd',\n // U+EAD1 Vibrato smallest, slow\n wiggleVibratoSmallestSlow = '\\uead1',\n // U+EAD2 Vibrato smallest, slower\n wiggleVibratoSmallestSlower = '\\uead2',\n // U+EAD3 Vibrato smallest, slowest\n wiggleVibratoSmallestSlowest = '\\uead3',\n // U+EACC Vibrato start\n wiggleVibratoStart = '\\ueacc',\n // U+EAB1 Wide vibrato / shake wiggle segment\n wiggleVibratoWide = '\\ueab1',\n // U+EAB5 Wavy line segment\n wiggleWavy = '\\ueab5',\n // U+EAB4 Narrow wavy line segment\n wiggleWavyNarrow = '\\ueab4',\n // U+EAB6 Wide wavy line segment\n wiggleWavyWide = '\\ueab6',\n // U+E5F4 Closed hole\n windClosedHole = '\\ue5f4',\n // U+E5FB Flatter embouchure\n windFlatEmbouchure = '\\ue5fb',\n // U+E5F6 Half-closed hole\n windHalfClosedHole1 = '\\ue5f6',\n // U+E5F7 Half-closed hole 2\n windHalfClosedHole2 = '\\ue5f7',\n // U+E5F8 Half-open hole\n windHalfClosedHole3 = '\\ue5f8',\n // U+E5FE Somewhat relaxed embouchure\n windLessRelaxedEmbouchure = '\\ue5fe',\n // U+E600 Somewhat tight embouchure\n windLessTightEmbouchure = '\\ue600',\n // U+E60A Mouthpiece or hand pop\n windMouthpiecePop = '\\ue60a',\n // U+E607 Combining multiphonics (black) for stem\n windMultiphonicsBlackStem = '\\ue607',\n // U+E609 Combining multiphonics (black and white) for stem\n windMultiphonicsBlackWhiteStem = '\\ue609',\n // U+E608 Combining multiphonics (white) for stem\n windMultiphonicsWhiteStem = '\\ue608',\n // U+E5F9 Open hole\n windOpenHole = '\\ue5f9',\n // U+E606 Much more reed (push inwards)\n windReedPositionIn = '\\ue606',\n // U+E604 Normal reed position\n windReedPositionNormal = '\\ue604',\n // U+E605 Very little reed (pull outwards)\n windReedPositionOut = '\\ue605',\n // U+E5FD Relaxed embouchure\n windRelaxedEmbouchure = '\\ue5fd',\n // U+E60B Rim only\n windRimOnly = '\\ue60b',\n // U+E5FC Sharper embouchure\n windSharpEmbouchure = '\\ue5fc',\n // U+E603 Very tight embouchure / strong air pressure\n windStrongAirPressure = '\\ue603',\n // U+E5F5 Three-quarters closed hole\n windThreeQuartersClosedHole = '\\ue5f5',\n // U+E5FF Tight embouchure\n windTightEmbouchure = '\\ue5ff',\n // U+E5FA Trill key\n windTrillKey = '\\ue5fa',\n // U+E601 Very tight embouchure\n windVeryTightEmbouchure = '\\ue601',\n // U+E602 Very relaxed embouchure / weak air-pressure\n windWeakAirPressure = '\\ue602',\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n\nimport { ArticulationStruct } from './articulation';\nimport { Fraction } from './fraction';\nimport { Glyphs } from './glyphs';\nimport { GlyphProps, KeyProps } from './note';\nimport { RuntimeError } from './util';\n\nconst RESOLUTION = 16384;\n\n/**\n * Map duration numbers and strings to an integer number of ticks,\n * the unit of duration used throughout VexFlow.\n * For example, a quarter note is 4, so it maps to RESOLUTION / 4 = 4096 ticks.\n * In some places ticks can also be Fractions (such as tuplets) but not in\n * basic durations.\n */\nconst durations: Record<string, number> = {\n '1/8': RESOLUTION * 8, // Maxima\n '1/4': RESOLUTION * 4, // Longa\n '1/2': RESOLUTION * 2, // Breve\n 1: RESOLUTION / 1,\n 2: RESOLUTION / 2,\n 4: RESOLUTION / 4,\n 8: RESOLUTION / 8,\n 16: RESOLUTION / 16,\n 32: RESOLUTION / 32,\n 64: RESOLUTION / 64,\n 128: RESOLUTION / 128,\n 256: RESOLUTION / 256,\n 512: RESOLUTION / 512,\n 1024: RESOLUTION / 1024,\n};\n\nconst durationAliases: Record<string, string> = {\n m: '1/8', // Maxima\n l: '1/4', // Longa\n w: '1',\n h: '2',\n q: '4',\n\n // This is the default duration used to render bars (BarNote). Bars no longer\n // consume ticks, so this should be a no-op.\n // TODO(0xfe): This needs to be cleaned up.\n b: '256',\n};\n\ntype KeySignature = {\n accidental?: string;\n num: number;\n};\n\ntype KeySignatures = Record<string, KeySignature>;\n\nconst generateKeySignatures = (): KeySignatures => {\n const keySignatures: KeySignatures = {};\n\n for (let i = 1; i <= 14; i++) {\n keySignatures[`flats_${i}`] = { accidental: 'b', num: i };\n keySignatures[`sharps_${i}`] = { accidental: '#', num: i };\n }\n\n keySignatures['flats_0'] = { num: 0 };\n keySignatures['sharps_0'] = { num: 0 };\n\n return keySignatures;\n};\n\nconst keySignatures: Record<string, KeySignature> = {\n ...generateKeySignatures(),\n C: { num: 0 },\n Am: { num: 0 },\n F: { accidental: 'b', num: 1 },\n Dm: { accidental: 'b', num: 1 },\n Bb: { accidental: 'b', num: 2 },\n Gm: { accidental: 'b', num: 2 },\n Eb: { accidental: 'b', num: 3 },\n Cm: { accidental: 'b', num: 3 },\n Ab: { accidental: 'b', num: 4 },\n Fm: { accidental: 'b', num: 4 },\n Db: { accidental: 'b', num: 5 },\n Bbm: { accidental: 'b', num: 5 },\n Gb: { accidental: 'b', num: 6 },\n Ebm: { accidental: 'b', num: 6 },\n Cb: { accidental: 'b', num: 7 },\n Abm: { accidental: 'b', num: 7 },\n Dbm: { accidental: 'b', num: 8 },\n Gbm: { accidental: 'b', num: 9 },\n G: { accidental: '#', num: 1 },\n Em: { accidental: '#', num: 1 },\n D: { accidental: '#', num: 2 },\n Bm: { accidental: '#', num: 2 },\n A: { accidental: '#', num: 3 },\n 'F#m': { accidental: '#', num: 3 },\n E: { accidental: '#', num: 4 },\n 'C#m': { accidental: '#', num: 4 },\n B: { accidental: '#', num: 5 },\n 'G#m': { accidental: '#', num: 5 },\n 'F#': { accidental: '#', num: 6 },\n 'D#m': { accidental: '#', num: 6 },\n 'C#': { accidental: '#', num: 7 },\n 'A#m': { accidental: '#', num: 7 },\n 'G#': { accidental: '#', num: 8 },\n 'D#': { accidental: '#', num: 9 },\n 'A#': { accidental: '#', num: 10 },\n};\n\nconst clefs: Record<string, { lineShift: number }> = {\n treble: { lineShift: 0 },\n bass: { lineShift: 6 },\n tenor: { lineShift: 4 },\n alto: { lineShift: 3 },\n soprano: { lineShift: 1 },\n percussion: { lineShift: 0 },\n 'mezzo-soprano': { lineShift: 2 },\n 'baritone-c': { lineShift: 5 },\n 'baritone-f': { lineShift: 5 },\n subbass: { lineShift: 7 },\n french: { lineShift: -1 },\n};\n\nconst notesInfo: Record<\n string,\n {\n index: number;\n intVal?: number;\n }\n> = {\n C: { index: 0, intVal: 0 },\n CN: { index: 0, intVal: 0 },\n 'C#': { index: 0, intVal: 1 },\n 'C##': { index: 0, intVal: 2 },\n CB: { index: 0, intVal: 11 },\n CBB: { index: 0, intVal: 10 },\n D: { index: 1, intVal: 2 },\n DN: { index: 1, intVal: 2 },\n 'D#': { index: 1, intVal: 3 },\n 'D##': { index: 1, intVal: 4 },\n DB: { index: 1, intVal: 1 },\n DBB: { index: 1, intVal: 0 },\n E: { index: 2, intVal: 4 },\n EN: { index: 2, intVal: 4 },\n 'E#': { index: 2, intVal: 5 },\n 'E##': { index: 2, intVal: 6 },\n EB: { index: 2, intVal: 3 },\n EBB: { index: 2, intVal: 2 },\n F: { index: 3, intVal: 5 },\n FN: { index: 3, intVal: 5 },\n 'F#': { index: 3, intVal: 6 },\n 'F##': { index: 3, intVal: 7 },\n FB: { index: 3, intVal: 4 },\n FBB: { index: 3, intVal: 3 },\n G: { index: 4, intVal: 7 },\n GN: { index: 4, intVal: 7 },\n 'G#': { index: 4, intVal: 8 },\n 'G##': { index: 4, intVal: 9 },\n GB: { index: 4, intVal: 6 },\n GBB: { index: 4, intVal: 5 },\n A: { index: 5, intVal: 9 },\n AN: { index: 5, intVal: 9 },\n 'A#': { index: 5, intVal: 10 },\n 'A##': { index: 5, intVal: 11 },\n AB: { index: 5, intVal: 8 },\n ABB: { index: 5, intVal: 7 },\n B: { index: 6, intVal: 11 },\n BN: { index: 6, intVal: 11 },\n 'B#': { index: 6, intVal: 12 },\n 'B##': { index: 6, intVal: 13 },\n BB: { index: 6, intVal: 10 },\n BBB: { index: 6, intVal: 9 },\n R: { index: 6 }, // Rest\n X: { index: 6 },\n};\n\nconst validNoteTypes: Record<string, { name: string }> = {\n n: { name: 'note' },\n r: { name: 'rest' },\n h: { name: 'harmonic' },\n m: { name: 'muted' },\n s: { name: 'slash' },\n g: { name: 'ghost' },\n d: { name: 'diamond' },\n x: { name: 'x' },\n ci: { name: 'circled' },\n cx: { name: 'circle x' },\n sf: { name: 'slashed' },\n sb: { name: 'slashed backward' },\n sq: { name: 'square' },\n tu: { name: 'triangle up' },\n td: { name: 'triangle down' },\n};\n\nconst accidentals: Record<string, string> = {\n '#': Glyphs.accidentalSharp,\n '##': Glyphs.accidentalDoubleSharp,\n b: Glyphs.accidentalFlat,\n bb: Glyphs.accidentalDoubleFlat,\n n: Glyphs.accidentalNatural,\n '{': Glyphs.accidentalParensLeft,\n '}': Glyphs.accidentalParensRight,\n db: Glyphs.accidentalThreeQuarterTonesFlatZimmermann,\n d: Glyphs.accidentalQuarterToneFlatStein,\n '++': Glyphs.accidentalThreeQuarterTonesSharpStein,\n '+': Glyphs.accidentalQuarterToneSharpStein,\n '+-': Glyphs.accidentalKucukMucennebSharp,\n bs: Glyphs.accidentalBakiyeFlat,\n bss: Glyphs.accidentalBuyukMucennebFlat,\n o: Glyphs.accidentalSori,\n k: Glyphs.accidentalKoron,\n bbs: Glyphs.accidentalBuyukMucennebSharp,\n '++-': Glyphs.accidentalBuyukMucennebSharp,\n ashs: Glyphs.accidentalBuyukMucennebSharp,\n afhf: Glyphs.accidentalBuyukMucennebSharp,\n};\n\n// Helps determine the layout of accidentals.\nconst accidentalColumns: Record<number, { [name: string]: number[] }> = {\n 1: {\n a: [1],\n b: [1],\n },\n 2: {\n a: [1, 2],\n },\n 3: {\n a: [1, 3, 2],\n b: [1, 2, 1],\n secondOnBottom: [1, 2, 3],\n },\n 4: {\n a: [1, 3, 4, 2],\n b: [1, 2, 3, 1],\n spacedOutTetrachord: [1, 2, 1, 2],\n },\n 5: {\n a: [1, 3, 5, 4, 2],\n b: [1, 2, 4, 3, 1],\n spacedOutPentachord: [1, 2, 3, 2, 1],\n verySpacedOutPentachord: [1, 2, 1, 2, 1],\n },\n 6: {\n a: [1, 3, 5, 6, 4, 2],\n b: [1, 2, 4, 5, 3, 1],\n spacedOutHexachord: [1, 3, 2, 1, 3, 2],\n verySpacedOutHexachord: [1, 2, 1, 2, 1, 2],\n },\n};\n\nconst articulations: Record<string, ArticulationStruct> = {\n 'a.': { code: Glyphs.augmentationDot, betweenLines: true }, // Staccato\n av: {\n aboveCode: Glyphs.articStaccatissimoAbove,\n belowCode: Glyphs.articStaccatissimoBelow,\n betweenLines: true,\n }, // Staccatissimo\n 'a>': {\n aboveCode: Glyphs.articAccentAbove,\n belowCode: Glyphs.articAccentBelow,\n betweenLines: true,\n }, // Accent\n 'a-': {\n aboveCode: Glyphs.articTenutoAbove,\n belowCode: Glyphs.articTenutoBelow,\n betweenLines: true,\n }, // Tenuto\n 'a^': {\n aboveCode: Glyphs.articMarcatoAbove,\n belowCode: Glyphs.articMarcatoBelow,\n betweenLines: false,\n }, // Marcato\n 'a+': { code: Glyphs.pluckedLeftHandPizzicato, betweenLines: false }, // Left hand pizzicato\n ao: {\n aboveCode: Glyphs.pluckedSnapPizzicatoAbove,\n belowCode: Glyphs.pluckedSnapPizzicatoBelow,\n betweenLines: false,\n }, // Snap pizzicato\n ah: { code: Glyphs.stringsHarmonic, betweenLines: false }, // Natural harmonic or open note\n 'a@': { aboveCode: Glyphs.fermataAbove, belowCode: Glyphs.fermataBelow, betweenLines: false }, // Fermata\n 'a@a': { code: Glyphs.fermataAbove, betweenLines: false }, // Fermata above staff\n 'a@u': { code: Glyphs.fermataBelow, betweenLines: false }, // Fermata below staff\n 'a@s': { aboveCode: Glyphs.fermataShortAbove, belowCode: Glyphs.fermataShortBelow, betweenLines: false }, // Fermata short\n 'a@as': { code: Glyphs.fermataShortAbove, betweenLines: false }, // Fermata short above staff\n 'a@us': { code: Glyphs.fermataShortBelow, betweenLines: false }, // Fermata short below staff\n 'a@l': { aboveCode: Glyphs.fermataLongAbove, belowCode: Glyphs.fermataLongBelow, betweenLines: false }, // Fermata long\n 'a@al': { code: Glyphs.fermataLongAbove, betweenLines: false }, // Fermata long above staff\n 'a@ul': { code: Glyphs.fermataLongBelow, betweenLines: false }, // Fermata long below staff\n 'a@vl': {\n aboveCode: Glyphs.fermataVeryLongAbove,\n belowCode: Glyphs.fermataVeryLongBelow,\n betweenLines: false,\n }, // Fermata very long\n 'a@avl': { code: Glyphs.fermataVeryLongAbove, betweenLines: false }, // Fermata very long above staff\n 'a@uvl': { code: Glyphs.fermataVeryLongBelow, betweenLines: false }, // Fermata very long below staff\n 'a|': { code: Glyphs.stringsUpBow, betweenLines: false }, // Bow up - up stroke\n am: { code: Glyphs.stringsDownBow, betweenLines: false }, // Bow down - down stroke\n 'a,': { code: Glyphs.pictChokeCymbal, betweenLines: false }, // Choked\n};\n\nconst ornaments: Record<string, string> = {\n mordent: Glyphs.ornamentShortTrill,\n mordentInverted: Glyphs.ornamentMordent,\n turn: Glyphs.ornamentTurn,\n turnInverted: Glyphs.ornamentTurnSlash,\n tr: Glyphs.ornamentTrill,\n upprall: Glyphs.ornamentPrecompSlideTrillDAnglebert,\n downprall: Glyphs.ornamentPrecompDoubleCadenceUpperPrefix,\n prallup: Glyphs.ornamentPrecompTrillSuffixDandrieu,\n pralldown: Glyphs.ornamentPrecompTrillLowerSuffix,\n upmordent: Glyphs.ornamentPrecompSlideTrillBach,\n downmordent: Glyphs.ornamentPrecompDoubleCadenceUpperPrefixTurn,\n lineprall: Glyphs.ornamentPrecompAppoggTrill,\n prallprall: Glyphs.ornamentTremblement,\n scoop: Glyphs.brassScoop,\n doit: Glyphs.brassDoitMedium,\n fall: Glyphs.brassFallLipShort,\n doitLong: Glyphs.brassLiftMedium,\n fallLong: Glyphs.brassFallRoughMedium,\n bend: Glyphs.brassBend,\n plungerClosed: Glyphs.brassMuteClosed,\n plungerOpen: Glyphs.brassMuteOpen,\n flip: Glyphs.brassFlip,\n jazzTurn: Glyphs.brassJazzTurn,\n smear: Glyphs.brassSmear,\n};\n\nexport class Tables {\n static UNISON = true;\n static SOFTMAX_FACTOR = 10;\n static STEM_WIDTH = 1.5;\n static STEM_HEIGHT = 35;\n static STAVE_LINE_THICKNESS = 1;\n static RENDER_PRECISION_PLACES = 3;\n static RESOLUTION = RESOLUTION;\n\n // 1/8, 1/4, 1/2, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024\n // NOTE: There is no 256 here! However, there are other mentions of 256 in this file.\n // For example, in durations has a 256 key, and sanitizeDuration() can return 256.\n // The sanitizeDuration() bit may need to be removed by 0xfe.\n static durationCodes: Record<string, Partial<GlyphProps>> = {\n '1/8': {\n stem: true,\n },\n\n '1/4': {\n stem: false,\n },\n\n '1/2': {\n stem: false,\n },\n\n 1: {\n stem: false,\n },\n\n 2: {\n stem: true,\n },\n\n 4: {\n stem: true,\n },\n\n 8: {\n stem: true,\n beamCount: 1,\n stemBeamExtension: 0,\n codeFlagUp: Glyphs.flag8thUp,\n },\n\n 16: {\n beamCount: 2,\n stemBeamExtension: 0,\n stem: true,\n codeFlagUp: Glyphs.flag16thUp,\n },\n\n 32: {\n beamCount: 3,\n stemBeamExtension: 7.5,\n stem: true,\n codeFlagUp: Glyphs.flag32ndUp,\n },\n\n 64: {\n beamCount: 4,\n stemBeamExtension: 15,\n stem: true,\n codeFlagUp: Glyphs.flag64thUp,\n },\n\n 128: {\n beamCount: 5,\n stemBeamExtension: 22.5,\n stem: true,\n codeFlagUp: Glyphs.flag128thUp,\n },\n\n 256: {\n beamCount: 6,\n stemBeamExtension: 25,\n stem: true,\n codeFlagUp: Glyphs.flag256thUp,\n },\n\n 512: {\n beamCount: 7,\n stemBeamExtension: 27.5,\n stem: true,\n codeFlagUp: Glyphs.flag512thUp,\n },\n\n 1024: {\n beamCount: 8,\n stemBeamExtension: 30,\n stem: true,\n codeFlagUp: Glyphs.flag1024thUp,\n },\n };\n\n static NOTATION_FONT_SCALE = 39;\n static TABLATURE_FONT_SCALE = 39;\n\n static SLASH_NOTEHEAD_WIDTH = 15;\n static STAVE_LINE_DISTANCE = 10;\n\n /**\n * SMuFL stem anchor Y offsets for noteheads, in staff spaces (positive = above notehead center).\n * Sourced from Bravura metadata `glyphsWithAnchors`: `stemUpSE[1]` (up) and `stemDownNW[1]` (down).\n * Used to position the stem base at the correct SMuFL attachment point rather than the notehead center.\n */\n static readonly noteHeadStemYOffsets: Record<string, { up: number; down: number }> = {\n [Glyphs.noteheadXBlack]: { up: 0.444, down: -0.44 },\n [Glyphs.noteheadXHalf]: { up: 0.412, down: -0.412 },\n };\n\n // HACK:\n // Since text origins are positioned at the baseline, we must\n // compensate for the ascender of the text. Of course, 1 staff space is\n // a very poor approximation.\n //\n // This will be deprecated in the future. This is a temporary solution until\n // we have more robust text metrics.\n static TEXT_HEIGHT_OFFSET_HACK = 1;\n\n static clefProperties(clef: string): { lineShift: number } {\n if (!clef || !(clef in clefs)) throw new RuntimeError('BadArgument', 'Invalid clef: ' + clef);\n return clefs[clef];\n }\n\n /**\n * @param keyOctaveGlyph a string in the format \"key/octave\" (e.g., \"c/5\") or \"key/octave/custom-note-head-code\" (e.g., \"g/5/t3\").\n * @param clef\n * @param params a struct with one option, `octaveShift` for clef ottavation (0 = default; 1 = 8va; -1 = 8vb, etc.).\n * @returns properties for the specified note.\n */\n\n static keyProperties(\n keyOctaveGlyph: string,\n clef: string = 'treble',\n type: string = 'N',\n params?: { octaveShift?: number }\n ): KeyProps {\n let options = { octaveShift: 0, duration: '4' };\n if (typeof params === 'object') {\n options = { ...options, ...params };\n }\n const duration = Tables.sanitizeDuration(options.duration);\n\n const pieces = keyOctaveGlyph.split('/');\n if (pieces.length < 2) {\n throw new RuntimeError(\n 'BadArguments',\n `First argument must be note/octave or note/octave/glyph-code: ${keyOctaveGlyph}`\n );\n }\n\n const key = pieces[0].toUpperCase();\n type = type.toUpperCase();\n const value = notesInfo[key];\n if (!value) throw new RuntimeError('BadArguments', 'Invalid key name: ' + key);\n let octave = parseInt(pieces[1], 10);\n\n // .octaveShift is the shift to compensate for clef 8va/8vb.\n octave -= options.octaveShift;\n\n const baseIndex = octave * 7 - 4 * 7;\n let line = (baseIndex + value.index) / 2;\n line += Tables.clefProperties(clef).lineShift;\n\n // Integer value for note arithmetic.\n const intValue = typeof value.intVal !== 'undefined' ? octave * 12 + value.intVal : undefined;\n\n // If the user specified a glyph, overwrite the glyph code.\n let code = '';\n let glyphName = 'N';\n if (pieces.length > 2 && pieces[2]) {\n glyphName = pieces[2].toUpperCase();\n } else if (type !== 'N') {\n glyphName = type;\n } else glyphName = key;\n code = this.codeNoteHead(glyphName, duration);\n\n return {\n key,\n octave,\n line,\n intValue,\n code,\n displaced: false,\n };\n }\n\n static integerToNote(integer?: number): string {\n if (typeof integer === 'undefined' || integer < 0 || integer > 11) {\n throw new RuntimeError('BadArguments', `integerToNote() requires an integer in the range [0, 11]: ${integer}`);\n }\n\n const table: Record<number, string> = {\n 0: 'C',\n 1: 'C#',\n 2: 'D',\n 3: 'D#',\n 4: 'E',\n 5: 'F',\n 6: 'F#',\n 7: 'G',\n 8: 'G#',\n 9: 'A',\n 10: 'A#',\n 11: 'B',\n };\n\n const noteValue = table[integer];\n if (!noteValue) {\n throw new RuntimeError('BadArguments', `Unknown note value for integer: ${integer}`);\n }\n\n return noteValue;\n }\n\n // Used by annotation.ts and bend.ts. Clearly this implementation only works for the default font size.\n // TODO: The actual width depends on the font family, size, weight, style.\n static textWidth(text: string): number {\n return 7 * text.toString().length;\n }\n\n static articulationCodes(artic: string): ArticulationStruct {\n return articulations[artic];\n }\n\n static accidentalCodes(accidental: string): string {\n return accidentals[accidental] ?? accidental;\n }\n\n static accidentalColumnsTable = accidentalColumns;\n\n static ornamentCodes(ornament: string): string {\n return ornaments[ornament] ?? ornament;\n }\n\n static keySignature(spec: string): { type: string; line: number }[] {\n const keySpec = keySignatures[spec];\n\n if (!keySpec) {\n throw new RuntimeError('BadKeySignature', `Bad key signature spec: '${spec}'`);\n }\n\n if (!keySpec.accidental) {\n return [];\n }\n\n const accidentalList: Record<string, number[]> = {\n b: [2, 0.5, 2.5, 1, 3, 1.5, 3.5],\n '#': [0, 1.5, -0.5, 1, 2.5, 0.5, 2],\n };\n\n const notes = accidentalList[keySpec.accidental];\n\n const accidentalCount = Math.min(keySpec.num, 7);\n const doubleAccidentalCount = Math.max(keySpec.num - 7, 0);\n\n const regularAccidentals = notes.slice(doubleAccidentalCount, accidentalCount).map((line) => ({\n type: `${keySpec.accidental}`,\n line,\n }));\n\n const doubleAccidentals = notes.slice(0, doubleAccidentalCount).map((line) => ({\n type: `${keySpec.accidental}${keySpec.accidental}`,\n line,\n }));\n return [...regularAccidentals, ...doubleAccidentals];\n }\n\n static getKeySignatures(): Record<string, { accidental?: string; num: number }> {\n return keySignatures;\n }\n\n static hasKeySignature(spec: string): boolean {\n return spec in keySignatures;\n }\n\n // TODO: Should these be moved to glyphs.ts? We could have a non-SMuFL section....\n static unicode = {\n // ♯ accidental sharp\n sharp: '\\u266f',\n // ♭ accidental flat\n flat: '\\u266d',\n // ♮ accidental natural\n natural: '\\u266e',\n // △ major seventh\n triangle: '\\u25b3',\n // ø half-diminished\n 'o-with-slash': '\\u00f8',\n // ° diminished\n degrees: '\\u00b0',\n // ○ diminished\n circle: '\\u25cb',\n };\n\n /**\n * Convert duration aliases to the number based duration.\n * If the input isn't an alias, simply return the input.\n * @param duration\n * @returns Example: 'q' -> '4', '8' -> '8'\n */\n static sanitizeDuration(duration: string): string {\n const durationNumber: string = durationAliases[duration];\n if (durationNumber !== undefined) {\n duration = durationNumber;\n }\n if (durations[duration] === undefined) {\n throw new RuntimeError('BadArguments', `The provided duration is not valid: ${duration}`);\n }\n return duration;\n }\n\n /** Convert the `duration` to a fraction. */\n static durationToFraction(duration: string): Fraction {\n return new Fraction().parse(Tables.sanitizeDuration(duration));\n }\n\n /** Convert the `duration` to a number. */\n static durationToNumber(duration: string): number {\n return Tables.durationToFraction(duration).value();\n }\n\n /* Convert the `duration` to total ticks. */\n static durationToTicks(duration: string): number {\n duration = Tables.sanitizeDuration(duration);\n const ticks = durations[duration];\n if (ticks === undefined) {\n throw new RuntimeError('InvalidDuration');\n }\n return ticks;\n }\n\n static codeNoteHead(type: string, duration: string): string {\n switch (type) {\n /* Diamond */\n case 'D0':\n return Glyphs.noteheadDiamondWhole;\n case 'D1':\n return Glyphs.noteheadDiamondHalf;\n case 'D2':\n return Glyphs.noteheadDiamondBlack;\n case 'D3':\n return Glyphs.noteheadDiamondBlack;\n\n /* Triangle */\n case 'T0':\n return Glyphs.noteheadTriangleUpWhole;\n case 'T1':\n return Glyphs.noteheadTriangleUpHalf;\n case 'T2':\n return Glyphs.noteheadTriangleUpBlack;\n case 'T3':\n return Glyphs.noteheadTriangleUpBlack;\n\n /* Cross */\n case 'X0':\n return Glyphs.noteheadXWhole;\n case 'X1':\n return Glyphs.noteheadXHalf;\n case 'X2':\n return Glyphs.noteheadXBlack;\n case 'X3':\n return Glyphs.noteheadCircleX;\n\n /* Square */\n case 'S1':\n return Glyphs.noteheadSquareWhite;\n case 'S2':\n return Glyphs.noteheadSquareBlack;\n\n /* Rectangle */\n case 'R1':\n return Glyphs.noteheadSquareWhite; // no smufl code\n case 'R2':\n return Glyphs.noteheadSquareWhite; // no smufl code\n\n case 'DO':\n return Glyphs.noteheadTriangleUpBlack;\n case 'RE':\n return Glyphs.noteheadMoonBlack;\n case 'MI':\n return Glyphs.noteheadDiamondBlack;\n case 'FA':\n return Glyphs.noteheadTriangleLeftBlack;\n case 'FAUP':\n return Glyphs.noteheadTriangleRightBlack;\n case 'SO':\n return Glyphs.noteheadBlack;\n case 'LA':\n return Glyphs.noteheadSquareBlack;\n case 'TI':\n return Glyphs.noteheadTriangleRoundDownBlack;\n\n case 'DI': // Diamond\n case 'H': // Harmonics\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadDiamondDoubleWhole;\n case '1':\n return Glyphs.noteheadDiamondWhole;\n case '2':\n return Glyphs.noteheadDiamondHalf;\n default:\n return Glyphs.noteheadDiamondBlack;\n }\n case 'X':\n case 'M': // Muted\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadXDoubleWhole;\n case '1':\n return Glyphs.noteheadXWhole;\n case '2':\n return Glyphs.noteheadXHalf;\n default:\n return Glyphs.noteheadXBlack;\n }\n case 'CX':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadCircleXDoubleWhole;\n case '1':\n return Glyphs.noteheadCircleXWhole;\n case '2':\n return Glyphs.noteheadCircleXHalf;\n default:\n return Glyphs.noteheadCircleX;\n }\n case 'CI':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadCircledDoubleWhole;\n case '1':\n return Glyphs.noteheadCircledWhole;\n case '2':\n return Glyphs.noteheadCircledHalf;\n default:\n return Glyphs.noteheadCircledBlack;\n }\n case 'SQ':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadDoubleWholeSquare;\n case '1':\n return Glyphs.noteheadSquareWhite;\n case '2':\n return Glyphs.noteheadSquareWhite;\n default:\n return Glyphs.noteheadSquareBlack;\n }\n case 'TU':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadTriangleUpDoubleWhole;\n case '1':\n return Glyphs.noteheadTriangleUpWhole;\n case '2':\n return Glyphs.noteheadTriangleUpHalf;\n default:\n return Glyphs.noteheadTriangleUpBlack;\n }\n case 'TD':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadTriangleDownDoubleWhole;\n case '1':\n return Glyphs.noteheadTriangleDownWhole;\n case '2':\n return Glyphs.noteheadTriangleDownHalf;\n default:\n return Glyphs.noteheadTriangleDownBlack;\n }\n case 'SF':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadSlashedDoubleWhole1;\n case '1':\n return Glyphs.noteheadSlashedWhole1;\n case '2':\n return Glyphs.noteheadSlashedHalf1;\n default:\n return Glyphs.noteheadSlashedBlack1;\n }\n case 'SB':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadSlashedDoubleWhole2;\n case '1':\n return Glyphs.noteheadSlashedWhole2;\n case '2':\n return Glyphs.noteheadSlashedHalf2;\n default:\n return Glyphs.noteheadSlashedBlack2;\n }\n case 'R':\n switch (duration) {\n case '1/8':\n return Glyphs.restMaxima;\n case '1/4':\n return Glyphs.restLonga;\n case '1/2':\n return Glyphs.restDoubleWhole;\n case '1':\n return Glyphs.restWhole;\n case '2':\n return Glyphs.restHalf;\n case '4':\n return Glyphs.restQuarter;\n case '8':\n return Glyphs.rest8th;\n case '16':\n return Glyphs.rest16th;\n case '32':\n return Glyphs.rest32nd;\n case '64':\n return Glyphs.rest64th;\n case '128':\n return Glyphs.rest128th;\n case '256':\n return Glyphs.rest256th;\n case '512':\n return Glyphs.rest512th;\n case '1024':\n return Glyphs.rest1024th;\n }\n break;\n case 'S':\n switch (duration) {\n case '1/2':\n return Glyphs.noteheadSlashWhiteDoubleWhole;\n case '1':\n return Glyphs.noteheadSlashWhiteWhole;\n case '2':\n return Glyphs.noteheadSlashWhiteHalf;\n default:\n return Glyphs.noteheadSlashVerticalEnds;\n }\n default:\n switch (duration) {\n case '1/8':\n return Glyphs.mensuralNoteheadMaximaBlack;\n case '1/4':\n return Glyphs.mensuralNoteheadLongaBlack;\n case '1/2':\n return Glyphs.noteheadDoubleWhole;\n case '1':\n return Glyphs.noteheadWhole;\n case '2':\n return Glyphs.noteheadHalf;\n default:\n return Glyphs.noteheadBlack;\n }\n }\n return Glyphs.null;\n }\n\n /* The list of valid note types. Used by note.ts during parseNoteStruct(). */\n static validTypes = validNoteTypes;\n\n // Default time signature.\n static TIME4_4 = {\n numBeats: 4,\n beatValue: 4,\n resolution: RESOLUTION,\n };\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n// @author Mohit Cheppudira\n// @author Greg Ristow (modifications)\n\nimport { Fraction } from './fraction';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Music } from './music';\nimport { Note } from './note';\nimport { Tables } from './tables';\nimport { Tickable } from './tickable';\nimport { Category, isAccidental, isGraceNote, isGraceNoteGroup, isStaveNote } from './typeguard';\nimport { defined, log } from './util';\nimport { Voice } from './voice';\n\ntype StaveLineAccidentalLayoutMetrics = {\n column: number;\n line: number;\n /**\n * A flat line needs more clearance above than below. This is\n * set to true if the accidental is either a flat or double flat.\n */\n flatLine: boolean;\n /**\n * Double sharps need less clearance above and below than other\n * accidentals.\n */\n dblSharpLine: boolean;\n numAcc: number;\n width: number;\n};\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Accidental.DEBUG) log('VexFlow.Accidental', args);\n}\n\n/**\n * An `Accidental` inherits from `Modifier`, and is formatted within a\n * `ModifierContext`. Accidentals are modifiers that can be attached to\n * notes. Support is included for both western and microtonal accidentals.\n *\n * See `tests/accidental_tests.ts` for usage examples.\n */\n\nexport class Accidental extends Modifier {\n /** Accidental code provided to the constructor. */\n readonly type: string;\n /** To enable logging for this class. Set `VexFlow.Accidental.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n protected cautionary: boolean;\n\n /** Accidentals category string. */\n static override get CATEGORY(): string {\n return Category.Accidental;\n }\n\n /** Arrange accidentals inside a ModifierContext. */\n static format(accidentals: Accidental[], state: ModifierContextState): void {\n // If there are no accidentals, no need to format their positions.\n if (!accidentals || accidentals.length === 0) return;\n\n const noteheadAccidentalPadding = Metrics.get('Accidental.noteheadAccidentalPadding');\n const leftShift = state.leftShift + noteheadAccidentalPadding;\n const accidentalSpacing = Metrics.get('Accidental.accidentalSpacing');\n const additionalPadding = Metrics.get('Accidental.leftPadding'); // padding to the left of all accidentals\n\n // A type used just in this formatting function.\n type AccidentalLinePositionsAndXSpaceNeeds = {\n y?: number;\n line: number;\n /**\n * The amount by which the accidental requests that notes be shifted to the right\n * to accommodate its presence.\n */\n extraXSpaceNeeded: number;\n accidental: Accidental;\n spacingBetweenStaveLines?: number;\n };\n\n const accidentalLinePositionsAndSpaceNeeds: AccidentalLinePositionsAndXSpaceNeeds[] = [];\n let prevNote = undefined;\n let extraXSpaceNeededForLeftDisplacedNotehead = 0;\n\n // First determine the accidentals' Y positions from the note.keys\n for (let i = 0; i < accidentals.length; ++i) {\n const accidental: Accidental = accidentals[i];\n\n const note = accidental.getNote();\n const stave = note.getStave();\n const index = accidental.checkIndex();\n const props = note.getKeyProps()[index];\n\n if (note !== prevNote) {\n // Iterate through all notes to get the displaced pixels\n for (let n = 0; n < note.keys.length; ++n) {\n // If the current extra left-space needed isn't as big as this note's,\n // then we need to use this note's.\n extraXSpaceNeededForLeftDisplacedNotehead = Math.max(\n note.getLeftDisplacedHeadPx() - note.getXShift(),\n extraXSpaceNeededForLeftDisplacedNotehead\n );\n }\n prevNote = note;\n }\n if (stave) {\n const lineSpace = stave.getSpacingBetweenLines();\n const y = stave.getYForLine(props.line);\n const accLine = Math.round((y / lineSpace) * 2) / 2;\n accidentalLinePositionsAndSpaceNeeds.push({\n y,\n line: accLine,\n extraXSpaceNeeded: extraXSpaceNeededForLeftDisplacedNotehead,\n accidental: accidental,\n spacingBetweenStaveLines: lineSpace,\n });\n } else {\n accidentalLinePositionsAndSpaceNeeds.push({\n line: props.line,\n extraXSpaceNeeded: extraXSpaceNeededForLeftDisplacedNotehead,\n accidental: accidental,\n });\n }\n }\n\n // Sort accidentals by line number.\n accidentalLinePositionsAndSpaceNeeds.sort((a, b) => b.line - a.line);\n\n const staveLineAccidentalLayoutMetrics: StaveLineAccidentalLayoutMetrics[] = [];\n\n // amount by which all accidentals must be shifted right or left for\n // stem flipping, notehead shifting concerns.\n let maxExtraXSpaceNeeded = 0;\n\n // Create an array of unique line numbers (staveLineAccidentalLayoutMetrics)\n // from accidentalLinePositionsAndSpaceNeeds\n for (let i = 0; i < accidentalLinePositionsAndSpaceNeeds.length; i++) {\n const accidentalLinePositionAndSpaceNeeds = accidentalLinePositionsAndSpaceNeeds[i];\n const accidentalType = accidentalLinePositionAndSpaceNeeds.accidental.type;\n const priorLineMetric = staveLineAccidentalLayoutMetrics[staveLineAccidentalLayoutMetrics.length - 1];\n let currentLineMetric: StaveLineAccidentalLayoutMetrics;\n\n // if this is the first line, or a new line, add a staveLineAccidentalLayoutMetric\n if (!priorLineMetric || priorLineMetric?.line !== accidentalLinePositionAndSpaceNeeds.line) {\n currentLineMetric = {\n line: accidentalLinePositionAndSpaceNeeds.line,\n flatLine: true,\n dblSharpLine: true,\n numAcc: 0,\n width: 0,\n column: 0,\n };\n staveLineAccidentalLayoutMetrics.push(currentLineMetric);\n } else {\n currentLineMetric = priorLineMetric;\n }\n\n // if this accidental is not a flat, the accidental needs 3.0 lines lower\n // clearance instead of 2.5 lines for b or bb.\n if (accidentalType !== 'b' && accidentalType !== 'bb') {\n currentLineMetric.flatLine = false;\n }\n\n // if this accidental is not a double sharp, the accidental needs 3.0 lines above\n if (accidentalType !== '##') {\n currentLineMetric.dblSharpLine = false;\n }\n\n // Track how many accidentals are on this line:\n currentLineMetric.numAcc++;\n\n // Track the total xOffset needed for this line which will be needed\n // for formatting lines w/ multiple accidentals:\n\n // width = accidental width + universal spacing between accidentals\n currentLineMetric.width += accidentalLinePositionAndSpaceNeeds.accidental.getWidth() + accidentalSpacing;\n\n // if this extraXSpaceNeeded is the largest so far, use it as the starting point for\n // all accidental columns.\n maxExtraXSpaceNeeded = Math.max(accidentalLinePositionAndSpaceNeeds.extraXSpaceNeeded, maxExtraXSpaceNeeded);\n }\n\n // ### Place Accidentals in Columns\n //\n // Default to a classic triangular layout (middle accidental farthest left),\n // but follow exceptions as outlined in G. Read's _Music Notation_ and\n // Elaine Gould's _Behind Bars_.\n //\n // Additionally, this implements different vertical collision rules for\n // flats (only need 2.5 lines clearance below) and double sharps (only\n // need 2.5 lines of clearance above or below).\n //\n // Classic layouts and exception patterns are found in the 'tables.js'\n // in 'Tables.accidentalColumnsTable'\n //\n // Beyond 6 vertical accidentals, default to the parallel ascending lines approach,\n // using as few columns as possible for the vertical structure.\n //\n // TODO (?): Allow column to be specified for an accidental at run-time?\n\n let totalColumns = 0;\n\n // establish the boundaries for a group of notes with clashing accidentals:\n for (let i = 0; i < staveLineAccidentalLayoutMetrics.length; i++) {\n let noFurtherConflicts = false;\n const groupStart = i;\n let groupEnd = i;\n\n while (groupEnd + 1 < staveLineAccidentalLayoutMetrics.length && !noFurtherConflicts) {\n // if this note conflicts with the next:\n if (\n this.checkCollision(\n staveLineAccidentalLayoutMetrics[groupEnd],\n staveLineAccidentalLayoutMetrics[groupEnd + 1]\n )\n ) {\n // include the next note in the group:\n groupEnd++;\n } else {\n noFurtherConflicts = true;\n }\n }\n\n // Gets a line from the `lineList`, relative to the current group\n const getGroupLine = (index: number) => staveLineAccidentalLayoutMetrics[groupStart + index];\n const getGroupLines = (indexes: number[]) => indexes.map(getGroupLine);\n const lineDifference = (indexA: number, indexB: number) => {\n const [a, b] = getGroupLines([indexA, indexB]).map((item) => item.line);\n return a - b;\n };\n\n const notColliding = (...indexPairs: number[][]) =>\n indexPairs.map(getGroupLines).every(([line1, line2]) => !this.checkCollision(line1, line2));\n\n // Set columns for the lines in this group:\n const groupLength = groupEnd - groupStart + 1;\n\n // Set the accidental column for each line of the group\n let endCase = this.checkCollision(\n staveLineAccidentalLayoutMetrics[groupStart],\n staveLineAccidentalLayoutMetrics[groupEnd]\n )\n ? 'a'\n : 'b';\n\n switch (groupLength) {\n case 3:\n if (endCase === 'a' && lineDifference(1, 2) === 0.5 && lineDifference(0, 1) !== 0.5) {\n endCase = 'secondOnBottom';\n }\n break;\n case 4:\n if (notColliding([0, 2], [1, 3])) {\n endCase = 'spacedOutTetrachord';\n }\n break;\n case 5:\n if (endCase === 'b' && notColliding([1, 3])) {\n endCase = 'spacedOutPentachord';\n if (notColliding([0, 2], [2, 4])) {\n endCase = 'verySpacedOutPentachord';\n }\n }\n break;\n case 6:\n if (notColliding([0, 3], [1, 4], [2, 5])) {\n endCase = 'spacedOutHexachord';\n }\n if (notColliding([0, 2], [2, 4], [1, 3], [3, 5])) {\n endCase = 'verySpacedOutHexachord';\n }\n break;\n default:\n break;\n }\n\n let groupMember;\n let column;\n // If the group contains seven members or more, use ascending parallel lines\n // of accidentals, using as few columns as possible while avoiding collisions.\n if (groupLength >= 7) {\n // First, determine how many columns to use:\n let patternLength = 2;\n let collisionDetected = true;\n while (collisionDetected === true) {\n collisionDetected = false;\n for (let line = 0; line + patternLength < staveLineAccidentalLayoutMetrics.length; line++) {\n if (\n this.checkCollision(\n staveLineAccidentalLayoutMetrics[line],\n staveLineAccidentalLayoutMetrics[line + patternLength]\n )\n ) {\n collisionDetected = true;\n patternLength++;\n break;\n }\n }\n }\n // Then, assign a column to each line of accidentals\n for (groupMember = i; groupMember <= groupEnd; groupMember++) {\n column = ((groupMember - i) % patternLength) + 1;\n staveLineAccidentalLayoutMetrics[groupMember].column = column;\n totalColumns = totalColumns > column ? totalColumns : column;\n }\n } else {\n // If the group contains fewer than seven members, use the layouts from\n // the Tables.accidentalColumnsTable (See: tables.ts).\n for (groupMember = i; groupMember <= groupEnd; groupMember++) {\n column = Tables.accidentalColumnsTable[groupLength][endCase][groupMember - i];\n staveLineAccidentalLayoutMetrics[groupMember].column = column;\n totalColumns = totalColumns > column ? totalColumns : column;\n }\n }\n\n // Increment i to the last note that was set, so that if a lower set of notes\n // does not conflict at all with this group, it can have its own classic shape.\n i = groupEnd;\n }\n\n // ### Convert Columns to xOffsets\n //\n // This keeps columns aligned, even if they have different accidentals within them\n // which sometimes results in a larger xOffset than is an accidental might need\n // to preserve the symmetry of the accidental shape.\n //\n // Neither A.C. Vinci nor G. Read address this, and it typically only happens in\n // music with complex chord clusters.\n //\n // TODO (?): Optionally allow closer compression of accidentals, instead of forcing\n // parallel columns.\n\n // track each column's max width, which will be used as initial shift of later columns:\n const columnWidths: number[] = [];\n const columnXOffsets: number[] = [];\n for (let i = 0; i <= totalColumns; i++) {\n columnWidths[i] = 0;\n columnXOffsets[i] = 0;\n }\n\n columnWidths[0] = leftShift + maxExtraXSpaceNeeded;\n columnXOffsets[0] = leftShift;\n\n // Fill columnWidths with the widest needed x-space;\n // this is what keeps the columns parallel.\n staveLineAccidentalLayoutMetrics.forEach((line) => {\n if (line.width > columnWidths[line.column]) columnWidths[line.column] = line.width;\n });\n\n for (let i = 1; i < columnWidths.length; i++) {\n // this column's offset = this column's width + previous column's offset\n columnXOffsets[i] = columnWidths[i] + columnXOffsets[i - 1];\n }\n\n const totalShift = columnXOffsets[columnXOffsets.length - 1];\n // Set the xShift for each accidental according to column offsets:\n let accCount = 0;\n staveLineAccidentalLayoutMetrics.forEach((line) => {\n let lineWidth = 0;\n const lastAccOnLine = accCount + line.numAcc;\n // handle all accidentals on a given line:\n for (accCount; accCount < lastAccOnLine; accCount++) {\n const xShift = columnXOffsets[line.column - 1] + lineWidth + maxExtraXSpaceNeeded;\n accidentalLinePositionsAndSpaceNeeds[accCount].accidental.setXShift(xShift);\n // keep track of the width of accidentals we've added so far, so that when\n // we loop, we add space for them.\n lineWidth += accidentalLinePositionsAndSpaceNeeds[accCount].accidental.getWidth() + accidentalSpacing;\n L('Line, accCount, shift: ', line.line, accCount, xShift);\n }\n });\n // update the overall layout with the full width of the accidental shapes:\n state.leftShift = totalShift + additionalPadding;\n }\n\n /** Helper function to determine whether two lines of accidentals collide vertically */\n protected static checkCollision(\n line1: StaveLineAccidentalLayoutMetrics,\n line2: StaveLineAccidentalLayoutMetrics\n ): boolean {\n let clearance = line2.line - line1.line;\n let clearanceRequired = 3;\n // But less clearance is required for certain accidentals: b, bb and ##.\n if (clearance > 0) {\n // then line 2 is on top\n clearanceRequired = line2.flatLine || line2.dblSharpLine ? 2.5 : 3.0;\n if (line1.dblSharpLine) clearance -= 0.5;\n } else {\n // line 1 is on top\n clearanceRequired = line1.flatLine || line1.dblSharpLine ? 2.5 : 3.0;\n if (line2.dblSharpLine) clearance -= 0.5;\n }\n const collision = Math.abs(clearance) < clearanceRequired;\n L('Line1, Line2, Collision: ', line1.line, line2.line, collision);\n return collision;\n }\n\n /**\n * Use this method to automatically apply accidentals to a set of `voices`.\n * The accidentals will be remembered between all the voices provided.\n * Optionally, you can also provide an initial `keySignature`.\n */\n static applyAccidentals(voices: Voice[], keySignature: string): void {\n const tickPositions: number[] = [];\n const tickNoteMap: Record<number, Tickable[]> = {};\n\n // Sort the tickables in each voice by their tick position in the voice.\n voices.forEach((voice) => {\n const tickPosition = new Fraction(0, 1);\n const tickable = voice.getTickables();\n tickable.forEach((t) => {\n if (t.shouldIgnoreTicks()) return;\n\n const notesAtPosition = tickNoteMap[tickPosition.value()];\n\n if (!notesAtPosition) {\n tickPositions.push(tickPosition.value());\n tickNoteMap[tickPosition.value()] = [t];\n } else {\n notesAtPosition.push(t);\n }\n\n tickPosition.add(t.getTicks());\n });\n });\n\n const music = new Music();\n\n // Default key signature is C major.\n if (!keySignature) keySignature = 'C';\n\n // Get the scale map, which represents the current state of each pitch.\n const scaleMapKey = music.createScaleMap(keySignature);\n const scaleMap: Record<string, string> = {};\n\n tickPositions.forEach((tickPos: number) => {\n const tickables = tickNoteMap[tickPos];\n\n // Array to store all pitches that modified accidental states\n // at this tick position\n const modifiedPitches: string[] = [];\n\n const processNote = (t: Tickable) => {\n // Only StaveNote implements .addModifier(), which is used below.\n if (!isStaveNote(t) || t.isRest() || t.shouldIgnoreTicks()) {\n return;\n }\n\n // Go through each key and determine if an accidental should be applied.\n const staveNote = t;\n staveNote.keys.forEach((keyString: string, keyIndex: number) => {\n const key = music.getNoteParts(keyString.split('/')[0]);\n const octave = keyString.split('/')[1];\n\n // Force a natural for every key without an accidental\n const accidentalString = key.accidental || 'n';\n const pitch = key.root + accidentalString;\n\n // Determine if the current pitch has the same accidental\n // as the scale state\n if (!scaleMap[key.root + octave]) scaleMap[key.root + octave] = scaleMapKey[key.root];\n const sameAccidental = scaleMap[key.root + octave] === pitch;\n\n // Determine if an identical pitch in the chord already\n // modified the accidental state\n const previouslyModified = modifiedPitches.indexOf(keyString) > -1;\n\n // Remove accidentals\n staveNote.getModifiers().forEach((modifier, index) => {\n if (isAccidental(modifier) && modifier.type == accidentalString && modifier.getIndex() == keyIndex) {\n staveNote.getModifiers().splice(index, 1);\n }\n });\n\n // Add the accidental to the StaveNote\n if (!sameAccidental || (sameAccidental && previouslyModified)) {\n // Modify the scale map so that the root pitch has an\n // updated state\n scaleMap[key.root + octave] = pitch;\n\n // Create the accidental\n const accidental = new Accidental(accidentalString);\n\n // Attach the accidental to the StaveNote\n staveNote.addModifier(accidental, keyIndex);\n\n // Add the pitch to list of pitches that modified accidentals\n modifiedPitches.push(keyString);\n }\n });\n\n // process grace notes\n staveNote.getModifiers().forEach((modifier: Modifier) => {\n if (isGraceNoteGroup(modifier)) {\n modifier.getGraceNotes().forEach(processNote);\n }\n });\n };\n\n tickables.forEach(processNote);\n });\n }\n\n /**\n * Create accidental.\n * @param type value from `VexFlow.accidentalCodes.accidentals` table in `tables.ts`.\n * For example: `#`, `##`, `b`, `n`, etc.\n */\n constructor(type: string) {\n super();\n\n L('New accidental: ', type);\n\n this.type = type;\n this.position = Modifier.Position.LEFT;\n\n // Cautionary accidentals have parentheses around them\n this.cautionary = false;\n\n this.reset();\n }\n\n protected override reset(): void {\n this.text = '';\n\n if (!this.cautionary) {\n this.text += Tables.accidentalCodes(this.type);\n this.fontInfo.size = Metrics.get('Accidental.fontSize');\n } else {\n this.text += Tables.accidentalCodes('{');\n this.text += Tables.accidentalCodes(this.type);\n this.text += Tables.accidentalCodes('}');\n this.fontInfo.size = Metrics.get('Accidental.cautionary.fontSize');\n }\n // Accidentals attached to grace notes are rendered smaller.\n if (isGraceNote(this.note)) {\n this.fontInfo.size = Metrics.get('Accidental.grace.fontSize');\n }\n }\n\n /** Attach this accidental to `note`, which must be a `StaveNote`. */\n override setNote(note: Note): this {\n defined(note, 'ArgumentError', `Bad note value: ${note}`);\n\n this.note = note;\n this.reset();\n return this;\n }\n\n /** If called, draws parenthesis around accidental. */\n setAsCautionary(): this {\n this.cautionary = true;\n this.reset();\n return this;\n }\n\n /** Render accidental onto canvas. */\n override draw(): void {\n const { type, position, index } = this;\n\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n // Figure out the start `x` and `y` coordinates for note and index.\n const start = note.getModifierStartXY(position, index);\n this.x = start.x - this.width;\n this.y = start.y;\n L('Rendering: ', type, start.x, start.y);\n this.renderText(ctx, 0, 0);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n// This file implements the `Stem` object. Generally this object is handled\n// by its parent `StemmableNote`.\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Metrics } from './metrics';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { log, RuntimeError } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Stem.DEBUG) log('VexFlow.Stem', args);\n}\n\nexport interface StemOptions {\n stemDownYBaseOffset?: number;\n stemUpYBaseOffset?: number;\n stemDownYOffset?: number;\n stemUpYOffset?: number;\n stemletHeight?: number;\n isStemlet?: boolean;\n hide?: boolean;\n stemDirection?: number;\n stemExtension?: number;\n yBottom?: number;\n yTop?: number;\n xEnd?: number;\n xBegin?: number;\n}\n\nexport class Stem extends Element {\n /** To enable logging for this class. Set `VexFlow.Stem.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.Stem;\n }\n\n // Stem directions\n static get UP(): number {\n return 1;\n }\n static get DOWN(): number {\n return -1;\n }\n\n // Theme\n static get WIDTH(): number {\n return Tables.STEM_WIDTH;\n }\n static get HEIGHT(): number {\n return Tables.STEM_HEIGHT;\n }\n\n protected hide: boolean;\n protected isStemlet: boolean;\n protected stemletHeight: number;\n protected xBegin: number;\n protected xEnd: number;\n protected yTop: number;\n protected stemUpYOffset: number = 0;\n protected yBottom: number;\n protected stemDownYOffset: number = 0;\n protected stemUpYBaseOffset: number = 0;\n protected stemDownYBaseOffset: number = 0;\n protected stemDirection: number;\n protected stemExtension: number;\n protected renderHeightAdjustment: number;\n\n constructor(options?: StemOptions) {\n super();\n\n // Default notehead x bounds\n this.xBegin = options?.xBegin ?? 0;\n this.xEnd = options?.xEnd ?? 0;\n\n // Y bounds for top/bottom most notehead\n this.yTop = options?.yTop ?? 0;\n this.yBottom = options?.yBottom ?? 0;\n\n // Stem top extension\n this.stemExtension = options?.stemExtension ?? 0;\n\n // Direction of the stem\n this.stemDirection = options?.stemDirection ?? 0;\n\n // Flag to override all draw calls\n this.hide = options?.hide || false;\n\n this.isStemlet = options?.isStemlet || false;\n this.stemletHeight = options?.stemletHeight ?? 0;\n\n // Use to adjust the rendered height without affecting\n // the results of `.getExtents()`\n this.renderHeightAdjustment = 0;\n this.setOptions(options);\n }\n\n setOptions(options?: StemOptions): void {\n // Changing where the stem meets the head\n this.stemUpYOffset = options?.stemUpYOffset ?? 0;\n this.stemDownYOffset = options?.stemDownYOffset ?? 0;\n this.stemUpYBaseOffset = options?.stemUpYBaseOffset ?? 0;\n this.stemDownYBaseOffset = options?.stemDownYBaseOffset ?? 0;\n }\n\n // Set the x bounds for the default notehead\n setNoteHeadXBounds(xBegin: number, xEnd: number): this {\n this.xBegin = xBegin;\n this.xEnd = xEnd;\n return this;\n }\n\n // Set the direction of the stem in relation to the noteheads\n setDirection(direction: number): void {\n this.stemDirection = direction;\n }\n\n // Set the extension for the stem, generally for flags or beams\n setExtension(ext: number): void {\n this.stemExtension = ext;\n }\n\n getExtension(): number {\n return this.stemExtension;\n }\n\n // The the y bounds for the top and bottom noteheads\n setYBounds(yTop: number, yBottom: number): void {\n this.yTop = yTop;\n this.yBottom = yBottom;\n }\n\n // Gets the entire height for the stem\n override getHeight(): number {\n const yOffset = this.stemDirection === Stem.UP ? this.stemUpYOffset : this.stemDownYOffset;\n const unsignedHeight = this.yBottom - this.yTop + (Stem.HEIGHT - yOffset + this.stemExtension); // parentheses just for grouping.\n return unsignedHeight * this.stemDirection;\n }\n\n override getBoundingBox(): BoundingBox {\n throw new RuntimeError('NotImplemented', 'getBoundingBox() not implemented.');\n }\n\n // Get the y coordinates for the very base of the stem to the top of\n // the extension\n getExtents(): { topY: number; baseY: number } {\n const isStemUp = this.stemDirection === Stem.UP;\n const ys = [this.yTop, this.yBottom];\n const stemHeight = Stem.HEIGHT + this.stemExtension;\n\n const innerMostNoteheadY = (isStemUp ? Math.min : Math.max)(...ys);\n const outerMostNoteheadY = (isStemUp ? Math.max : Math.min)(...ys);\n const stemTipY = innerMostNoteheadY + stemHeight * -this.stemDirection;\n\n return { topY: stemTipY, baseY: outerMostNoteheadY };\n }\n\n setVisibility(isVisible: boolean): this {\n this.hide = !isVisible;\n return this;\n }\n\n setStemlet(isStemlet: boolean, stemletHeight: number): this {\n this.isStemlet = isStemlet;\n this.stemletHeight = stemletHeight;\n return this;\n }\n\n adjustHeightForFlag(): void {\n this.renderHeightAdjustment = Metrics.get('Stem.heightAdjustmentForFlag', -3);\n }\n\n adjustHeightForBeam(): void {\n this.renderHeightAdjustment = -Stem.WIDTH / 2;\n }\n\n // Render the stem onto the canvas\n override draw(): void {\n this.setRendered();\n if (this.hide) return;\n const ctx = this.checkContext();\n\n let stemX;\n let stemY;\n const stemDirection = this.stemDirection;\n\n let yBaseOffset: number = 0;\n if (stemDirection === Stem.DOWN) {\n // Down stems are rendered to the left of the head.\n stemX = this.xBegin;\n stemY = this.yTop + this.stemDownYOffset;\n yBaseOffset = this.stemDownYBaseOffset;\n } else {\n // Up stems are rendered to the right of the head.\n stemX = this.xEnd;\n stemY = this.yBottom - this.stemUpYOffset;\n yBaseOffset = this.stemUpYBaseOffset;\n }\n\n const stemHeight = this.getHeight();\n\n L('Rendering stem - ', 'Top Y: ', this.yTop, 'Bottom Y: ', this.yBottom);\n\n // The offset from the stem's base which is required fo satisfy the stemlet height\n const stemletYOffset = this.isStemlet ? stemHeight - this.stemletHeight * this.stemDirection : 0;\n\n // Draw the stem\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('stem' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n ctx.beginPath();\n ctx.setLineWidth(Stem.WIDTH);\n ctx.moveTo(stemX, stemY - stemletYOffset + yBaseOffset);\n ctx.lineTo(stemX, stemY - stemHeight - this.renderHeightAdjustment * stemDirection);\n ctx.stroke();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\nimport { Font } from './font';\nimport { Metrics } from './metrics';\nimport { Modifier, ModifierPosition } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Stave } from './stave';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category, isStemmableNote, isTabNote } from './typeguard';\nimport { log } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Annotation.DEBUG) log('VexFlow.Annotation', args);\n}\n\nexport enum AnnotationHorizontalJustify {\n LEFT = 1,\n CENTER = 2,\n RIGHT = 3,\n CENTER_STEM = 4,\n}\n\nexport enum AnnotationVerticalJustify {\n TOP = 1,\n CENTER = 2,\n BOTTOM = 3,\n CENTER_STEM = 4,\n}\n\n/**\n * Annotations are modifiers that can be attached to\n * notes.\n *\n * See `tests/annotation_tests.ts` for usage examples.\n */\nexport class Annotation extends Modifier {\n /** To enable logging for this class. Set `VexFlow.Annotation.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n /** Annotations category string. */\n static override get CATEGORY(): string {\n return Category.Annotation;\n }\n\n /** Text annotations can be positioned and justified relative to the note. */\n static HorizontalJustify = AnnotationHorizontalJustify;\n\n static HorizontalJustifyString: Record<string, number> = {\n left: AnnotationHorizontalJustify.LEFT,\n right: AnnotationHorizontalJustify.RIGHT,\n center: AnnotationHorizontalJustify.CENTER,\n centerStem: AnnotationHorizontalJustify.CENTER_STEM,\n };\n\n static VerticalJustify = AnnotationVerticalJustify;\n\n static VerticalJustifyString: Record<string, number> = {\n above: AnnotationVerticalJustify.TOP,\n top: AnnotationVerticalJustify.TOP,\n below: AnnotationVerticalJustify.BOTTOM,\n bottom: AnnotationVerticalJustify.BOTTOM,\n center: AnnotationVerticalJustify.CENTER,\n centerStem: AnnotationVerticalJustify.CENTER_STEM,\n };\n\n // Use the same padding for annotations as note head so the\n // words don't run into each other.\n static get minAnnotationPadding(): number {\n return Metrics.get('NoteHead.minPadding');\n }\n /** Arrange annotations within a `ModifierContext` */\n static format(annotations: Annotation[], state: ModifierContextState): boolean {\n if (!annotations || annotations.length === 0) return false;\n let leftWidth = 0;\n let rightWidth = 0;\n let maxLeftGlyphWidth = 0;\n let maxRightGlyphWidth = 0;\n for (let i = 0; i < annotations.length; ++i) {\n const annotation = annotations[i];\n // Text height is expressed in fractional stave spaces.\n const textLines = (2 + Font.convertSizeToPixelValue(annotation.fontInfo.size)) / Tables.STAVE_LINE_DISTANCE;\n let verticalSpaceNeeded = textLines;\n\n const note = annotation.checkAttachedNote();\n const glyphWidth = note.getGlyphWidth();\n // Get the text width from the font metrics.\n const textWidth = annotation.getWidth();\n if (annotation.horizontalJustification === AnnotationHorizontalJustify.RIGHT) {\n maxLeftGlyphWidth = Math.max(glyphWidth, maxLeftGlyphWidth);\n leftWidth = Math.max(leftWidth, textWidth) + Annotation.minAnnotationPadding;\n } else if (annotation.horizontalJustification === AnnotationHorizontalJustify.LEFT) {\n maxRightGlyphWidth = Math.max(glyphWidth, maxRightGlyphWidth);\n rightWidth = Math.max(rightWidth, textWidth);\n } else {\n leftWidth = Math.max(leftWidth, textWidth / 2) + Annotation.minAnnotationPadding;\n rightWidth = Math.max(rightWidth, textWidth / 2);\n maxLeftGlyphWidth = Math.max(glyphWidth / 2, maxLeftGlyphWidth);\n maxRightGlyphWidth = Math.max(glyphWidth / 2, maxRightGlyphWidth);\n }\n\n const stave: Stave | undefined = note.getStave();\n const stemDirection = note.hasStem() ? note.getStemDirection() : Stem.UP;\n let stemHeight = 0;\n let lines = 5;\n\n if (isTabNote(note)) {\n if (note.renderOptions.drawStem) {\n const stem = (note as StemmableNote).getStem();\n if (stem) {\n stemHeight = Math.abs(stem.getHeight()) / Tables.STAVE_LINE_DISTANCE;\n }\n } else {\n stemHeight = 0;\n }\n } else if (isStemmableNote(note)) {\n const stem = note.getStem();\n if (stem && note.getNoteType() === 'n') {\n stemHeight = Math.abs(stem.getHeight()) / Tables.STAVE_LINE_DISTANCE;\n }\n }\n if (stave) {\n lines = stave.getNumLines();\n }\n\n if (annotation.verticalJustification === this.VerticalJustify.TOP) {\n let noteLine = note.getLineNumber(true);\n if (isTabNote(note)) {\n noteLine = lines - (note.leastString() - 0.5);\n }\n if (stemDirection === Stem.UP) {\n noteLine += stemHeight;\n }\n const curTop = noteLine + state.topTextLine + 0.5;\n if (curTop < lines) {\n annotation.setTextLine(lines - noteLine);\n verticalSpaceNeeded += lines - noteLine;\n state.topTextLine = verticalSpaceNeeded;\n } else {\n annotation.setTextLine(state.topTextLine);\n state.topTextLine += verticalSpaceNeeded;\n }\n } else if (annotation.verticalJustification === this.VerticalJustify.BOTTOM) {\n let noteLine = lines - note.getLineNumber();\n if (isTabNote(note)) {\n noteLine = note.greatestString() - 1;\n }\n if (stemDirection === Stem.DOWN) {\n noteLine += stemHeight;\n }\n const curBottom = noteLine + state.textLine + 1;\n if (curBottom < lines) {\n annotation.setTextLine(lines - curBottom);\n verticalSpaceNeeded += lines - curBottom;\n state.textLine = verticalSpaceNeeded;\n } else {\n annotation.setTextLine(state.textLine);\n state.textLine += verticalSpaceNeeded;\n }\n } else {\n annotation.setTextLine(state.textLine);\n }\n }\n const rightOverlap = Math.min(\n Math.max(rightWidth - maxRightGlyphWidth, 0),\n Math.max(rightWidth - state.rightShift, 0)\n );\n const leftOverlap = Math.min(Math.max(leftWidth - maxLeftGlyphWidth, 0), Math.max(leftWidth - state.leftShift, 0));\n state.leftShift += leftOverlap;\n state.rightShift += rightOverlap;\n return true;\n }\n\n protected horizontalJustification: AnnotationHorizontalJustify;\n protected verticalJustification: AnnotationVerticalJustify;\n\n /**\n * Annotations inherit from `Modifier` and is positioned correctly when\n * in a `ModifierContext`.\n * Create a new `Annotation` with the string `text`.\n */\n constructor(text: string) {\n super();\n\n this.text = text;\n this.horizontalJustification = AnnotationHorizontalJustify.CENTER;\n // warning: the default in the constructor is TOP, but in the factory the default is BOTTOM.\n // this is to support legacy application that may expect this.\n this.verticalJustification = AnnotationVerticalJustify.TOP;\n }\n\n /**\n * Set vertical position of text (above or below stave).\n * @param just value in `AnnotationVerticalJustify`.\n */\n setVerticalJustification(just: string | AnnotationVerticalJustify): this {\n this.verticalJustification = typeof just === 'string' ? Annotation.VerticalJustifyString[just] : just;\n return this;\n }\n\n /**\n * Get horizontal justification.\n */\n getJustification(): AnnotationHorizontalJustify {\n return this.horizontalJustification;\n }\n\n /**\n * Set horizontal justification.\n * @param just value in `Annotation.Justify`.\n */\n setJustification(just: string | AnnotationHorizontalJustify): this {\n this.horizontalJustification = typeof just === 'string' ? Annotation.HorizontalJustifyString[just] : just;\n return this;\n }\n\n /** Render text beside the note. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n const stemDirection = note.hasStem() ? note.getStemDirection() : Stem.UP;\n const start = note.getModifierStartXY(ModifierPosition.ABOVE, this.index);\n\n this.setRendered();\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('annotation' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n const textWidth = this.getWidth();\n const textHeight = Font.convertSizeToPixelValue(this.fontInfo.size);\n let x;\n let y;\n\n if (this.horizontalJustification === AnnotationHorizontalJustify.LEFT) {\n x = start.x;\n } else if (this.horizontalJustification === AnnotationHorizontalJustify.RIGHT) {\n x = start.x - textWidth;\n } else if (this.horizontalJustification === AnnotationHorizontalJustify.CENTER) {\n x = start.x - textWidth / 2;\n } /* CENTER_STEM */ else {\n x = (note as StemmableNote).getStemX() - textWidth / 2;\n }\n\n let stemExt: Record<string, number> = {};\n let spacing = 0;\n const hasStem = note.hasStem();\n const stave = note.checkStave();\n\n // The position of the text varies based on whether or not the note\n // has a stem.\n if (hasStem) {\n stemExt = (note as StemmableNote).checkStem().getExtents();\n spacing = stave.getSpacingBetweenLines();\n }\n\n if (this.verticalJustification === AnnotationVerticalJustify.BOTTOM) {\n // Use the largest (lowest) Y value\n const ys: number[] = note.getYs();\n y = ys.reduce((a, b) => (a > b ? a : b));\n y += (this.textLine + 1) * Tables.STAVE_LINE_DISTANCE + textHeight;\n if (hasStem && stemDirection === Stem.DOWN) {\n y = Math.max(y, stemExt.topY + textHeight + spacing * this.textLine);\n }\n } else if (this.verticalJustification === AnnotationVerticalJustify.CENTER) {\n const yt = note.getYForTopText(this.textLine) - 1;\n const yb = stave.getYForBottomText(this.textLine);\n y = yt + (yb - yt) / 2 + textHeight / 2;\n } else if (this.verticalJustification === AnnotationVerticalJustify.TOP) {\n const topY = Math.min(...note.getYs());\n y = topY - (this.textLine + 1) * Tables.STAVE_LINE_DISTANCE;\n if (hasStem && stemDirection === Stem.UP) {\n // If the stem is above the stave already, go with default line width vs. actual\n // since the lines between don't really matter.\n spacing = stemExt.topY < stave.getTopLineTopY() ? Tables.STAVE_LINE_DISTANCE : spacing;\n y = Math.min(y, stemExt.topY - spacing * (this.textLine + 1));\n }\n } /* CENTER_STEM */ else {\n const extents = note.getStemExtents();\n y = extents.topY + (extents.baseY - extents.topY) / 2 + textHeight / 2;\n }\n\n L('Rendering annotation: ', this.text, x, y);\n this.x = x;\n this.y = y;\n this.renderText(ctx, 0, 0);\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Larry Kuhns.\n// MIT License\n\nimport { Builder } from './easyscore';\nimport { Glyphs } from './glyphs';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { Stave } from './stave';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category, isGraceNote, isStaveNote, isStemmableNote, isTabNote } from './typeguard';\nimport { log, RuntimeError } from './util';\n\nexport interface ArticulationStruct {\n code?: string;\n aboveCode?: string;\n belowCode?: string;\n betweenLines: boolean;\n}\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Articulation.DEBUG) log('VexFlow.Articulation', args);\n}\n\nconst { ABOVE, BELOW } = Modifier.Position;\n\nfunction roundToNearestHalf(mathFn: (a: number) => number, value: number): number {\n return mathFn(value / 0.5) * 0.5;\n}\n\n// This includes both staff and ledger lines\nfunction isWithinLines(line: number, position: number): boolean {\n return position === ABOVE ? line <= 5 : line >= 1;\n}\n\nfunction getRoundingFunction(line: number, position: number): (a: number) => number {\n if (isWithinLines(line, position)) {\n if (position === ABOVE) {\n return Math.ceil;\n } else {\n return Math.floor;\n }\n } else {\n return Math.round;\n }\n}\n\nfunction snapLineToStaff(canSitBetweenLines: boolean, line: number, position: number, offsetDirection: number): number {\n // Initially, snap to nearest staff line or space\n const snappedLine = roundToNearestHalf(getRoundingFunction(line, position), line);\n const canSnapToStaffSpace = canSitBetweenLines && isWithinLines(snappedLine, position);\n const onStaffLine = snappedLine % 1 === 0;\n\n if (canSnapToStaffSpace && onStaffLine) {\n const HALF_STAFF_SPACE = 0.5;\n return snappedLine + HALF_STAFF_SPACE * -offsetDirection;\n } else {\n return snappedLine;\n }\n}\n\n// Helper function for checking if a Note object is either a StaveNote or a GraceNote.\nconst isStaveOrGraceNote = (note: Note) => isStaveNote(note) || isGraceNote(note);\n\nexport function getTopY(note: Note, textLine: number): number {\n const stemDirection = note.getStemDirection();\n const { topY: stemTipY, baseY: stemBaseY } = note.getStemExtents();\n\n if (isStaveOrGraceNote(note)) {\n if (note.hasStem()) {\n if (stemDirection === Stem.UP) {\n return stemTipY;\n } else {\n return stemBaseY;\n }\n } else {\n return Math.min(...note.getYs());\n }\n } else if (isTabNote(note)) {\n if (note.hasStem()) {\n if (stemDirection === Stem.UP) {\n return stemTipY;\n } else {\n return note.checkStave().getYForTopText(textLine);\n }\n } else {\n return note.checkStave().getYForTopText(textLine);\n }\n } else {\n throw new RuntimeError('UnknownCategory', 'Only can get the top and bottom ys of stavenotes and tabnotes');\n }\n}\n\nexport function getBottomY(note: Note, textLine: number): number {\n const stemDirection = note.getStemDirection();\n const { topY: stemTipY, baseY: stemBaseY } = note.getStemExtents();\n\n if (isStaveOrGraceNote(note)) {\n if (note.hasStem()) {\n if (stemDirection === Stem.UP) {\n return stemBaseY;\n } else {\n return stemTipY;\n }\n } else {\n return Math.max(...note.getYs());\n }\n } else if (isTabNote(note)) {\n if (note.hasStem()) {\n if (stemDirection === Stem.UP) {\n return note.checkStave().getYForBottomText(textLine);\n } else {\n return stemTipY;\n }\n } else {\n return note.checkStave().getYForBottomText(textLine);\n }\n } else {\n throw new RuntimeError('UnknownCategory', 'Only can get the top and bottom ys of stavenotes and tabnotes');\n }\n}\n\n/**\n * Get the initial offset of the articulation from the y value of the starting position.\n * This is required because the top/bottom text positions already have spacing applied to\n * provide a \"visually pleasant\" default position. However the y values provided from\n * the stavenote's top/bottom do *not* have any pre-applied spacing. This function\n * normalizes this asymmetry.\n * @param note\n * @param position\n * @returns\n */\nexport function getInitialOffset(note: Note, position: number): number {\n const isOnStemTip =\n (position === ABOVE && note.getStemDirection() === Stem.UP) ||\n (position === BELOW && note.getStemDirection() === Stem.DOWN);\n\n if (isStaveOrGraceNote(note)) {\n if (note.hasStem() && isOnStemTip) {\n return 0.5;\n } else {\n // this amount is larger than the stem-tip offset because we start from\n // the center of the notehead\n return 1;\n }\n } else {\n if (note.hasStem() && isOnStemTip) {\n return 1;\n } else {\n return 0;\n }\n }\n}\n\n/**\n * Articulations and Accents are modifiers that can be\n * attached to notes. The complete list of articulations is available in\n * `tables.ts` under `VexFlow.articulationCodes`.\n *\n * See `tests/articulation_tests.ts` for usage examples.\n */\nexport class Articulation extends Modifier {\n /** To enable logging for this class. Set `VexFlow.Articulation.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n /** Articulations category string. */\n static override get CATEGORY(): string {\n return Category.Articulation;\n }\n\n protected static readonly INITIAL_OFFSET: number = -0.5;\n\n /** Articulation code provided to the constructor. */\n readonly type: string;\n\n protected articulation: ArticulationStruct;\n\n protected heightShift = 0;\n /**\n * FIXME:\n * Most of the complex formatting logic (ie: snapping to space) is\n * actually done in .render(). But that logic belongs in this method.\n *\n * Unfortunately, this isn't possible because, by this point, stem lengths\n * have not yet been finalized. Finalized stem lengths are required to determine the\n * initial position of any stem-side articulation.\n *\n * This indicates that all objects should have their stave set before being\n * formatted. It can't be an optional if you want accurate vertical positioning.\n * Consistently positioned articulations that play nice with other modifiers\n * won't be possible until we stop relying on render-time formatting.\n *\n * Ideally, when this function has completed, the vertical articulation positions\n * should be ready to render without further adjustment. But the current state\n * is far from this ideal.\n */\n static format(articulations: Articulation[], state: ModifierContextState): boolean {\n if (!articulations || articulations.length === 0) return false;\n\n const margin = 0.5;\n let maxGlyphWidth = 0;\n\n const getIncrement = (articulation: Articulation, line: number, position: number) =>\n roundToNearestHalf(getRoundingFunction(line, position), articulation.height / 10 + margin);\n\n articulations.forEach((articulation) => {\n const note = articulation.checkAttachedNote();\n maxGlyphWidth = Math.max(note.getGlyphWidth(), maxGlyphWidth);\n let lines = 5;\n const stemDirection = note.hasStem() ? note.getStemDirection() : Stem.UP;\n let stemHeight = 0;\n // Decide if we need to consider beam direction in placement.\n\n if (isStemmableNote(note)) {\n const stem = note.getStem();\n if (stem) {\n stemHeight = Math.abs(stem.getHeight()) / Tables.STAVE_LINE_DISTANCE;\n }\n }\n const stave: Stave | undefined = note.getStave();\n if (stave) {\n lines = stave.getNumLines();\n }\n if (articulation.getPosition() === ABOVE) {\n let noteLine = note.getLineNumber(true);\n if (stemDirection === Stem.UP) {\n noteLine += stemHeight;\n }\n let increment = getIncrement(articulation, state.topTextLine, ABOVE);\n const curTop = noteLine + state.topTextLine + 0.5;\n // If articulation must be above stave, add lines between note and stave top\n if (!articulation.articulation.betweenLines && curTop < lines) {\n increment += lines - curTop;\n }\n articulation.setTextLine(state.topTextLine);\n state.topTextLine += increment;\n articulation.setOrigin(0.5, 1);\n } else if (articulation.getPosition() === BELOW) {\n let noteLine = Math.max(lines - note.getLineNumber(), 0);\n if (stemDirection === Stem.DOWN) {\n noteLine += stemHeight;\n }\n let increment = getIncrement(articulation, state.textLine, BELOW);\n const curBottom = noteLine + state.textLine + 0.5;\n // if articulation must be below stave, add lines from note to stave bottom\n if (!articulation.articulation.betweenLines && curBottom < lines) {\n increment += lines - curBottom;\n }\n articulation.setTextLine(state.textLine);\n state.textLine += increment;\n articulation.setOrigin(0.5, 0);\n }\n });\n\n const width = articulations\n .map((articulation) => articulation.getWidth())\n .reduce((maxWidth, articWidth) => Math.max(articWidth, maxWidth));\n const overlap = Math.min(\n Math.max(width - maxGlyphWidth, 0),\n Math.max(width - (state.leftShift + state.rightShift), 0)\n );\n\n state.leftShift += overlap / 2;\n state.rightShift += overlap / 2;\n return true;\n }\n\n static easyScoreHook({ articulations }: { articulations: string }, note: StemmableNote, builder: Builder): void {\n if (!articulations) return;\n\n const articNameToCode: Record<string, string> = {\n staccato: 'a.',\n tenuto: 'a-',\n accent: 'a>',\n };\n\n articulations\n .split(',')\n .map((articString) => articString.trim().split('.'))\n .map(([name, position]) => {\n const artic: { type: string; position?: number } = { type: articNameToCode[name] };\n if (position) artic.position = Modifier.PositionString[position];\n return builder.getFactory().Articulation(artic);\n })\n .map((artic) => note.addModifier(artic, 0));\n }\n\n /**\n * Create a new articulation.\n * @param type entry in `VexFlow.articulationCodes` in `tables.ts` or Glyph code.\n *\n * Notes default positions (see https://w3c.github.io/smufl/latest/tables/articulation.html):\n * - Even codes will be positioned ABOVE\n * - Odd codes will be positioned BELOW\n */\n constructor(type: string) {\n super();\n\n this.type = type;\n this.position = ABOVE;\n if (!Tables.articulationCodes(this.type)) {\n if ((this.type.codePointAt(0) ?? 0) % 2 === 0) this.position = ABOVE;\n else this.position = BELOW;\n }\n\n this.articulation = { betweenLines: false };\n this.reset();\n }\n\n protected override reset(): void {\n this.articulation = Tables.articulationCodes(this.type);\n // Use type as glyph code, if not defined as articulation code\n if (!this.articulation) {\n this.articulation = { code: this.type, betweenLines: false };\n }\n const code =\n (this.position === ABOVE ? this.articulation.aboveCode : this.articulation.belowCode) ||\n this.articulation.code ||\n Glyphs.null;\n this.text = code;\n }\n\n /** Set if articulation should be rendered between lines. */\n setBetweenLines(betweenLines = true): this {\n this.articulation.betweenLines = betweenLines;\n return this;\n }\n\n /** Render articulation in position next to note. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const index = this.checkIndex();\n const { position, textLine } = this;\n const canSitBetweenLines = this.articulation.betweenLines;\n\n const stave = note.checkStave();\n const staffSpace = stave.getSpacingBetweenLines();\n const isTab = isTabNote(note);\n\n // Articulations are centered over/under the note head.\n const { x } = note.getModifierStartXY(position, index);\n const shouldSitOutsideStaff = !canSitBetweenLines || isTab;\n\n const initialOffset = getInitialOffset(note, position);\n\n let y = (\n {\n [ABOVE]: () => {\n const y = getTopY(note, textLine) - (textLine + initialOffset) * staffSpace;\n return shouldSitOutsideStaff ? Math.min(stave.getYForTopText(Articulation.INITIAL_OFFSET), y) : y;\n },\n [BELOW]: () => {\n const y = getBottomY(note, textLine) + (textLine + initialOffset) * staffSpace;\n return shouldSitOutsideStaff ? Math.max(stave.getYForBottomText(Articulation.INITIAL_OFFSET), y) : y;\n },\n } as Record<number, () => number>\n )[position]();\n\n if (!isTab) {\n const offsetDirection = position === ABOVE ? -1 : +1;\n const noteLine = note.getKeyProps()[index].line;\n const distanceFromNote = (note.getYs()[index] - y) / staffSpace;\n const articLine = distanceFromNote + Number(noteLine);\n const snappedLine = snapLineToStaff(canSitBetweenLines, articLine, position, offsetDirection);\n\n if (isWithinLines(snappedLine, position)) this.setOrigin(0.5, 0.5);\n\n y += Math.abs(snappedLine - articLine) * staffSpace * offsetDirection;\n }\n\n L(`Rendering articulation at (x: ${x}, y: ${y})`);\n this.x = x;\n this.y = y;\n this.renderText(ctx, 0, 0);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { FontInfo } from './font';\nimport { Category } from './typeguard';\n\nexport interface TextMeasure {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport abstract class RenderContext {\n static get CATEGORY(): string {\n return Category.RenderContext;\n }\n\n abstract clear(): void;\n abstract setFillStyle(style: string): this;\n abstract setBackgroundFillStyle(style: string): this;\n abstract setStrokeStyle(style: string): this;\n abstract setShadowColor(color: string): this;\n abstract setShadowBlur(blur: number): this;\n abstract setLineWidth(width: number): this;\n abstract setLineCap(capType: CanvasLineCap): this;\n abstract setLineDash(dashPattern: number[]): this;\n abstract scale(x: number, y: number): this;\n abstract rect(x: number, y: number, width: number, height: number): this;\n abstract resize(width: number, height: number): this;\n abstract fillRect(x: number, y: number, width: number, height: number): this;\n abstract clearRect(x: number, y: number, width: number, height: number): this;\n abstract pointerRect(x: number, y: number, width: number, height: number): this;\n abstract beginPath(): this;\n abstract moveTo(x: number, y: number): this;\n abstract lineTo(x: number, y: number): this;\n abstract bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;\n abstract quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;\n abstract arc(\n x: number,\n y: number,\n radius: number,\n startAngle: number,\n endAngle: number,\n counterclockwise: boolean\n ): this;\n // eslint-disable-next-line\n abstract fill(attributes?: any): this;\n abstract stroke(): this;\n abstract closePath(): this;\n abstract fillText(text: string, x: number, y: number): this;\n abstract save(): this;\n abstract restore(): this;\n // eslint-disable-next-line\n abstract openGroup(cls?: string, id?: string): any;\n abstract closeGroup(): void;\n abstract openRotation(angleDegrees: number, x: number, y: number): void;\n abstract closeRotation(): void;\n\n // eslint-disable-next-line\n abstract add(child: any): void;\n abstract measureText(text: string): TextMeasure;\n\n abstract set fillStyle(style: string | CanvasGradient | CanvasPattern);\n abstract get fillStyle(): string | CanvasGradient | CanvasPattern;\n\n abstract set strokeStyle(style: string | CanvasGradient | CanvasPattern);\n abstract get strokeStyle(): string | CanvasGradient | CanvasPattern;\n\n abstract setFont(f?: string | FontInfo, size?: string | number, weight?: string | number, style?: string): this;\n abstract getFont(): string;\n\n set font(f: string) {\n this.setFont(f);\n }\n get font(): string {\n return this.getFont();\n }\n}\n\n/**\n * Draw a tiny dot marker on the specified context. A great debugging aid.\n * @param ctx context\n * @param x dot x coordinate\n * @param y dot y coordinate\n * @param color\n */\nexport function drawDot(ctx: RenderContext, x: number, y: number, color = '#F55'): void {\n ctx.save();\n ctx.setFillStyle(color);\n\n // draw a circle\n ctx.beginPath();\n ctx.arc(x, y, 3, 0, Math.PI * 2, false);\n ctx.closePath();\n ctx.fill();\n ctx.restore();\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { Fraction } from './fraction';\nimport { Modifier } from './modifier';\nimport { ModifierContext } from './modifiercontext';\nimport { Stave } from './stave';\nimport { Tables } from './tables';\nimport { TickContext } from './tickcontext';\nimport { Tuplet } from './tuplet';\nimport { Category } from './typeguard';\nimport { defined, RuntimeError } from './util';\nimport { Voice } from './voice';\n\n/** Formatter metrics interface */\nexport interface FormatterMetrics {\n duration: string;\n freedom: {\n left: number;\n right: number;\n };\n iterations: number;\n space: {\n used: number;\n mean: number;\n deviation: number;\n };\n}\n\n/**\n * Tickable represents a element that sit on a score and\n * has a duration, i.e., Tickables occupy space in the musical rendering dimension.\n */\nexport abstract class Tickable extends Element {\n static override get CATEGORY(): string {\n return Category.Tickable;\n }\n\n protected ignoreTicks: boolean;\n protected tupletStack: Tuplet[];\n protected ticks: Fraction;\n protected centerXShift: number;\n protected voice?: Voice;\n protected modifierContext?: ModifierContext;\n protected tickContext?: TickContext;\n protected modifiers: Modifier[];\n protected tickMultiplier: Fraction;\n protected formatterMetrics: FormatterMetrics;\n protected intrinsicTicks: number;\n protected alignCenter: boolean;\n\n private _preFormatted: boolean = false;\n private _postFormatted: boolean = false;\n\n constructor() {\n super();\n\n // These properties represent the duration of\n // this tickable element.\n this.ticks = new Fraction(0, 1); // Fractional value of ticks\n this.intrinsicTicks = 0; // Integer value of ticks without tickMultiplier (tuplets)\n this.tickMultiplier = new Fraction(1, 1);\n\n this.modifiers = [];\n this.tupletStack = [];\n\n this.alignCenter = false;\n this.centerXShift = 0; // Shift from tick context if center aligned\n\n // This flag tells the formatter to ignore this tickable during\n // formatting and justification. It is set by tickables such as BarNote.\n this.ignoreTicks = false;\n\n // This is a space for an external formatting class or function to maintain\n // metrics.\n this.formatterMetrics = {\n // The freedom of a tickable is the distance it can move without colliding\n // with neighboring elements. A formatter can set these values during its\n // formatting pass, which a different formatter can then use to fine tune.\n freedom: { left: 0, right: 0 },\n\n // The simplified rational duration of this tick as a string. It can be\n // used as an index to a map or hashtable.\n duration: '',\n\n // The number of formatting iterations undergone.\n iterations: 0,\n\n // The space in pixels allocated by this formatter, along with the mean space\n // for tickables of this duration, and the deviation from the mean.\n space: {\n used: 0,\n mean: 0,\n deviation: 0,\n },\n };\n }\n\n /** Reset the Tickable, this function will be overloaded. */\n reset(): this {\n return this;\n }\n\n /** Return the ticks. */\n getTicks(): Fraction {\n return this.ticks;\n }\n\n /** Check if it ignores the ticks. */\n shouldIgnoreTicks(): boolean {\n return this.ignoreTicks;\n }\n\n /** Ignore the ticks. */\n setIgnoreTicks(flag: boolean): this {\n this.ignoreTicks = flag;\n return this;\n }\n\n /** Get width of note. Used by the formatter for positioning. */\n override getWidth(): number {\n if (!this._preFormatted) {\n throw new RuntimeError('UnformattedNote', \"Can't call GetWidth on an unformatted note.\");\n }\n\n return this.width + (this.modifierContext ? this.modifierContext.getWidth() : 0);\n }\n\n /** Get `x` position of this tick context. */\n override getX(): number {\n const tickContext = this.checkTickContext(`Can't getX() without a TickContext.`);\n return tickContext.getX() + this.xShift;\n }\n\n /** Return the formatterMetrics. */\n getFormatterMetrics(): FormatterMetrics {\n return this.formatterMetrics;\n }\n\n /** Return the center `x` shift. */\n getCenterXShift(): number {\n if (this.isCenterAligned()) {\n return this.centerXShift;\n }\n\n return 0;\n }\n\n /** Set the center `x` shift. */\n setCenterXShift(centerXShift: number): this {\n this.centerXShift = centerXShift;\n return this;\n }\n\n // Check if tickable is center aligned. */\n isCenterAligned(): boolean {\n return this.alignCenter;\n }\n\n // Set/unset center alignment. */\n setCenterAlignment(alignCenter: boolean): this {\n this.alignCenter = alignCenter;\n return this;\n }\n\n /**\n * Return the associated voice. Every tickable must be associated with a voice.\n * This allows formatters and preFormatter to associate them with the right modifierContexts.\n */\n getVoice(): Voice {\n return defined(this.voice, 'NoVoice', 'Tickable has no voice.');\n }\n\n /** Set the associated voice. */\n setVoice(voice: Voice): void {\n this.voice = voice;\n }\n\n /** Get the Tuplet if any.\n * If there are multiple Tuplets, the most recently added one is returned. */\n getTuplet(): Tuplet | undefined {\n return this.tupletStack.at(-1);\n }\n\n /** Return a readonly array of Tuplets (might be empty). */\n getTupletStack(): readonly Tuplet[] {\n return this.tupletStack as readonly Tuplet[];\n }\n\n /**\n * Remove the given tuplet; raises an Error if the tuplet is not in the TupletStack.\n */\n removeTuplet(tuplet: Tuplet): this {\n const i = this.tupletStack.indexOf(tuplet);\n if (i === -1) {\n throw new RuntimeError('BadArguments', 'Tuplet is not found in this tickable');\n }\n this.tupletStack.splice(i, 1);\n const noteCount = tuplet.getNoteCount();\n const notesOccupied = tuplet.getNotesOccupied();\n\n // Revert old multiplier by inverting numerator & denominator:\n // to remove a 3:2 tuplet, multiply the previous 2/3 by 3/2 to get 1/1.\n this.applyTickMultiplier(noteCount, notesOccupied);\n return this;\n }\n\n /**\n * Remove all tuplets from the tickable.\n */\n clearTuplets(): this {\n if (!this.tupletStack.length) {\n return this;\n }\n this.tupletStack = [];\n this.tickMultiplier = new Fraction(1, 1);\n this.ticks = new Fraction(this.intrinsicTicks, 1);\n return this;\n }\n\n /**\n * Deprecated, to be removed in v6. Use `removeTuplet(tuplet)` or `clearTuplets()` instead.\n * Reset the specific Tuplet (if this is not provided, all tuplets are reset).\n * Remove any prior tuplets from the tick calculation and\n * reset the intrinsic tick value.\n */\n resetTuplet(tuplet?: Tuplet): this {\n if (tuplet) {\n try {\n this.removeTuplet(tuplet);\n } catch {\n // do nothing -- resetTuplet silent failed if tuplet missing.\n }\n } else {\n this.clearTuplets();\n }\n return this;\n }\n\n /** Set the tuplet to the given Tuplet. If there are existing tuplets clears them first. */\n setTuplet(tuplet: Tuplet): this {\n if (this.tupletStack.length) {\n this.clearTuplets();\n }\n return this.addTuplet(tuplet);\n }\n\n /** Add the given Tuplet to the tupletStack without clearing it first. */\n addTuplet(tuplet: Tuplet): this {\n this.tupletStack.push(tuplet);\n\n const noteCount = tuplet.getNoteCount();\n const notesOccupied = tuplet.getNotesOccupied();\n\n // apply the reciprocal of the tuplet. 3:2 multiplies by 2/3, etc.\n this.applyTickMultiplier(notesOccupied, noteCount);\n return this;\n }\n\n /**\n * Sets all the tuplets on the tickable to the given tupletStack. Note that\n * a new array is created on the tickable, so manipulating the array that is\n * passed in will not affect the tupletStack used by the tickable.\n */\n setTupletStack(tupletStack: Tuplet[]): this {\n this.clearTuplets();\n for (const tup of tupletStack) {\n // TODO: this can be made more efficient by figuring out the composite\n // noteCount and notesOccupied individually and applying the tick multiplier\n // only at the end. In practice, however, nested tuplets are used seldom enough\n // that the added complexity is not worth the difficulty.\n this.addTuplet(tup);\n }\n return this;\n }\n\n /**\n * Add self to the provided ModifierContext `mc`.\n * If this tickable has modifiers, set modifierContext.\n * @returns this\n */\n addToModifierContext(mc: ModifierContext): this {\n this.modifierContext = mc;\n for (let i = 0; i < this.modifiers.length; ++i) {\n this.modifierContext.addMember(this.modifiers[i]);\n }\n this.modifierContext.addMember(this);\n this._preFormatted = false;\n return this;\n }\n\n /**\n * Optional, if tickable has modifiers, associate a Modifier.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n addModifier(modifier: Modifier, index: number = 0): this {\n this.modifiers.push(modifier);\n this._preFormatted = false;\n return this;\n }\n\n /** Get the list of associated modifiers. */\n getModifiers(): Modifier[] {\n return this.modifiers;\n }\n\n /** Set the Tick Context. */\n setTickContext(tc: TickContext): void {\n this.tickContext = tc;\n this._preFormatted = false;\n }\n\n checkTickContext(message = 'Tickable has no tick context.'): TickContext {\n return defined(this.tickContext, 'NoTickContext', message);\n }\n\n /** Preformat the Tickable. */\n preFormat(): void {\n if (this._preFormatted) return;\n\n this.width = 0;\n if (this.modifierContext) {\n this.modifierContext.preFormat();\n this.width += this.modifierContext.getWidth();\n }\n }\n\n /** Set preformatted status. */\n set preFormatted(value: boolean) {\n this._preFormatted = value;\n }\n\n get preFormatted(): boolean {\n return this._preFormatted;\n }\n\n /** Postformat the Tickable. */\n postFormat(): this {\n if (this._postFormatted) return this;\n this._postFormatted = true;\n return this;\n }\n\n /** Set postformatted status. */\n set postFormatted(value: boolean) {\n this._postFormatted = value;\n }\n\n get postFormatted(): boolean {\n return this._postFormatted;\n }\n\n /** Return the intrinsic ticks as an integer. */\n getIntrinsicTicks(): number {\n return this.intrinsicTicks;\n }\n\n /** Set the intrinsic ticks as an integer. */\n setIntrinsicTicks(intrinsicTicks: number): void {\n this.intrinsicTicks = intrinsicTicks;\n this.ticks = this.tickMultiplier.clone().multiply(this.intrinsicTicks);\n }\n\n /** Get the tick multiplier as a Fraction. Defaults to Fraction(1, 1). */\n getTickMultiplier(): Fraction {\n return this.tickMultiplier;\n }\n\n /** Apply a tick multiplier, by multiplying the current tickMultiplier by\n * the numerator and denominator given here. Updates ticks. */\n applyTickMultiplier(numerator: number, denominator: number): void {\n this.tickMultiplier.multiply(numerator, denominator);\n this.ticks = this.tickMultiplier.clone().multiply(this.intrinsicTicks);\n }\n\n /** Set the duration. */\n setDuration(duration: Fraction): void {\n const ticks = duration.numerator * (Tables.RESOLUTION / duration.denominator);\n this.ticks = this.tickMultiplier.clone().multiply(ticks);\n this.intrinsicTicks = this.ticks.value();\n }\n\n getAbsoluteX(): number {\n const tickContext = this.checkTickContext(`Can't getAbsoluteX() without a TickContext.`);\n return tickContext.getX();\n }\n\n /** Attach this note to a modifier context. */\n setModifierContext(mc?: ModifierContext): this {\n this.modifierContext = mc;\n return this;\n }\n\n /** Get `ModifierContext`. */\n getModifierContext(): ModifierContext | undefined {\n return this.modifierContext;\n }\n\n /** Check and get `ModifierContext`. */\n checkModifierContext(): ModifierContext {\n return defined(this.modifierContext, 'NoModifierContext', 'No modifier context attached to this tickable.');\n }\n\n /** Get the target stave. */\n abstract getStave(): Stave | undefined;\n\n /** Set the target stave. */\n abstract setStave(stave: Stave): this;\n\n // eslint-disable-next-line\n abstract getMetrics(): any;\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Beam } from './beam';\nimport { BoundingBox } from './boundingbox';\nimport { Fraction } from './fraction';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { drawDot, RenderContext } from './rendercontext';\nimport { Stave } from './stave';\nimport { Stroke } from './strokes';\nimport { Tables } from './tables';\nimport { Tickable } from './tickable';\nimport { TickContext } from './tickcontext';\nimport { Category } from './typeguard';\nimport { defined, RuntimeError } from './util';\nimport { Voice } from './voice';\n\nexport interface GlyphProps {\n codeHead: string;\n stemBeamExtension: number;\n stem: boolean;\n codeFlagUp?: string;\n beamCount: number;\n}\n\nexport interface KeyProps {\n key: string;\n octave: number;\n line: number;\n intValue?: number;\n code?: string;\n displaced: boolean;\n}\n\nexport interface NoteMetrics {\n /** The total width of the note (including modifiers). */\n width: number;\n glyphWidth?: number;\n /** The width of the note head only. */\n notePx: number;\n /** Start `X` for left modifiers. */\n modLeftPx: number;\n /** Start `X` for right modifiers. */\n modRightPx: number;\n /** Extra space on left of note. */\n leftDisplacedHeadPx: number;\n glyphPx: number;\n /** Extra space on right of note. */\n rightDisplacedHeadPx: number;\n}\n\nexport interface NoteDuration {\n duration: string;\n dots: number;\n type: string;\n}\n\nexport interface ParsedNote {\n duration: string;\n type: string;\n customTypes: string[];\n dots: number;\n ticks: number;\n}\n\nexport interface NoteStruct {\n /** Array of pitches, e.g: `['c/4', 'e/4', 'g/4']` */\n keys?: string[];\n /** The time length (e.g., `q` for quarter, `h` for half, `8` for eighth etc.). */\n duration: string;\n line?: number;\n /** The number of dots, which affects the duration. */\n dots?: number;\n /** The note type (e.g., `r` for rest, `s` for slash notes, etc.). */\n type?: string;\n alignCenter?: boolean;\n durationOverride?: Fraction;\n}\n\n/**\n * Note implements an abstract interface for notes and chords that\n * are rendered on a stave. Notes have some common properties: All of them\n * have a value (e.g., pitch, fret, etc.) and a duration (quarter, half, etc.)\n *\n * Some notes have stems, heads, dots, etc. Most notational elements that\n * surround a note are called *modifiers*, and every note has an associated\n * array of them. All notes also have a rendering context and belong to a stave.\n */\nexport abstract class Note extends Tickable {\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // STATIC MEMBERS\n\n static override get CATEGORY(): string {\n return Category.Note;\n }\n\n // Return a glyph given duration and type. The type can be a custom glyph code from customNoteHeads.\n // The default type is a regular note ('n').\n static getGlyphProps(duration: string, type: string = 'n'): GlyphProps {\n duration = Tables.sanitizeDuration(duration);\n\n // Lookup duration for default glyph head code\n let code = Tables.durationCodes[duration];\n if (code === undefined) {\n code = Tables.durationCodes['4'];\n }\n\n // Try and get the note head\n const codeNoteHead = Tables.codeNoteHead(type.toUpperCase(), duration);\n // Merge duration props for 'duration' with the note head properties.\n if (codeNoteHead !== Glyphs.null) {\n code = { ...code, codeHead: codeNoteHead };\n }\n\n return code as GlyphProps;\n }\n\n /** Debug helper. Displays various note metrics for the given note. */\n static plotMetrics(ctx: RenderContext, note: Tickable, yPos: number): void {\n const metrics = note.getMetrics();\n const xStart = note.getAbsoluteX() - metrics.modLeftPx - metrics.leftDisplacedHeadPx;\n const xPre1 = note.getAbsoluteX() - metrics.leftDisplacedHeadPx;\n const xAbs = note.getAbsoluteX();\n const xPost1 = note.getAbsoluteX() + metrics.notePx;\n const xPost2 = note.getAbsoluteX() + metrics.notePx + metrics.rightDisplacedHeadPx;\n const xEnd = note.getAbsoluteX() + metrics.notePx + metrics.rightDisplacedHeadPx + metrics.modRightPx;\n const xFreedomRight = xEnd + (note.getFormatterMetrics().freedom.right ?? 0);\n\n const xWidth = xEnd - xStart;\n ctx.save();\n ctx.setFont(Metrics.get('fontFamily'), 8);\n ctx.fillText(Math.round(xWidth) + 'px', xStart + note.getXShift(), yPos);\n\n const y = yPos + 7;\n function stroke(x1: number, x2: number, color: string, yy: number = y) {\n ctx.beginPath();\n ctx.setStrokeStyle(color);\n ctx.setFillStyle(color);\n ctx.setLineWidth(3);\n ctx.moveTo(x1 + note.getXShift(), yy);\n ctx.lineTo(x2 + note.getXShift(), yy);\n ctx.stroke();\n }\n\n stroke(xStart, xPre1, 'red');\n stroke(xPre1, xAbs, '#999');\n stroke(xAbs, xPost1, 'green');\n stroke(xPost1, xPost2, '#999');\n stroke(xPost2, xEnd, 'red');\n stroke(xEnd, xFreedomRight, '#DD0');\n stroke(xStart - note.getXShift(), xStart, '#BBB'); // Shift\n drawDot(ctx, xAbs + note.getXShift(), y, 'blue');\n\n const formatterMetrics = note.getFormatterMetrics();\n if (formatterMetrics.iterations > 0) {\n const spaceDeviation = formatterMetrics.space.deviation;\n const prefix = spaceDeviation >= 0 ? '+' : '';\n ctx.setFillStyle('red');\n ctx.fillText(prefix + Math.round(spaceDeviation), xAbs + note.getXShift(), yPos - 10);\n }\n ctx.restore();\n }\n\n protected static parseDuration(durationString?: string): NoteDuration | undefined {\n if (!durationString) {\n return undefined;\n }\n const regexp = /(\\d*\\/?\\d+|[a-z])(d*)([nrhms]|$)/;\n const result = regexp.exec(durationString);\n if (!result) {\n return undefined;\n }\n\n const duration = result[1];\n const dots = result[2].length;\n const type = result[3] || 'n';\n\n return { duration, dots, type };\n }\n\n protected static parseNoteStruct(noteStruct: NoteStruct): ParsedNote | undefined {\n // Preserve backwards-compatibility\n const durationProps = Note.parseDuration(noteStruct.duration);\n if (!durationProps) {\n return undefined;\n }\n\n // If specified type is invalid, return undefined.\n let type = noteStruct.type;\n if (type && !Tables.validTypes[type]) {\n return undefined;\n }\n\n // If no type specified, check duration or custom types\n const customTypes: string[] = [];\n if (!type) {\n type = durationProps.type || 'n';\n\n // If we have keys, try and check if we've got a custom glyph\n if (noteStruct.keys !== undefined) {\n noteStruct.keys.forEach((k, i) => {\n const result = k.split('/');\n // We have a custom glyph specified after the note eg. /X2\n customTypes[i] = (result && result.length === 3 ? result[2] : type) as string;\n });\n }\n }\n\n // Calculate the tick duration of the note\n let ticks = Tables.durationToTicks(durationProps.duration);\n if (!ticks) {\n return undefined;\n }\n\n // Are there any dots?\n const dots = noteStruct.dots ? noteStruct.dots : durationProps.dots;\n if (typeof dots !== 'number') {\n return undefined;\n }\n\n // Add ticks as necessary depending on the numbr of dots\n let currentTicks = ticks;\n for (let i = 0; i < dots; i++) {\n if (currentTicks <= 1) return undefined;\n\n currentTicks = currentTicks / 2;\n ticks += currentTicks;\n }\n\n return {\n duration: durationProps.duration,\n type,\n customTypes,\n dots,\n ticks,\n };\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // INSTANCE MEMBERS\n\n glyphProps: GlyphProps;\n keys: string[];\n keyProps: KeyProps[];\n\n protected stave?: Stave;\n public renderOptions: {\n drawStemThroughStave?: boolean;\n draw?: boolean;\n drawDots?: boolean;\n drawStem?: boolean;\n yShift: number;\n extendLeft?: number;\n extendRight?: number;\n annotationSpacing: number;\n strokePx: number;\n };\n protected duration: string;\n protected leftDisplacedHeadPx: number;\n protected rightDisplacedHeadPx: number;\n protected noteType: string;\n protected customGlyphs: GlyphProps[];\n protected ys: number[];\n protected customTypes: string[];\n protected playNote?: Note;\n protected beam?: Beam;\n\n /**\n * Every note is a tickable, i.e., it can be mutated by the `Formatter` class for\n * positioning and layout.\n *\n * @param noteStruct To create a new note you need to provide a `noteStruct`.\n */\n constructor(noteStruct: NoteStruct) {\n super();\n\n if (!noteStruct) {\n throw new RuntimeError('BadArguments', 'Note must have valid initialization data to identify duration and type.');\n }\n\n /** Parses `noteStruct` and get note properties. */\n const parsedNoteStruct = Note.parseNoteStruct(noteStruct);\n if (!parsedNoteStruct) {\n throw new RuntimeError('BadArguments', `Invalid note initialization object: ${JSON.stringify(noteStruct)}`);\n }\n\n // Set note properties from parameters.\n this.keys = noteStruct.keys || [];\n // per-pitch properties\n this.keyProps = [];\n\n this.duration = parsedNoteStruct.duration;\n this.noteType = parsedNoteStruct.type;\n this.customTypes = parsedNoteStruct.customTypes;\n\n if (noteStruct.durationOverride) {\n // Custom duration\n this.setDuration(noteStruct.durationOverride);\n } else {\n // Default duration\n this.setIntrinsicTicks(parsedNoteStruct.ticks);\n }\n\n this.modifiers = [];\n\n // Get the glyph code for this note from the font.\n this.glyphProps = Note.getGlyphProps(this.duration, this.noteType);\n this.customGlyphs = this.customTypes.map((t) => Note.getGlyphProps(this.duration, t));\n\n // Note to play for audio players.\n this.playNote = undefined;\n\n // Positioning contexts used by the Formatter.\n this.ignoreTicks = false;\n\n // Positioning variables\n this.width = 0; // Width in pixels calculated after preFormat\n this.leftDisplacedHeadPx = 0; // Extra room on left for displaced note head\n this.rightDisplacedHeadPx = 0; // Extra room on right for displaced note head\n this.xShift = 0; // X shift from tick context X\n this.ys = []; // list of y coordinates for each note\n // we need to hold on to these for ties and beams.\n\n if (noteStruct.alignCenter) {\n this.setCenterAlignment(noteStruct.alignCenter);\n }\n\n // The render surface.\n this.renderOptions = {\n annotationSpacing: 5,\n strokePx: 1,\n yShift: 0,\n };\n }\n\n /**\n * Get the play note, which is arbitrary data that can be used by an\n * audio player.\n */\n getPlayNote(): Note | undefined {\n return this.playNote;\n }\n\n /**\n * Set the play note, which is arbitrary data that can be used by an\n * audio player.\n */\n setPlayNote(note: Note): this {\n this.playNote = note;\n return this;\n }\n\n /**\n * @returns true if this note is a type of rest.\n *\n * Rests don't have pitches, but take up space in the score.\n * Subclasses should override this default implementation.\n */\n isRest(): boolean {\n return false;\n }\n\n /** Add stroke. */\n addStroke(index: number, stroke: Stroke): this {\n stroke.setNote(this);\n stroke.setIndex(index);\n this.modifiers.push(stroke);\n this.preFormatted = false;\n return this;\n }\n\n /** Get the target stave. */\n getStave(): Stave | undefined {\n return this.stave;\n }\n\n /** Check and get the target stave. */\n checkStave(): Stave {\n return defined(this.stave, 'NoStave', 'No stave attached to instance.');\n }\n\n /** Set the target stave. */\n setStave(stave: Stave): this {\n this.stave = stave;\n this.setYs([stave.getYForLine(0)]); // Update Y values if the stave is changed.\n this.setContext(this.stave.getContext());\n return this;\n }\n\n /** Get spacing to the left of the notes. */\n getLeftDisplacedHeadPx(): number {\n return this.leftDisplacedHeadPx;\n }\n\n /** Get spacing to the right of the notes. */\n getRightDisplacedHeadPx(): number {\n return this.rightDisplacedHeadPx;\n }\n\n /** Set spacing to the left of the notes. */\n setLeftDisplacedHeadPx(x: number): this {\n this.leftDisplacedHeadPx = x;\n return this;\n }\n\n /** Set spacing to the right of the notes. */\n setRightDisplacedHeadPx(x: number): this {\n this.rightDisplacedHeadPx = x;\n return this;\n }\n\n /** True if this note has no duration (e.g., bar notes, spacers, etc.). */\n override shouldIgnoreTicks(): boolean {\n return this.ignoreTicks;\n }\n\n /** Get the stave line number for the note. */\n // eslint-disable-next-line\n getLineNumber(isTopNote?: boolean): number {\n return 0;\n }\n\n /** Get the stave line number for rest. */\n getLineForRest(): number {\n return 0;\n }\n\n /** Get the glyph associated with this note. */\n getGlyphProps(): GlyphProps {\n return this.glyphProps;\n }\n\n /** Get the glyph width. */\n getGlyphWidth(): number {\n return 0;\n }\n\n /**\n * Set Y positions for this note. Each Y value is associated with\n * an individual pitch/key within the note/chord.\n */\n setYs(ys: number[]): this {\n this.ys = ys;\n return this;\n }\n\n /**\n * Get Y positions for this note. Each Y value is associated with\n * an individual pitch/key within the note/chord.\n */\n getYs(): number[] {\n if (this.ys.length === 0) {\n throw new RuntimeError('NoYValues', 'No Y-values calculated for this note.');\n }\n\n return this.ys;\n }\n\n /**\n * Get the Y position of the space above the stave onto which text can\n * be rendered.\n */\n getYForTopText(textLine: number): number {\n return this.checkStave().getYForTopText(textLine);\n }\n\n /** Return the voice that this note belongs in. */\n override getVoice(): Voice {\n if (!this.voice) throw new RuntimeError('NoVoice', 'Note has no voice.');\n return this.voice;\n }\n\n /** Attach this note to `voice`. */\n override setVoice(voice: Voice): this {\n this.voice = voice;\n this.preFormatted = false;\n return this;\n }\n\n /** Get the `TickContext` for this note. */\n getTickContext(): TickContext {\n return this.checkTickContext();\n }\n\n /** Set the `TickContext` for this note. */\n override setTickContext(tc: TickContext): this {\n this.tickContext = tc;\n this.preFormatted = false;\n return this;\n }\n\n /** Accessor to duration. */\n getDuration(): string {\n return this.duration;\n }\n\n /** Accessor to isDotted. */\n isDotted(): boolean {\n return this.getModifiersByType(Category.Dot).length > 0;\n }\n\n /** Accessor to hasStem. */\n hasStem(): boolean {\n return false;\n }\n\n /** Accessor to note type. */\n getNoteType(): string {\n return this.noteType;\n }\n\n /** Get the beam. */\n getBeam(): Beam | undefined {\n return this.beam;\n }\n\n /** Check and get the beam. */\n checkBeam(): Beam {\n return defined(this.beam, 'NoBeam', 'No beam attached to instance');\n }\n\n /** Check it has a beam. */\n hasBeam(): boolean {\n return this.beam !== undefined;\n }\n\n /** Set the beam. */\n setBeam(beam: Beam): this {\n this.beam = beam;\n return this;\n }\n\n /**\n * Attach a modifier to this note.\n * @param modifier the Modifier to add.\n * @param index of the key to modify.\n * @returns this\n */\n override addModifier(modifier: Modifier, index: number = 0): this {\n const signature = 'Note.addModifier(modifier: Modifier, index: number=0)';\n // Backwards compatibility with 3.0.9.\n if (typeof index === 'string') {\n index = parseInt(index);\n // eslint-disable-next-line\n console.warn(signature + ' expected a number for `index`, but received a string.');\n }\n\n // Some versions of VexFlow had the two parameters reversed.\n // Check here and throw an error if the argument types are not correct.\n if (typeof modifier !== 'object' || typeof index !== 'number') {\n throw new RuntimeError('WrongParams', 'Incorrect call signature. Use ' + signature + ' instead.');\n }\n modifier.setNote(this);\n modifier.setIndex(index);\n super.addModifier(modifier);\n return this;\n }\n\n /** Get all modifiers of a specific type in `this.modifiers`. */\n getModifiersByType(type: string): Modifier[] {\n return this.modifiers.filter((modifier) => modifier.getCategory() === type);\n }\n\n /** Get the coordinates for where modifiers begin. */\n // eslint-disable-next-line\n getModifierStartXY(position?: number, index?: number, options?: any): { x: number; y: number } {\n if (!this.preFormatted) {\n throw new RuntimeError('UnformattedNote', \"Can't call GetModifierStartXY on an unformatted note\");\n }\n\n return {\n x: this.getAbsoluteX(),\n y: this.ys[0],\n };\n }\n\n getRightParenthesisPx(index: number): number {\n const props = this.getKeyProps()[index];\n return props.displaced ? this.getRightDisplacedHeadPx() : 0;\n }\n\n getLeftParenthesisPx(index: number): number {\n const props = this.getKeyProps()[index];\n return props.displaced ? this.getLeftDisplacedHeadPx() - this.xShift : -this.xShift;\n }\n\n getFirstDotPx(): number {\n let px = this.getRightDisplacedHeadPx();\n const parentheses = this.checkModifierContext().getMembers('Parenthesis');\n\n // consider parentheses on noteheads, dots should be to the right of them\n if (parentheses.length !== 0) {\n px += parentheses[0].getWidth() + 1;\n }\n return px;\n }\n\n /** Get the metrics for this note. */\n getMetrics(): NoteMetrics {\n if (!this.preFormatted) {\n throw new RuntimeError('UnformattedNote', \"Can't call getMetrics on an unformatted note.\");\n }\n\n const modLeftPx = this.modifierContext ? this.modifierContext.getState().leftShift : 0;\n const modRightPx = this.modifierContext ? this.modifierContext.getState().rightShift : 0;\n const width = this.getWidth();\n const glyphWidth = this.getGlyphWidth();\n const notePx =\n width -\n modLeftPx - // subtract left modifiers\n modRightPx - // subtract right modifiers\n this.leftDisplacedHeadPx - // subtract left displaced head\n this.rightDisplacedHeadPx; // subtract right displaced head\n\n // NOTE: If you change this, remember to update MockTickable.getMetrics() in the tests/ directory.\n return {\n width,\n glyphWidth,\n notePx,\n\n // Modifier spacing.\n modLeftPx,\n modRightPx,\n\n // Displaced note head on left or right.\n leftDisplacedHeadPx: this.leftDisplacedHeadPx,\n rightDisplacedHeadPx: this.rightDisplacedHeadPx,\n glyphPx: 0,\n };\n }\n\n /**\n * Get the absolute `X` position of this note's tick context. This\n * excludes xShift, so you'll need to factor it in if you're\n * looking for the post-formatted x-position.\n */\n override getAbsoluteX(): number {\n const tickContext = this.checkTickContext(`Can't getAbsoluteX() without a TickContext.`);\n // Position note to left edge of tick context.\n let x = tickContext.getX();\n if (this.stave) {\n x += this.stave.getNoteStartX() + Metrics.get('Stave.padding', 0);\n }\n if (this.isCenterAligned()) {\n x += this.getCenterXShift();\n }\n return x;\n }\n\n /** Get the direction of the stem. */\n getStemDirection(): number {\n throw new RuntimeError('NoStem', 'No stem attached to this note.');\n }\n\n /** Get the top and bottom `y` values of the stem. */\n getStemExtents(): Record<string, number> {\n throw new RuntimeError('NoStem', 'No stem attached to this note.');\n }\n\n /** Get the `x` coordinate to the right of the note. */\n getTieRightX(): number {\n let tieStartX = this.getAbsoluteX();\n const noteGlyphWidth = this.getGlyphWidth();\n tieStartX += noteGlyphWidth / 2;\n tieStartX += -this.width / 2 + this.width + 2;\n\n return tieStartX;\n }\n\n /** Get the `x` coordinate to the left of the note. */\n getTieLeftX(): number {\n let tieEndX = this.getAbsoluteX();\n const noteGlyphWidth = this.getGlyphWidth();\n tieEndX += noteGlyphWidth / 2;\n tieEndX -= this.width / 2 + 2;\n\n return tieEndX;\n }\n\n // Get the pitches in the note\n getKeys(): string[] {\n return this.keys;\n }\n\n // Get the properties for all the keys in the note\n getKeyProps(): KeyProps[] {\n return this.keyProps;\n }\n\n // Get the `BoundingBox` for the entire note\n override getBoundingBox(): BoundingBox {\n const boundingBox = super.getBoundingBox();\n for (let i = 0; i < this.modifiers.length; i++) {\n boundingBox.mergeWith(this.modifiers[i].getBoundingBox());\n }\n return boundingBox;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n// A base class for stave modifiers (e.g. clefs, key signatures)\n\nimport { Element } from './element';\nimport { Stave } from './stave';\nimport { Category } from './typeguard';\nimport { defined } from './util';\n\nexport interface LayoutMetrics {\n xMin: number;\n xMax: number;\n paddingLeft: number;\n paddingRight: number;\n}\n\nexport enum StaveModifierPosition {\n CENTER = 0,\n LEFT = 1,\n RIGHT = 2,\n ABOVE = 3,\n BELOW = 4,\n BEGIN = 5,\n END = 6,\n}\n\nexport class StaveModifier extends Element {\n static override get CATEGORY(): string {\n return Category.StaveModifier;\n }\n\n static get Position(): typeof StaveModifierPosition {\n return StaveModifierPosition;\n }\n\n protected padding: number;\n protected position: StaveModifierPosition;\n protected stave?: Stave;\n protected layoutMetrics?: LayoutMetrics;\n\n constructor() {\n super();\n\n this.padding = 10;\n this.position = StaveModifierPosition.ABOVE;\n }\n\n getPosition(): number {\n return this.position;\n }\n\n setPosition(position: number): this {\n this.position = position;\n return this;\n }\n\n getStave(): Stave | undefined {\n return this.stave;\n }\n\n checkStave(): Stave {\n return defined(this.stave, 'NoStave', 'No stave attached to instance.');\n }\n\n setStave(stave: Stave): this {\n this.stave = stave;\n return this;\n }\n\n getPadding(index: number): number {\n return index !== undefined && index < 2 ? 0 : this.padding;\n }\n\n setPadding(padding: number): this {\n this.padding = padding;\n return this;\n }\n\n setLayoutMetrics(layoutMetrics: LayoutMetrics): this {\n this.layoutMetrics = layoutMetrics;\n return this;\n }\n\n getLayoutMetrics(): LayoutMetrics | undefined {\n return this.layoutMetrics;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// @author: Larry Kuhns 2011\n\nimport { Stave } from './stave';\nimport { LayoutMetrics, StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\n\nexport enum BarlineType {\n SINGLE = 1,\n DOUBLE = 2,\n END = 3,\n REPEAT_BEGIN = 4,\n REPEAT_END = 5,\n REPEAT_BOTH = 6,\n NONE = 7,\n}\nexport enum RepeatBracketType {\n NONE = 0,\n STRAIGHT = 1,\n CURVED = 2\n}\nexport class Barline extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.Barline;\n }\n\n protected widths: Record<string, number>;\n protected paddings: Record<string, number>;\n protected layoutMetricsMap: Record<number, LayoutMetrics>;\n\n protected repeatBrackets: RepeatBracketType = RepeatBracketType.NONE;\n protected thickness: number;\n protected type!: BarlineType;\n\n static get type(): typeof BarlineType {\n return BarlineType;\n }\n\n static get typeString(): Record<string, BarlineType> {\n return {\n single: BarlineType.SINGLE,\n double: BarlineType.DOUBLE,\n end: BarlineType.END,\n repeatBegin: BarlineType.REPEAT_BEGIN,\n repeatEnd: BarlineType.REPEAT_END,\n repeatBoth: BarlineType.REPEAT_BOTH,\n none: BarlineType.NONE,\n };\n }\n\n constructor(type: BarlineType | string) {\n super();\n this.thickness = Tables.STAVE_LINE_THICKNESS;\n\n const TYPE = BarlineType;\n this.widths = {};\n this.widths[TYPE.SINGLE] = 5;\n this.widths[TYPE.DOUBLE] = 5;\n this.widths[TYPE.END] = 5;\n this.widths[TYPE.REPEAT_BEGIN] = 5;\n this.widths[TYPE.REPEAT_END] = 5;\n this.widths[TYPE.REPEAT_BOTH] = 5;\n this.widths[TYPE.NONE] = 5;\n\n this.paddings = {};\n this.paddings[TYPE.SINGLE] = 0;\n this.paddings[TYPE.DOUBLE] = 0;\n this.paddings[TYPE.END] = 0;\n this.paddings[TYPE.REPEAT_BEGIN] = 15;\n this.paddings[TYPE.REPEAT_END] = 15;\n this.paddings[TYPE.REPEAT_BOTH] = 15;\n this.paddings[TYPE.NONE] = 0;\n\n this.layoutMetricsMap = {};\n this.layoutMetricsMap[TYPE.SINGLE] = {\n xMin: 0,\n xMax: 1,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.layoutMetricsMap[TYPE.DOUBLE] = {\n xMin: -3,\n xMax: 1,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.layoutMetricsMap[TYPE.END] = {\n xMin: -5,\n xMax: 1,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.layoutMetricsMap[TYPE.REPEAT_END] = {\n xMin: -10,\n xMax: 1,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.layoutMetricsMap[TYPE.REPEAT_BEGIN] = {\n xMin: -2,\n xMax: 10,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.layoutMetricsMap[TYPE.REPEAT_BOTH] = {\n xMin: -10,\n xMax: 10,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.layoutMetricsMap[TYPE.NONE] = {\n xMin: 0,\n xMax: 0,\n paddingLeft: 5,\n paddingRight: 5,\n };\n this.setPosition(StaveModifierPosition.BEGIN);\n this.setType(type);\n } \n setRepeatBracket(val: RepeatBracketType) {\n this.repeatBrackets = val;\n }\n getRepeatBrackets(): RepeatBracketType {\n return this.repeatBrackets;\n }\n getType(): number {\n return this.type;\n }\n\n setType(type: string | number): this {\n this.type = typeof type === 'string' ? Barline.typeString[type] : type;\n\n this.setWidth(this.widths[this.type]);\n this.setPadding(this.paddings[this.type]);\n this.setLayoutMetrics(this.layoutMetricsMap[this.type]);\n return this;\n }\n\n // Draw barlines\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n this.setRendered();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('stavebarline' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n switch (this.type) {\n case BarlineType.SINGLE:\n this.drawVerticalBar(stave, this.x, false);\n break;\n case BarlineType.DOUBLE:\n this.drawVerticalBar(stave, this.x, true);\n break;\n case BarlineType.END:\n this.drawVerticalEndBar(stave, this.x);\n break;\n case BarlineType.REPEAT_BEGIN:\n // If the barline is shifted over (in front of clef/time/key)\n // Draw vertical bar at the beginning.\n this.drawRepeatBar(stave, this.x, true);\n if (stave.getX() !== this.x) {\n this.drawVerticalBar(stave, stave.getX());\n }\n\n break;\n case BarlineType.REPEAT_END:\n this.drawRepeatBar(stave, this.x, false);\n break;\n case BarlineType.REPEAT_BOTH:\n this.drawRepeatBar(stave, this.x, false);\n this.drawRepeatBar(stave, this.x, true);\n break;\n default:\n // Default is NONE, so nothing to draw\n break;\n }\n this.drawPointerRect();\n ctx.closeGroup();\n }\n\n drawVerticalBar(stave: Stave, x: number, doubleBar?: boolean): void {\n const staveCtx = stave.checkContext();\n const topY = stave.getTopLineTopY();\n const botY = stave.getBottomLineBottomY();\n if (doubleBar) {\n staveCtx.fillRect(x - 3, topY, 1, botY - topY);\n }\n staveCtx.fillRect(x, topY, 1, botY - topY);\n }\n\n drawVerticalEndBar(stave: Stave, x: number): void {\n const staveCtx = stave.checkContext();\n const topY = stave.getTopLineTopY();\n const botY = stave.getBottomLineBottomY();\n staveCtx.fillRect(x - 5, topY, 1, botY - topY);\n staveCtx.fillRect(x - 2, topY, 3, botY - topY);\n }\n drawStraightBrackets(stave: Stave, startX: number, startY: number, yDirection: number, xDirection: number) {\n const staveCtx = stave.checkContext();\n const rptBracketW = Math.round(1.5 * Tables.STAVE_LINE_DISTANCE) * xDirection;\n const rptBracketH = Math.round(0.6 * Tables.STAVE_LINE_DISTANCE);\n const rptBracketMH = Math.round(rptBracketH / 2);\n const brY = startY + yDirection;\n const brX = xDirection > 0 ? startX -2 : startX;\n staveCtx.moveTo(brX, brY);\n staveCtx.lineTo(brX, brY + rptBracketH * (-1 * yDirection));\n staveCtx.lineTo(brX + rptBracketW, brY + rptBracketH * yDirection);\n staveCtx.lineTo(brX + rptBracketW, brY + yDirection * (rptBracketH + rptBracketMH));\n staveCtx.lineTo(brX, brY);\n staveCtx.fill();\n }\n\n drawCurvedBrackets(stave: Stave, startX: number, startY: number, yDirection: number, xDirection: number) {\n const staveCtx = stave.checkContext();\n const rptBracketW = Math.round(1.5 * Tables.STAVE_LINE_DISTANCE) * xDirection;\n const rptBracketH = Math.round(0.6 * Tables.STAVE_LINE_DISTANCE);\n const rptBracketMH = Math.round(rptBracketH / 2);\n const brY = startY + yDirection;\n const brX = xDirection > 0 ? startX -2 : startX;\n\n staveCtx.moveTo(brX, brY);\n staveCtx.lineTo(brX, brY + rptBracketH * (-1 * yDirection));\n staveCtx.quadraticCurveTo(brX + rptBracketW/2, brY + rptBracketH * (-1 * yDirection), \n brX + rptBracketW, brY + rptBracketH * yDirection);\n staveCtx.lineTo(brX + rptBracketW, brY + yDirection * (rptBracketH + rptBracketMH));\n staveCtx.quadraticCurveTo(brX + rptBracketW/2, brY, brX, brY);\n staveCtx.fill();\n }\n\n drawRepeatBar(stave: Stave, x: number, begin: boolean): void {\n const staveCtx = stave.checkContext();\n\n const topY = stave.getTopLineTopY();\n const botY = stave.getBottomLineBottomY();\n let xShift = 3;\n\n if (!begin) {\n xShift = -5;\n }\n const xBracketDir = begin ? 1 : -1;\n staveCtx.fillRect(x + xShift, topY, 1, botY - topY);\n staveCtx.fillRect(x - 2, topY, 3, botY - topY);\n if (this.repeatBrackets === RepeatBracketType.CURVED) {\n this.drawCurvedBrackets(stave, x, topY, -1, xBracketDir);\n this.drawCurvedBrackets(stave, x, botY, 1, xBracketDir);\n } else if (this.repeatBrackets === RepeatBracketType.STRAIGHT) {\n this.drawStraightBrackets(stave, x, topY, -1, xBracketDir);\n this.drawStraightBrackets(stave, x, botY, 1, xBracketDir);\n }\n\n const dotRadius = 2;\n\n // Shift dots left or right\n if (begin) {\n xShift += 4;\n } else {\n xShift -= 4;\n }\n\n const dotX = x + xShift + dotRadius / 2;\n\n // calculate the y offset based on number of stave lines\n let yOffset = (stave.getNumLines() - 1) * stave.getSpacingBetweenLines();\n yOffset = yOffset / 2 - stave.getSpacingBetweenLines() / 2;\n let dotY = topY + yOffset + dotRadius / 2;\n\n // draw the top repeat dot\n staveCtx.beginPath();\n staveCtx.arc(dotX, dotY, dotRadius, 0, Math.PI * 2, false);\n staveCtx.fill();\n\n // draw the bottom repeat dot\n dotY += stave.getSpacingBetweenLines();\n staveCtx.beginPath();\n staveCtx.arc(dotX, dotY, dotRadius, 0, Math.PI * 2, false);\n staveCtx.fill();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { ModifierContext } from './modifiercontext';\nimport { Note } from './note';\nimport { Barline, BarlineType } from './stavebarline';\nimport { Category } from './typeguard';\nimport { log } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (BarNote.DEBUG) log('VexFlow.BarNote', args);\n}\n\n/**\n * A `BarNote` is used to render bar lines (from `barline.ts`). `BarNote`s can\n * be added to a voice and rendered in the middle of a stave. Since it has no\n * duration, it consumes no `tick`s, and is dealt with appropriately by the formatter.\n *\n * See `tests/barnote_tests.ts` for usage examples.\n */\nexport class BarNote extends Note {\n /** To enable logging for this class. Set `VexFlow.BarNote.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.BarNote;\n }\n\n protected metrics: { widths: Record<string, number> };\n // Initialized by the constructor via this.setType(type)\n protected type!: BarlineType;\n\n constructor(type: string | BarlineType = BarlineType.SINGLE) {\n super({ duration: 'b' });\n\n this.metrics = {\n widths: {},\n };\n\n const TYPE = BarlineType;\n this.metrics.widths = {\n [TYPE.SINGLE]: 8,\n [TYPE.DOUBLE]: 12,\n [TYPE.END]: 15,\n [TYPE.REPEAT_BEGIN]: 14,\n [TYPE.REPEAT_END]: 14,\n [TYPE.REPEAT_BOTH]: 18,\n [TYPE.NONE]: 0,\n };\n\n // Tell the formatter that bar notes have no duration.\n this.ignoreTicks = true;\n this.setType(type);\n }\n\n /** Get the type of bar note.*/\n getType(): BarlineType {\n return this.type;\n }\n\n /** Set the type of bar note. */\n setType(type: string | BarlineType): this {\n this.type = typeof type === 'string' ? Barline.typeString[type] : type;\n\n // Set width to width of relevant `Barline`.\n this.setWidth(this.metrics.widths[this.type]);\n return this;\n }\n\n /* Overridden to ignore */\n // eslint-disable-next-line\n override addToModifierContext(mc: ModifierContext): this {\n // DO NOTHING.\n return this;\n }\n\n /** Overridden to ignore. */\n override preFormat(): this {\n this.preFormatted = true;\n return this;\n }\n\n /** Render note to stave. */\n override draw(): void {\n const ctx = this.checkContext();\n L('Rendering bar line at: ', this.getAbsoluteX());\n const barline = new Barline(this.type);\n barline.setX(this.getAbsoluteX());\n barline.setStave(this.checkStave());\n barline.setContext(ctx);\n barline.drawWithStyle();\n this.setRendered();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element, ElementStyle } from './element';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Category, isTabNote } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface BendPhrase {\n x?: number;\n type: number;\n text: string;\n width?: number;\n drawWidth?: number;\n}\n\n/** Bend implements tablature bends. */\nexport class Bend extends Modifier {\n static override get CATEGORY(): string {\n return Category.Bend;\n }\n\n static get UP(): number {\n return 0;\n }\n\n static get DOWN(): number {\n return 1;\n }\n\n // Arrange bends in `ModifierContext`\n static format(bends: Bend[], state: ModifierContextState): boolean {\n if (!bends || bends.length === 0) return false;\n\n let lastWidth = 0;\n // Format Bends\n for (let i = 0; i < bends.length; ++i) {\n const bend = bends[i];\n const note = bend.checkAttachedNote();\n\n if (isTabNote(note)) {\n const stringPos = note.leastString() - 1;\n if (state.topTextLine < stringPos) {\n state.topTextLine = stringPos;\n }\n }\n bend.setXShift(lastWidth);\n lastWidth = bend.getWidth();\n bend.setTextLine(state.topTextLine);\n }\n\n state.rightShift += lastWidth;\n state.topTextLine += 1;\n return true;\n }\n\n protected tap: string;\n protected phrase: BendPhrase[];\n\n protected styleLine: ElementStyle = Metrics.getStyle('Bend.line');\n\n /** Set the element style used for rendering the lines. */\n setStyleLine(style: ElementStyle): this {\n this.styleLine = style;\n return this;\n }\n\n /** Get the element style used for rendering the lines. */\n getStyleLine(): ElementStyle {\n return this.styleLine;\n }\n\n public renderOptions: {\n releaseWidth: number;\n bendWidth: number;\n };\n\n /**\n * Example of a phrase:\n * ```\n * [{\n * type: UP,\n * text: \"whole\"\n * width: 8;\n * },\n * {\n * type: DOWN,\n * text: \"whole\"\n * width: 8;\n * },\n * {\n * type: UP,\n * text: \"half\"\n * width: 8;\n * },\n * {\n * type: UP,\n * text: \"whole\"\n * width: 8;\n * },\n * {\n * type: DOWN,\n * text: \"1 1/2\"\n * width: 8;\n * }]\n * ```\n */\n constructor(phrase: BendPhrase[]) {\n super();\n\n this.xShift = 0;\n this.tap = '';\n this.renderOptions = {\n bendWidth: 8,\n releaseWidth: 8,\n };\n\n this.phrase = phrase;\n\n this.updateWidth();\n }\n\n /** Set horizontal shift in pixels. */\n override setXShift(value: number): this {\n this.xShift = value;\n this.updateWidth();\n return this;\n }\n\n setTap(value: string): this {\n this.tap = value;\n return this;\n }\n\n getTextHeight(): number {\n const element = new Element(Category.Bend);\n element.setText(this.phrase[0].text);\n return element.getHeight();\n }\n\n /** Recalculate width. */\n protected updateWidth(): this {\n const measureText = (text: string) => {\n const element = new Element(Category.Bend);\n element.setText(text);\n return element.getWidth();\n };\n\n let totalWidth = 0;\n for (let i = 0; i < this.phrase.length; ++i) {\n const bend = this.phrase[i];\n if (bend.width !== undefined) {\n totalWidth += bend.width;\n } else {\n const additionalWidth = bend.type === Bend.UP ? this.renderOptions.bendWidth : this.renderOptions.releaseWidth;\n\n bend.width = Math.max(additionalWidth, measureText(bend.text)) + 3;\n bend.drawWidth = bend.width / 2;\n totalWidth += bend.width;\n }\n }\n\n this.setWidth(totalWidth + this.xShift);\n return this;\n }\n\n /** Draw the bend on the rendering context. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const start = note.getModifierStartXY(Modifier.Position.RIGHT, this.index);\n start.x += 3;\n start.y += 0.5;\n const xShift = this.xShift;\n\n const stave = note.checkStave();\n const spacing = stave.getSpacingBetweenLines();\n const lowestY = note.getYs().reduce((a, b) => (a < b ? a : b));\n // this.textLine is relative to top string in the group.\n const bendHeight = start.y - ((this.textLine + 1) * spacing + start.y - lowestY) + 3;\n const annotationY = start.y - ((this.textLine + 1) * spacing + start.y - lowestY) - 1;\n\n const renderBend = (x: number, y: number, width: number, height: number) => {\n const cpX = x + width;\n const cpY = y;\n\n this.applyStyle(ctx, this.styleLine);\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.quadraticCurveTo(cpX, cpY, x + width, height);\n ctx.stroke();\n };\n\n const renderRelease = (x: number, y: number, width: number, height: number) => {\n this.applyStyle(ctx, this.styleLine);\n ctx.beginPath();\n ctx.moveTo(x, height);\n ctx.quadraticCurveTo(x + width, height, x + width, y);\n ctx.stroke();\n };\n\n const renderArrowHead = (x: number, y: number, direction: number) => {\n const width = 4;\n const yBase = y + width * direction;\n\n ctx.beginPath();\n ctx.moveTo(x, y); // tip of the arrow\n ctx.lineTo(x - width, yBase);\n ctx.lineTo(x + width, yBase);\n ctx.closePath();\n ctx.fill();\n };\n\n const renderText = (x: number, text: string) => {\n ctx.setFont(this.fontInfo);\n const renderX = x - ctx.measureText(text).width / 2;\n ctx.fillText(text, renderX, annotationY);\n };\n\n let lastBend = undefined;\n let lastBendDrawWidth = 0;\n let lastDrawnWidth = 0;\n if (this.tap?.length) {\n const tapStart = note.getModifierStartXY(Modifier.Position.CENTER, this.index);\n renderText(tapStart.x, this.tap);\n }\n\n for (let i = 0; i < this.phrase.length; ++i) {\n const bend = this.phrase[i];\n if (!bend.drawWidth) bend.drawWidth = 0;\n if (i === 0) bend.drawWidth += xShift;\n\n lastDrawnWidth = bend.drawWidth + lastBendDrawWidth - (i === 1 ? xShift : 0);\n if (bend.type === Bend.UP) {\n if (lastBend && lastBend.type === Bend.UP) {\n renderArrowHead(start.x, bendHeight, +1);\n }\n\n renderBend(start.x, start.y, lastDrawnWidth, bendHeight);\n }\n\n if (bend.type === Bend.DOWN) {\n if (lastBend && lastBend.type === Bend.UP) {\n renderRelease(start.x, start.y, lastDrawnWidth, bendHeight);\n }\n\n if (lastBend && lastBend.type === Bend.DOWN) {\n renderArrowHead(start.x, start.y, -1);\n renderRelease(start.x, start.y, lastDrawnWidth, bendHeight);\n }\n\n if (!lastBend) {\n lastDrawnWidth = bend.drawWidth;\n renderRelease(start.x, start.y, lastDrawnWidth, bendHeight);\n }\n }\n\n renderText(start.x + lastDrawnWidth, bend.text);\n lastBend = bend;\n lastBendDrawWidth = bend.drawWidth;\n lastBend.x = start.x;\n\n start.x += lastDrawnWidth;\n }\n\n if (!lastBend || lastBend.x === undefined) {\n throw new RuntimeError('NoLastBendForBend', 'Internal error.');\n }\n\n // Final arrowhead and text\n if (lastBend.type === Bend.UP) {\n renderArrowHead(lastBend.x + lastDrawnWidth, bendHeight, +1);\n } else if (lastBend.type === Bend.DOWN) {\n renderArrowHead(lastBend.x + lastDrawnWidth, start.y, -1);\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// @author Aaron (@AaronDavidNewman)\n//\n// This implements chord symbols above/below a chord.\n// Chord symbols are modifiers that can be attached to notes.\n// They can contain multiple 'blocks' which represent text or\n// glyphs with various positioning options.\n//\n// See `tests/chordsymbol_tests.ts` for usage examples.\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Font } from './font';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category, isStemmableNote } from './typeguard';\nimport { log } from './util';\n\n// To enable logging for this class. Set `VexFlow.ChordSymbol.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]): void {\n if (ChordSymbol.DEBUG) log('VexFlow.ChordSymbol', args);\n}\n\nexport class ChordSymbolBlock extends Element {\n symbolModifier: SymbolModifiers;\n vAlign: boolean;\n\n constructor(text: string, symbolModifier: SymbolModifiers, xShift: number, yShift: number, vAlign: boolean) {\n super();\n this.text = text;\n this.symbolModifier = symbolModifier;\n this.xShift = xShift;\n this.yShift = yShift;\n this.vAlign = vAlign;\n }\n\n isSuperscript(): boolean {\n return this.symbolModifier === SymbolModifiers.SUPERSCRIPT;\n }\n\n isSubscript(): boolean {\n return this.symbolModifier === SymbolModifiers.SUBSCRIPT;\n }\n}\n\nexport enum ChordSymbolHorizontalJustify {\n LEFT = 1,\n CENTER = 2,\n RIGHT = 3,\n CENTER_STEM = 4,\n}\n\nexport enum ChordSymbolVerticalJustify {\n TOP = 1,\n BOTTOM = 2,\n}\n\nexport enum SymbolModifiers {\n NONE = 1,\n SUBSCRIPT = 2,\n SUPERSCRIPT = 3,\n}\n\n/**\n * ChordSymbol is a modifier that creates a chord symbol above/below a chord.\n * As a modifier, it is attached to an existing note.\n */\nexport class ChordSymbol extends Modifier {\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.ChordSymbol;\n }\n\n // Chord symbols can be positioned and justified relative to the note.\n static readonly HorizontalJustify = ChordSymbolHorizontalJustify;\n\n static readonly HorizontalJustifyString: Record<string, ChordSymbolHorizontalJustify> = {\n left: ChordSymbolHorizontalJustify.LEFT,\n right: ChordSymbolHorizontalJustify.RIGHT,\n center: ChordSymbolHorizontalJustify.CENTER,\n centerStem: ChordSymbolHorizontalJustify.CENTER_STEM,\n };\n\n static readonly VerticalJustify = ChordSymbolVerticalJustify;\n\n static readonly VerticalJustifyString: Record<string, ChordSymbolVerticalJustify> = {\n top: ChordSymbolVerticalJustify.TOP,\n above: ChordSymbolVerticalJustify.TOP,\n below: ChordSymbolVerticalJustify.BOTTOM,\n bottom: ChordSymbolVerticalJustify.BOTTOM,\n };\n\n static get superSubRatio(): number {\n return Metrics.get('ChordSymbol.superSubRatio');\n }\n\n static get spacingBetweenBlocks(): number {\n return Metrics.get('ChordSymbol.spacing');\n }\n\n static get superscriptOffset(): number {\n return Metrics.get('ChordSymbol.superscriptOffset');\n }\n\n static get subscriptOffset(): number {\n return Metrics.get('ChordSymbol.subscriptOffset');\n }\n\n // Glyph data\n static readonly glyphs: Record<string, string> = {\n diminished: Glyphs.csymDiminished,\n dim: Glyphs.csymDiminished,\n halfDiminished: Glyphs.csymHalfDiminished,\n '+': Glyphs.csymAugmented,\n augmented: Glyphs.csymAugmented,\n majorSeventh: Glyphs.csymMajorSeventh,\n minor: Glyphs.csymMinor,\n '-': Glyphs.csymMinor,\n '(': '(', // Glyphs.csymParensLeftTall,\n leftParen: '(', // Glyphs.csymParensLeftTall,\n ')': ')', // Glyphs.csymParensRightTall,\n rightParen: ')', // Glyphs.csymParensRightTall,\n leftBracket: Glyphs.csymBracketLeftTall,\n rightBracket: Glyphs.csymBracketRightTall,\n leftParenTall: '(', // Glyphs.csymParensLeftVeryTall,\n rightParenTall: ')', // Glyphs.csymParensRightVeryTall,\n '/': Glyphs.csymDiagonalArrangementSlash,\n over: Glyphs.csymDiagonalArrangementSlash,\n '#': Glyphs.csymAccidentalSharp,\n b: Glyphs.csymAccidentalFlat,\n };\n\n static readonly symbolModifiers = SymbolModifiers;\n\n static get minPadding(): number {\n return Metrics.get('NoteHead.minPadding');\n }\n\n /**\n * Estimate the width of the whole chord symbol, based on the sum of the widths of the individual blocks.\n * Estimate how many lines above/below the staff we need.\n */\n static format(symbols: ChordSymbol[], state: ModifierContextState): boolean {\n if (!symbols || symbols.length === 0) return false;\n\n let width = 0;\n let leftWidth = 0;\n let rightWidth = 0;\n let maxLeftGlyphWidth = 0;\n let maxRightGlyphWidth = 0;\n\n for (const symbol of symbols) {\n const note: Note = symbol.checkAttachedNote();\n let lineSpaces = 1;\n\n for (let j = 0; j < symbol.symbolBlocks.length; ++j) {\n const block = symbol.symbolBlocks[j];\n const sup = block.isSuperscript();\n const sub = block.isSubscript();\n block.setXShift(width);\n\n // If there are super/subscripts, they extend beyond the line so\n // assume they take up 2 lines\n if (sup || sub) {\n lineSpaces = 2;\n }\n\n // If a subscript immediately follows a superscript block, try to\n // overlay them.\n if (sub && j > 0) {\n const prev = symbol.symbolBlocks[j - 1];\n if (prev.isSuperscript()) {\n // slide the symbol over so it lines up with superscript\n block.setXShift(width - prev.getWidth() - ChordSymbol.minPadding);\n block.vAlign = true;\n width +=\n -prev.getWidth() -\n ChordSymbol.minPadding +\n (prev.getWidth() > block.getWidth() ? prev.getWidth() - block.getWidth() : 0);\n }\n }\n width += block.getWidth() + ChordSymbol.minPadding;\n }\n\n if (symbol.getVertical() === ChordSymbolVerticalJustify.TOP) {\n symbol.setTextLine(state.topTextLine);\n state.topTextLine += lineSpaces;\n } else {\n symbol.setTextLine(state.textLine + 1);\n state.textLine += lineSpaces + 1;\n }\n if (symbol.getReportWidth()) {\n if (isStemmableNote(note)) {\n const glyphWidth = note.getGlyphWidth();\n if (symbol.getHorizontal() === ChordSymbolHorizontalJustify.RIGHT) {\n maxLeftGlyphWidth = Math.max(glyphWidth, maxLeftGlyphWidth);\n leftWidth = Math.max(leftWidth, width) + ChordSymbol.minPadding;\n } else if (symbol.getHorizontal() === ChordSymbolHorizontalJustify.LEFT) {\n maxRightGlyphWidth = Math.max(glyphWidth, maxRightGlyphWidth);\n rightWidth = Math.max(rightWidth, width);\n } else {\n leftWidth = Math.max(leftWidth, width / 2) + ChordSymbol.minPadding;\n rightWidth = Math.max(rightWidth, width / 2);\n maxLeftGlyphWidth = Math.max(glyphWidth / 2, maxLeftGlyphWidth);\n maxRightGlyphWidth = Math.max(glyphWidth / 2, maxRightGlyphWidth);\n }\n }\n symbol.width = width;\n }\n width = 0; // reset symbol width\n }\n const rightOverlap = Math.min(\n Math.max(rightWidth - maxRightGlyphWidth, 0),\n Math.max(rightWidth - state.rightShift, 0)\n );\n const leftOverlap = Math.min(Math.max(leftWidth - maxLeftGlyphWidth, 0), Math.max(leftWidth - state.leftShift, 0));\n\n state.leftShift += leftOverlap;\n state.rightShift += rightOverlap;\n return true;\n }\n\n protected symbolBlocks: ChordSymbolBlock[] = [];\n protected horizontal: number = ChordSymbolHorizontalJustify.LEFT;\n protected vertical: number = ChordSymbolVerticalJustify.TOP;\n protected reportWidth: boolean = true;\n\n constructor() {\n super();\n }\n\n /**\n * The offset is specified in `em`. Scale this value by the font size in pixels.\n */\n get superscriptOffset(): number {\n return ChordSymbol.superscriptOffset * Font.convertSizeToPixelValue(this.fontInfo.size);\n }\n\n get subscriptOffset(): number {\n return ChordSymbol.subscriptOffset * Font.convertSizeToPixelValue(this.fontInfo.size);\n }\n setReportWidth(value: boolean): this {\n this.reportWidth = value;\n return this;\n }\n\n getReportWidth(): boolean {\n return this.reportWidth;\n }\n /**\n * ChordSymbol allows multiple blocks so we can mix glyphs and font text.\n * Each block can have its own vertical orientation.\n */\n getSymbolBlock(\n params: Partial<{\n text: string;\n symbolModifier: SymbolModifiers;\n }> = {}\n ): ChordSymbolBlock {\n const symbolBlock = new ChordSymbolBlock(\n params.text ?? '',\n params.symbolModifier ?? SymbolModifiers.NONE,\n 0,\n 0,\n false\n );\n\n if (symbolBlock.isSubscript()) {\n symbolBlock.setYShift(this.subscriptOffset);\n }\n if (symbolBlock.isSuperscript()) {\n symbolBlock.setYShift(this.superscriptOffset);\n }\n if (symbolBlock.isSubscript() || symbolBlock.isSuperscript()) {\n const { family, size, weight, style } = this.fontInfo;\n const smallerFontSize = Font.scaleSize(size, ChordSymbol.superSubRatio);\n symbolBlock.setFont(family, smallerFontSize, weight, style);\n } else {\n symbolBlock.setFont(this.fontInfo);\n }\n\n return symbolBlock;\n }\n\n /** Add a symbol to this chord, could be text, glyph or line. */\n addSymbolBlock(\n parameters: Partial<{\n text: string;\n symbolModifier: SymbolModifiers;\n }>\n ): this {\n this.symbolBlocks.push(this.getSymbolBlock(parameters));\n return this;\n }\n\n // ### Convenience functions for creating different types of chord symbol parts.\n\n /** Add a text block. */\n addText(\n text: string,\n parameters: Partial<{\n symbolModifier: SymbolModifiers;\n }> = {}\n ): this {\n return this.addSymbolBlock({ ...parameters, text });\n }\n\n /** Add a text block with superscript modifier. */\n addTextSuperscript(text: string): this {\n const symbolModifier = SymbolModifiers.SUPERSCRIPT;\n return this.addSymbolBlock({ text, symbolModifier });\n }\n\n /** Add a text block with subscript modifier. */\n addTextSubscript(text: string): this {\n const symbolModifier = SymbolModifiers.SUBSCRIPT;\n return this.addSymbolBlock({ text, symbolModifier });\n }\n\n /** Add a glyph block with superscript modifier. */\n addGlyphSuperscript(glyph: string): this {\n return this.addTextSuperscript(ChordSymbol.glyphs[glyph]);\n }\n\n /** Add a glyph block. */\n addGlyph(\n glyph: string,\n params: Partial<{\n symbolModifier: SymbolModifiers;\n }> = {}\n ): this {\n return this.addText(ChordSymbol.glyphs[glyph], params);\n }\n\n /**\n * Add a glyph for each character in 'text'. If the glyph is not available, use text from the font.\n * e.g. `addGlyphOrText('(+5#11)')` will use text for the '5' and '11', and glyphs for everything else.\n */\n addGlyphOrText(\n text: string,\n params: Partial<{\n symbolModifier: SymbolModifiers;\n }> = {}\n ): this {\n let str = '';\n for (let i = 0; i < text.length; ++i) {\n const char = text[i];\n const glyph = ChordSymbol.glyphs[char];\n if (glyph) {\n str += glyph;\n } else {\n // Collect consecutive characters with no glyphs.\n str += char;\n }\n }\n if (str.length > 0) {\n this.addText(str, params);\n }\n return this;\n }\n\n /** Add a line of the given width, used as a continuation of the previous symbol in analysis, or lyrics, etc. */\n addLine(\n params: Partial<{\n symbolModifier: SymbolModifiers;\n }> = {}\n ): this {\n // Two csymMinor glyphs next to each other.\n return this.addText('\\ue874\\ue874' /*{csymMinor}{csymMinor}*/, params);\n }\n\n /** Set vertical position of text (above or below stave). */\n setVertical(vj: ChordSymbolVerticalJustify | string | number): this {\n this.vertical = typeof vj === 'string' ? ChordSymbol.VerticalJustifyString[vj] : vj;\n return this;\n }\n\n getVertical(): number {\n return this.vertical;\n }\n\n /** Set horizontal justification. */\n setHorizontal(hj: ChordSymbolHorizontalJustify | string | number): this {\n this.horizontal = typeof hj === 'string' ? ChordSymbol.HorizontalJustifyString[hj] : hj;\n return this;\n }\n\n getHorizontal(): number {\n return this.horizontal;\n }\n\n /** Render text and glyphs above/below the note. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote() as StemmableNote;\n this.setRendered();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('chordsymbol' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n const start = note.getModifierStartXY(Modifier.Position.ABOVE, this.index);\n ctx.setFont(this.fontInfo);\n\n let y: number;\n\n // The position of the text varies based on whether or not the note\n // has a stem.\n const hasStem = note.hasStem();\n const stave = note.checkStave();\n\n if (this.vertical === ChordSymbolVerticalJustify.BOTTOM) {\n // HACK: We need to compensate for the text's height since its origin is bottom-right.\n y = stave.getYForBottomText(this.textLine + Tables.TEXT_HEIGHT_OFFSET_HACK);\n if (hasStem) {\n const stemExt = note.checkStem().getExtents();\n const spacing = stave.getSpacingBetweenLines();\n const stemBase = note.getStemDirection() === 1 ? stemExt.baseY : stemExt.topY;\n y = Math.max(y, stemBase + spacing * (this.textLine + 2));\n }\n } else {\n // (this.vertical === VerticalJustify.TOP)\n const topY = Math.min(...note.getYs());\n y = Math.min(stave.getYForTopText(this.textLine), topY - 10);\n if (hasStem) {\n const stemExt = note.checkStem().getExtents();\n const spacing = stave.getSpacingBetweenLines();\n y = Math.min(y, stemExt.topY - 5 - spacing * this.textLine);\n }\n }\n\n let x = start.x;\n if (this.horizontal === ChordSymbolHorizontalJustify.LEFT) {\n x = start.x;\n } else if (this.horizontal === ChordSymbolHorizontalJustify.RIGHT) {\n x = start.x + this.getWidth();\n } else if (this.horizontal === ChordSymbolHorizontalJustify.CENTER) {\n x = start.x - this.getWidth() / 2;\n } else {\n // HorizontalJustify.CENTER_STEM\n x = note.getStemX() - this.getWidth() / 2;\n }\n L('Rendering ChordSymbol: ', x, y);\n\n this.symbolBlocks.forEach((symbol) => {\n L('Rendering Text: ', symbol.getText(), x + symbol.getXShift(), y + symbol.getYShift());\n symbol.setX(x);\n symbol.setY(y);\n symbol.renderText(ctx, 0, 0);\n });\n this.drawPointerRect();\n ctx.closeGroup();\n }\n\n // Get the `BoundingBox` for the entire chord\n override getBoundingBox(): BoundingBox {\n const boundingBox = this.symbolBlocks[0].getBoundingBox();\n for (let i = 1; i < this.symbolBlocks.length; i++) {\n boundingBox.mergeWith(this.symbolBlocks[i].getBoundingBox());\n }\n return boundingBox;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// This class implements dot modifiers for notes.\n\nimport { Glyphs } from './glyphs';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { Category, isStaveNote, isTabNote } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport class Dot extends Modifier {\n static override get CATEGORY(): string {\n return Category.Dot;\n }\n\n protected dotShiftY: number;\n\n /** Returns the dots associated to a Note. */\n static getDots(note: Note): Dot[] {\n return note.getModifiersByType(Dot.CATEGORY) as Dot[];\n }\n\n /** Add a dot on the specified keys to the notes. */\n static buildAndAttach(notes: Note[], options?: { index?: number; all?: boolean }): void {\n for (const note of notes) {\n if (options?.all) {\n for (let i = 0; i < note.keys.length; i++) {\n const dot = new Dot();\n note.addModifier(dot, i);\n }\n } else if (options?.index !== undefined) {\n const dot = new Dot();\n note.addModifier(dot, options?.index);\n } else {\n const dot = new Dot();\n note.addModifier(dot, 0);\n }\n }\n }\n\n // Arrange dots inside a ModifierContext.\n static format(dots: Dot[], state: ModifierContextState): boolean {\n const rightShift = state.rightShift;\n const dotSpacing = 1;\n\n if (!dots || dots.length === 0) return false;\n\n const dotList = [];\n const maxShiftMap: Record<string, number> = {};\n for (let i = 0; i < dots.length; ++i) {\n const dot = dots[i];\n const note = dot.getNote();\n\n let props;\n let shift;\n\n if (isStaveNote(note)) {\n const index = dot.checkIndex();\n props = note.getKeyProps()[index];\n // consider right displaced head with no previous modifier\n shift = note.getFirstDotPx();\n } else if (isTabNote(note)) {\n props = { line: 0.5 }; // Shim key props for dot placement\n shift = rightShift;\n } else {\n // note object is not StaveNote or TabNote.\n throw new RuntimeError('Internal', 'Unexpected instance.');\n }\n\n const noteId = note.getAttribute('id');\n dotList.push({ line: props.line, note, noteId, dot });\n maxShiftMap[noteId] = Math.max(maxShiftMap[noteId] || shift, shift);\n }\n\n // Sort dots by line number.\n dotList.sort((a, b) => b.line - a.line);\n\n let dotShift = rightShift;\n let xWidth = 0;\n let lastLine = null;\n let lastNote = null;\n let prevDottedSpace = null;\n let halfShiftY = 0;\n\n for (let i = 0; i < dotList.length; ++i) {\n const { dot, note, noteId, line } = dotList[i];\n\n // Reset the position of the dot every line.\n if (line !== lastLine || note !== lastNote) {\n dotShift = maxShiftMap[noteId];\n }\n\n if (!note.isRest() && line !== lastLine) {\n if (Math.abs(line % 1) === 0.5) {\n // note is on a space, so no dot shift\n halfShiftY = 0;\n } else {\n // note is on a line, so shift dot to space above the line\n halfShiftY = 0.5;\n if (lastNote !== null && !lastNote.isRest() && lastLine !== null && lastLine - line === 0.5) {\n // previous note on a space, so shift dot to space below the line\n halfShiftY = -0.5;\n } else if (line + halfShiftY === prevDottedSpace) {\n // previous space is dotted, so shift dot to space below the line\n halfShiftY = -0.5;\n }\n }\n }\n\n // Convert halfShiftY to a multiplier for dots.draw().\n if (note.isRest()) {\n dot.dotShiftY += -halfShiftY;\n } else {\n dot.dotShiftY = -halfShiftY;\n }\n prevDottedSpace = line + halfShiftY;\n\n dot.setXShift(dotShift);\n dotShift += dot.getWidth() + dotSpacing; // spacing\n xWidth = dotShift > xWidth ? dotShift : xWidth;\n lastLine = line;\n lastNote = note;\n }\n\n // Update state.\n state.rightShift += xWidth;\n return true;\n }\n\n constructor() {\n super();\n\n this.position = Modifier.Position.RIGHT;\n\n this.setText(Glyphs.augmentationDot);\n this.dotShiftY = 0;\n }\n\n override setNote(note: Note): this {\n this.note = note;\n this.font = note.font;\n return this;\n }\n\n setDotShiftY(y: number): this {\n this.dotShiftY = y;\n return this;\n }\n\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const stave = note.checkStave();\n const lineSpace = stave.getSpacingBetweenLines();\n\n const start = note.getModifierStartXY(this.position, this.index, { forceFlagRight: true });\n\n // Set the starting y coordinate to the base of the stem for TabNotes.\n if (isTabNote(note)) {\n start.y = note.getStemExtents().baseY;\n }\n\n this.x = start.x;\n this.y = start.y + this.dotShiftY * lineSpace;\n\n this.renderText(ctx, 0, 0);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Larry Kuhns 2013\n// Class to draws string numbers into the notation.\n\nimport { Builder } from './easyscore';\nimport { Metrics } from './metrics';\nimport { Modifier, ModifierPosition } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport class FretHandFinger extends Modifier {\n static override get CATEGORY(): string {\n return Category.FretHandFinger;\n }\n\n // Arrange fingerings inside a ModifierContext.\n static format(nums: FretHandFinger[], state: ModifierContextState): boolean {\n const { leftShift, rightShift } = state;\n const numSpacing = 1;\n\n if (!nums || nums.length === 0) return false;\n\n const numsList = [];\n let prevNote = null;\n let shiftLeft = 0;\n let shiftRight = 0;\n\n for (let i = 0; i < nums.length; ++i) {\n const num = nums[i];\n const note = num.getNote();\n const pos = num.getPosition();\n const index = num.checkIndex();\n const props = note.getKeyProps()[index];\n const textHeight = Metrics.get('FretHandFinger.fontSize');\n if (num.position === ModifierPosition.ABOVE) {\n state.topTextLine += textHeight / Tables.STAVE_LINE_DISTANCE + 0.5;\n }\n if (num.position === ModifierPosition.BELOW) {\n state.textLine += textHeight / Tables.STAVE_LINE_DISTANCE + 0.5;\n }\n\n if (note !== prevNote) {\n for (let n = 0; n < note.keys.length; ++n) {\n if (leftShift === 0) {\n shiftLeft = Math.max(note.getLeftDisplacedHeadPx(), shiftLeft);\n }\n if (rightShift === 0) {\n shiftRight = Math.max(note.getRightDisplacedHeadPx(), shiftRight);\n }\n }\n prevNote = note;\n }\n\n numsList.push({\n note,\n num,\n pos,\n line: props.line,\n shiftL: shiftLeft,\n shiftR: shiftRight,\n });\n }\n\n // Sort fingernumbers by line number.\n numsList.sort((a, b) => b.line - a.line);\n\n let numShiftL = 0;\n let numShiftR = 0;\n let xWidthL = 0;\n let xWidthR = 0;\n let lastLine = null;\n let lastNote = null;\n\n for (let i = 0; i < numsList.length; ++i) {\n let numShift = 0;\n const { note, pos, num, line, shiftL, shiftR } = numsList[i];\n\n // Reset the position of the string number every line.\n if (line !== lastLine || note !== lastNote) {\n numShiftL = leftShift + shiftL;\n numShiftR = rightShift + shiftR;\n }\n\n const numWidth = num.getWidth() + numSpacing;\n if (pos === Modifier.Position.LEFT) {\n num.setXShift(leftShift + numShiftL);\n numShift = leftShift + numWidth; // spacing\n xWidthL = numShift > xWidthL ? numShift : xWidthL;\n } else if (pos === Modifier.Position.RIGHT) {\n num.setXShift(numShiftR);\n numShift = shiftRight + numWidth; // spacing\n xWidthR = numShift > xWidthR ? numShift : xWidthR;\n }\n lastLine = line;\n lastNote = note;\n }\n\n state.leftShift += xWidthL;\n state.rightShift += xWidthR;\n\n return true;\n }\n\n static easyScoreHook({ fingerings }: { fingerings?: string } = {}, note: StemmableNote, builder: Builder): void {\n fingerings\n ?.split(',')\n .map((fingeringString: string) => {\n const split = fingeringString.trim().split('.');\n const params: { number: string; position?: string } = { number: split[0] };\n if (split[1]) params.position = split[1];\n return builder.getFactory().Fingering(params);\n })\n .map((fingering: Modifier, index: number) => note.addModifier(fingering, index));\n }\n\n protected xOffset: number;\n protected yOffset: number;\n\n constructor(finger: string) {\n super();\n\n this.setFretHandFinger(finger);\n this.position = Modifier.Position.LEFT; // Default position above stem or note head\n this.xOffset = 0; // Horizontal offset from default\n this.yOffset = 0; // Vertical offset from default\n }\n\n setFretHandFinger(finger: string): this {\n this.text = finger;\n return this;\n }\n\n getFretHandFinger(): string {\n return this.text;\n }\n\n setOffsetX(x: number): this {\n this.xOffset = x;\n return this;\n }\n\n setOffsetY(y: number): this {\n this.yOffset = y;\n return this;\n }\n\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const start = note.getModifierStartXY(this.position, this.index);\n let dotX = start.x + this.xOffset;\n let dotY = start.y + this.yOffset + 5;\n\n switch (this.position) {\n case Modifier.Position.ABOVE:\n dotX -= 4;\n dotY -= 12;\n break;\n case Modifier.Position.BELOW:\n dotX -= 2;\n dotY += 10;\n break;\n case Modifier.Position.LEFT:\n dotX -= this.width;\n break;\n case Modifier.Position.RIGHT:\n dotX += 1;\n break;\n default:\n throw new RuntimeError('InvalidPosition', `The position ${this.position} does not exist`);\n }\n\n this.renderText(ctx, dotX, dotY);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { ElementStyle } from './element';\nimport { Note, NoteStruct } from './note';\nimport { Stave } from './stave';\nimport { StaveNote } from './stavenote';\nimport { Stem } from './stem';\nimport { Category } from './typeguard';\nimport { defined, log } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (NoteHead.DEBUG) log('VexFlow.NoteHead', args);\n}\n\nexport interface NoteHeadStruct extends NoteStruct {\n line?: number;\n slashed?: boolean;\n style?: ElementStyle;\n customGlyphCode?: string;\n stemDirection?: number;\n displaced?: boolean;\n noteType?: string;\n x?: number;\n y?: number;\n index?: number;\n}\n\n/**\n * `NoteHeads` are typically not manipulated\n * directly, but used internally in `StaveNote`.\n *\n * See `tests/notehead_tests.ts` for usage examples.\n */\nexport class NoteHead extends Note {\n /** To enable logging for this class. Set `VexFlow.NoteHead.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.NoteHead;\n }\n\n protected customGlyph: boolean = false;\n protected displaced: boolean;\n protected stemDirection: number;\n\n protected line: number;\n protected index?: number;\n protected slashed: boolean;\n\n // map notehead SMuFL codes to the corresponding SMuFL code with ledger line\n protected ledger: Record<string, string> = {\n '\\ue4e3' /*restWhole*/: '\\ue4f4' /*restWholeLegerLine*/,\n '\\ue4e4' /*restHalf*/: '\\ue4f5' /*restHalfLegerLine*/,\n };\n\n constructor(noteStruct: NoteHeadStruct) {\n super(noteStruct);\n\n this.index = noteStruct.index;\n this.x = noteStruct.x || 0;\n this.y = noteStruct.y || 0;\n if (noteStruct.noteType) this.noteType = noteStruct.noteType;\n this.displaced = noteStruct.displaced || false;\n this.stemDirection = noteStruct.stemDirection || Stem.UP;\n this.line = noteStruct.line || 0;\n\n // Get glyph code based on duration and note type. This could be\n // regular notes, rests, or other custom codes.\n this.glyphProps = Note.getGlyphProps(this.duration, this.noteType);\n defined(\n this.glyphProps,\n 'BadArguments',\n `No glyph found for duration '${this.duration}' and type '${this.noteType}'`\n );\n\n // Swap out the glyph with ledger lines\n if ((this.line > 5 || this.line < 0) && this.ledger[this.glyphProps.codeHead]) {\n this.glyphProps.codeHead = this.ledger[this.glyphProps.codeHead];\n }\n this.text = this.glyphProps.codeHead;\n if (noteStruct.customGlyphCode) {\n this.customGlyph = true;\n this.text = noteStruct.customGlyphCode;\n }\n\n this.setStyle(noteStruct.style ?? {});\n this.slashed = noteStruct.slashed || false;\n\n this.renderOptions = {\n ...this.renderOptions,\n };\n }\n /** Get the width of the notehead. */\n override getWidth(): number {\n return this.width;\n }\n\n /** Determine if the notehead is displaced. */\n isDisplaced(): boolean {\n return this.displaced === true;\n }\n\n /** Get the stave line the notehead is placed on. */\n getLine(): number {\n return this.line;\n }\n\n /** Set the stave line the notehead is placed on. */\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n /** Get the canvas `x` coordinate position of the notehead. */\n override getAbsoluteX(): number {\n // If the note has not been preformatted, then get the static x value\n // Otherwise, it's been formatted and we should use it's x value relative\n // to its tick context\n const x = !this.preFormatted ? this.x : super.getAbsoluteX();\n\n // For a more natural displaced notehead, we adjust the displacement amount\n // by half the stem width in order to maintain a slight overlap with the stem\n const displacementStemAdjustment = Stem.WIDTH / 2;\n\n return x + (this.displaced ? (this.width - displacementStemAdjustment) * this.stemDirection : 0);\n }\n\n /** Set notehead to a provided `stave`. */\n override setStave(stave: Stave): this {\n const line = this.getLine();\n\n this.stave = stave;\n if (this.stave) {\n this.setY(this.stave.getYForNote(line));\n this.setContext(this.stave.getContext());\n }\n return this;\n }\n\n /** Pre-render formatting. */\n override preFormat(): this {\n if (this.preFormatted) return this;\n\n this.preFormatted = true;\n return this;\n }\n\n /** Draw the notehead. */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('notehead' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n L(\"Drawing note head '\", this.noteType, this.duration, \"' at\", this.x, this.y);\n this.x = this.getAbsoluteX();\n this.renderText(ctx, 0, 0);\n (this.parent as StaveNote)?.drawModifiers(this);\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { Category } from './typeguard';\nimport { log } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Flag.DEBUG) log('VexFlow.Flag', args);\n}\n\n/**\n * `Flags` are typically not manipulated\n * directly, but used internally in `StaveNote`.\n */\nexport class Flag extends Element {\n /** To enable logging for this class. Set `VexFlow.NoteHead.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.Flag;\n }\n\n /** Draw the notehead. */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('flag' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n L(\"Drawing flag '\", this.text, \"' at\", this.x, this.y);\n this.renderText(ctx, 0, 0);\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n// `StemmableNote` is an abstract interface for notes with optional stems.\n// Examples of stemmable notes are `StaveNote` and `TabNote`\n\nimport { Flag } from './flag';\nimport { Glyphs } from './glyphs';\nimport { GlyphProps, Note, NoteStruct } from './note';\nimport { Stem, StemOptions } from './stem';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport abstract class StemmableNote extends Note {\n static override get CATEGORY(): string {\n return Category.StemmableNote;\n }\n\n stemDirection?: number;\n stem?: Stem;\n\n protected flag = new Flag();\n protected stemExtensionOverride?: number;\n\n constructor(noteStruct: NoteStruct) {\n super(noteStruct);\n }\n\n // Get and set the note's `Stem`\n getStem(): Stem | undefined {\n return this.stem;\n }\n\n checkStem(): Stem {\n if (!this.stem) {\n throw new RuntimeError('NoStem', 'No stem attached to instance');\n }\n return this.stem;\n }\n\n setStem(stem: Stem): this {\n this.stem = stem;\n this.addChild(stem);\n return this;\n }\n\n // Builds and sets a new stem\n buildStem(): this {\n const stem = new Stem();\n this.setStem(stem);\n return this;\n }\n\n buildFlag(): void {\n const { glyphProps } = this;\n\n if (this.hasFlag()) {\n const flagCode =\n // codeFlagDown = codeFlagUp + 1\n // if codeFlagUp is undefined, codePoint will be 0\n this.getStemDirection() === Stem.DOWN\n ? String.fromCodePoint((glyphProps.codeFlagUp?.codePointAt(0) ?? -1) + 1)\n : (glyphProps.codeFlagUp ?? Glyphs.null);\n\n this.flag.setText(flagCode);\n this.flag.fontInfo = this.fontInfo;\n }\n }\n\n // Get the custom glyph associated with the outer note head on the base of the stem.\n getBaseCustomNoteHeadGlyphProps(): GlyphProps {\n if (this.getStemDirection() === Stem.DOWN) {\n return this.customGlyphs[this.customGlyphs.length - 1];\n } else {\n return this.customGlyphs[0];\n }\n }\n\n // Get the full length of stem\n getStemLength(): number {\n return Stem.HEIGHT + this.getStemExtension();\n }\n\n // Get the number of beams for this duration\n getBeamCount(): number {\n const glyphProps = this.getGlyphProps();\n\n if (glyphProps) {\n return glyphProps.beamCount;\n } else {\n return 0;\n }\n }\n\n // Get the minimum length of stem\n getStemMinimumLength(): number {\n const frac = Tables.durationToFraction(this.duration);\n const beamIsUndefined = this.beam === undefined;\n let length = frac.value() <= 1 ? 0 : 20;\n // if note is flagged, cannot shorten beam\n switch (this.duration) {\n case '8':\n case '16':\n length = beamIsUndefined ? 35 : 25;\n break;\n case '32':\n length = beamIsUndefined ? 45 : 35;\n break;\n case '64':\n length = beamIsUndefined ? 50 : 40;\n break;\n case '128':\n length = beamIsUndefined ? 55 : 45;\n break;\n case '256':\n length = beamIsUndefined ? 60 : 55;\n break;\n case '512':\n length = beamIsUndefined ? 65 : 60;\n break;\n case '1024':\n length = beamIsUndefined ? 70 : 65;\n break;\n default:\n break;\n }\n return length;\n }\n\n // Get/set the direction of the stem\n override getStemDirection(): number {\n if (!this.stemDirection) throw new RuntimeError('NoStem', 'No stem attached to this note.');\n return this.stemDirection;\n }\n\n setStemDirection(direction?: number): this {\n if (!direction) direction = Stem.UP;\n if (direction !== Stem.UP && direction !== Stem.DOWN) {\n throw new RuntimeError('BadArgument', `Invalid stem direction: ${direction}`);\n }\n\n this.stemDirection = direction;\n\n // Reset and reformat everything. Flag has to be built before calling getStemExtension.\n this.reset();\n if (this.hasFlag()) {\n this.buildFlag();\n }\n this.beam = undefined;\n\n if (this.stem) {\n this.stem.setDirection(direction);\n this.stem.setExtension(this.getStemExtension());\n }\n\n if (this.preFormatted) {\n this.preFormat();\n }\n return this;\n }\n\n // Get the `x` coordinate of the stem\n getStemX(): number {\n const xBegin = this.getAbsoluteX() + this.xShift;\n const xEnd = this.getAbsoluteX() + this.xShift + this.getGlyphWidth();\n const stemX = this.stemDirection === Stem.DOWN ? xBegin : xEnd;\n return stemX;\n }\n\n // Get the `x` coordinate for the center of the glyph.\n // Used for `TabNote` stems and stemlets over rests\n getCenterGlyphX(): number {\n return this.getAbsoluteX() + this.xShift + this.getGlyphWidth() / 2;\n }\n\n // Get the stem extension for the current duration\n getStemExtension(): number {\n const glyphProps = this.getGlyphProps();\n const flagHeight = this.flag.getHeight();\n const scale = this.getFontScale();\n\n if (this.stemExtensionOverride !== undefined) {\n return this.stemExtensionOverride;\n }\n\n // Use stemBeamExtension with beams\n if (this.beam) {\n return glyphProps.stemBeamExtension * scale;\n }\n\n // If the flag is longer than the stem, extend the stem by the difference.\n return flagHeight > Stem.HEIGHT * scale ? flagHeight - Stem.HEIGHT * scale : 0;\n }\n\n // Set the stem length to a specific. Will override the default length.\n setStemLength(height: number): this {\n this.stemExtensionOverride = height - Stem.HEIGHT;\n return this;\n }\n\n // Get the top and bottom `y` values of the stem.\n override getStemExtents(): { topY: number; baseY: number } {\n if (!this.stem) throw new RuntimeError('NoStem', 'No stem attached to this note.');\n return this.stem.getExtents();\n }\n\n /** Gets the `y` value for the top modifiers at a specific `textLine`. */\n override getYForTopText(textLine: number): number {\n const stave = this.checkStave();\n if (this.hasStem()) {\n const extents = this.getStemExtents();\n if (!extents) throw new RuntimeError('InvalidState', 'Stem does not have extents.');\n\n return Math.min(\n stave.getYForTopText(textLine),\n extents.topY - this.renderOptions.annotationSpacing * (textLine + 1)\n );\n } else {\n return stave.getYForTopText(textLine);\n }\n }\n\n /** Gets the `y` value for the bottom modifiers at a specific `textLine`. */\n getYForBottomText(textLine: number): number {\n const stave = this.checkStave();\n if (this.hasStem()) {\n const extents = this.getStemExtents();\n if (!extents) throw new RuntimeError('InvalidState', 'Stem does not have extents.');\n\n return Math.max(stave.getYForTopText(textLine), extents.baseY + this.renderOptions.annotationSpacing * textLine);\n } else {\n return stave.getYForBottomText(textLine);\n }\n }\n\n hasFlag(): boolean {\n return this.glyphProps.codeFlagUp !== undefined && !this.beam && !this.isRest();\n }\n\n /** Post formats the note. */\n override postFormat(): this {\n this.beam?.postFormat();\n this.postFormatted = true;\n return this;\n }\n\n /** Renders the stem onto the canvas. */\n drawStem(stemOptions: StemOptions): void {\n this.checkContext();\n this.setRendered();\n\n this.setStem(new Stem(stemOptions));\n this.stem?.setContext(this.getContext()).drawWithStyle();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// This file implements notes for standard notation. This consists of one or\n// more `NoteHeads`, an optional stem, and an optional flag.\n//\n// Throughout these comments, a \"note\" refers to the entire `StaveNote`,\n// and a \"key\" refers to a specific pitch/notehead within a note.\n//\n// See `tests/stavenote_tests.ts` for usage examples.\n\nimport { Beam } from './beam';\nimport { BoundingBox } from './boundingbox';\nimport { ElementStyle } from './element';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { KeyProps, Note, NoteStruct } from './note';\nimport { NoteHead } from './notehead';\nimport { Stave } from './stave';\nimport { Stem, StemOptions } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { defined, log, midLine, RuntimeError } from './util';\n\nexport interface StaveNoteHeadBounds {\n yTop: number;\n yBottom: number;\n displacedX?: number;\n nonDisplacedX?: number;\n highestLine: number;\n lowestLine: number;\n highestDisplacedLine?: number;\n lowestDisplacedLine?: number;\n highestNonDisplacedLine: number;\n lowestNonDisplacedLine: number;\n}\n\nexport interface StaveNoteFormatSettings {\n line: number;\n maxLine: number;\n minLine: number;\n isrest: boolean;\n stemDirection?: number;\n stemMax: number;\n stemMin: number;\n voiceShift: number;\n isDisplaced: boolean;\n note: StaveNote;\n}\n\nexport interface StaveNoteStruct extends NoteStruct {\n /** `Stem.UP` or `Stem.DOWN`. */\n stemDirection?: number;\n autoStem?: boolean;\n strokePx?: number;\n octaveShift?: number;\n clef?: string;\n}\n\n// To enable logging for this class. Set `VexFlow.StaveNote.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (StaveNote.DEBUG) log('VexFlow.StaveNote', args);\n}\n\nconst isInnerNoteIndex = (note: StaveNote, index: number) =>\n index === (note.getStemDirection() === Stem.UP ? note.keyProps.length - 1 : 0);\n\n// Helper methods for rest positioning in ModifierContext.\nfunction shiftRestVertical(rest: StaveNoteFormatSettings, note: StaveNoteFormatSettings, dir: number) {\n const delta = dir;\n\n rest.line += delta;\n rest.maxLine += delta;\n rest.minLine += delta;\n rest.note.setKeyLine(0, rest.note.getKeyLine(0) + delta);\n}\n\n// Called from formatNotes :: center a rest between two notes\nfunction centerRest(rest: StaveNoteFormatSettings, noteU: StaveNoteFormatSettings, noteL: StaveNoteFormatSettings) {\n const delta = rest.line - midLine(noteU.minLine, noteL.maxLine);\n rest.note.setKeyLine(0, rest.note.getKeyLine(0) - delta);\n rest.line -= delta;\n rest.maxLine -= delta;\n rest.minLine -= delta;\n}\n\nexport class StaveNote extends StemmableNote {\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.StaveNote;\n }\n\n static get LEDGER_LINE_OFFSET(): number {\n return 3;\n }\n\n static get minNoteheadPadding(): number {\n return Metrics.get('NoteHead.minPadding');\n }\n\n /** Format notes inside a ModifierContext. */\n static format(notes: StaveNote[], state: ModifierContextState): boolean {\n if (!notes || notes.length < 2) return false;\n\n const notesList: StaveNoteFormatSettings[] = [];\n\n for (let i = 0; i < notes.length; i++) {\n // Formatting uses sortedKeyProps to calculate line and minL.\n const props = notes[i].sortedKeyProps;\n const line = props[0].keyProps.line;\n let minL = props[props.length - 1].keyProps.line;\n const stemDirection = notes[i].getStemDirection();\n const stemMax = notes[i].getStemLength() / 10;\n const stemMin = notes[i].getStemMinimumLength() / 10;\n\n let maxL;\n if (notes[i].isRest()) {\n maxL =\n line +\n Math.ceil(notes[i]._noteHeads[0].getTextMetrics().actualBoundingBoxAscent / Tables.STAVE_LINE_DISTANCE);\n minL =\n line -\n Math.ceil(notes[i]._noteHeads[0].getTextMetrics().actualBoundingBoxDescent / Tables.STAVE_LINE_DISTANCE);\n } else {\n maxL =\n stemDirection === 1 ? props[props.length - 1].keyProps.line + stemMax : props[props.length - 1].keyProps.line;\n\n minL = stemDirection === 1 ? props[0].keyProps.line : props[0].keyProps.line - stemMax;\n }\n\n notesList.push({\n line: props[0].keyProps.line, // note/rest base line\n maxLine: maxL, // note/rest upper bounds line\n minLine: minL, // note/rest lower bounds line\n isrest: notes[i].isRest(),\n stemDirection,\n stemMax, // Maximum (default) note stem length;\n stemMin, // minimum note stem length\n voiceShift: notes[i].getVoiceShiftWidth(),\n isDisplaced: notes[i].isDisplaced(), // note manually displaced\n note: notes[i],\n });\n }\n\n let voices = 0;\n let noteU = undefined;\n let noteM = undefined;\n let noteL = undefined;\n const draw = [false, false, false];\n\n for (let i = 0; i < notesList.length; i++) {\n // If .draw is true or undefined, we set draw[i] = true\n draw[i] = notesList[i].note.renderOptions.draw !== false;\n }\n\n if (draw[0] && draw[1] && draw[2]) {\n // Three visible notes\n voices = 3;\n noteU = notesList[0];\n noteM = notesList[1];\n noteL = notesList[2];\n } else if (draw[0] && draw[1]) {\n // Two visible notes, 0 & 1\n voices = 2;\n noteU = notesList[0];\n noteL = notesList[1];\n } else if (draw[0] && draw[2]) {\n // Two visible notes, 0 & 2\n voices = 2;\n noteU = notesList[0];\n noteL = notesList[2];\n } else if (draw[1] && draw[2]) {\n // Two visible notes, 1 & 2\n voices = 2;\n noteU = notesList[1];\n noteL = notesList[2];\n } else {\n // No shift required for less than 2 visible notes\n return true;\n }\n\n // for two voice backward compatibility, ensure upper voice is stems up\n // for three voices, the voices must be in order (upper, middle, lower)\n if (voices === 2 && noteU.stemDirection === -1 && noteL.stemDirection === 1) {\n noteU = notesList[1];\n noteL = notesList[0];\n }\n\n const voiceXShift = Math.max(noteU.voiceShift, noteL.voiceShift);\n let xShift = 0;\n\n // Test for two voice note intersection\n if (voices === 2) {\n const lineSpacing =\n noteU.note.hasStem() && noteL.note.hasStem() && noteU.stemDirection === noteL.stemDirection ? 0.0 : 0.5;\n if (noteL.isrest && noteU.isrest && noteU.note.duration === noteL.note.duration) {\n noteL.note.renderOptions.draw = false;\n } else if (noteU.minLine <= noteL.maxLine + lineSpacing) {\n if (noteU.isrest) {\n // shift rest up\n shiftRestVertical(noteU, noteL, 1);\n } else if (noteL.isrest) {\n // shift rest down\n shiftRestVertical(noteL, noteU, -1);\n } else {\n //Instead of shifting notes, remove the appropriate flag\n //If we are sharing a line, switch one notes stem direction.\n //If we are sharing a line and in the same voice, only then offset one note\n const lineDiff = Math.abs(noteU.line - noteL.line);\n if (noteU.note.hasStem() && noteL.note.hasStem()) {\n const noteUHead = noteU.note.sortedKeyProps[0].keyProps.code;\n const noteLHead = noteL.note.sortedKeyProps[noteL.note.sortedKeyProps.length - 1].keyProps.code;\n if (\n // If unison is not configured, shift\n !Tables.UNISON ||\n // If we have different noteheads, shift\n noteUHead !== noteLHead ||\n // If we have different dot values, shift\n noteU.note.getModifiers().filter((item) => item.getCategory() === Category.Dot && item.getIndex() === 0)\n .length !==\n noteL.note.getModifiers().filter((item) => item.getCategory() === Category.Dot && item.getIndex() === 0)\n .length ||\n // If the notes are quite close but not on the same line, shift\n (lineDiff < 1 && lineDiff > 0) ||\n // If styles are different, shift\n JSON.stringify(noteU.note.getStyle()) !== JSON.stringify(noteL.note.getStyle())\n ) {\n xShift = voiceXShift + 2;\n if (noteU.stemDirection === noteL.stemDirection) {\n // upper voice is middle voice, so shift it right\n noteU.note.setXShift(xShift);\n } else {\n // shift lower voice right\n noteL.note.setXShift(xShift);\n }\n } else if (noteU.note.voice !== noteL.note.voice) {\n //If we are not in the same voice\n if (noteU.stemDirection === noteL.stemDirection) {\n if (noteU.line !== noteL.line) {\n xShift = voiceXShift + 2;\n noteU.note.setXShift(xShift);\n } else {\n //same line, swap stem direction for one note\n if (noteL.stemDirection === 1) {\n noteL.stemDirection = -1;\n noteL.note.setStemDirection(-1);\n }\n }\n }\n } //Very close whole notes\n } else if (lineDiff < 1) {\n xShift = voiceXShift + 2;\n if (noteU.note.duration < noteL.note.duration) {\n // upper voice is shorter, so shift it right\n noteU.note.setXShift(xShift);\n } else {\n // shift lower voice right\n noteL.note.setXShift(xShift);\n }\n } else if (noteU.note.hasStem()) {\n noteU.stemDirection = -noteU.note.getStemDirection();\n noteU.note.setStemDirection(noteU.stemDirection);\n } else if (noteL.note.hasStem()) {\n noteL.stemDirection = -noteL.note.getStemDirection();\n noteL.note.setStemDirection(noteL.stemDirection);\n }\n }\n }\n\n // format complete\n state.rightShift += xShift;\n return true;\n }\n\n if (!noteM) throw new RuntimeError('InvalidState', 'noteM not defined.');\n\n // For three voices, test if rests can be repositioned\n //\n // Special case 1 :: middle voice rest between two notes\n //\n if (noteM.isrest && !noteU.isrest && !noteL.isrest) {\n if (noteU.minLine <= noteM.maxLine || noteM.minLine <= noteL.maxLine) {\n const restHeight = noteM.maxLine - noteM.minLine;\n const space = noteU.minLine - noteL.maxLine;\n if (restHeight < space) {\n // center middle voice rest between the upper and lower voices\n centerRest(noteM, noteU, noteL);\n } else {\n xShift = voiceXShift + 2; // shift middle rest right\n noteM.note.setXShift(xShift);\n if (noteL.note.hasBeam() === false) {\n noteL.stemDirection = -1;\n noteL.note.setStemDirection(-1);\n }\n if (noteU.minLine <= noteL.maxLine && noteU.note.hasBeam() === false) {\n noteU.stemDirection = 1;\n noteU.note.setStemDirection(1);\n }\n }\n // format complete\n state.rightShift += xShift;\n return true;\n }\n }\n\n // Special case 2 :: all voices are rests\n if (noteU.isrest && noteM.isrest && noteL.isrest) {\n // Hide upper voice rest\n noteU.note.renderOptions.draw = false;\n // Hide lower voice rest\n noteL.note.renderOptions.draw = false;\n // format complete\n state.rightShift += xShift;\n return true;\n }\n\n // Test if any other rests can be repositioned\n if (noteM.isrest && noteU.isrest && noteM.minLine <= noteL.maxLine) {\n // Hide middle voice rest\n noteM.note.renderOptions.draw = false;\n }\n if (noteM.isrest && noteL.isrest && noteU.minLine <= noteM.maxLine) {\n // Hide middle voice rest\n noteM.note.renderOptions.draw = false;\n }\n if (noteU.isrest && noteU.minLine <= noteM.maxLine) {\n // shift upper voice rest up;\n shiftRestVertical(noteU, noteM, 1);\n }\n if (noteL.isrest && noteM.minLine <= noteL.maxLine) {\n // shift lower voice rest down\n shiftRestVertical(noteL, noteM, -1);\n }\n // If middle voice intersects upper or lower voice\n if (noteU.minLine <= noteM.maxLine + 0.5 || noteM.minLine <= noteL.maxLine) {\n // shift middle note right\n xShift = voiceXShift + 2;\n noteM.note.setXShift(xShift);\n if (noteL.note.hasBeam() === false) {\n noteL.stemDirection = -1;\n noteL.note.setStemDirection(-1);\n }\n if (noteU.minLine <= noteL.maxLine && noteU.note.hasBeam() === false) {\n noteU.stemDirection = 1;\n noteU.note.setStemDirection(1);\n }\n }\n\n state.rightShift += xShift;\n return true;\n }\n\n static postFormat(notes: Note[]): boolean {\n if (!notes) return false;\n\n notes.forEach((note) => note.postFormat());\n\n return true;\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////////////\n // INSTANCE MEMBERS\n\n minLine: number = 0;\n maxLine: number = 0;\n\n protected readonly clef: string;\n protected readonly octaveShift?: number;\n\n protected displaced: boolean;\n protected dotShiftY: number;\n protected useDefaultHeadX: boolean;\n protected ledgerLineStyle: ElementStyle;\n\n private _noteHeads: NoteHead[];\n\n // Sorted variant of keyProps used internally.\n private sortedKeyProps: { keyProps: KeyProps; index: number }[] = [];\n\n constructor(noteStruct: StaveNoteStruct) {\n super(noteStruct);\n\n this.ledgerLineStyle = {};\n\n this.clef = noteStruct.clef ?? 'treble';\n this.octaveShift = noteStruct.octaveShift ?? 0;\n\n // Pull note rendering properties.\n this.glyphProps = Note.getGlyphProps(this.duration, this.noteType);\n defined(\n this.glyphProps,\n 'BadArguments',\n `No glyph found for duration '${this.duration}' and type '${this.noteType}'`\n );\n\n // if true, displace note to right\n this.displaced = false;\n this.dotShiftY = 0;\n // for displaced ledger lines\n this.useDefaultHeadX = false;\n\n // Drawing\n this._noteHeads = [];\n this.modifiers = [];\n\n this.renderOptions = {\n ...this.renderOptions,\n // number of stroke px to the left and right of head\n strokePx: noteStruct.strokePx || StaveNote.LEDGER_LINE_OFFSET,\n };\n\n this.calculateKeyProps();\n this.buildStem();\n\n // Set the stem direction\n if (noteStruct.autoStem) {\n this.autoStem();\n } else {\n this.setStemDirection(noteStruct.stemDirection ?? Stem.UP);\n }\n this.reset();\n this.buildFlag();\n }\n\n override reset(): this {\n super.reset();\n\n // Save prior noteHead styles & reapply them after making new noteheads.\n const noteHeadStyles = this._noteHeads.map((noteHead) => noteHead.getStyle());\n this.buildNoteHeads();\n this._noteHeads.forEach((noteHead, index) => {\n const noteHeadStyle = noteHeadStyles[index];\n if (noteHeadStyle) noteHead.setStyle(noteHeadStyle);\n });\n\n const stave = this.stave;\n if (stave) {\n this.setStave(stave);\n }\n this.calcNoteDisplacements();\n return this;\n }\n\n override setBeam(beam: Beam): this {\n this.beam = beam;\n this.calcNoteDisplacements();\n // Update stem extension if a beam is assigned.\n if (this.stem) {\n this.stem.setExtension(this.getStemExtension());\n }\n return this;\n }\n\n // Builds a `Stem` for the note\n override buildStem(): this {\n this.setStem(new Stem({ hide: this.isRest() }));\n return this;\n }\n\n // Builds a `NoteHead` for each key in the note\n buildNoteHeads(): NoteHead[] {\n this._noteHeads = [];\n const stemDirection = this.getStemDirection();\n const keys = this.getKeys();\n\n let lastLine = undefined;\n let lineDiff = undefined;\n let displaced = false;\n\n // Draw notes from bottom to top.\n\n // For down-stem notes, we draw from top to bottom.\n let start: number;\n let end: number;\n let step: number;\n if (stemDirection === Stem.UP) {\n start = 0;\n end = keys.length;\n step = 1;\n } else {\n start = keys.length - 1;\n end = -1;\n step = -1;\n }\n\n for (let i = start; i !== end; i += step) {\n // Building noteheads rely on sortedKeNotes in order to calculate the displacements\n const noteProps = this.sortedKeyProps[i].keyProps;\n const line = noteProps.line;\n\n // Keep track of last line with a note head, so that consecutive heads\n // are correctly displaced.\n if (lastLine === undefined) {\n lastLine = line;\n } else {\n lineDiff = Math.abs(lastLine - line);\n if (lineDiff === 0 || lineDiff === 0.5) {\n displaced = !displaced;\n } else {\n displaced = false;\n this.useDefaultHeadX = true;\n }\n }\n lastLine = line;\n\n const notehead = new NoteHead({\n duration: this.duration,\n noteType: this.noteType,\n displaced,\n stemDirection,\n customGlyphCode: noteProps.code,\n line: noteProps.line,\n });\n\n notehead.fontInfo = this.fontInfo;\n\n this.addChild(notehead);\n this._noteHeads[this.sortedKeyProps[i].index] = notehead;\n }\n return this._noteHeads;\n }\n\n // Automatically sets the stem direction based on the keys in the note\n autoStem(): void {\n this.setStemDirection(this.calculateOptimalStemDirection());\n }\n\n calculateOptimalStemDirection(): number {\n // Figure out optimal stem direction based on given notes\n // minLine & maxLine rely on sortedKeyProps\n this.minLine = this.sortedKeyProps[0].keyProps.line;\n this.maxLine = this.sortedKeyProps[this.keyProps.length - 1].keyProps.line;\n\n const MIDDLE_LINE = 3;\n const decider = (this.minLine + this.maxLine) / 2;\n const stemDirection = decider < MIDDLE_LINE ? Stem.UP : Stem.DOWN;\n\n return stemDirection;\n }\n\n // Calculates and stores the properties for each key in the note\n calculateKeyProps(): void {\n let lastLine: number | undefined;\n for (let i = 0; i < this.keys.length; ++i) {\n const key = this.keys[i];\n\n const options = { octaveShift: this.octaveShift ?? 0, duration: this.duration };\n const props = Tables.keyProperties(key, this.clef, this.noteType, options);\n\n if (!props) {\n throw new RuntimeError('BadArguments', `Invalid key for note properties: ${key}`);\n }\n\n // Override line placement for default rests\n if (props.key === 'R') {\n if (this.duration === '1' || this.duration === 'w') {\n props.line = 4;\n } else {\n props.line = 3;\n }\n }\n\n // Calculate displacement of this note\n const line = props.line;\n if (lastLine === undefined) {\n lastLine = line;\n } else {\n // < 1 means == 0.5 (second) or 0.0 (unison)\n if (Math.abs(lastLine - line) < 1) {\n this.displaced = true;\n props.displaced = true;\n\n // Have to mark the previous note as\n // displaced as well, for modifier placement\n if (this.keyProps.length > 0) {\n this.keyProps[i - 1].displaced = true;\n }\n }\n }\n\n lastLine = line;\n this.keyProps.push(props);\n }\n // Sort the notes from lowest line to highest line in sortedKeyProps\n // Warn no longer required as keyProps remains unsorted\n this.keyProps.forEach((keyProps, index) => {\n this.sortedKeyProps.push({ keyProps, index });\n });\n this.sortedKeyProps.sort((a, b) => a.keyProps.line - b.keyProps.line);\n }\n\n // Get the `BoundingBox` for the entire note\n override getBoundingBox(): BoundingBox {\n const boundingBox = new BoundingBox(this.getAbsoluteX(), this.ys[0], 0, 0);\n this._noteHeads.forEach((notehead) => {\n boundingBox.mergeWith(notehead.getBoundingBox());\n });\n const { yTop, yBottom } = this.getNoteHeadBounds();\n\n if (!this.isRest() && this.hasStem()) {\n const noteStemHeight = this.stem!.getHeight();\n const stemY =\n this.getStemDirection() === Stem.DOWN\n ? yTop - noteStemHeight - this.flag.getTextMetrics().actualBoundingBoxDescent\n : yBottom - noteStemHeight + this.flag.getTextMetrics().actualBoundingBoxAscent;\n boundingBox.mergeWith(new BoundingBox(this.getAbsoluteX(), stemY, 0, 0));\n }\n if (this.hasFlag()) {\n const bbFlag = this.flag.getBoundingBox();\n boundingBox.mergeWith(bbFlag);\n }\n for (let i = 0; i < this.modifiers.length; i++) {\n boundingBox.mergeWith(this.modifiers[i].getBoundingBox());\n }\n return boundingBox;\n }\n\n // Gets the line number of the bottom note in the chord.\n // If `isTopNote` is `true` then get the top note's line number instead\n override getLineNumber(isTopNote?: boolean): number {\n if (!this.keyProps.length) {\n throw new RuntimeError('NoKeyProps', \"Can't get bottom note line, because note is not initialized properly.\");\n }\n\n let resultLine = this.keyProps[0].line;\n\n // No precondition assumed for sortedness of keyProps array\n for (let i = 0; i < this.keyProps.length; i++) {\n const thisLine = this.keyProps[i].line;\n if (isTopNote) {\n if (thisLine > resultLine) resultLine = thisLine;\n } else {\n if (thisLine < resultLine) resultLine = thisLine;\n }\n }\n\n return resultLine;\n }\n\n /**\n * @returns true if this note is a type of rest. Rests don't have pitches, but take up space in the score.\n */\n override isRest(): boolean {\n const val = this.glyphProps.codeHead;\n return val >= '\\ue4e0' && val <= '\\ue4ff';\n }\n\n // Determine if the current note is a chord\n isChord(): boolean {\n return !this.isRest() && this.keys.length > 1;\n }\n\n // Determine if the `StaveNote` has a stem\n override hasStem(): boolean {\n return this.glyphProps.stem;\n }\n\n override hasFlag(): boolean {\n return super.hasFlag() && !this.isRest();\n }\n\n override getStemX(): number {\n if (this.noteType === 'r') {\n return this.getCenterGlyphX();\n } else {\n // We adjust the origin of the stem because we want the stem left-aligned\n // with the notehead if stemmed-down, and right-aligned if stemmed-up\n return super.getStemX() + (this.stemDirection ? Stem.WIDTH / (2 * -this.stemDirection) : 0);\n }\n }\n\n // Get the `y` coordinate for text placed on the top/bottom of a\n // note at a desired `textLine`\n override getYForTopText(textLine: number): number {\n const extents = this.getStemExtents();\n return Math.min(\n this.checkStave().getYForTopText(textLine),\n extents.topY - this.renderOptions.annotationSpacing * (textLine + 1)\n );\n }\n override getYForBottomText(textLine: number): number {\n const extents = this.getStemExtents();\n return Math.max(\n this.checkStave().getYForTopText(textLine),\n extents.baseY + this.renderOptions.annotationSpacing * textLine\n );\n }\n\n // Sets the current note to the provided `stave`. This applies\n // `y` values to the `NoteHeads`.\n override setStave(stave: Stave): this {\n super.setStave(stave);\n\n const ys = this._noteHeads.map((notehead) => {\n notehead.setStave(stave);\n return notehead.getY();\n });\n\n this.setYs(ys);\n\n if (this.stem) {\n const { yTop, yBottom } = this.getStemYBounds();\n this.stem.setYBounds(yTop, yBottom);\n }\n\n return this;\n }\n\n // Check if note is shifted to the right\n isDisplaced(): boolean {\n return this.displaced;\n }\n\n // Sets whether shift note to the right. `displaced` is a `boolean`\n setNoteDisplaced(displaced: boolean): this {\n this.displaced = displaced;\n return this;\n }\n\n // Get the starting `x` coordinate for a `StaveTie`\n override getTieRightX(): number {\n let tieStartX = this.getAbsoluteX();\n tieStartX += this.getGlyphWidth() + this.xShift + this.rightDisplacedHeadPx;\n if (this.modifierContext) tieStartX += this.modifierContext.getRightShift();\n return tieStartX;\n }\n\n // Get the ending `x` coordinate for a `StaveTie`\n override getTieLeftX(): number {\n let tieEndX = this.getAbsoluteX();\n tieEndX += this.xShift - this.leftDisplacedHeadPx;\n return tieEndX;\n }\n\n // Get the stave line on which to place a rest\n override getLineForRest(): number {\n let restLine = this.keyProps[0].line;\n if (this.keyProps.length > 1) {\n const lastLine = this.keyProps[this.keyProps.length - 1].line;\n const top = Math.max(restLine, lastLine);\n const bot = Math.min(restLine, lastLine);\n restLine = midLine(top, bot);\n }\n\n return restLine;\n }\n\n // Get the default `x` and `y` coordinates for the provided `position`\n // and key `index`\n override getModifierStartXY(\n position: number,\n index: number,\n options: { forceFlagRight?: boolean } = {}\n ): { x: number; y: number } {\n if (!this.preFormatted) {\n throw new RuntimeError('UnformattedNote', \"Can't call GetModifierStartXY on an unformatted note\");\n }\n\n if (this.ys.length === 0) {\n throw new RuntimeError('NoYValues', 'No Y-Values calculated for this note.');\n }\n\n const { ABOVE, BELOW, LEFT, RIGHT } = Modifier.Position;\n let x = 0;\n if (position === LEFT) {\n // FIXME: Left modifier padding, move to font file\n x = -1 * 2;\n } else if (position === RIGHT) {\n // FIXME: Right modifier padding, move to font file\n x = this.getGlyphWidth() + this.xShift + 2;\n\n if (\n this.stemDirection === Stem.UP &&\n this.hasFlag() &&\n (options.forceFlagRight || isInnerNoteIndex(this, index))\n ) {\n x += this.flag.getWidth();\n }\n } else if (position === BELOW || position === ABOVE) {\n x = this.getGlyphWidth() / 2;\n }\n\n // addtional y shifts for rests\n let restShift = 0;\n switch (this._noteHeads[index].getText()) {\n case Glyphs.restWhole:\n restShift += 0.5;\n break;\n case Glyphs.restHalf:\n case Glyphs.restQuarter:\n case Glyphs.rest8th:\n case Glyphs.rest16th:\n restShift -= 0.5;\n break;\n case Glyphs.rest32nd:\n case Glyphs.rest64th:\n restShift -= 1.5;\n break;\n case Glyphs.rest128th:\n case Glyphs.rest256th:\n restShift -= 2.5;\n break;\n case Glyphs.rest512th:\n restShift -= 3.5;\n break;\n case Glyphs.rest1024th:\n restShift -= 4.5;\n break;\n }\n\n return {\n x: this.getAbsoluteX() + x,\n y: this.ys[index] + restShift * this.checkStave().getSpacingBetweenLines(),\n };\n }\n\n // Sets the style of the complete StaveNote, including all keys\n // and the stem.\n override setStyle(style: ElementStyle): this {\n return super.setGroupStyle(style);\n }\n\n setStemStyle(style: ElementStyle): this {\n const stem = this.getStem();\n if (stem) stem.setStyle(style);\n return this;\n }\n getStemStyle(): ElementStyle | undefined {\n return this.stem?.getStyle();\n }\n\n setLedgerLineStyle(style: ElementStyle): void {\n this.ledgerLineStyle = style;\n }\n\n getLedgerLineStyle(): ElementStyle {\n return this.ledgerLineStyle;\n }\n\n setFlagStyle(style: ElementStyle): void {\n this.flag.setStyle(style);\n }\n getFlagStyle(): ElementStyle | undefined {\n return this.flag.getStyle();\n }\n\n /** Get the glyph width. */\n override getGlyphWidth(): number {\n return this.noteHeads[0].getWidth();\n }\n\n // Sets the notehead at `index` to the provided coloring `style`.\n //\n // `style` is an `object` with the following properties: `shadowColor`,\n // `shadowBlur`, `fillStyle`, `strokeStyle`\n setKeyStyle(index: number, style: ElementStyle): this {\n this._noteHeads[index].setStyle(style);\n return this;\n }\n\n setKeyLine(index: number, line: number): this {\n this.keyProps[index].line = line;\n this.reset();\n return this;\n }\n\n getKeyLine(index: number): number {\n return this.keyProps[index].line;\n }\n\n // Get the width of the note if it is displaced. Used for `Voice`\n // formatting\n getVoiceShiftWidth(): number {\n // TODO: may need to accommodate for dot here.\n return this.getGlyphWidth() * (this.displaced ? 2 : 1);\n }\n\n // Calculates and sets the extra pixels to the left or right\n // if the note is displaced.\n calcNoteDisplacements(): void {\n this.setLeftDisplacedHeadPx(this.displaced && this.stemDirection === Stem.DOWN ? this.getGlyphWidth() : 0);\n\n // For upstems with flags, the extra space is unnecessary, since it's taken\n // up by the flag.\n this.setRightDisplacedHeadPx(\n !this.hasFlag() && this.displaced && this.stemDirection === Stem.UP ? this.getGlyphWidth() : 0\n );\n }\n\n // Pre-render formatting\n override preFormat(): void {\n if (this.preFormatted) return;\n\n let noteHeadPadding = 0;\n if (this.modifierContext) {\n this.modifierContext.preFormat();\n // If there are no modifiers on this note, make sure there is adequate padding\n // between the notes.\n if (this.modifierContext.getWidth() === 0) {\n noteHeadPadding = StaveNote.minNoteheadPadding;\n }\n }\n\n let width = this.getGlyphWidth() + this.leftDisplacedHeadPx + this.rightDisplacedHeadPx + noteHeadPadding;\n\n // For upward flagged notes, the width of the flag needs to be added\n if (this.shouldDrawFlag() && this.stemDirection === Stem.UP) {\n width += this.getGlyphWidth();\n // TODO: Add flag width as a separate metric\n }\n\n this.setWidth(width);\n this.preFormatted = true;\n }\n\n /**\n * @typedef {Object} noteHeadBounds\n * @property {number} yTop the highest notehead bound\n * @property {number} yBottom the lowest notehead bound\n * @property {number|Null} displacedX the starting x for displaced noteheads\n * @property {number|Null} nonDisplacedX the starting x for non-displaced noteheads\n * @property {number} highestLine the highest notehead line in traditional music line\n * numbering (bottom line = 1, top line = 5)\n * @property {number} lowestLine the lowest notehead line\n * @property {number|false} highestDisplacedLine the highest staff line number\n * for a displaced notehead\n * @property {number|false} lowestDisplacedLine\n * @property {number} highestNonDisplacedLine\n * @property {number} lowestNonDisplacedLine\n */\n\n /**\n * Get Y bounds for the stem, adjusted for SMuFL stem anchor offsets defined in\n * Tables.noteHeadStemYOffsets. This ensures stems attach at the correct point\n * on the notehead (e.g. the arm tip of an X notehead) rather than the center.\n */\n protected getStemYBounds(): { yTop: number; yBottom: number } {\n const anchorKey = this.stemDirection === Stem.UP ? 'up' : 'down';\n let yTop = +Infinity;\n let yBottom = -Infinity;\n this._noteHeads.forEach((nh) => {\n const offset = Tables.noteHeadStemYOffsets[nh.text];\n const anchor = offset ? offset[anchorKey] : 0;\n const y = nh.getY() - anchor * Tables.STAVE_LINE_DISTANCE;\n yTop = Math.min(y, yTop);\n yBottom = Math.max(y, yBottom);\n });\n if (!isFinite(yTop) || !isFinite(yBottom)) {\n const bounds = this.getNoteHeadBounds();\n return { yTop: bounds.yTop, yBottom: bounds.yBottom };\n }\n return { yTop, yBottom };\n }\n\n /**\n * Get the staff line and y value for the highest & lowest noteheads\n * @returns {noteHeadBounds}\n */\n getNoteHeadBounds(): StaveNoteHeadBounds {\n // Top and bottom Y values for stem.\n let yTop: number = +Infinity;\n let yBottom: number = -Infinity;\n let nonDisplacedX: number | undefined;\n let displacedX: number | undefined;\n\n let highestLine = this.checkStave().getNumLines();\n let lowestLine = 1;\n let highestDisplacedLine: number | undefined;\n let lowestDisplacedLine: number | undefined;\n let highestNonDisplacedLine = highestLine;\n let lowestNonDisplacedLine = lowestLine;\n\n this._noteHeads.forEach((notehead) => {\n const line: number = notehead.getLine();\n const y = notehead.getY();\n\n yTop = Math.min(y, yTop);\n yBottom = Math.max(y, yBottom);\n\n if (displacedX === undefined && notehead.isDisplaced()) {\n displacedX = notehead.getAbsoluteX();\n }\n\n if (nonDisplacedX === undefined && !notehead.isDisplaced()) {\n nonDisplacedX = notehead.getAbsoluteX();\n }\n\n highestLine = Math.max(line, highestLine);\n lowestLine = Math.min(line, lowestLine);\n\n if (notehead.isDisplaced()) {\n highestDisplacedLine = highestDisplacedLine === undefined ? line : Math.max(line, highestDisplacedLine);\n lowestDisplacedLine = lowestDisplacedLine === undefined ? line : Math.min(line, lowestDisplacedLine);\n } else {\n highestNonDisplacedLine = Math.max(line, highestNonDisplacedLine);\n lowestNonDisplacedLine = Math.min(line, lowestNonDisplacedLine);\n }\n }, this);\n\n return {\n yTop,\n yBottom,\n displacedX,\n nonDisplacedX,\n highestLine,\n lowestLine,\n highestDisplacedLine,\n lowestDisplacedLine,\n highestNonDisplacedLine,\n lowestNonDisplacedLine,\n };\n }\n\n // Get the starting `x` coordinate for the noteheads\n getNoteHeadBeginX(): number {\n return this.getAbsoluteX() + this.xShift;\n }\n\n // Get the ending `x` coordinate for the noteheads\n getNoteHeadEndX(): number {\n const xBegin = this.getNoteHeadBeginX();\n return xBegin + this.getGlyphWidth();\n }\n\n get noteHeads(): NoteHead[] {\n return this._noteHeads.slice();\n }\n\n // Draw the ledger lines between the stave and the highest/lowest keys\n drawLedgerLines(): void {\n const stave = this.checkStave();\n const {\n renderOptions: { strokePx },\n } = this;\n const ctx = this.checkContext();\n const width = this.getGlyphWidth() + strokePx * 2;\n const doubleWidth = 2 * (this.getGlyphWidth() + strokePx) - Stem.WIDTH / 2;\n\n if (this.isRest()) return;\n if (!ctx) {\n throw new RuntimeError('NoCanvasContext', \"Can't draw without a canvas context.\");\n }\n\n const {\n highestLine,\n lowestLine,\n highestDisplacedLine,\n highestNonDisplacedLine,\n lowestDisplacedLine,\n lowestNonDisplacedLine,\n displacedX,\n nonDisplacedX,\n } = this.getNoteHeadBounds();\n\n // Early out if there are no ledger lines to draw.\n if (highestLine < 6 && lowestLine > 0) return;\n\n const minX = Math.min(displacedX ?? 0, nonDisplacedX ?? 0);\n\n const drawLedgerLine = (y: number, normal: boolean, displaced: boolean) => {\n let x;\n if (displaced && normal) x = minX - strokePx;\n else if (normal) x = (nonDisplacedX ?? 0) - strokePx;\n else x = (displacedX ?? 0) - strokePx;\n const ledgerWidth = normal && displaced ? doubleWidth : width;\n\n ctx.beginPath();\n ctx.moveTo(x, y);\n ctx.lineTo(x + ledgerWidth, y);\n ctx.stroke();\n };\n\n const style = { ...stave.getDefaultLedgerLineStyle(), ...this.getLedgerLineStyle() };\n ctx.save();\n this.applyStyle(ctx, style);\n\n // Draw ledger lines below the staff:\n for (let line = 6; line <= highestLine; ++line) {\n const normal = nonDisplacedX !== undefined && line <= highestNonDisplacedLine;\n const displaced = highestDisplacedLine !== undefined && line <= highestDisplacedLine;\n drawLedgerLine(stave.getYForNote(line), normal, displaced);\n }\n\n // Draw ledger lines above the staff:\n for (let line = 0; line >= lowestLine; --line) {\n const normal = nonDisplacedX !== undefined && line >= lowestNonDisplacedLine;\n const displaced = lowestDisplacedLine !== undefined && line >= lowestDisplacedLine;\n drawLedgerLine(stave.getYForNote(line), normal, displaced);\n }\n\n ctx.restore();\n }\n\n // Draw all key modifiers\n drawModifiers(noteheadParam: NoteHead): void {\n const ctx = this.checkContext();\n for (let i = 0; i < this.modifiers.length; i++) {\n const modifier = this.modifiers[i];\n const index = modifier.checkIndex();\n const notehead = this._noteHeads[index];\n if (notehead === noteheadParam) {\n modifier.setContext(ctx);\n modifier.drawWithStyle();\n }\n }\n }\n\n shouldDrawFlag(): boolean {\n const hasStem = this.stem !== undefined;\n const hasFlag = this.glyphProps.codeFlagUp !== undefined;\n const hasNoBeam = this.beam === undefined;\n return hasStem && hasFlag && hasNoBeam && !this.isRest();\n }\n\n // Draw the flag for the note\n drawFlag(): void {\n const ctx = this.checkContext();\n if (!ctx) {\n throw new RuntimeError('NoCanvasContext', \"Can't draw without a canvas context.\");\n }\n\n if (this.shouldDrawFlag()) {\n const { yTop, yBottom } = this.getNoteHeadBounds();\n\n const noteStemHeight = this.stem!.getHeight();\n const flagX = this.getStemX() - Tables.STEM_WIDTH / 2;\n const flagY =\n this.getStemDirection() === Stem.DOWN\n ? // Down stems are below the note head and have flags on the right.\n yTop - noteStemHeight - this.flag.getTextMetrics().actualBoundingBoxDescent\n : // Up stems are above the note head and have flags on the right.\n yBottom - noteStemHeight + this.flag.getTextMetrics().actualBoundingBoxAscent;\n\n // Draw the Flag\n this.flag.setContext(ctx).setX(flagX).setY(flagY).drawWithStyle();\n }\n }\n\n // Draw the NoteHeads\n drawNoteHeads(): void {\n const ctx = this.checkContext();\n this._noteHeads.forEach((notehead) => {\n notehead.setContext(ctx).drawWithStyle();\n });\n }\n\n override drawStem(stemOptions?: StemOptions): void {\n // GCR TODO: I can't find any context in which this is called with the stemStruct\n // argument in the codebase or tests. Nor can I find a case where super.drawStem\n // is called at all. Perhaps these should be removed?\n const ctx = this.checkContext();\n\n if (stemOptions) {\n this.setStem(new Stem(stemOptions));\n }\n\n // If we will render a flag, we shorten the stem so that the tip\n // does not poke through the flag.\n if (this.shouldDrawFlag() && this.stem) {\n this.stem.adjustHeightForFlag();\n }\n\n if (this.stem) {\n this.stem.setContext(ctx).drawWithStyle();\n }\n }\n\n /**\n * Override stemmablenote stem extension to adjust for distance from middle line.\n */\n override getStemExtension(): number {\n const superStemExtension = super.getStemExtension();\n if (!this.glyphProps.stem) {\n return superStemExtension;\n }\n\n const stemDirection = this.getStemDirection();\n if (stemDirection !== this.calculateOptimalStemDirection()) {\n return superStemExtension; // no adjustment for manually set stem direction.\n }\n let midLineDistance;\n const MIDDLE_LINE = 3;\n if (stemDirection === Stem.UP) {\n // Note that the use of maxLine here instead of minLine might\n // seem counterintuitive, but in the case of (say) treble clef\n // chord(F2, E4) stem up, we do not want to extend the stem because\n // of F2, when a normal octave-length stem above E4 is fine.\n //\n // maxLine and minLine are set in calculateOptimalStemDirection() so\n // will be known.\n midLineDistance = MIDDLE_LINE - this.maxLine;\n } else {\n midLineDistance = this.minLine - MIDDLE_LINE;\n }\n\n // how many lines more than an octave is the relevant notehead?\n const linesOverOctaveFromMidLine = midLineDistance - 3.5;\n if (linesOverOctaveFromMidLine <= 0) {\n return superStemExtension;\n }\n const stave = this.getStave();\n let spacingBetweenLines = 10;\n if (stave !== undefined) {\n spacingBetweenLines = stave.getSpacingBetweenLines();\n }\n return superStemExtension + linesOverOctaveFromMidLine * spacingBetweenLines;\n }\n\n // Draws all the `StaveNote` parts. This is the main drawing method.\n override draw(): void {\n if (this.renderOptions.draw === false) return;\n\n if (this.ys.length === 0) {\n throw new RuntimeError('NoYValues', \"Can't draw note without Y values.\");\n }\n\n const ctx = this.checkContext();\n const xBegin = this.getNoteHeadBeginX();\n const shouldRenderStem = this.hasStem() && !this.beam;\n\n // Format note head x positions\n this._noteHeads.forEach((notehead) => notehead.setX(xBegin));\n\n if (this.stem) {\n // Format stem x positions\n const stemX = this.getStemX();\n this.stem.setNoteHeadXBounds(stemX, stemX);\n }\n\n L('Rendering ', this.isChord() ? 'chord :' : 'note :', this.keys);\n\n // Apply the overall style -- may be contradicted by local settings:\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('stavenote' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n this.drawLedgerLines();\n if (shouldRenderStem) this.drawStem();\n this.drawNoteHeads();\n this.drawFlag();\n this.drawPointerRect();\n ctx.closeGroup();\n this.setRendered();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// This class implements varies types of ties between contiguous notes. The\n// ties include: regular ties, hammer ons, pull offs, and slides.\n\nimport { Element } from './element';\nimport { Note } from './note';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\n// For backwards compatibility with 3.0.9, firstNote and/or lastNote can be undefined or null.\n// We prefer undefined instead of null.\n// However, some of our test cases used to pass in null, so maybe there is client code relying on it.\nexport interface TieNotes {\n firstNote?: Note | null;\n lastNote?: Note | null;\n firstIndexes?: number[];\n lastIndexes?: number[];\n}\n\nexport class StaveTie extends Element {\n static override get CATEGORY(): string {\n return Category.StaveTie;\n }\n\n public renderOptions: {\n cp1: number; // Curve control point 1\n cp2: number; // Curve control point 2\n shortTieCutoff: number; // below this we use short control points\n cp1Short: number;\n cp2Short: number;\n firstXShift: number;\n lastXShift: number;\n tieSpacing: number;\n textShiftX: number;\n yShift: number;\n };\n\n // notes is initialized by the constructor via this.setNotes(notes).\n protected notes!: TieNotes;\n\n protected direction?: number;\n\n /**\n * @param notes is a struct that has:\n *\n * {\n * firstNote: Note,\n * lastNote: Note,\n * firstIndexes: [n1, n2, n3],\n * lastIndexes: [n1, n2, n3]\n * }\n *\n * @param text\n */\n constructor(notes: TieNotes, text = '') {\n super();\n this.setNotes(notes);\n this.text = text;\n this.renderOptions = {\n cp1: 8, // Curve control point 1\n cp2: 12, // Curve control point 2\n shortTieCutoff: 10,\n cp1Short: 2,\n cp2Short: 8,\n textShiftX: 0,\n firstXShift: 0,\n lastXShift: 0,\n yShift: 7,\n tieSpacing: 0,\n };\n }\n\n /**\n * Returns either the direction explicitly set with setDirection, or\n * a logical direction based on lastNote or firstNote.\n */\n getDirection(): number {\n if (this.direction !== undefined && this.direction !== null) {\n return this.direction;\n } else if (this.notes.lastNote) {\n return this.notes.lastNote.getStemDirection();\n } else if (this.notes.firstNote) {\n return this.notes.firstNote.getStemDirection();\n } else {\n return 0;\n }\n }\n\n setDirection(direction: number): this {\n this.direction = direction;\n return this;\n }\n\n /**\n * Set the notes to attach this tie to.\n *\n * @param {!Object} notes The notes to tie up.\n */\n setNotes(notes: TieNotes): this {\n if (!notes.firstNote && !notes.lastNote) {\n throw new RuntimeError('BadArguments', 'Tie needs to have either firstNote or lastNote set.');\n }\n\n if (!notes.firstIndexes) {\n notes.firstIndexes = [0];\n }\n if (!notes.lastIndexes) {\n notes.lastIndexes = [0];\n }\n\n if (notes.firstIndexes.length !== notes.lastIndexes.length) {\n throw new RuntimeError('BadArguments', 'Tied notes must have same number of indexes.');\n }\n\n this.notes = notes;\n return this;\n }\n\n /**\n * @return {boolean} Returns true if this is a partial bar.\n */\n isPartial(): boolean {\n return !this.notes.firstNote || !this.notes.lastNote;\n }\n\n /**\n * @param params.firstX is specified in pixels.\n * @param params.lastX is specified in pixels.\n */\n renderTie(params: { direction: number; firstX: number; lastX: number; lastYs: number[]; firstYs: number[] }): void {\n if (params.firstYs.length === 0 || params.lastYs.length === 0) {\n throw new RuntimeError('BadArguments', 'No Y-values to render');\n }\n\n const ctx = this.checkContext();\n let cp1 = this.renderOptions.cp1;\n let cp2 = this.renderOptions.cp2;\n\n if (Math.abs(params.lastX - params.firstX) < this.renderOptions.shortTieCutoff) {\n // do not get super exaggerated curves for very short ties\n cp1 = this.renderOptions.cp1Short;\n cp2 = this.renderOptions.cp2Short;\n }\n\n const firstXShift = this.renderOptions.firstXShift;\n const lastXShift = this.renderOptions.lastXShift;\n const yShift = this.renderOptions.yShift * params.direction;\n\n // setNotes(...) verified that firstIndexes and lastIndexes are not undefined.\n // As a result, we use the ! non-null assertion operator here.\n\n const firstIndexes = this.notes.firstIndexes!;\n\n const lastIndexes = this.notes.lastIndexes!;\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('stavetie' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n for (let i = 0; i < firstIndexes.length; ++i) {\n const cpX = (params.lastX + lastXShift + (params.firstX + firstXShift)) / 2;\n // firstY and lastY are specified in pixels.\n const firstY = params.firstYs[firstIndexes[i]] + yShift;\n const lastY = params.lastYs[lastIndexes[i]] + yShift;\n\n if (isNaN(firstY) || isNaN(lastY)) {\n throw new RuntimeError('BadArguments', 'Bad indexes for tie rendering.');\n }\n\n const topControlPointY = (firstY + lastY) / 2 + cp1 * params.direction;\n const bottomControlPointY = (firstY + lastY) / 2 + cp2 * params.direction;\n\n ctx.beginPath();\n ctx.moveTo(params.firstX + firstXShift, firstY);\n ctx.quadraticCurveTo(cpX, topControlPointY, params.lastX + lastXShift, lastY);\n ctx.quadraticCurveTo(cpX, bottomControlPointY, params.firstX + firstXShift, firstY);\n ctx.closePath();\n ctx.fill();\n }\n this.drawPointerRect();\n ctx.closeGroup();\n }\n\n /**\n * @param firstX specified in pixels\n * @param lastX specified in pixels\n */\n renderTieText(firstX: number, lastX: number): void {\n const ctx = this.checkContext();\n let centerX = (firstX + lastX) / 2;\n centerX -= ctx.measureText(this.text).width / 2;\n const stave = this.notes.firstNote?.checkStave() ?? this.notes.lastNote?.checkStave();\n if (stave) {\n ctx.setFont(this.fontInfo);\n ctx.fillText(this.text, centerX + this.renderOptions.textShiftX, stave.getYForTopText() - 1);\n }\n }\n\n /**\n * Returns the TieNotes structure of the first and last note this tie connects.\n */\n getNotes(): TieNotes {\n return this.notes;\n }\n\n /**\n * Returns the X position in pixels that the tie will be drawn starting from;\n * ideally from the firstNote, alternatively from the lastNote, or 0 if all else fails.\n */\n getFirstX(): number {\n if (this.notes.firstNote) {\n return this.notes.firstNote.getTieRightX() + this.renderOptions.tieSpacing;\n } else if (this.notes.lastNote) {\n return this.notes.lastNote.checkStave().getTieStartX();\n } else {\n return 0;\n }\n }\n\n /**\n * Returns the X position in pixels that the tie will be drawn ending at;\n * ideally from the firstNote, alternatively from the lastNote, or 0 if all else fails.\n */\n getLastX(): number {\n if (this.notes.lastNote) {\n return this.notes.lastNote.getTieLeftX() + this.renderOptions.tieSpacing;\n } else if (this.notes.firstNote) {\n return this.notes.firstNote.checkStave().getTieEndX();\n } else {\n return 0;\n }\n }\n\n /**\n * Get the Y positions of the places where a tie needs to be drawn starting from.\n */\n getFirstYs(): number[] {\n if (this.notes.firstNote) {\n return this.notes.firstNote.getYs();\n } else if (this.notes.lastNote) {\n return this.notes.lastNote.getYs();\n } else {\n return [0];\n }\n }\n\n /**\n * Get the Y positions of the places where a tie needs to be drawn ending at.\n */\n getLastYs(): number[] {\n if (this.notes.lastNote) {\n return this.notes.lastNote.getYs();\n } else if (this.notes.firstNote) {\n return this.notes.firstNote.getYs();\n } else {\n return [0];\n }\n }\n\n /**\n * If a tie has firstNote and not lastNote, or vice-versa, then their\n * firstIndexes and lastIndexes need to be equal to each other.\n *\n * Does nothing if both notes.firstNote and notes.lastNote are defined (or\n * if neither are)\n *\n * (Note that after doing so they share a common Array object, so any change\n * to one will affect the other; this behavior may change in a future release)\n */\n synchronizeIndexes(): void {\n if (this.notes.firstNote && this.notes.lastNote) {\n return;\n } else if (!this.notes.firstNote && !this.notes.lastNote) {\n return;\n } else if (this.notes.firstNote) {\n this.notes.lastIndexes = this.notes.firstIndexes;\n } else {\n // this.notes.lastNote defined, but not firstNote\n this.notes.firstIndexes = this.notes.lastIndexes;\n }\n }\n\n override draw(): boolean {\n this.checkContext();\n this.setRendered();\n this.synchronizeIndexes();\n const firstX = this.getFirstX();\n const lastX = this.getLastX();\n this.renderTie({\n firstX,\n lastX,\n firstYs: this.getFirstYs(),\n lastYs: this.getLastYs(),\n direction: this.getDirection(), // note: not this.direction\n });\n\n this.renderTieText(firstX, lastX);\n return true;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n//\n// ## Description\n// This class implements varies types of ties between contiguous notes. The\n// ties include: regular ties, hammer ons, pull offs, and slides.\n\nimport { StaveTie, TieNotes } from './stavetie';\nimport { Category } from './typeguard';\n\nexport class TabTie extends StaveTie {\n static override get CATEGORY(): string {\n return Category.TabTie;\n }\n\n static createHammeron(notes: TieNotes): TabTie {\n return new TabTie(notes, 'H');\n }\n\n static createPulloff(notes: TieNotes): TabTie {\n return new TabTie(notes, 'P');\n }\n\n /**\n * @param notes is a struct that has:\n * {\n * firstNote: Note,\n * lastNote: Note,\n * firstIndexes: [n1, n2, n3],\n * lastIndexes: [n1, n2, n3]\n * }\n *\n * @param text\n */\n constructor(notes: TieNotes, text?: string) {\n super(notes, text);\n\n this.renderOptions.cp1 = 9;\n this.renderOptions.cp2 = 11;\n this.renderOptions.yShift = 3;\n\n this.direction = -1; // Tab tie's are always face up.\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Fraction } from './fraction';\nimport { RenderContext } from './rendercontext';\nimport { Stave } from './stave';\nimport { Tables } from './tables';\nimport { Tickable } from './tickable';\nimport { Category } from './typeguard';\nimport { defined, RuntimeError, sumArray } from './util';\n\nexport interface VoiceTime {\n numBeats: number;\n beatValue: number;\n /** Defaults to `VexFlow.RESOLUTION` if not provided. */\n resolution?: number;\n}\n\nexport enum VoiceMode {\n STRICT = 1,\n SOFT = 2,\n FULL = 3,\n}\n\n/**\n * `Voice` is mainly a container object to group `Tickables` for formatting.\n */\nexport class Voice extends Element {\n static override get CATEGORY(): string {\n return Category.Voice;\n }\n\n /**\n * Modes allow the addition of ticks in three different ways:\n * - STRICT: This is the default. Ticks must fill the voice.\n * - SOFT: Ticks can be added without restrictions.\n * - FULL: Ticks do not need to fill the voice, but can't exceed the maximum tick length.\n */\n static get Mode(): typeof VoiceMode {\n return VoiceMode;\n }\n\n protected resolutionMultiplier: number = 1;\n protected smallestTickCount: Fraction;\n protected stave?: Stave;\n protected mode: VoiceMode = VoiceMode.STRICT;\n protected expTicksUsed?: number;\n protected preFormatted: boolean = false;\n protected options: { softmaxFactor: number };\n\n protected readonly totalTicks: Fraction;\n protected readonly ticksUsed: Fraction = new Fraction(0, 1);\n protected readonly largestTickWidth: number = 0;\n protected readonly tickables: Tickable[] = [];\n protected readonly time: Required<VoiceTime>;\n\n constructor(time?: VoiceTime | string) {\n super();\n\n this.options = {\n softmaxFactor: Tables.SOFTMAX_FACTOR,\n };\n\n // Convert the `time` string into a VoiceTime object if necessary.\n let voiceTime: VoiceTime | undefined;\n if (typeof time === 'string') {\n // Time signature shortcut: \"4/4\", \"3/8\", etc.\n const match = time.match(/(\\d+)\\/(\\d+)/);\n if (match) {\n voiceTime = {\n numBeats: parseInt(match[1]),\n beatValue: parseInt(match[2]),\n };\n }\n } else {\n voiceTime = time;\n }\n\n // Default time signature is 4/4.\n this.time = {\n numBeats: 4,\n beatValue: 4,\n resolution: Tables.RESOLUTION,\n ...voiceTime,\n };\n\n // Recalculate total ticks.\n this.totalTicks = new Fraction(this.time.numBeats * (this.time.resolution / this.time.beatValue), 1);\n // until tickables are added, the smallestTickCount is the same as the stated totalTicks duration.\n this.smallestTickCount = this.totalTicks.clone();\n }\n\n /** Get the total ticks in the voice. */\n getTotalTicks(): Fraction {\n return this.totalTicks;\n }\n\n /** Get the total ticks used in the voice by all the tickables. */\n getTicksUsed(): Fraction {\n return this.ticksUsed;\n }\n\n /** Get the largest width of all the tickables. */\n getLargestTickWidth(): number {\n return this.largestTickWidth;\n }\n\n /** Get the tick count for the shortest tickable */\n getSmallestTickCount(): Fraction {\n return this.smallestTickCount;\n }\n\n /** Get the tickables in the voice. */\n getTickables(): Tickable[] {\n return this.tickables;\n }\n\n /** Get the voice mode (Voice.Mode.SOFT, STRICT, or FULL) */\n getMode(): number {\n return this.mode;\n }\n\n /**\n * Set the voice mode.\n * @param mode value from `VoiceMode` or Voice.Mode\n */\n setMode(mode: number): this {\n this.mode = mode;\n return this;\n }\n\n /** Get the resolution multiplier for the voice. */\n getResolutionMultiplier(): number {\n return this.resolutionMultiplier;\n }\n\n /** Get the actual tick resolution for the voice. */\n getActualResolution(): number {\n return this.resolutionMultiplier * this.time.resolution;\n }\n\n /** Set the voice's stave. */\n setStave(stave: Stave): this {\n this.stave = stave;\n return this;\n }\n\n getStave(): Stave | undefined {\n return this.stave;\n }\n\n /** Get the bounding box for the voice. */\n override getBoundingBox(): BoundingBox {\n const boundingBox = this.tickables[0].getBoundingBox();\n for (let i = 1; i < this.tickables.length; ++i) {\n const tickable = this.tickables[i];\n if (!tickable.getStave() && this.stave) tickable.setStave(this.stave);\n const bb = tickable.getBoundingBox();\n boundingBox.mergeWith(bb);\n }\n return boundingBox;\n }\n\n /** Set the voice mode to strict or soft. */\n setStrict(strict: boolean): this {\n this.mode = strict ? VoiceMode.STRICT : VoiceMode.SOFT;\n return this;\n }\n\n /** Determine if the voice is complete according to the voice mode. */\n isComplete(): boolean {\n if (this.mode === VoiceMode.STRICT || this.mode === VoiceMode.FULL) {\n return this.ticksUsed.equals(this.totalTicks);\n } else {\n return true;\n }\n }\n\n /**\n * We use softmax to layout the tickables proportional to the exponent of\n * their duration. The softmax factor is used to determine the 'linearness' of\n * the layout.\n *\n * The softmax of all the tickables in this voice should sum to 1.\n */\n setSoftmaxFactor(factor: number): this {\n this.options.softmaxFactor = factor;\n this.expTicksUsed = 0; // reset\n return this;\n }\n\n /**\n * Calculate the sum of the exponents of all the ticks in this voice to use\n * as the denominator of softmax. (It is not the sum of the softmax(t) over all tickables)\n *\n * Note that the \"exp\" of \"expTicksUsed\" stands for \"expontential\" ticks used,\n * not \"expected\" ticks used.\n */\n protected reCalculateExpTicksUsed(): number {\n const totalTicks = this.ticksUsed.value();\n const exp = (tickable: Tickable) => Math.pow(this.options.softmaxFactor, tickable.getTicks().value() / totalTicks);\n this.expTicksUsed = sumArray(this.tickables.map(exp));\n return this.expTicksUsed;\n }\n\n /** Get the softmax-scaled value of a tick duration. 'tickValue' is a number. */\n softmax(tickValue: number): number {\n if (!this.expTicksUsed) {\n this.expTicksUsed = this.reCalculateExpTicksUsed();\n }\n\n const totalTicks = this.ticksUsed.value();\n const exp = (v: number) => Math.pow(this.options.softmaxFactor, v / totalTicks);\n const sm = exp(tickValue) / this.expTicksUsed;\n return sm;\n }\n\n /** Add a tickable to the voice. */\n addTickable(tickable: Tickable): this {\n if (!tickable.shouldIgnoreTicks()) {\n const ticks = tickable.getTicks();\n\n // Update the total ticks for this line.\n this.ticksUsed.add(ticks);\n this.expTicksUsed = 0; // reset\n\n if (\n (this.mode === VoiceMode.STRICT || this.mode === VoiceMode.FULL) &&\n this.ticksUsed.greaterThan(this.totalTicks)\n ) {\n this.ticksUsed.subtract(ticks);\n throw new RuntimeError('BadArgument', 'Too many ticks.');\n }\n\n // Track the smallest tickable for formatting.\n if (ticks.lessThan(this.smallestTickCount)) {\n this.smallestTickCount = ticks.clone();\n }\n\n this.resolutionMultiplier = this.ticksUsed.denominator;\n\n // Expand total ticks using denominator from ticks used.\n this.totalTicks.add(0, this.ticksUsed.denominator);\n }\n\n // Add the tickable to the line.\n this.tickables.push(tickable);\n tickable.setVoice(this);\n return this;\n }\n\n /** Add an array of tickables to the voice. */\n addTickables(tickables: Tickable[]): this {\n for (let i = 0; i < tickables.length; ++i) {\n this.addTickable(tickables[i]);\n }\n return this;\n }\n\n /** Preformat the voice by applying the voice's stave to each note. */\n preFormat(): this {\n if (this.preFormatted) return this;\n const stave = this.checkStave();\n this.tickables.forEach((tickable) => {\n if (!tickable.getStave()) {\n tickable.setStave(stave);\n }\n });\n this.preFormatted = true;\n return this;\n }\n\n checkStave(): Stave {\n return defined(this.stave, 'NoStave', 'No stave attached to instance.');\n }\n\n /**\n * Render the voice onto the canvas `context` and an optional `stave`.\n * If `stave` is omitted, it is expected that the notes have staves\n * already set.\n *\n * This method also calculates the voice's boundingBox while drawing\n * the notes. Note the similarities with this.getBoundingBox().\n */\n override draw(context: RenderContext = this.checkContext(), stave?: Stave): void {\n stave = stave ?? this.stave;\n this.setRendered();\n for (let i = 0; i < this.tickables.length; ++i) {\n const tickable = this.tickables[i];\n // Set the stave if provided.\n if (stave) {\n tickable.setStave(stave);\n }\n defined(tickable.getStave(), 'MissingStave', 'The voice cannot draw tickables without staves.');\n\n tickable.setContext(context);\n tickable.drawWithStyle();\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n//\n// This file implements `GraceNoteGroup` which is used to format and\n// render grace notes.\n\nimport { Beam } from './beam';\nimport { Formatter } from './formatter';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { StaveNote } from './stavenote';\nimport { StaveTie } from './stavetie';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { TabTie } from './tabtie';\nimport { Category, isStaveNote } from './typeguard';\nimport { log } from './util';\nimport { Voice } from './voice';\n\n// To enable logging for this class. Set `GraceNoteGroup.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any) {\n if (GraceNoteGroup.DEBUG) log('VexFlow.GraceNoteGroup', args);\n}\n\n/** GraceNoteGroup is used to format and render grace notes. */\nexport class GraceNoteGroup extends Modifier {\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.GraceNoteGroup;\n }\n\n protected readonly voice: Voice;\n protected readonly graceNotes: StemmableNote[];\n protected readonly showSlur?: boolean;\n\n protected preFormatted: boolean = false;\n protected formatter?: Formatter;\n public renderOptions: { slurYShift: number };\n protected slur?: StaveTie | TabTie;\n protected beams: Beam[];\n\n /** Arranges groups inside a `ModifierContext`. */\n static format(gracenoteGroups: GraceNoteGroup[], state: ModifierContextState): boolean {\n const groupSpacingStave = 4;\n const groupSpacingTab = 0;\n\n if (!gracenoteGroups || gracenoteGroups.length === 0) return false;\n\n const groupList = [];\n let prevNote = null;\n let shift = 0;\n\n for (let i = 0; i < gracenoteGroups.length; ++i) {\n const gracenoteGroup = gracenoteGroups[i];\n const note = gracenoteGroup.getNote();\n const isStavenote = isStaveNote(note);\n const spacing = isStavenote ? groupSpacingStave : groupSpacingTab;\n\n if (isStavenote && note !== prevNote) {\n // Iterate through all notes to get the displaced pixels\n for (let n = 0; n < note.keys.length; ++n) {\n shift = Math.max(note.getLeftDisplacedHeadPx(), shift);\n }\n prevNote = note;\n }\n\n groupList.push({ shift: shift, gracenoteGroup, spacing });\n }\n\n // If first note left shift in case it is displaced\n let groupShift = groupList[0].shift;\n let formatWidth;\n let right = false;\n let left = false;\n for (let i = 0; i < groupList.length; ++i) {\n const gracenoteGroup = groupList[i].gracenoteGroup;\n if (gracenoteGroup.position === Modifier.Position.RIGHT) right = true;\n else left = true;\n gracenoteGroup.preFormat();\n formatWidth = gracenoteGroup.getWidth() + groupList[i].spacing;\n groupShift = Math.max(formatWidth, groupShift);\n }\n\n for (let i = 0; i < groupList.length; ++i) {\n const gracenoteGroup = groupList[i].gracenoteGroup;\n formatWidth = gracenoteGroup.getWidth() + groupList[i].spacing;\n gracenoteGroup.setSpacingFromNextModifier(\n groupShift - Math.min(formatWidth, groupShift) + StaveNote.minNoteheadPadding\n );\n }\n\n if (right) state.rightShift += groupShift;\n if (left) state.leftShift += groupShift;\n return true;\n }\n\n //** `GraceNoteGroup` inherits from `Modifier` and is placed inside a `ModifierContext`. */\n constructor(graceNotes: StemmableNote[], showSlur?: boolean) {\n super();\n\n this.position = Modifier.Position.LEFT;\n this.graceNotes = graceNotes;\n this.width = 0;\n\n this.showSlur = showSlur;\n this.slur = undefined;\n\n this.voice = new Voice({\n numBeats: 4,\n beatValue: 4,\n resolution: Tables.RESOLUTION,\n }).setStrict(false);\n\n this.renderOptions = {\n slurYShift: 0,\n };\n\n this.beams = [];\n\n this.voice.addTickables(this.graceNotes);\n\n return this;\n }\n\n preFormat(): void {\n if (this.preFormatted) return;\n\n if (!this.formatter) {\n this.formatter = new Formatter();\n }\n this.formatter.joinVoices([this.voice]).format([this.voice], 0, {});\n this.setWidth(this.formatter.getMinTotalWidth());\n this.preFormatted = true;\n }\n\n beamNotes(graceNotes?: StemmableNote[]): this {\n graceNotes = graceNotes || this.graceNotes;\n if (graceNotes.length > 1) {\n const beam = new Beam(graceNotes);\n\n beam.renderOptions.beamWidth = 3;\n beam.renderOptions.partialBeamLength = 4;\n\n this.beams.push(beam);\n }\n\n return this;\n }\n\n override setWidth(width: number): this {\n this.width = width;\n return this;\n }\n\n override getWidth(): number {\n return this.width + StaveNote.minNoteheadPadding;\n }\n\n getGraceNotes(): Note[] {\n return this.graceNotes;\n }\n\n override draw(): void {\n const ctx: RenderContext = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n L('Drawing grace note group for:', note);\n\n this.alignSubNotesWithNote(this.getGraceNotes(), note, this.position); // Modifier function\n\n // Draw grace notes.\n this.graceNotes.forEach((graceNote) => graceNote.setContext(ctx).drawWithStyle());\n // Draw beams.\n this.beams.forEach((beam) => beam.setContext(ctx).drawWithStyle());\n\n if (this.showSlur) {\n // Create and draw slur.\n const isStavenote = isStaveNote(note);\n const TieClass = isStavenote ? StaveTie : TabTie;\n\n this.slur = new TieClass({\n lastNote: this.graceNotes[0],\n firstNote: note,\n firstIndexes: [0],\n lastIndexes: [0],\n });\n\n this.slur.renderOptions.cp2 = 12;\n this.slur.renderOptions.yShift = (isStavenote ? 7 : 5) + this.renderOptions.slurYShift;\n this.slur.setContext(ctx).drawWithStyle();\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Taehoon Moon 2016\n//\n// ## Description\n//\n// This file implements `NoteSubGroup` which is used to format and\n// render notes as a `Modifier`\n// ex) ClefNote, TimeSigNote and BarNote.\n\nimport { Formatter } from './formatter';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { Voice } from './voice';\n\nexport class NoteSubGroup extends Modifier {\n static override get CATEGORY(): string {\n return Category.NoteSubGroup;\n }\n\n // Arrange groups inside a `ModifierContext`\n static format(groups: NoteSubGroup[], state: ModifierContextState): boolean {\n if (!groups || groups.length === 0) return false;\n\n let width = 0;\n for (let i = 0; i < groups.length; ++i) {\n const group = groups[i];\n group.preFormat();\n width += group.getWidth();\n }\n\n state.leftShift += width;\n return true;\n }\n\n protected subNotes: Note[];\n protected preFormatted: boolean = false;\n protected formatter: Formatter;\n protected voice: Voice;\n\n constructor(subNotes: Note[]) {\n super();\n\n this.position = Modifier.Position.LEFT;\n this.subNotes = subNotes;\n this.subNotes.forEach((subNote) => {\n subNote.setIgnoreTicks(false);\n });\n this.width = 0;\n\n this.formatter = new Formatter();\n this.voice = new Voice({\n numBeats: 4,\n beatValue: 4,\n resolution: Tables.RESOLUTION,\n }).setStrict(false);\n\n this.voice.addTickables(this.subNotes);\n }\n\n preFormat(): void {\n if (this.preFormatted) return;\n\n this.formatter.joinVoices([this.voice]).format([this.voice], 0);\n this.setWidth(this.formatter.getMinTotalWidth());\n this.preFormatted = true;\n }\n\n override setWidth(width: number): this {\n this.width = width;\n return this;\n }\n\n override getWidth(): number {\n return this.width;\n }\n\n override draw(): void {\n const ctx: RenderContext = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n this.alignSubNotesWithNote(this.subNotes, note); // Modifier function\n this.subNotes.forEach((subNote) => subNote.setContext(ctx).drawWithStyle());\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Cyril Silverman\n// MIT License\n\nimport { getBottomY, getInitialOffset, getTopY } from './articulation';\nimport { Element } from './element';\nimport { Metrics } from './metrics';\nimport { Modifier, ModifierPosition } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { log } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Ornament.DEBUG) log('VexFlow.Ornament', args);\n}\n\n/**\n * Ornament implements ornaments as modifiers that can be\n * attached to notes. The complete list of ornaments is available in\n * `tables.ts` under `VexFlow.ornamentCodes`.\n *\n * See `tests/ornament_tests.ts` for usage examples.\n */\nexport class Ornament extends Modifier {\n /** To enable logging for this class. Set `VexFlow.Ornament.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n /** Ornaments category string. */\n static override get CATEGORY(): string {\n return Category.Ornament;\n }\n static get minPadding(): number {\n return Metrics.get('NoteHead.minPadding');\n }\n\n protected ornamentAlignWithNoteHead: string[] | boolean;\n protected type: string;\n\n protected delayed: boolean;\n protected adjustForStemDirection: boolean;\n public renderOptions: {\n accidentalUpperPadding: number;\n accidentalLowerPadding: number;\n };\n protected accidentalUpper?: Element;\n protected accidentalLower?: Element;\n protected delayXShift?: number;\n\n /** Arrange ornaments inside `ModifierContext` */\n static format(ornaments: Ornament[], state: ModifierContextState): boolean {\n if (!ornaments || ornaments.length === 0) return false;\n\n let width = 0; // width is used by ornaments, which are always centered on the note head\n let rightShift = state.rightShift; // jazz ornaments calculate r/l shift separately\n let leftShift = state.leftShift;\n\n for (let i = 0; i < ornaments.length; ++i) {\n const ornament = ornaments[i];\n const increment = 2;\n\n if (ornament.position === ModifierPosition.RIGHT) {\n ornament.xShift += rightShift + 2;\n rightShift += ornament.width + Ornament.minPadding;\n } else if (ornament.position === ModifierPosition.LEFT) {\n ornament.xShift -= leftShift + ornament.width + 2;\n leftShift += ornament.width + Ornament.minPadding;\n } else if (ornament.position === ModifierPosition.ABOVE) {\n width = Math.max(ornament.getWidth(), width);\n const note = ornament.getNote() as StemmableNote;\n let curTop = note.getLineNumber(true) + state.topTextLine;\n const stem = note.getStem();\n if (stem && note.getStemDirection() === Stem.UP) {\n curTop += Math.abs(stem.getHeight()) / Tables.STAVE_LINE_DISTANCE;\n }\n const numLines = note.getStave()?.getNumLines() ?? 0;\n // make sure that the ornaments stay above the staff\n if (curTop < numLines) state.topTextLine += numLines - curTop;\n ornament.setTextLine(state.topTextLine);\n state.topTextLine += increment;\n } else {\n width = Math.max(ornament.getWidth(), width);\n ornament.setTextLine(state.textLine);\n state.textLine += increment;\n }\n }\n\n // Note: 'legit' ornaments don't consider other modifiers when calculating their\n // X position, but jazz ornaments sometimes need to.\n state.leftShift = leftShift + width / 2;\n state.rightShift = rightShift + width / 2;\n return true;\n }\n\n /**\n * ornamentNoteTransition means the jazz ornament represents an effect from one note to another,\n * these are generally on the top of the staff.\n */\n static get ornamentNoteTransition(): string[] {\n return ['flip', 'jazzTurn', 'smear'];\n }\n\n /**\n * ornamentAttack indicates something that happens in the attach, placed before the note and\n * any accidentals\n */\n static get ornamentAttack(): string[] {\n return ['scoop'];\n }\n\n /**\n * The ornament is aligned based on the note head, but without regard to whether the\n * stem goes up or down.\n */\n static get ornamentAlignWithNoteHead(): string[] {\n return ['doit', 'fall', 'fallLong', 'doitLong', 'scoop'];\n }\n\n /**\n * An ornament that happens on the release of the note, generally placed after the\n * note and overlapping the next beat/measure..\n */\n static get ornamentRelease(): string[] {\n return ['doit', 'fall', 'fallLong', 'doitLong', 'jazzTurn', 'smear', 'flip'];\n }\n\n static get ornamentLeft(): string[] {\n return ['scoop'];\n }\n\n static get ornamentRight(): string[] {\n return ['doit', 'fall', 'fallLong', 'doitLong'];\n }\n\n static get ornamentYShift(): string[] {\n return ['fallLong'];\n }\n\n /** ornamentArticulation goes above/below the note based on space availablity */\n static get ornamentArticulation(): string[] {\n return ['bend', 'plungerClosed', 'plungerOpen'];\n }\n\n /**\n * Create a new ornament of type `type`, which is an entry in\n * `VexFlow.ornamentCodes` in `tables.ts`.\n */\n constructor(type: string) {\n super();\n\n // Default position ABOVE\n this.position = ModifierPosition.ABOVE;\n if (Ornament.ornamentRight.indexOf(type) >= 0) {\n this.position = ModifierPosition.RIGHT;\n }\n if (Ornament.ornamentLeft.indexOf(type) >= 0) {\n this.position = ModifierPosition.LEFT;\n }\n this.type = type;\n this.delayed = false;\n\n this.renderOptions = {\n accidentalLowerPadding: 3,\n accidentalUpperPadding: 3,\n };\n\n // some jazz ornaments are above or below depending on stem direction.\n this.adjustForStemDirection = false;\n\n this.ornamentAlignWithNoteHead = Ornament.ornamentAlignWithNoteHead.indexOf(this.type) >= 0;\n\n // Is this a jazz ornament that goes between this note and the next note.\n if (Ornament.ornamentNoteTransition.indexOf(this.type) >= 0) {\n this.delayed = true;\n }\n\n this.text = Tables.ornamentCodes(this.type);\n }\n\n /** Set note attached to ornament. */\n override setNote(note: Note): this {\n super.setNote(note);\n // articulations above/below the line can be stacked.\n if (Ornament.ornamentArticulation.indexOf(this.type) >= 0) {\n // Unfortunately we don't know the stem direction. So we base it\n // on the line number, but also allow it to be overridden.\n if (note.getLineNumber() >= 3) {\n this.position = Modifier.Position.ABOVE;\n } else {\n this.position = Modifier.Position.BELOW;\n }\n }\n return this;\n }\n\n /** Set whether the ornament is to be delayed. */\n setDelayed(delayed: boolean): this {\n this.delayed = delayed;\n return this;\n }\n\n /** Set the upper accidental for the ornament. */\n setUpperAccidental(accid: string): this {\n this.accidentalUpper = new Element();\n this.accidentalUpper.setText(Tables.accidentalCodes(accid));\n return this;\n }\n\n /** Set the lower accidental for the ornament. */\n setLowerAccidental(accid: string): this {\n this.accidentalLower = new Element();\n this.accidentalLower.setText(Tables.accidentalCodes(accid));\n return this;\n }\n\n /** Render ornament in position next to note. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote() as StemmableNote;\n this.setRendered();\n\n const stave = note.checkStave();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('ornament' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n // Get initial coordinates for the modifier position\n const start = note.getModifierStartXY(this.position, this.index);\n let glyphX = start.x;\n\n const staffSpace = stave.getSpacingBetweenLines();\n const initialOffset = getInitialOffset(note, this.position);\n\n // If the ornament is aligned with the note head, don't consider the stave y\n // but use the 'natural' modifier y\n let glyphY = this.ornamentAlignWithNoteHead ? start.y : 0;\n if (this.position === ModifierPosition.ABOVE) {\n glyphY = getTopY(note, this.textLine) - (this.textLine + initialOffset) * staffSpace;\n }\n if (this.position === ModifierPosition.BELOW) {\n glyphY = getBottomY(note, this.textLine) + (this.textLine + initialOffset + 1.5) * staffSpace;\n }\n\n // Ajdust x position if ornament is delayed\n if (this.delayed) {\n let delayXShift = 0;\n const startX = note.getTickContext().getX();\n if (this.delayXShift !== undefined) {\n delayXShift = this.delayXShift;\n } else {\n const tickables = note.getVoice().getTickables();\n const index = tickables.indexOf(note);\n const nextContext = index + 1 < tickables.length ? tickables[index + 1].checkTickContext() : undefined;\n if (nextContext) {\n delayXShift += (nextContext.getX() - startX) * 0.5;\n } else {\n delayXShift += (stave.getX() + stave.getWidth() - glyphX) * 0.5;\n }\n this.delayXShift = delayXShift;\n }\n glyphX += delayXShift;\n }\n\n L('Rendering ornament: ', this.text.charCodeAt(0), glyphX, glyphY);\n if (this.accidentalLower) {\n this.accidentalLower.renderText(\n ctx,\n glyphX + this.xShift - this.accidentalLower.getWidth() * 0.5,\n glyphY + this.yShift - this.accidentalLower.getTextMetrics().actualBoundingBoxDescent\n );\n glyphY -= this.accidentalLower.getHeight() + this.renderOptions.accidentalLowerPadding;\n }\n\n // ornament requires yShift\n if (Ornament.ornamentYShift.indexOf(this.type) >= 0) {\n this.yShift += this.getHeight();\n }\n\n this.x =\n glyphX -\n (this.position === ModifierPosition.ABOVE || this.position === ModifierPosition.BELOW ? this.width * 0.5 : 0);\n this.y = glyphY;\n\n this.renderText(ctx, 0, 0);\n\n if (this.accidentalUpper) {\n glyphY -= this.getHeight() + this.renderOptions.accidentalUpperPadding;\n this.accidentalUpper.renderText(\n ctx,\n glyphX + this.xShift - this.accidentalUpper.getWidth() * 0.5,\n glyphY + this.yShift - this.accidentalUpper.getTextMetrics().actualBoundingBoxDescent\n );\n }\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Rodrigo Vilar\n// MIT License\n\nimport { Modifier, ModifierPosition } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { Category } from './typeguard';\n\n/** Parenthesis implements parenthesis modifiers for notes. */\nexport class Parenthesis extends Modifier {\n static override get CATEGORY(): string {\n return Category.Parenthesis;\n }\n\n /** Add parentheses to the notes. */\n static buildAndAttach(notes: Note[]): void {\n for (const note of notes) {\n for (let i = 0; i < note.keys.length; i++) {\n note.addModifier(new Parenthesis(ModifierPosition.LEFT), i);\n note.addModifier(new Parenthesis(ModifierPosition.RIGHT), i);\n }\n }\n }\n\n /** Arrange parentheses inside a ModifierContext. */\n static format(parentheses: Parenthesis[], state: ModifierContextState): boolean {\n if (!parentheses || parentheses.length === 0) return false;\n\n let xWidthL = 0;\n let xWidthR = 0;\n\n for (let i = 0; i < parentheses.length; ++i) {\n const parenthesis = parentheses[i];\n const note = parenthesis.getNote();\n const pos = parenthesis.getPosition();\n const index = parenthesis.checkIndex();\n\n let shift = 0;\n\n if (pos === ModifierPosition.RIGHT) {\n shift = note.getRightParenthesisPx(index);\n xWidthR = xWidthR > shift + parenthesis.width ? xWidthR : shift + parenthesis.width;\n }\n if (pos === ModifierPosition.LEFT) {\n shift = note.getLeftParenthesisPx(index) + parenthesis.width;\n xWidthL = xWidthL > shift + parenthesis.width ? xWidthL : shift + parenthesis.width;\n }\n parenthesis.setXShift(shift);\n }\n state.leftShift += xWidthL;\n state.rightShift += xWidthR;\n\n return true;\n }\n\n /**\n * Constructor\n *\n * @param position Modifier.Position.LEFT (default) or Modifier.Position.RIGHT\n */\n constructor(position: ModifierPosition) {\n super();\n\n this.position = position ?? Modifier.Position.LEFT;\n if (this.position === Modifier.Position.RIGHT) {\n this.text = '\\uE0F6'; /*noteheadParenthesisRight*/\n } else if (this.position === Modifier.Position.LEFT) {\n this.text = '\\uE0F5'; /*noteheadParenthesisLeft*/\n }\n }\n\n /** Set the associated note. */\n override setNote(note: Note): this {\n this.note = note;\n this.setFont(note.getFont());\n return this;\n }\n\n /** Render the parenthesis. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const start = note.getModifierStartXY(this.position, this.index, { forceFlagRight: true });\n this.renderText(ctx, start.x, start.y);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Ron B. Yeh\n// MIT License\n//\n// Utilities for working with Web APIs.\n// See: https://developer.mozilla.org/en-US/docs/Web/API\n\nimport { globalObject } from './util';\n\n// eslint-disable-next-line\nexport function isHTMLCanvas(element: any): element is HTMLCanvasElement {\n if (!element) return false;\n\n const global = globalObject();\n return (\n // It's either an instance of the HTMLCanvasElement class,\n (typeof global.HTMLCanvasElement === 'function' && element instanceof global.HTMLCanvasElement) ||\n // OR it's pretending to be a <canvas> element. Good enough!\n // Do not rely on .tagName, because node-canvas doesn't provide a tagName.\n (typeof element.getContext === 'function' && typeof element.toDataURL === 'function')\n );\n}\n\n// eslint-disable-next-line\nexport function isHTMLDiv(element: any): element is HTMLDivElement {\n if (!element) return false;\n\n const global = globalObject();\n return (\n // It's either an instance of the HTMLDivElement class.\n (typeof global.HTMLDivElement === 'function' && element instanceof global.HTMLDivElement) ||\n // OR it's pretending to be a <div>. See: svgcontext.ts.\n (typeof element.appendChild === 'function' && typeof element.style === 'object')\n );\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Font, FontInfo } from './font';\nimport { RenderContext, TextMeasure } from './rendercontext';\nimport { globalObject, warn } from './util';\nimport { isHTMLCanvas } from './web';\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/offscreencanvas\n// https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/offscreencanvas/index.d.ts\n\ninterface OffscreenCanvas extends EventTarget {\n width: number;\n height: number;\n // ...more stuff that we removed.\n}\n\n// https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvasrenderingcontext2d\ninterface OffscreenCanvasRenderingContext2D\n extends CanvasState,\n CanvasTransform,\n CanvasCompositing,\n CanvasImageSmoothing,\n CanvasFillStrokeStyles,\n CanvasShadowStyles,\n CanvasFilters,\n CanvasRect,\n CanvasDrawPath,\n CanvasText,\n CanvasDrawImage,\n CanvasImageData,\n CanvasPathDrawingStyles,\n CanvasTextDrawingStyles,\n CanvasPath {\n readonly canvas: OffscreenCanvas;\n}\n\n/**\n * A rendering context for the Canvas backend. This class serves as a proxy for the\n * underlying CanvasRenderingContext2D object, part of the browser's API.\n */\nexport class CanvasContext extends RenderContext {\n /** The 2D rendering context from the Canvas API. Forward method calls to this object. */\n context2D: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;\n\n curTransfrom: DOMMatrix;\n /**\n * The HTMLCanvasElement or OffscreenCanvas that is associated with the above context.\n * If there was no associated `<canvas>` element, just store the default WIDTH / HEIGHT.\n */\n canvas: HTMLCanvasElement | OffscreenCanvas | { width: number; height: number };\n\n /** Height of one line of text (in pixels). */\n textHeight: number = 0;\n\n static get WIDTH(): number {\n return 600;\n }\n\n static get HEIGHT(): number {\n return 400;\n }\n\n static get CANVAS_BROWSER_SIZE_LIMIT(): number {\n return 32767; // Chrome/Firefox. Could be determined more precisely by npm module canvas-size.\n }\n\n /**\n * Ensure that width and height do not exceed the browser limit.\n * @returns array of [width, height] clamped to the browser limit.\n */\n static sanitizeCanvasDims(width: number, height: number): [number, number] {\n const limit = this.CANVAS_BROWSER_SIZE_LIMIT;\n if (Math.max(width, height) > limit) {\n warn('Canvas dimensions exceed browser limit. Cropping to ' + limit);\n if (width > limit) {\n width = limit;\n }\n if (height > limit) {\n height = limit;\n }\n }\n return [width, height];\n }\n\n constructor(context: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D) {\n super();\n this.context2D = context;\n this.curTransfrom = context.getTransform();\n if (!context.canvas) {\n this.canvas = {\n width: CanvasContext.WIDTH,\n height: CanvasContext.HEIGHT,\n };\n } else {\n this.canvas = context.canvas;\n }\n }\n\n /**\n * Set all pixels to transparent black rgba(0,0,0,0).\n */\n clear(): void {\n this.context2D.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n\n // eslint-disable-next-line\n openGroup(cls?: string, id?: string): any {\n // Containers not implemented.\n }\n\n closeGroup(): void {\n // Containers not implemented.\n }\n\n openRotation(angleDegrees: number, x: number, y: number) {\n this.curTransfrom = this.context2D.getTransform();\n this.context2D.translate(x, y);\n this.context2D.rotate((angleDegrees * Math.PI) / 180);\n this.context2D.translate(-x, -y);\n }\n\n closeRotation() {\n this.context2D.setTransform(this.curTransfrom);\n }\n\n // eslint-disable-next-line\n add(child: any): void {\n // Containers not implemented.\n }\n\n setFillStyle(style: string): this {\n this.context2D.fillStyle = style;\n return this;\n }\n\n /** CanvasContext ignores `setBackgroundFillStyle()`. */\n // eslint-disable-next-line\n setBackgroundFillStyle(style: string): this {\n // DO NOTHING\n return this;\n }\n\n setStrokeStyle(style: string): this {\n this.context2D.strokeStyle = style;\n return this;\n }\n\n setShadowColor(color: string): this {\n this.context2D.shadowColor = color;\n return this;\n }\n\n setShadowBlur(blur: number): this {\n // CanvasRenderingContext2D does not scale the shadow blur by the current\n // transform, so we have to do it manually. We assume uniform scaling\n // (though allow for rotation) because the blur can only be scaled\n // uniformly anyway.\n const t = this.context2D.getTransform();\n const scale = Math.sqrt(t.a * t.a + t.b * t.b + t.c * t.c + t.d * t.d);\n this.context2D.shadowBlur = scale * blur;\n return this;\n }\n\n setLineWidth(width: number): this {\n this.context2D.lineWidth = width;\n return this;\n }\n\n setLineCap(capType: CanvasLineCap): this {\n this.context2D.lineCap = capType;\n return this;\n }\n\n setLineDash(dash: number[]): this {\n this.context2D.setLineDash(dash);\n return this;\n }\n\n scale(x: number, y: number): this {\n this.context2D.scale(x, y);\n return this;\n }\n\n resize(width: number, height: number, devicePixelRatio?: number): this {\n const canvas = this.context2D.canvas;\n const dpr: number = devicePixelRatio ?? globalObject().devicePixelRatio ?? 1;\n\n // Scale the canvas size by the device pixel ratio clamping to the maximum supported size.\n [width, height] = CanvasContext.sanitizeCanvasDims(width * dpr, height * dpr);\n\n // Divide back down by the pixel ratio and convert to integers.\n width = (width / dpr) | 0;\n height = (height / dpr) | 0;\n\n canvas.width = width * dpr;\n canvas.height = height * dpr;\n\n // The canvas could be an instance of either HTMLCanvasElement or an OffscreenCanvas.\n // Only HTMLCanvasElement has a style attribute.\n if (isHTMLCanvas(canvas)) {\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n }\n\n return this.scale(dpr, dpr);\n }\n\n rect(x: number, y: number, width: number, height: number): this {\n this.context2D.rect(x, y, width, height);\n return this;\n }\n\n fillRect(x: number, y: number, width: number, height: number): this {\n this.context2D.fillRect(x, y, width, height);\n return this;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pointerRect(x: number, y: number, width: number, height: number): this {\n return this;\n }\n\n /**\n * Set the pixels in a rectangular area to transparent black rgba(0,0,0,0).\n */\n clearRect(x: number, y: number, width: number, height: number): this {\n this.context2D.clearRect(x, y, width, height);\n return this;\n }\n\n beginPath(): this {\n this.context2D.beginPath();\n return this;\n }\n\n moveTo(x: number, y: number): this {\n this.context2D.moveTo(x, y);\n return this;\n }\n\n lineTo(x: number, y: number): this {\n this.context2D.lineTo(x, y);\n return this;\n }\n\n bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this {\n this.context2D.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n return this;\n }\n\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this {\n this.context2D.quadraticCurveTo(cpx, cpy, x, y);\n return this;\n }\n\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise: boolean): this {\n this.context2D.arc(x, y, radius, startAngle, endAngle, counterclockwise);\n return this;\n }\n\n fill(): this {\n this.context2D.fill();\n return this;\n }\n\n stroke(): this {\n this.context2D.stroke();\n return this;\n }\n\n closePath(): this {\n this.context2D.closePath();\n return this;\n }\n\n measureText(text: string): TextMeasure {\n const metrics = this.context2D.measureText(text);\n\n let y = 0;\n let height = 0;\n if (metrics.fontBoundingBoxAscent) {\n y = -metrics.fontBoundingBoxAscent;\n height = metrics.fontBoundingBoxDescent + metrics.fontBoundingBoxAscent;\n } else {\n y = -metrics.actualBoundingBoxAscent;\n height = metrics.actualBoundingBoxDescent + metrics.actualBoundingBoxAscent;\n }\n // Return x, y, width & height in the same manner as svg getBBox\n return {\n x: 0,\n y: y,\n width: metrics.width,\n height: height,\n };\n }\n\n fillText(text: string, x: number, y: number): this {\n this.context2D.fillText(text, x, y);\n return this;\n }\n\n save(): this {\n this.context2D.save();\n return this;\n }\n\n restore(): this {\n this.context2D.restore();\n return this;\n }\n\n set fillStyle(style: string | CanvasGradient | CanvasPattern) {\n this.context2D.fillStyle = style;\n }\n\n get fillStyle(): string | CanvasGradient | CanvasPattern {\n return this.context2D.fillStyle;\n }\n\n set strokeStyle(style: string | CanvasGradient | CanvasPattern) {\n this.context2D.strokeStyle = style;\n }\n\n get strokeStyle(): string | CanvasGradient | CanvasPattern {\n return this.context2D.strokeStyle;\n }\n\n /**\n * @param f is 1) a `FontInfo` object or\n * 2) a string formatted as CSS font shorthand (e.g., 'bold 10pt Arial') or\n * 3) a string representing the font family (one of `size`, `weight`, or `style` must also be provided).\n * @param size a string specifying the font size and unit (e.g., '16pt'), or a number (the unit is assumed to be 'pt').\n * @param weight is a string (e.g., 'bold', 'normal') or a number (100, 200, ... 900).\n * @param style is a string (e.g., 'italic', 'normal').\n */\n setFont(f?: string | FontInfo, size?: string | number, weight?: string | number, style?: string): this {\n const fontInfo = Font.validate(f, size, weight, style);\n this.context2D.font = Font.toCSSString(fontInfo);\n this.textHeight = Font.convertSizeToPixelValue(fontInfo.size);\n return this;\n }\n\n /** Return a string of the form `'italic bold 15pt Arial'` */\n getFont(): string {\n return this.context2D.font;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n// @author Gregory Ristow (2015)\n\nimport { Element } from \"./element\";\nimport { Font, FontInfo, FontStyle, FontWeight } from \"./font\";\nimport { Metrics } from \"./metrics\";\nimport { RenderContext, TextMeasure } from \"./rendercontext\";\nimport { Tables } from \"./tables\";\nimport { normalizeAngle, prefix, RuntimeError } from \"./util\";\n\nexport type Attributes = {\n [name: string]: string | number | undefined;\n \"font-family\"?: string;\n \"font-size\"?: string | number;\n \"font-style\"?: string;\n \"font-weight\"?: string | number;\n scaleX?: number;\n scaleY?: number;\n};\n\n/** For a particular element type (e.g., rect), we will not apply certain presentation attributes. */\nconst ATTRIBUTES_TO_IGNORE: Record<\n string /* element type */,\n Record<string, boolean> /* ignored attributes */\n> = {\n path: {\n x: true,\n y: true,\n width: true,\n height: true,\n \"font-family\": true,\n \"font-weight\": true,\n \"font-style\": true,\n \"font-size\": true,\n },\n rect: {\n \"font-family\": true,\n \"font-weight\": true,\n \"font-style\": true,\n \"font-size\": true,\n },\n text: {\n width: true,\n height: true,\n },\n};\n\n/** Create the SVG in the SVG namespace. */\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nconst TWO_PI = 2 * Math.PI;\n\nexport interface State {\n state: Attributes;\n attributes: Attributes;\n}\n\n/**\n * SVG rendering context with an API similar to CanvasRenderingContext2D.\n */\nexport class SVGContext extends RenderContext {\n protected static measureTextElement = new Element();\n\n element: HTMLElement; // the parent DOM object\n svg: SVGSVGElement;\n width: number = 0;\n height: number = 0;\n path: string;\n pen: { x: number; y: number };\n attributes: Attributes;\n state: Attributes;\n stateStack: State[];\n\n // Always points to the current group.\n // Calls to add() or openGroup() will append the new element to `this.parent`.\n parent: SVGGElement;\n // The stack of groups.\n groups: SVGGElement[];\n // The stack of attributes associated with each group.\n protected groupAttributes: Attributes[];\n\n protected precision = 1;\n\n backgroundFillStyle: string = \"white\";\n\n /** Formatted as CSS font shorthand (e.g., 'italic bold 12pt Arial') */\n protected fontCSSString: string = \"\";\n\n constructor(element: HTMLElement) {\n super();\n this.element = element;\n\n this.precision = Math.pow(10, Tables.RENDER_PRECISION_PLACES);\n\n // Create an SVG element and add it to the container element.\n const svg = this.create(\"svg\");\n svg.setAttribute(\"pointer-events\", \"none\");\n this.element.appendChild(svg);\n this.svg = svg;\n\n this.parent = this.svg;\n this.groups = [this.svg];\n\n this.path = \"\";\n this.pen = { x: NaN, y: NaN };\n\n const defaultFontAttributes = {\n \"font-family\": Metrics.get(\"fontFamily\") as string,\n \"font-size\": \"10pt\",\n \"font-weight\": FontWeight.NORMAL,\n \"font-style\": FontStyle.NORMAL,\n };\n\n this.state = {\n scaleX: 1,\n scaleY: 1,\n ...defaultFontAttributes,\n };\n\n this.attributes = {\n \"stroke-width\": 1.0,\n \"stroke-dasharray\": \"none\",\n fill: \"black\",\n stroke: \"black\",\n shadowBlur: 0,\n shadowColor: \"black\",\n ...defaultFontAttributes,\n };\n\n this.groupAttributes = [];\n this.applyAttributes(svg, this.attributes);\n this.groupAttributes.push({ ...this.attributes });\n\n this.stateStack = [];\n }\n\n protected round(n: number): number {\n return Math.round(n * this.precision) / this.precision;\n }\n\n /**\n * Use one of the overload signatures to create an SVG element of a specific type.\n * The last overload accepts an arbitrary string, and is identical to the\n * implementation signature.\n * Feel free to add new overloads for other SVG element types as required.\n */\n create(svgElementType: \"g\"): SVGGElement;\n create(svgElementType: \"path\"): SVGPathElement;\n create(svgElementType: \"rect\"): SVGRectElement;\n create(svgElementType: \"svg\"): SVGSVGElement;\n create(svgElementType: \"text\"): SVGTextElement;\n create(svgElementType: string): SVGElement;\n create(svgElementType: string): SVGElement {\n return document.createElementNS(SVG_NS, svgElementType);\n }\n\n // Allow grouping elements in containers for interactivity.\n openGroup(cls?: string, id?: string): SVGGElement {\n const group = this.create(\"g\");\n this.groups.push(group);\n this.parent.appendChild(group);\n this.parent = group;\n if (cls) group.setAttribute(\"class\", prefix(cls));\n if (id) group.setAttribute(\"id\", prefix(id));\n\n this.applyAttributes(group, this.attributes);\n this.groupAttributes.push({\n ...this.groupAttributes[this.groupAttributes.length - 1],\n ...this.attributes,\n });\n return group;\n }\n\n closeGroup(): void {\n this.groups.pop();\n this.groupAttributes.pop();\n this.parent = this.groups[this.groups.length - 1];\n }\n\n openRotation(angleDegrees: number, x: number, y: number) {\n this.openGroup().setAttribute(\n \"transform\",\n `translate(${x},${y}) rotate(${angleDegrees}) translate(-${x},-${y})`,\n );\n }\n\n closeRotation() {\n this.closeGroup();\n }\n\n add(elem: SVGElement): void {\n this.parent.appendChild(elem);\n }\n\n setFillStyle(style: string): this {\n this.attributes.fill = style;\n return this;\n }\n\n /**\n * Used to set the fill color for `clearRect()`. This allows us to simulate\n * cutting a \"hole\" into the SVG drawing.\n */\n setBackgroundFillStyle(style: string): this {\n this.backgroundFillStyle = style;\n return this;\n }\n\n setStrokeStyle(style: string): this {\n this.attributes.stroke = style;\n return this;\n }\n\n setShadowColor(color: string): this {\n this.attributes.shadowColor = color;\n return this;\n }\n\n /**\n * @param blur A non-negative float specifying the level of shadow blur, where 0\n * represents no blur and larger numbers represent increasingly more blur.\n * @returns this\n */\n setShadowBlur(blur: number): this {\n this.attributes.shadowBlur = blur;\n return this;\n }\n\n /**\n * @param width\n * @returns this\n */\n setLineWidth(width: number): this {\n this.attributes[\"stroke-width\"] = width;\n return this;\n }\n\n /**\n * @param lineDash an array of integers in the form of [dash, space, dash, space, etc...]\n * @returns this\n *\n * See: [SVG `stroke-dasharray` attribute](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray)\n */\n setLineDash(lineDash: number[]): this {\n if (Object.prototype.toString.call(lineDash) === \"[object Array]\") {\n this.attributes[\"stroke-dasharray\"] = lineDash.join(\",\");\n return this;\n } else {\n throw new RuntimeError(\n \"ArgumentError\",\n \"lineDash must be an array of integers.\",\n );\n }\n }\n\n /**\n * @param capType\n * @returns this\n */\n setLineCap(capType: CanvasLineCap): this {\n this.attributes[\"stroke-linecap\"] = capType;\n return this;\n }\n\n // ### Sizing & Scaling Methods:\n\n // TODO (GCR): See note at scale() -- separate our internal\n // conception of pixel-based width/height from the style.width\n // and style.height properties eventually to allow users to\n // apply responsive sizing attributes to the SVG.\n resize(width: number, height: number): this {\n this.width = width;\n this.height = height;\n this.element.style.width = width.toString();\n\n this.svg.style.width = width.toString();\n this.svg.style.height = height.toString();\n\n const attributes = {\n width,\n height,\n };\n\n this.applyAttributes(this.svg, attributes);\n this.scale(this.state.scaleX as number, this.state.scaleY as number);\n return this;\n }\n\n scale(x: number, y: number): this {\n // uses viewBox to scale\n // TODO (GCR): we may at some point want to distinguish the\n // style.width / style.height properties that are applied to\n // the SVG object from our internal conception of the SVG\n // width/height. This would allow us to create automatically\n // scaling SVGs that filled their containers, for instance.\n //\n // As this isn't implemented in Canvas contexts,\n // I've left as is for now, but in using the viewBox to\n // handle internal scaling, am trying to make it possible\n // for us to eventually move in that direction.\n\n this.state.scaleX = this.state.scaleX ? this.state.scaleX * x : x;\n this.state.scaleY = this.state.scaleY ? this.state.scaleY * y : y;\n const visibleWidth = this.width / this.state.scaleX;\n const visibleHeight = this.height / this.state.scaleY;\n this.setViewBox(0, 0, visibleWidth, visibleHeight);\n\n return this;\n }\n\n /**\n * 1 arg: string in the \"x y w h\" format\n * 4 args: x:number, y:number, w:number, h:number\n */\n setViewBox(\n viewBoxOrMinX: string | number,\n minY?: number,\n width?: number,\n height?: number,\n ): void {\n if (typeof viewBoxOrMinX === \"string\") {\n this.svg.setAttribute(\"viewBox\", viewBoxOrMinX);\n } else {\n const viewBoxString =\n viewBoxOrMinX + \" \" + minY + \" \" + width + \" \" + height;\n this.svg.setAttribute(\"viewBox\", viewBoxString);\n }\n }\n\n // ### Drawing helper methods:\n\n applyAttributes(element: SVGElement, attributes: Attributes): SVGElement {\n const attrNamesToIgnore = ATTRIBUTES_TO_IGNORE[element.nodeName];\n for (const attrName in attributes) {\n if (attrNamesToIgnore && attrNamesToIgnore[attrName]) {\n continue;\n }\n if (\n attributes[attrName] &&\n (this.groupAttributes.length === 0 ||\n attributes[attrName] !=\n this.groupAttributes[this.groupAttributes.length - 1][attrName])\n )\n element.setAttributeNS(null, attrName, attributes[attrName] as string);\n }\n\n return element;\n }\n\n // ### Shape & Path Methods:\n\n clear(): void {\n // Clear the SVG by removing all inner children.\n\n // (This approach is usually slightly more efficient\n // than removing the old SVG & adding a new one to\n // the container element, since it does not cause the\n // container to resize twice. Also, the resize\n // triggered by removing the entire SVG can trigger\n // a touchcancel event when the element resizes away\n // from a touch point.)\n\n while (this.svg.lastChild) {\n this.svg.removeChild(this.svg.lastChild);\n }\n }\n\n // ## Rectangles:\n rect(\n x: number,\n y: number,\n width: number,\n height: number,\n attributes?: Attributes,\n ): this {\n // Avoid invalid negative height attributes by flipping the rectangle on its head:\n if (height < 0) {\n y += height;\n height *= -1;\n }\n\n const rectangle = this.create(\"rect\");\n attributes = attributes ?? {\n fill: \"none\",\n \"stroke-width\": this.attributes[\"stroke-width\"],\n stroke: \"black\",\n };\n x = this.round(x);\n y = this.round(y);\n width = this.round(width);\n height = this.round(height);\n this.applyAttributes(rectangle, { x, y, width, height, ...attributes });\n this.add(rectangle);\n return this;\n }\n\n fillRect(x: number, y: number, width: number, height: number): this {\n const attributes = { fill: this.attributes.fill, stroke: \"none\" };\n this.rect(x, y, width, height, attributes);\n return this;\n }\n\n pointerRect(x: number, y: number, width: number, height: number): this {\n const attributes = { opacity: \"0\", \"pointer-events\": \"auto\" };\n this.rect(x, y, width, height, attributes);\n return this;\n }\n\n clearRect(x: number, y: number, width: number, height: number): this {\n // Currently this fills a rect with the backgroundFillStyle, rather\n // than \"cut a hole\" into the existing shapes.\n //\n // Since tabNote seems to be the only module that makes use of this\n // it may be worth creating a separate tabStave that would\n // draw lines around locations of tablature fingering.\n this.rect(x, y, width, height, {\n fill: this.backgroundFillStyle,\n stroke: \"none\",\n });\n return this;\n }\n\n // ## Paths:\n\n beginPath(): this {\n this.path = \"\";\n this.pen.x = NaN;\n this.pen.y = NaN;\n return this;\n }\n\n moveTo(x: number, y: number): this {\n x = this.round(x);\n y = this.round(y);\n this.path += \"M\" + x + \" \" + y;\n this.pen.x = x;\n this.pen.y = y;\n return this;\n }\n\n lineTo(x: number, y: number): this {\n x = this.round(x);\n y = this.round(y);\n this.path += \"L\" + x + \" \" + y;\n this.pen.x = x;\n this.pen.y = y;\n return this;\n }\n\n bezierCurveTo(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n x: number,\n y: number,\n ): this {\n x = this.round(x);\n y = this.round(y);\n x1 = this.round(x1);\n y1 = this.round(y1);\n x2 = this.round(x2);\n y2 = this.round(y2);\n this.path += \"C\" + x1 + \" \" + y1 + \",\" + x2 + \" \" + y2 + \",\" + x + \" \" + y;\n this.pen.x = x;\n this.pen.y = y;\n return this;\n }\n\n quadraticCurveTo(x1: number, y1: number, x: number, y: number): this {\n x = this.round(x);\n y = this.round(y);\n x1 = this.round(x1);\n y1 = this.round(y1);\n this.path += \"Q\" + x1 + \" \" + y1 + \",\" + x + \" \" + y;\n this.pen.x = x;\n this.pen.y = y;\n return this;\n }\n\n arc(\n x: number,\n y: number,\n radius: number,\n startAngle: number,\n endAngle: number,\n counterclockwise: boolean,\n ): this {\n let x0 = x + radius * Math.cos(startAngle);\n let y0 = y + radius * Math.sin(startAngle);\n x0 = this.round(x0);\n y0 = this.round(y0);\n\n // svg behavior different from canvas. Don't normalize angles if\n // we are drawing a circle because they both normalize to 0\n const tmpStartTest = normalizeAngle(startAngle);\n const tmpEndTest = normalizeAngle(endAngle);\n if (\n (!counterclockwise && endAngle - startAngle >= TWO_PI) ||\n (counterclockwise && startAngle - endAngle >= TWO_PI) ||\n tmpStartTest === tmpEndTest\n ) {\n let x1 = x + radius * Math.cos(startAngle + Math.PI);\n let y1 = y + radius * Math.sin(startAngle + Math.PI);\n // There's no way to specify a completely circular arc in SVG so we have to\n // use two semi-circular arcs.\n x1 = this.round(x1);\n y1 = this.round(y1);\n radius = this.round(radius);\n this.path += `M${x0} ${y0} A${radius} ${radius} 0 0 0 ${x1} ${y1} `;\n this.path += `A${radius} ${radius} 0 0 0 ${x0} ${y0}`;\n this.pen.x = x0;\n this.pen.y = y0;\n } else {\n let x1 = x + radius * Math.cos(endAngle);\n let y1 = y + radius * Math.sin(endAngle);\n\n startAngle = tmpStartTest;\n endAngle = tmpEndTest;\n let large: boolean;\n if (Math.abs(endAngle - startAngle) < Math.PI) {\n large = counterclockwise;\n } else {\n large = !counterclockwise;\n }\n if (startAngle > endAngle) {\n large = !large;\n }\n\n const sweep = !counterclockwise;\n\n x1 = this.round(x1);\n y1 = this.round(y1);\n radius = this.round(radius);\n this.path += `M${x0} ${y0} A${radius} ${radius} 0 ${+large} ${+sweep} ${x1} ${y1}`;\n this.pen.x = x1;\n this.pen.y = y1;\n }\n return this;\n }\n\n closePath(): this {\n this.path += \"Z\";\n return this;\n }\n\n protected getShadowStyle(): string {\n // A CSS drop-shadow filter blur looks different than a canvas shadowBlur\n // of the same radius, so we scale the drop-shadow radius here to make it\n // look close to the canvas shadow.\n return `filter: drop-shadow(0 0 ${(this.attributes.shadowBlur as number) / 1.5}px ${this.attributes.shadowColor})`;\n }\n\n fill(attributes?: Attributes): this {\n const path = this.create(\"path\");\n if (typeof attributes === \"undefined\") {\n attributes = { ...this.attributes, stroke: \"none\" };\n }\n\n attributes.d = this.path;\n if ((this.attributes.shadowBlur as number) > 0) {\n attributes.style = this.getShadowStyle();\n }\n\n this.applyAttributes(path, attributes);\n this.add(path);\n return this;\n }\n\n stroke(): this {\n const path = this.create(\"path\");\n const attributes: Attributes = {\n ...this.attributes,\n fill: \"none\",\n d: this.path,\n };\n if ((this.attributes.shadowBlur as number) > 0) {\n attributes.style = this.getShadowStyle();\n }\n\n this.applyAttributes(path, attributes);\n this.add(path);\n return this;\n }\n\n // ## Text Methods:\n measureText(text: string): TextMeasure {\n SVGContext.measureTextElement.setText(text);\n SVGContext.measureTextElement.setFont(\n this.attributes[\"font-family\"],\n this.attributes[\"font-size\"],\n this.attributes[\"font-weight\"],\n this.attributes[\"font-style\"],\n );\n const bb = SVGContext.measureTextElement.getBoundingBox();\n return { x: bb.x, y: bb.y, width: bb.w, height: bb.h };\n }\n\n fillText(text: string, x: number, y: number): this {\n if (!text || text.length <= 0) {\n return this;\n }\n x = this.round(x);\n y = this.round(y);\n const attributes: Attributes = {\n ...this.attributes,\n stroke: \"none\",\n x,\n y,\n };\n\n const txt = this.create(\"text\");\n txt.textContent = text;\n this.applyAttributes(txt, attributes);\n this.add(txt);\n return this;\n }\n\n save(): this {\n this.stateStack.push({\n state: structuredClone(this.state),\n attributes: structuredClone(this.attributes),\n });\n return this;\n }\n\n restore(): this {\n const savedState = this.stateStack.pop();\n if (savedState) {\n const state = savedState;\n this.state = structuredClone(state.state);\n this.attributes = structuredClone(state.attributes);\n }\n return this;\n }\n\n set fillStyle(style: string | CanvasGradient | CanvasPattern) {\n this.setFillStyle(style as string);\n }\n\n get fillStyle(): string | CanvasGradient | CanvasPattern {\n return this.attributes.fill as string;\n }\n\n set strokeStyle(style: string | CanvasGradient | CanvasPattern) {\n this.setStrokeStyle(style as string);\n }\n\n get strokeStyle(): string | CanvasGradient | CanvasPattern {\n return this.attributes.stroke as string;\n }\n\n /**\n * @param f is 1) a `FontInfo` object or\n * 2) a string formatted as CSS font shorthand (e.g., 'bold 10pt Arial') or\n * 3) a string representing the font family (one of `size`, `weight`, or `style` must also be provided).\n * @param size a string specifying the font size and unit (e.g., '16pt'), or a number (the unit is assumed to be 'pt').\n * @param weight is a string (e.g., 'bold', 'normal') or a number (100, 200, ... 900). It is inserted\n * into the font-weight attribute (e.g., font-weight=\"bold\")\n * @param style is a string (e.g., 'italic', 'normal') that is inserted into the\n * font-style attribute (e.g., font-style=\"italic\")\n */\n setFont(\n f?: string | FontInfo,\n size?: string | number,\n weight?: string | number,\n style?: string,\n ): this {\n const fontInfo = Font.validate(f, size, weight, style);\n this.fontCSSString = Font.toCSSString(fontInfo);\n const fontAttributes = {\n \"font-family\": fontInfo.family,\n \"font-size\": fontInfo.size,\n \"font-weight\": fontInfo.weight,\n \"font-style\": fontInfo.style,\n };\n this.attributes = { ...this.attributes, ...fontAttributes };\n this.state = { ...this.state, ...fontAttributes };\n return this;\n }\n\n /** Return a string of the form `'italic bold 15pt Arial'` */\n getFont(): string {\n return this.fontCSSString;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { CanvasContext } from './canvascontext';\nimport { RenderContext } from './rendercontext';\nimport { SVGContext } from './svgcontext';\nimport { isRenderContext } from './typeguard';\nimport { RuntimeError } from './util';\nimport { isHTMLCanvas, isHTMLDiv } from './web';\n\n// A ContextBuilder is either Renderer.getSVGContext or Renderer.getCanvasContext.\nexport type ContextBuilder = typeof Renderer.getSVGContext | typeof Renderer.getCanvasContext;\n\nexport enum RendererBackends {\n CANVAS = 1,\n SVG = 2,\n}\n\n// End of line types\nexport enum RendererLineEndType {\n NONE = 1, // No leg\n UP = 2, // Upward leg\n DOWN = 3, // Downward leg\n}\n\n/**\n * Support Canvas & SVG rendering contexts.\n */\nexport class Renderer {\n static Backends = RendererBackends;\n\n static LineEndType = RendererLineEndType;\n\n // Used by vexflow_test_helpers.ts\n // Should this be private?\n // Can we do this in a cleaner way?\n static lastContext?: RenderContext = undefined;\n\n static buildContext(\n elementId: string | HTMLCanvasElement | HTMLDivElement,\n backend: number,\n width: number,\n height: number,\n background: string = '#FFF'\n ): RenderContext {\n const renderer = new Renderer(elementId, backend);\n if (width && height) {\n renderer.resize(width, height);\n }\n\n const ctx = renderer.getContext();\n ctx.setBackgroundFillStyle(background);\n Renderer.lastContext = ctx;\n return ctx;\n }\n\n static getCanvasContext(elementId: string, width: number, height: number, background?: string): RenderContext {\n return Renderer.buildContext(elementId, Renderer.Backends.CANVAS, width, height, background);\n }\n\n static getSVGContext(elementId: string, width: number, height: number, background?: string): RenderContext {\n return Renderer.buildContext(elementId, Renderer.Backends.SVG, width, height, background);\n }\n\n // Draw a dashed line (horizontal, vertical or diagonal\n // dashPattern = [3,3] draws a 3 pixel dash followed by a three pixel space.\n // setting the second number to 0 draws a solid line.\n static drawDashedLine(\n context: RenderContext,\n fromX: number,\n fromY: number,\n toX: number,\n toY: number,\n dashPattern: number[]\n ): void {\n context.beginPath();\n\n const dx = toX - fromX;\n const dy = toY - fromY;\n const angle = Math.atan2(dy, dx);\n let x = fromX;\n let y = fromY;\n context.moveTo(fromX, fromY);\n let idx = 0;\n let draw = true;\n while (!((dx < 0 ? x <= toX : x >= toX) && (dy < 0 ? y <= toY : y >= toY))) {\n const dashLength = dashPattern[idx++ % dashPattern.length];\n const nx = x + Math.cos(angle) * dashLength;\n x = dx < 0 ? Math.max(toX, nx) : Math.min(toX, nx);\n const ny = y + Math.sin(angle) * dashLength;\n y = dy < 0 ? Math.max(toY, ny) : Math.min(toY, ny);\n if (draw) {\n context.lineTo(x, y);\n } else {\n context.moveTo(x, y);\n }\n draw = !draw;\n }\n\n context.closePath();\n context.stroke();\n }\n\n protected ctx: RenderContext;\n\n /**\n * @param canvasId can be:\n * - a string element ID (of a canvas or div element)\n * - a canvas element\n * - a div element, which will contain the SVG output\n * @param backend Renderer.Backends.CANVAS or Renderer.Backends.SVG\n */\n constructor(context: RenderContext);\n constructor(canvas: string | HTMLCanvasElement | HTMLDivElement, backend: number);\n constructor(arg0: string | HTMLCanvasElement | HTMLDivElement | RenderContext, arg1?: number) {\n if (isRenderContext(arg0)) {\n // The user has provided what looks like a RenderContext, let's just use it.\n this.ctx = arg0;\n } else {\n if (arg1 === undefined) {\n // The backend must be specified if the render context isn't directly provided.\n throw new RuntimeError('InvalidArgument', 'Missing backend argument');\n }\n const backend: number = arg1;\n\n let element: HTMLElement;\n if (typeof arg0 === 'string') {\n const maybeElement = document.getElementById(arg0);\n if (!maybeElement) {\n throw new RuntimeError('BadElementId', `Can't find element with ID \"${maybeElement}\"`);\n }\n element = maybeElement;\n } else {\n element = arg0 as HTMLElement;\n }\n\n // Verify backend and create context\n if (backend === Renderer.Backends.CANVAS) {\n if (!isHTMLCanvas(element)) {\n throw new RuntimeError('BadElement', 'CANVAS context requires an HTMLCanvasElement.');\n }\n const context = element.getContext('2d', { willReadFrequently: true });\n if (!context) {\n throw new RuntimeError('BadElement', \"Can't get canvas context\");\n }\n this.ctx = new CanvasContext(context);\n } else if (backend === Renderer.Backends.SVG) {\n if (!isHTMLDiv(element)) {\n throw new RuntimeError('BadElement', 'SVG context requires an HTMLDivElement.');\n }\n this.ctx = new SVGContext(element);\n } else {\n throw new RuntimeError('InvalidBackend', `No support for backend: ${backend}`);\n }\n }\n }\n\n resize(width: number, height: number): this {\n this.ctx.resize(width, height);\n return this;\n }\n\n getContext(): RenderContext {\n return this.ctx;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Larry Kuhns\n//\n// This file implements the `StringNumber` class which renders string\n// number annotations beside notes.\n\nimport { Metrics } from './metrics';\nimport { Modifier, ModifierPosition } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { Renderer } from './renderer';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category, isStaveNote, isStemmableNote } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport class StringNumber extends Modifier {\n static override get CATEGORY(): string {\n return Category.StringNumber;\n }\n\n // ## Static Methods\n // Arrange string numbers inside a `ModifierContext`\n static format(nums: StringNumber[], state: ModifierContextState): boolean {\n /**\n * The modifier context's leftShift state.\n */\n const leftShift = state.leftShift;\n /**\n * The modifier context's rightShift state.\n */\n const rightShift = state.rightShift;\n const numSpacing = 1;\n\n if (!nums || nums.length === 0) return false;\n\n const numsList = [];\n let prevNote = null;\n let extraXSpaceForDisplacedNotehead = 0;\n let shiftRight = 0;\n const modLines = 0;\n\n for (let i = 0; i < nums.length; ++i) {\n const num = nums[i];\n const note = num.getNote();\n const pos = num.getPosition();\n if (!isStaveNote(note)) {\n throw new RuntimeError('NoStaveNote');\n }\n const index = num.checkIndex();\n const props = note.getKeyProps()[index];\n const mc = note.getModifierContext();\n const verticalSpaceNeeded = (num.radius * 2) / Tables.STAVE_LINE_DISTANCE + 0.5;\n\n if (mc) {\n if (pos === ModifierPosition.ABOVE) {\n num.textLine = mc.getState().topTextLine;\n state.topTextLine += verticalSpaceNeeded;\n } else if (pos === ModifierPosition.BELOW) {\n num.textLine = mc.getState().textLine;\n state.textLine += verticalSpaceNeeded;\n }\n }\n\n if (note !== prevNote) {\n for (let n = 0; n < note.keys.length; ++n) {\n if (pos === Modifier.Position.LEFT) {\n extraXSpaceForDisplacedNotehead = Math.max(note.getLeftDisplacedHeadPx(), extraXSpaceForDisplacedNotehead);\n }\n if (rightShift === 0) {\n shiftRight = Math.max(note.getRightDisplacedHeadPx(), shiftRight);\n }\n }\n prevNote = note;\n }\n\n const glyphLine = modLines === 0 ? props.line : modLines;\n\n numsList.push({\n pos,\n note,\n num,\n line: glyphLine,\n shiftL: extraXSpaceForDisplacedNotehead,\n shiftR: shiftRight,\n });\n }\n\n // Sort string numbers by line number.\n numsList.sort((a, b) => b.line - a.line);\n\n let numShiftR = 0;\n let xWidthL = 0;\n let xWidthR = 0;\n let lastLine = null;\n let lastNote = null;\n for (let i = 0; i < numsList.length; ++i) {\n const note = numsList[i].note;\n const pos = numsList[i].pos;\n const num = numsList[i].num;\n const line = numsList[i].line;\n const shiftR = numsList[i].shiftR;\n // Reset the position of the string number every line.\n if (line !== lastLine || note !== lastNote) {\n numShiftR = rightShift + shiftR;\n }\n\n const numWidth = num.getWidth() + numSpacing;\n let numXShift = 0;\n if (pos === Modifier.Position.LEFT) {\n num.setXShift(leftShift + extraXSpaceForDisplacedNotehead);\n numXShift = numWidth; // spacing\n xWidthL = Math.max(numXShift, xWidthL);\n } else if (pos === Modifier.Position.RIGHT) {\n num.setXShift(numShiftR);\n numXShift += numWidth; // spacing\n xWidthR = numXShift > xWidthR ? numXShift : xWidthR;\n }\n lastLine = line;\n lastNote = note;\n }\n\n state.leftShift += xWidthL;\n state.rightShift += xWidthR;\n return true;\n }\n\n protected radius: number;\n protected drawCircle: boolean;\n protected lastNote?: Note;\n protected stringNumber: string;\n protected xOffset: number;\n protected yOffset: number;\n protected override textLine: number;\n protected stemOffset: number;\n protected dashed: boolean;\n protected leg: number;\n\n constructor(number: string) {\n super();\n\n this.stringNumber = number;\n this.position = Modifier.Position.ABOVE; // Default position above stem or note head\n this.xShift = 0;\n this.yShift = 0;\n this.textLine = 0;\n this.stemOffset = 0;\n this.xOffset = 0; // Horizontal offset from default\n this.yOffset = 0; // Vertical offset from default\n this.dashed = true; // true - draw dashed extension false - no extension\n this.leg = Renderer.LineEndType.NONE; // draw upward/downward leg at the of extension line\n this.radius = 8;\n this.drawCircle = true;\n this.setWidth(this.radius * 2 + 4);\n }\n\n setLineEndType(leg: number): this {\n if (leg >= Renderer.LineEndType.NONE && leg <= Renderer.LineEndType.DOWN) {\n this.leg = leg;\n }\n return this;\n }\n\n setStringNumber(number: string): this {\n this.stringNumber = number;\n return this;\n }\n\n setOffsetX(x: number): this {\n this.xOffset = x;\n return this;\n }\n\n setOffsetY(y: number): this {\n this.yOffset = y;\n return this;\n }\n\n setLastNote(note: Note): this {\n this.lastNote = note;\n return this;\n }\n\n setDashed(dashed: boolean): this {\n this.dashed = dashed;\n return this;\n }\n\n setDrawCircle(drawCircle: boolean): this {\n this.drawCircle = drawCircle;\n return this;\n }\n\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n const start = note.getModifierStartXY(this.position, this.index);\n const stemDirection = note.hasStem() ? note.getStemDirection() : Stem.UP;\n let dotX = start.x + this.xShift + this.xOffset;\n let stemExt: Record<string, number> = {};\n if (note.hasStem()) {\n stemExt = (note as StemmableNote).checkStem().getExtents();\n }\n\n let dotY = start.y + this.yShift + this.yOffset;\n\n switch (this.position) {\n case Modifier.Position.ABOVE:\n {\n const ys = note.getYs();\n dotY = ys.reduce((a, b) => (a < b ? a : b));\n if (note.hasStem() && stemDirection === Stem.UP) {\n dotY = stemExt.topY + Metrics.get('StringNumber.stemPadding');\n }\n dotY -=\n this.radius + Metrics.get('StringNumber.verticalPadding') + this.textLine * Tables.STAVE_LINE_DISTANCE;\n }\n break;\n case Modifier.Position.BELOW:\n {\n const ys: number[] = note.getYs();\n dotY = ys.reduce((a, b) => (a > b ? a : b));\n if (note.hasStem() && stemDirection === Stem.DOWN) {\n dotY = stemExt.topY - Metrics.get('StringNumber.stemPadding');\n }\n dotY +=\n this.radius + Metrics.get('StringNumber.verticalPadding') + this.textLine * Tables.STAVE_LINE_DISTANCE;\n }\n break;\n case Modifier.Position.LEFT:\n dotX -= this.radius / 2 + Metrics.get('StringNumber.leftPadding');\n break;\n case Modifier.Position.RIGHT:\n dotX += this.radius / 2 + Metrics.get('StringNumber.rightPadding');\n break;\n default:\n throw new RuntimeError('InvalidPosition', `The position ${this.position} is invalid`);\n }\n\n if (this.drawCircle) {\n ctx.beginPath();\n ctx.arc(dotX, dotY, this.radius, 0, Math.PI * 2, false);\n ctx.setLineWidth(1.5);\n ctx.stroke();\n }\n ctx.setFont(this.fontInfo);\n const x = dotX - ctx.measureText(this.stringNumber).width / 2;\n ctx.fillText('' + this.stringNumber, x, dotY + 4.5);\n\n const lastNote = this.lastNote;\n if (isStemmableNote(lastNote)) {\n // Only StemmableNote objects have getStemX().\n const end = lastNote.getStemX() - note.getX() + 5;\n ctx.setStrokeStyle('#000000');\n ctx.setLineCap('round');\n ctx.setLineWidth(0.6);\n if (this.dashed) {\n Renderer.drawDashedLine(ctx, dotX + 10, dotY, dotX + end, dotY, [3, 3]);\n } else {\n Renderer.drawDashedLine(ctx, dotX + 10, dotY, dotX + end, dotY, [3, 0]);\n }\n\n let len;\n let pattern;\n switch (this.leg) {\n case Renderer.LineEndType.UP:\n len = -10;\n pattern = this.dashed ? [3, 3] : [3, 0];\n Renderer.drawDashedLine(ctx, dotX + end, dotY, dotX + end, dotY + len, pattern);\n break;\n case Renderer.LineEndType.DOWN:\n len = 10;\n pattern = this.dashed ? [3, 3] : [3, 0];\n Renderer.drawDashedLine(ctx, dotX + end, dotY, dotX + end, dotY + len, pattern);\n break;\n default:\n break;\n }\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Larry Kuhns\n//\n// This file implements the `Stroke` class which renders chord strokes\n// that can be arpeggiated, brushed, rasgueado, etc.\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { ModifierContextState } from './modifiercontext';\nimport { Note } from './note';\nimport { Category, isNote, isStaveNote, isTabNote } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport class Stroke extends Modifier {\n static override get CATEGORY(): string {\n return Category.Stroke;\n }\n\n static readonly Type = {\n BRUSH_DOWN: 1,\n BRUSH_UP: 2,\n ROLL_DOWN: 3, // Arpeggiated chord\n ROLL_UP: 4, // Arpeggiated chord\n RASGUEADO_DOWN: 5,\n RASGUEADO_UP: 6,\n ARPEGGIO_DIRECTIONLESS: 7, // Arpeggiated chord without upwards or downwards arrow\n };\n\n // Arrange strokes inside `ModifierContext`\n static format(strokes: Stroke[], state: ModifierContextState): boolean {\n const leftShift = state.leftShift;\n const strokeSpacing = 5;\n\n if (!strokes || strokes.length === 0) return false;\n\n const strokeList = strokes.map((stroke) => {\n const note = stroke.getNote();\n const index = stroke.checkIndex();\n if (isStaveNote(note)) {\n // Only StaveNote objects have getKeyProps().\n const { line } = note.getKeyProps()[index];\n const shift = note.getLeftDisplacedHeadPx();\n return { line, shift, stroke };\n } else if (isTabNote(note)) {\n // Only TabNote objects have getPositions().\n const { str: string } = note.getPositions()[index];\n return { line: string, shift: 0, stroke };\n } else {\n throw new RuntimeError('Internal', 'Unexpected instance.');\n }\n });\n\n const strokeShift = leftShift;\n\n // There can only be one stroke .. if more than one, they overlay each other\n const xShift = strokeList.reduce((xShift, { stroke, shift }) => {\n stroke.setXShift(strokeShift + shift);\n return Math.max(stroke.getWidth() + strokeSpacing, xShift);\n }, 0);\n\n state.leftShift += xShift;\n\n return true;\n }\n\n protected options: { allVoices: boolean };\n protected allVoices: boolean;\n protected type: number;\n protected noteEnd?: Note;\n public renderOptions: {\n fontScale: number;\n };\n protected boundingBox = new BoundingBox(0, 0, 0, 0);\n\n constructor(type: number, options?: { allVoices: boolean }) {\n super();\n\n this.options = { allVoices: true, ...options };\n\n // multi voice - span stroke across all voices if true\n this.allVoices = this.options.allVoices;\n\n // multi voice - end note of stroke, set in draw()\n this.type = type;\n this.position = Modifier.Position.LEFT;\n\n this.renderOptions = {\n fontScale: Metrics.get('Stroke.fontSize'),\n };\n\n this.setXShift(0);\n this.setWidth(10);\n }\n\n override getPosition(): number {\n return this.position;\n }\n\n addEndNote(note: Note): this {\n this.noteEnd = note;\n return this;\n }\n\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const start = note.getModifierStartXY(this.position, this.index);\n let yPositions = note.getYs();\n let topY = start.y;\n let botY = start.y;\n const x = start.x - 5;\n const lineSpace = note.checkStave().getSpacingBetweenLines();\n\n const notes = this.checkModifierContext().getMembers(note.getCategory());\n for (let i = 0; i < notes.length; i++) {\n const note = notes[i];\n if (isNote(note)) {\n // Only Note objects have getYs().\n // note is an instance of either StaveNote or TabNote.\n yPositions = note.getYs();\n for (let n = 0; n < yPositions.length; n++) {\n if (this.note === notes[i] || this.allVoices) {\n topY = Math.min(topY, yPositions[n]);\n botY = Math.max(botY, yPositions[n]);\n }\n }\n }\n }\n\n let arrow = '';\n let arrowY = 0;\n let textY = 0;\n\n switch (this.type) {\n case Stroke.Type.BRUSH_DOWN:\n case Stroke.Type.ROLL_DOWN:\n case Stroke.Type.RASGUEADO_DOWN:\n arrow = Glyphs.arrowheadBlackUp;\n arrowY = topY;\n topY -= lineSpace / 2;\n botY += lineSpace / 2;\n break;\n case Stroke.Type.BRUSH_UP:\n case Stroke.Type.ROLL_UP:\n case Stroke.Type.RASGUEADO_UP:\n arrow = Glyphs.arrowheadBlackDown;\n arrowY = botY + lineSpace;\n topY -= lineSpace / 2;\n break;\n case Stroke.Type.ARPEGGIO_DIRECTIONLESS:\n topY -= lineSpace / 2;\n botY += lineSpace / 2;\n break;\n default:\n throw new RuntimeError('InvalidType', `The stroke type ${this.type} does not exist`);\n }\n\n // Draw the stroke\n if (this.type === Stroke.Type.BRUSH_DOWN || this.type === Stroke.Type.BRUSH_UP) {\n ctx.fillRect(x + this.xShift, topY, 1, botY - topY);\n this.boundingBox = new BoundingBox(x + this.xShift, topY, 1, botY - topY);\n } else {\n // Select the wiggle glyph depending on the arrow direction\n const lineGlyph = arrow === Glyphs.arrowheadBlackDown ? Glyphs.wiggleArpeggiatoDown : Glyphs.wiggleArpeggiatoUp;\n let txt = '';\n const el = new Element();\n // add glyphs until the required length is achieved\n while (el.getWidth() < botY - topY) {\n txt += lineGlyph;\n el.setText(txt);\n }\n if (\n this.type === Stroke.Type.RASGUEADO_DOWN ||\n this.type === Stroke.Type.ROLL_DOWN ||\n this.type === Stroke.Type.ARPEGGIO_DIRECTIONLESS\n ) {\n ctx.openRotation(90, x + this.xShift, topY);\n el.renderText(ctx, x + this.xShift, topY - el.getTextMetrics().actualBoundingBoxDescent + el.getHeight() / 2);\n ctx.closeRotation();\n textY = topY + el.getWidth() + 5;\n this.boundingBox = new BoundingBox(\n x + this.xShift - el.getHeight() / 2,\n topY - el.getTextMetrics().actualBoundingBoxDescent + el.getHeight() / 2,\n el.getHeight(),\n el.getWidth()\n );\n } else {\n ctx.openRotation(-90, x + this.xShift, botY);\n el.renderText(ctx, x + this.xShift, botY - el.getTextMetrics().actualBoundingBoxDescent + el.getHeight() / 2);\n ctx.closeRotation();\n textY = botY - el.getWidth() - 5;\n this.boundingBox = new BoundingBox(\n x + this.xShift - el.getHeight() / 2,\n botY - el.getTextMetrics().actualBoundingBoxDescent + el.getHeight() / 2 - el.getWidth(),\n el.getHeight(),\n el.getWidth()\n );\n }\n }\n\n // Draw the arrow head\n if (arrowY !== 0) {\n const el = new Element();\n el.setText(arrow);\n el.renderText(\n ctx,\n // Center the arrow head substracting its width / 2\n x + this.xShift - el.getWidth() / 2,\n arrowY\n );\n this.boundingBox.mergeWith(\n new BoundingBox(x + this.xShift - el.getWidth() / 2, arrowY - el.getHeight(), el.getWidth(), el.getHeight())\n );\n }\n\n // Draw the rasgueado \"R\"\n if (this.type === Stroke.Type.RASGUEADO_DOWN || this.type === Stroke.Type.RASGUEADO_UP) {\n const el = new Element('Stroke.text');\n el.setText('R');\n el.renderText(\n ctx,\n x + this.xShift - el.getWidth() / 2,\n textY + (this.type === Stroke.Type.RASGUEADO_DOWN ? el.getHeight() : 0)\n );\n this.boundingBox.mergeWith(\n new BoundingBox(\n x + this.xShift - el.getWidth() / 2,\n textY + (this.type === Stroke.Type.RASGUEADO_DOWN ? el.getHeight() : 0) - el.getHeight(),\n el.getWidth(),\n el.getHeight()\n )\n );\n }\n }\n\n /** Get the boundingBox. */\n override getBoundingBox(): BoundingBox {\n return this.boundingBox;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Bend } from './bend';\nimport { Modifier } from './modifier';\nimport { ModifierContext, ModifierContextState } from './modifiercontext';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface VibratoRenderOptions {\n code: number;\n width: number;\n}\n\n/** `Vibrato` implements diverse vibratos. */\nexport class Vibrato extends Modifier {\n static override get CATEGORY(): string {\n return Category.Vibrato;\n }\n\n protected renderOptions: VibratoRenderOptions;\n\n /** Arrange vibratos inside a `ModifierContext`. */\n static format(vibratos: Vibrato[], state: ModifierContextState, context: ModifierContext): boolean {\n if (!vibratos || vibratos.length === 0) return false;\n\n // Vibratos are always on top.\n let textLine = state.topTextLine;\n let width = 0;\n let shift = state.rightShift - 7;\n\n // If there's a bend, drop the text line\n const bends = context.getMembers(Bend.CATEGORY) as Bend[];\n if (bends && bends.length > 0) {\n const bendHeight =\n bends.map((bb) => bb.getTextHeight()).reduce((a, b) => (a > b ? a : b)) / Tables.STAVE_LINE_DISTANCE;\n textLine = textLine - (bendHeight + 1);\n } else {\n state.topTextLine += 1;\n }\n\n // Format Vibratos\n for (let i = 0; i < vibratos.length; ++i) {\n const vibrato = vibratos[i];\n vibrato.setXShift(shift);\n vibrato.setTextLine(textLine);\n width += vibrato.getWidth();\n shift += width;\n }\n\n state.rightShift += width;\n return true;\n }\n\n constructor() {\n super();\n\n this.position = Modifier.Position.RIGHT;\n this.renderOptions = {\n code: 0xeab0,\n width: 20,\n };\n\n this.setVibratoWidth(this.renderOptions.width);\n }\n\n /** Set vibrato width in pixels. */\n setVibratoWidth(width: number): this {\n this.renderOptions.width = width;\n this.text = String.fromCodePoint(this.renderOptions.code);\n const myWidth = this.getWidth();\n if (!myWidth) {\n throw new RuntimeError('Cannot set vibrato width if width is 0');\n }\n\n const items = Math.round(this.renderOptions.width / myWidth);\n for (let i = 1; i < items; i++) {\n this.text += String.fromCodePoint(this.renderOptions.code);\n }\n\n return this;\n }\n\n /** Set vibrato code. */\n setVibratoCode(code: number): this {\n this.renderOptions.code = code;\n return this.setVibratoWidth(this.renderOptions.width);\n }\n\n /** Draw the vibrato on the rendering context. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const start = note.getModifierStartXY(Modifier.Position.RIGHT, this.index);\n\n const vx = start.x;\n const vy = note.getYForTopText(this.textLine) + 5;\n\n this.renderText(ctx, vx, vy);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n//\n// This class implements various types of members to notes (e.g. bends,\n// fingering positions etc.). The ModifierContext works with tickables\n// that are at the same tick to ensure that they and their modifiers\n// all have proper alignment. (Note that the ModifierContext also\n// runs the spacing of the tickable).\n//\n// see https://github.com/0xfe/vexflow/wiki/How-Formatting-Works\n\nimport { Accidental } from './accidental';\nimport { Annotation } from './annotation';\nimport { Articulation } from './articulation';\nimport { Bend } from './bend';\nimport { ChordSymbol } from './chordsymbol';\nimport { Dot } from './dot';\nimport { FretHandFinger } from './frethandfinger';\nimport { GraceNoteGroup } from './gracenotegroup';\nimport { Modifier } from './modifier';\nimport { Note } from './note';\nimport { NoteSubGroup } from './notesubgroup';\nimport { Ornament } from './ornament';\nimport { Parenthesis } from './parenthesis';\nimport { StaveNote } from './stavenote';\nimport { StringNumber } from './stringnumber';\nimport { Stroke } from './strokes';\nimport { TabNote } from './tabnote';\nimport { Tickable } from './tickable';\nimport { Category } from './typeguard';\nimport { log, RuntimeError } from './util';\nimport { Vibrato } from './vibrato';\n\nexport interface ModifierContextState {\n leftShift: number;\n rightShift: number;\n textLine: number;\n topTextLine: number;\n}\n\nexport interface ModifierContextMetrics {\n width: number;\n spacing: number;\n}\n\nexport type ModifierContextMember = Tickable | Modifier | StaveNote | TabNote;\n\n// To enable logging for this class. Set `VexFlow.ModifierContext.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (ModifierContext.DEBUG) log('VexFlow.ModifierContext', args);\n}\n\nexport class ModifierContext {\n static DEBUG: boolean = false;\n\n // Formatting data.\n protected state: ModifierContextState = {\n leftShift: 0,\n rightShift: 0,\n textLine: 0,\n topTextLine: 0,\n };\n\n // Current members -- a mapping of Category (string) to a list of Tickables, Modifiers,\n // StaveNotes, TabNotes, etc.\n protected members: Record<string, ModifierContextMember[]> = {};\n\n protected preFormatted: boolean = false;\n protected postFormatted: boolean = false;\n protected formatted: boolean = false;\n\n protected width: number = 0;\n protected spacing: number = 0;\n\n addModifier(member: ModifierContextMember): this {\n L('addModifier is deprecated, use addMember instead.');\n return this.addMember(member);\n }\n\n /**\n * this.members maps CATEGORY strings to arrays of Tickable | Modifier | StaveNote | TabNote.\n * Here we add a new member to this.members, and create a new array if needed.\n * @param member\n * @returns this\n */\n addMember(member: ModifierContextMember): this {\n const category = member.getCategory();\n if (!this.members[category]) {\n this.members[category] = [];\n }\n this.members[category].push(member);\n member.setModifierContext(this);\n this.preFormatted = false;\n return this;\n }\n\n /**\n * @deprecated\n */\n getModifiers(category: string): ModifierContextMember[] {\n L('getModifiers is deprecated, use getMembers instead.');\n return this.getMembers(category);\n }\n\n getMembers(category: string): ModifierContextMember[] {\n return this.members[category] ?? [];\n }\n\n /**\n * Get the width of the entire\n */\n getWidth(): number {\n return this.width;\n }\n\n getLeftShift(): number {\n return this.state.leftShift;\n }\n\n getRightShift(): number {\n return this.state.rightShift;\n }\n\n getState(): ModifierContextState {\n return this.state;\n }\n\n getMetrics(): ModifierContextMetrics {\n if (!this.formatted) {\n throw new RuntimeError('UnformattedMember', 'Unformatted member has no metrics.');\n }\n\n return {\n width: this.state.leftShift + this.state.rightShift + this.spacing,\n spacing: this.spacing,\n };\n }\n\n preFormat(): void {\n if (this.preFormatted) return;\n L('Preformatting ModifierContext');\n\n const state = this.state;\n const members = this.members;\n\n // The ordering below determines when different members are formatted and rendered.\n StaveNote.format(members[Category.StaveNote] as StaveNote[], state);\n Parenthesis.format(members[Category.Parenthesis] as Parenthesis[], state);\n Dot.format(members[Category.Dot] as Dot[], state);\n FretHandFinger.format(members[Category.FretHandFinger] as FretHandFinger[], state);\n Accidental.format(members[Category.Accidental] as Accidental[], state);\n Stroke.format(members[Category.Stroke] as Stroke[], state);\n GraceNoteGroup.format(members[Category.GraceNoteGroup] as GraceNoteGroup[], state);\n NoteSubGroup.format(members[Category.NoteSubGroup] as NoteSubGroup[], state);\n StringNumber.format(members[Category.StringNumber] as StringNumber[], state);\n Articulation.format(members[Category.Articulation] as Articulation[], state);\n Ornament.format(members[Category.Ornament] as Ornament[], state);\n Annotation.format(members[Category.Annotation] as Annotation[], state);\n ChordSymbol.format(members[Category.ChordSymbol] as ChordSymbol[], state);\n Bend.format(members[Category.Bend] as Bend[], state);\n Vibrato.format(members[Category.Vibrato] as Vibrato[], state, this);\n\n // Update width of this member context\n this.width = state.leftShift + state.rightShift;\n this.preFormatted = true;\n }\n\n postFormat(): void {\n if (this.postFormatted) return;\n L('Postformatting ModifierContext');\n\n // If post-formatting is required for an element, add more lines below.\n StaveNote.postFormat(this.getMembers(Category.StaveNote) as Note[]);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n// Co-author: Benjamin W. Bohl\n\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Stave } from './stave';\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { Category } from './typeguard';\nimport { log } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Clef.DEBUG) log('VexFlow.Clef', args);\n}\n\n/**\n * Clef implements various types of clefs that can be rendered on a stave.\n *\n * See `tests/clef_tests.ts` for usage examples.\n */\nexport class Clef extends StaveModifier {\n /** To enable logging for this class, set `VexFlow.Clef.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.Clef;\n }\n\n /**\n * The attribute `clef` must be a key from\n * `Clef.types`\n */\n code = Clef.types['treble'].code;\n line = Clef.types['treble'].line;\n\n protected size = 'default';\n protected type = 'treble';\n\n /**\n * Every clef name is associated with a glyph code from the font file\n * and a default stave line number.\n */\n static get types(): Record<string, { code: string; line: number }> {\n const { gClef, fClef, cClef, unpitchedPercussionClef1, sixStringTabClef } = Glyphs;\n\n return {\n treble: {\n code: gClef,\n line: 3,\n },\n bass: {\n code: fClef,\n line: 1,\n },\n alto: {\n code: cClef,\n line: 2,\n },\n tenor: {\n code: cClef,\n line: 1,\n },\n percussion: {\n code: unpitchedPercussionClef1,\n line: 2,\n },\n soprano: {\n code: cClef,\n line: 4,\n },\n 'mezzo-soprano': {\n code: cClef,\n line: 3,\n },\n 'baritone-c': {\n code: cClef,\n line: 0,\n },\n 'baritone-f': {\n code: fClef,\n line: 2,\n },\n subbass: {\n code: fClef,\n line: 0,\n },\n french: {\n code: gClef,\n line: 4,\n },\n tab: {\n code: sixStringTabClef,\n line: 2.5,\n },\n };\n }\n\n /** Create a new clef. */\n constructor(type: string, size?: string, annotation?: string) {\n super();\n\n this.setPosition(StaveModifierPosition.BEGIN);\n this.setType(type, size, annotation);\n L('Creating clef:', type);\n }\n\n /** Set clef type, size and annotation. */\n setType(type: string, size: string = 'default', annotation?: string): this {\n this.type = type;\n this.code = Clef.types[type].code;\n this.line = Clef.types[type].line;\n this.size = size ?? 'default';\n\n // If an annotation, such as 8va, is specified, add it to the Clef object.\n if (annotation === '8va') {\n if (this.code === Glyphs.gClef) {\n this.code = Glyphs.gClef8va;\n }\n if (this.code === Glyphs.fClef) {\n this.code = Glyphs.fClef8va;\n }\n }\n if (annotation === '8vb') {\n if (this.code === Glyphs.gClef) {\n this.code = Glyphs.gClef8vb;\n }\n if (this.code === Glyphs.fClef) {\n this.code = Glyphs.fClef8vb;\n }\n }\n this.text = this.code;\n this.fontInfo.size = Math.floor(Clef.getPoint(this.size));\n\n return this;\n }\n\n /** Get point for clefs. */\n static getPoint(size?: string): number {\n // for sizes other than 'default', clef is 2/3 of the default value\n return size === 'default' ? Metrics.get('fontSize') : (Metrics.get('fontSize') * 2) / 3;\n }\n\n /** Set associated stave. */\n override setStave(stave: Stave): this {\n this.stave = stave;\n return this;\n }\n\n /** Render clef. */\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n this.setRendered();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('clef' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n this.y = stave.getYForLine(this.line);\n this.renderText(ctx, 0, 0);\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Cyril Silverman\n//\n// ## Description\n//\n// This file implements key signatures. A key signature sits on a stave\n// and indicates the notes with implicit accidentals.\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { Stave } from './stave';\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { defined } from './util';\n\nexport class KeySignature extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.KeySignature;\n }\n\n protected paddingForced: boolean;\n protected formatted?: boolean;\n protected cancelKeySpec?: string;\n protected accList: { type: string; line: number }[] = [];\n protected keySpec?: string;\n protected alterKeySpec?: string[];\n\n // Create a new Key Signature based on a `keySpec`\n constructor(keySpec: string, cancelKeySpec?: string, alterKeySpec?: string[]) {\n super();\n\n this.setKeySig(keySpec, cancelKeySpec, alterKeySpec);\n this.setPosition(StaveModifierPosition.BEGIN);\n this.children = [];\n this.paddingForced = false;\n }\n\n // Add an accidental glyph to the `KeySignature` instance which represents\n // the provided `acc`. If `nextAcc` is also provided, the appropriate\n // spacing will be included in the glyph's position\n protected convertToGlyph(\n acc: { type: string; line: number },\n nextAcc: { type: string; line: number },\n stave: Stave\n ): void {\n const code = Tables.accidentalCodes(acc.type);\n const glyph = new Element(Category.KeySignature);\n glyph.setText(code);\n\n // Determine spacing between current accidental and the next accidental\n let extraWidth = 1;\n // Place the glyph on the stave\n glyph.setYShift(stave.getYForLine(acc.line));\n if (this.children.length > 0) {\n const prevGlyph = this.children[this.children.length - 1];\n const isNatural = (el: Element) => el.getText() === Glyphs.accidentalNatural;\n const yShiftDiff = (el1: Element, el2: Element) => Math.abs(el2.getYShift() - el1.getYShift());\n\n if ((isNatural(prevGlyph) || isNatural(glyph)) && yShiftDiff(prevGlyph, glyph) < 10) {\n extraWidth = 2;\n }\n glyph.setXShift(prevGlyph.getXShift() + prevGlyph.getWidth() + extraWidth);\n }\n this.children.push(glyph);\n\n // Expand size of key signature\n this.width += glyph.getWidth() + extraWidth;\n }\n\n // Cancel out a key signature provided in the `spec` parameter. This will\n // place appropriate natural accidentals before the key signature.\n cancelKey(spec: string): this {\n this.formatted = false;\n this.cancelKeySpec = spec;\n\n return this;\n }\n\n // Convert the `cancelKeySpec` into a list of naturals to be displayed\n protected convertToCancelAccList(\n spec: string\n ): { type: string; accList: { type: string; line: number }[] } | undefined {\n // Get the accidental list for the cancelled key signature\n const cancelAccList = Tables.keySignature(spec);\n\n // If the cancelled key has a different accidental type, ie: # vs b\n const differentTypes =\n this.accList.length > 0 && cancelAccList.length > 0 && cancelAccList[0].type !== this.accList[0].type;\n\n // Determine how many naturals needed to add\n const naturals = differentTypes ? cancelAccList.length : cancelAccList.length - this.accList.length;\n\n // Return if no naturals needed\n if (naturals < 1) return undefined;\n\n // Get the line position for each natural\n const cancelled: { type: string; line: number }[] = [];\n for (let i = 0; i < naturals; i++) {\n let index = i;\n if (!differentTypes) {\n index = cancelAccList.length - naturals + i;\n }\n\n const acc = cancelAccList[index];\n cancelled.push({ type: 'n', line: acc.line });\n }\n\n // Combine naturals with main accidental list for the key signature\n this.accList = cancelled.concat(this.accList);\n\n return {\n accList: cancelled,\n type: cancelAccList[0].type,\n };\n }\n\n // Add this key signature to the start of a stave.\n addToStave(stave: Stave): this {\n this.paddingForced = true;\n stave.addModifier(this);\n\n return this;\n }\n\n // Add this key signature to a stave.\n override setStave(stave: Stave): this {\n this.formatted = false;\n return super.setStave(stave);\n }\n\n // Get the `BoundingBox`\n override getBoundingBox(): BoundingBox {\n if (!this.formatted) this.format();\n\n return super.getBoundingBox();\n }\n\n // Calculate the width and height for the entire signature\n protected calculateDimensions(): void {\n let boundingBox: BoundingBox;\n if (this.children.length > 0) {\n boundingBox = this.children[0].getBoundingBox();\n } else {\n boundingBox = new BoundingBox(this.x + this.xShift, this.y + this.yShift, 0, 0);\n }\n this.children.forEach((glyph) => {\n boundingBox.mergeWith(glyph.getBoundingBox());\n });\n this.width = boundingBox.getW();\n this.height = boundingBox.getH();\n this.y = boundingBox.getY();\n }\n\n // Apply the accidental staff line placement based on the `clef` and\n // the accidental `type` for the key signature ('# or 'b').\n protected convertAccLines(clef: string, type?: string, accList = this.accList): void {\n let offset = 0.0; // if clef === \"treble\"\n let customLines; // when clef doesn't follow treble key sig shape\n\n switch (clef) {\n // Treble & Subbass both have offsets of 0, so are not included.\n case 'soprano':\n if (type === '#') customLines = [2.5, 0.5, 2, 0, 1.5, -0.5, 1];\n else offset = -1;\n break;\n case 'mezzo-soprano':\n if (type === 'b') customLines = [0, 2, 0.5, 2.5, 1, 3, 1.5];\n else offset = 1.5;\n break;\n case 'alto':\n offset = 0.5;\n break;\n case 'tenor':\n if (type === '#') customLines = [3, 1, 2.5, 0.5, 2, 0, 1.5];\n else offset = -0.5;\n break;\n case 'baritone-f':\n case 'baritone-c':\n if (type === 'b') customLines = [0.5, 2.5, 1, 3, 1.5, 3.5, 2];\n else offset = 2;\n break;\n case 'bass':\n case 'french':\n offset = 1;\n break;\n default:\n break;\n }\n\n // If there's a special case, assign those lines/spaces:\n let i;\n if (typeof customLines !== 'undefined') {\n for (i = 0; i < accList.length; ++i) {\n accList[i].line = customLines[i];\n }\n } else if (offset !== 0) {\n for (i = 0; i < accList.length; ++i) {\n accList[i].line += offset;\n }\n }\n }\n\n // Get the padding required for this modifier\n override getPadding(index: number): number {\n if (!this.formatted) this.format();\n\n return this.children.length === 0 || (!this.paddingForced && index < 2) ? 0 : this.padding;\n }\n\n // Get the width of the modifier\n override getWidth(): number {\n if (!this.formatted) this.format();\n\n return this.width;\n }\n\n // Set the key signature to a specific key, ie: 'C' or 'Gm'\n setKeySig(keySpec: string, cancelKeySpec?: string, alterKeySpec?: string[]): this {\n this.formatted = false;\n this.keySpec = keySpec;\n this.cancelKeySpec = cancelKeySpec;\n this.alterKeySpec = alterKeySpec;\n\n return this;\n }\n\n // Alter the accidentals of a key spec one by one.\n // Each alteration is a new accidental that replaces the\n // original accidental (or the canceled one).\n alterKey(alterKeySpec: string[]): this {\n this.formatted = false;\n this.alterKeySpec = alterKeySpec;\n\n return this;\n }\n\n // Convert the `alterKeySpec` into a list of accidentals to be displayed\n protected convertToAlterAccList(alterKeySpec: string[]): void {\n const max = Math.min(alterKeySpec.length, this.accList.length);\n for (let i = 0; i < max; ++i) {\n if (alterKeySpec[i]) {\n this.accList[i].type = alterKeySpec[i];\n }\n }\n }\n\n /**\n * Format and position the modifier.\n * If no stave is set, a dummy stave is created.\n */\n format(): void {\n let stave = this.getStave();\n if (!stave) {\n stave = new Stave(0, 0, 100);\n this.setStave(stave);\n }\n\n this.width = 0;\n this.children = [];\n this.accList = Tables.keySignature(defined(this.keySpec));\n const accList = this.accList;\n const firstAccidentalType = accList.length > 0 ? accList[0].type : undefined;\n let cancelAccList;\n if (this.cancelKeySpec) {\n cancelAccList = this.convertToCancelAccList(this.cancelKeySpec);\n }\n if (this.alterKeySpec) {\n this.convertToAlterAccList(this.alterKeySpec);\n }\n\n if (this.accList.length > 0) {\n const clef =\n (this.position === StaveModifierPosition.END ? stave.getEndClef() : stave.getClef()) || stave.getClef();\n if (cancelAccList) {\n this.convertAccLines(clef, cancelAccList.type, cancelAccList.accList);\n }\n this.convertAccLines(clef, firstAccidentalType, accList);\n for (let i = 0; i < this.accList.length; ++i) {\n this.convertToGlyph(this.accList[i], this.accList[i + 1], stave);\n }\n }\n\n this.calculateDimensions();\n this.formatted = true;\n }\n\n // Render the key signature\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n\n if (!this.formatted) this.format();\n this.setRendered();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('keysignature' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n for (let i = 0; i < this.children.length; i++) {\n const glyph = this.children[i];\n glyph.renderText(ctx, this.x, 0);\n }\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Larry Kuhns 2011\n\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Stave } from './stave';\nimport { StaveModifier } from './stavemodifier';\nimport { Category } from './typeguard';\n\nexport class Repetition extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.Repetition;\n }\n\n static readonly type = {\n NONE: 1, // no coda or segno\n CODA_LEFT: 2, // coda at beginning of stave\n CODA_RIGHT: 3, // coda at end of stave\n SEGNO_LEFT: 4, // segno at beginning of stave\n SEGNO_RIGHT: 5, // segno at end of stave\n DC: 6, // D.C. at end of stave\n DC_AL_CODA: 7, // D.C. al coda at end of stave\n DC_AL_FINE: 8, // D.C. al Fine end of stave\n DS: 9, // D.S. at end of stave\n DS_AL_CODA: 10, // D.S. al coda at end of stave\n DS_AL_FINE: 11, // D.S. al Fine at end of stave\n FINE: 12, // Fine at end of stave\n TO_CODA: 13, // To Coda at end of stave\n };\n\n protected symbolType: number;\n\n protected override xShift: number;\n protected override yShift: number;\n\n constructor(type: number, x: number, yShift: number) {\n super();\n\n this.symbolType = type;\n this.x = x;\n this.xShift = 0;\n this.yShift = yShift;\n }\n\n setShiftX(x: number): this {\n this.xShift = x;\n return this;\n }\n\n setShiftY(y: number): this {\n this.yShift = y;\n return this;\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const x = stave.getModifierXShift(this.getPosition());\n this.setRendered();\n\n switch (this.symbolType) {\n case Repetition.type.CODA_RIGHT:\n this.drawCodaFixed(stave, x + stave.getWidth());\n break;\n case Repetition.type.CODA_LEFT:\n this.drawSymbolText(stave, x, 'Coda', true);\n break;\n case Repetition.type.SEGNO_LEFT:\n this.drawSegnoFixed(stave, x);\n break;\n case Repetition.type.SEGNO_RIGHT:\n this.drawSegnoFixed(stave, x + stave.getWidth());\n break;\n case Repetition.type.DC:\n this.drawSymbolText(stave, x, 'D.C.', false);\n break;\n case Repetition.type.DC_AL_CODA:\n this.drawSymbolText(stave, x, 'D.C. al', true);\n break;\n case Repetition.type.DC_AL_FINE:\n this.drawSymbolText(stave, x, 'D.C. al Fine', false);\n break;\n case Repetition.type.DS:\n this.drawSymbolText(stave, x, 'D.S.', false);\n break;\n case Repetition.type.DS_AL_CODA:\n this.drawSymbolText(stave, x, 'D.S. al', true);\n break;\n case Repetition.type.DS_AL_FINE:\n this.drawSymbolText(stave, x, 'D.S. al Fine', false);\n break;\n case Repetition.type.FINE:\n this.drawSymbolText(stave, x, 'Fine', false);\n break;\n case Repetition.type.TO_CODA:\n this.drawSymbolText(stave, x, 'To', true);\n break;\n default:\n break;\n }\n }\n\n drawCodaFixed(stave: Stave, x: number): this {\n const y = stave.getYForTopText(stave.getNumLines());\n this.text = Glyphs.coda;\n this.renderText(stave.checkContext(), x, y + Metrics.get('Repetition.coda.offsetY'));\n return this;\n }\n\n drawSegnoFixed(stave: Stave, x: number): this {\n const y = stave.getYForTopText(stave.getNumLines());\n this.text = Glyphs.segno;\n this.renderText(stave.checkContext(), x, y + Metrics.get('Repetition.segno.offsetY'));\n return this;\n }\n\n drawSymbolText(stave: Stave, x: number, text: string, drawCoda: boolean): this {\n const ctx = stave.checkContext();\n let textX = 0;\n\n this.text = text;\n if (drawCoda) {\n this.text += ' \\ue048' /*coda*/;\n }\n this.setFont(Metrics.getFontInfo('Repetition.text'));\n switch (this.symbolType) {\n // To the left\n case Repetition.type.CODA_LEFT:\n // Offset Coda text to right of stave beginning\n textX = stave.getVerticalBarWidth();\n break;\n // To the right\n case Repetition.type.DC:\n case Repetition.type.DC_AL_FINE:\n case Repetition.type.DS:\n case Repetition.type.DS_AL_FINE:\n case Repetition.type.FINE:\n default:\n textX =\n x - (stave.getNoteStartX() - this.x) + stave.getWidth() - this.width - Metrics.get('Repetition.text.offsetX');\n }\n\n const y = stave.getYForTopText(stave.getNumLines()) + Metrics.get('Repetition.text.offsetY');\n\n this.renderText(ctx, textX, y);\n\n return this;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Larry Kuhns 2011\n\nimport { Metrics } from './metrics';\nimport { StaveModifier } from './stavemodifier';\nimport { Category } from './typeguard';\n\nexport class StaveSection extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.StaveSection;\n }\n\n protected drawRect: boolean;\n\n constructor(section: string, x: number = 0, yShift: number = 0, drawRect = true) {\n super();\n\n this.setText(section);\n this.x = x;\n this.yShift = yShift;\n this.drawRect = drawRect;\n this.padding = Metrics.get('StaveSection.padding');\n }\n\n setDrawRect(drawRect: boolean): this {\n this.drawRect = drawRect;\n return this;\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n this.setRendered();\n\n this.x = stave.getX() + stave.getModifierXShift(this.getPosition());\n const headroom = -1 * this.textMetrics.actualBoundingBoxDescent;\n const width = this.width + 2 * this.padding; // add left & right padding\n const height = this.height + 2 * this.padding; // add top & bottom padding\n\n // Seems to be a good default y\n const y = stave.getYForTopText(1.5) + this.yShift;\n const x = this.x + this.xShift;\n if (this.drawRect) {\n ctx.beginPath();\n ctx.rect(x, y - height + headroom, width, height);\n ctx.stroke();\n }\n this.renderText(ctx, this.xShift + this.padding, y - this.padding);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Radosaw Eichler 2012\n\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { Category } from './typeguard';\n\nexport interface StaveTempoOptions {\n /** free text i.e.: 'Adagio', 'Andate grazioso', ... */\n name?: string;\n /**\n * Indicates whether or not to put the metronome mark in parentheses.\n * It is no if not specified.\n * */\n parenthesis?: boolean;\n /**\n * Indicates the graphical note type to use in a metronome mark.\n * see: `StaveTempo.durationToCode`.\n */\n duration?: string;\n /**\n * Specifies the number of augmentation dots for a metronome mark note.\n */\n dots?: number;\n /**\n * Specifies the beats per minute associated with the metronome mark.\n * i.e.: 120, \"c. 108\", \"132-144\"\n */\n bpm?: number | string;\n /**\n * Indicates the graphical note type to use at the right of the equation\n * in a metronome mark.\n * see: `StaveTempo.durationToCode`.\n */\n duration2?: string;\n /**\n * Specifies the number of augmentation dots for a metronome mark note\n * at the right of the equation.\n */\n dots2?: number;\n}\n\nexport class StaveTempo extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.StaveTempo;\n }\n protected tempo: StaveTempoOptions;\n\n constructor(tempo: StaveTempoOptions, x: number, shiftY: number) {\n super();\n\n this.tempo = tempo;\n this.position = StaveModifierPosition.ABOVE;\n this.x = x;\n this.setXShift(10);\n this.setYShift(shiftY);\n }\n\n protected durationToCode: Record<string, string> = {\n '1/4': Glyphs.metNoteDoubleWholeSquare,\n long: Glyphs.metNoteDoubleWholeSquare,\n '1/2': Glyphs.metNoteDoubleWhole,\n breve: Glyphs.metNoteDoubleWhole,\n 1: Glyphs.metNoteWhole,\n whole: Glyphs.metNoteWhole,\n w: Glyphs.metNoteWhole,\n 2: Glyphs.metNoteHalfUp,\n half: Glyphs.metNoteHalfUp,\n h: Glyphs.metNoteHalfUp,\n 4: Glyphs.metNoteQuarterUp,\n quarter: Glyphs.metNoteQuarterUp,\n q: Glyphs.metNoteQuarterUp,\n 8: Glyphs.metNote8thUp,\n eighth: Glyphs.metNote8thUp,\n 16: Glyphs.metNote16thUp,\n '16th': Glyphs.metNote16thUp,\n 32: Glyphs.metNote32ndUp,\n '32nd': Glyphs.metNote32ndUp,\n 64: Glyphs.metNote64thUp,\n '64th': Glyphs.metNote64thUp,\n 128: Glyphs.metNote128thUp,\n '128th': Glyphs.metNote128thUp,\n 256: Glyphs.metNote256thUp,\n '256th': Glyphs.metNote256thUp,\n 512: Glyphs.metNote512thUp,\n '512th': Glyphs.metNote512thUp,\n 1024: Glyphs.metNote1024thUp,\n '1024th': Glyphs.metNote1024thUp,\n };\n\n setTempo(tempo: StaveTempoOptions): this {\n this.tempo = tempo;\n return this;\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const shiftX = stave.getModifierXShift(this.getPosition());\n const ctx = stave.checkContext();\n this.setRendered();\n\n const { name, duration, dots, bpm, duration2, dots2, parenthesis } = this.tempo;\n let x = this.x + shiftX;\n const y = stave.getYForTopText(1);\n const el = new Element('StaveTempo.glyph');\n const elText = new Element('StaveTempo');\n\n if (name) {\n this.text = name;\n this.fontInfo = Metrics.getFontInfo('StaveTempo.name');\n this.renderText(ctx, shiftX, y);\n x += this.getWidth() + 3;\n }\n\n if ((name && duration) || parenthesis) {\n elText.setText('(');\n elText.renderText(ctx, x + this.xShift, y + this.yShift);\n x += elText.getWidth() + 3;\n }\n\n if (duration) {\n el.setText(this.durationToCode[duration]);\n el.renderText(ctx, x + this.xShift, y + this.yShift);\n x += el.getWidth() + 3;\n if (dots) {\n // Draw dot\n el.setText(Glyphs.metAugmentationDot);\n for (let i = 0; i < dots; i++) {\n el.renderText(ctx, x + this.xShift, y + 2 + this.yShift);\n x += el.getWidth() + 3;\n }\n }\n elText.setText('=');\n elText.renderText(ctx, x + this.xShift, y + this.yShift);\n x += elText.getWidth() + 3;\n if (duration2) {\n el.setText(this.durationToCode[duration2]);\n el.renderText(ctx, x + this.xShift, y + this.yShift);\n x += el.getWidth() + 3;\n if (dots2) {\n // Draw dot\n el.setText(Glyphs.metAugmentationDot);\n for (let i = 0; i < dots2; i++) {\n el.renderText(ctx, x + this.xShift, y + 2 + this.yShift);\n x += el.getWidth() + 3;\n }\n }\n } else if (bpm) {\n elText.setText('' + bpm);\n elText.renderText(ctx, x + this.xShift, y + this.yShift);\n x += elText.getWidth() + 3;\n }\n if (name || parenthesis) {\n elText.setText(')');\n elText.renderText(ctx, x + this.xShift, y + this.yShift);\n }\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { Font, FontInfo } from './font';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Note, NoteStruct } from './note';\nimport { Category } from './typeguard';\n\nexport enum TextJustification {\n LEFT = 1,\n CENTER = 2,\n RIGHT = 3,\n}\n\nexport interface TextNoteStruct extends NoteStruct {\n text?: string;\n glyph?: string;\n ignoreTicks?: boolean;\n smooth?: boolean;\n font?: FontInfo;\n subscript?: string;\n superscript?: string;\n}\n\n/**\n * `TextNote` is a notation element that is positioned in time. Generally\n * meant for objects that sit above/below the staff and inline with each other.\n * `TextNote` has to be assigned to a `Stave` before rendering by means of `setStave`.\n * Examples of this would be such as dynamics, lyrics, chord changes, etc.\n */\nexport class TextNote extends Note {\n static override get CATEGORY(): string {\n return Category.TextNote;\n }\n\n static readonly Justification = TextJustification;\n\n /** Glyph data. */\n static get GLYPHS(): Record<string, string> {\n return {\n segno: Glyphs.segno,\n tr: Glyphs.ornamentTrill,\n mordent: Glyphs.ornamentMordent,\n mordentUpper: Glyphs.ornamentShortTrill,\n mordentLower: Glyphs.ornamentMordent,\n f: Glyphs.dynamicForte,\n p: Glyphs.dynamicPiano,\n m: Glyphs.dynamicMezzo,\n s: Glyphs.dynamicSforzando,\n z: Glyphs.dynamicZ,\n coda: Glyphs.coda,\n pedalOpen: Glyphs.keyboardPedalPed,\n pedalClose: Glyphs.keyboardPedalUp,\n caesuraStraight: Glyphs.caesura,\n caesuraCurved: Glyphs.caesuraCurved,\n breath: Glyphs.breathMarkComma,\n tick: Glyphs.breathMarkTick,\n turn: Glyphs.ornamentTurn,\n turnInverted: Glyphs.ornamentTurnSlash,\n };\n }\n\n protected superscript?: Element;\n protected subscript?: Element;\n protected smooth: boolean;\n protected justification: TextJustification;\n protected line: number;\n\n constructor(noteStruct: TextNoteStruct) {\n super(noteStruct);\n\n this.text = noteStruct.text ?? '';\n if (noteStruct.glyph) {\n this.text += TextNote.GLYPHS[noteStruct.glyph] || noteStruct.glyph;\n }\n if (noteStruct.font) {\n this.setFont(noteStruct.font);\n } else if (noteStruct.glyph === undefined) {\n this.setFont(Metrics.getFontInfo('TextNote.text.fontSize'));\n }\n\n // Scale the font size by 1/1.3.\n const smallerFontSize = Font.convertSizeToPointValue(this.fontInfo.size) * 0.769231;\n if (noteStruct.superscript) {\n this.superscript = new Element('TexNote.subSuper');\n this.superscript.setText(noteStruct.superscript);\n this.superscript.setFontSize(smallerFontSize);\n }\n if (noteStruct.subscript) {\n this.subscript = new Element('TexNote.subSuper');\n this.subscript.setText(noteStruct.subscript);\n this.subscript.setFontSize(smallerFontSize);\n }\n\n this.line = noteStruct.line ?? 0;\n this.smooth = noteStruct.smooth || false;\n this.ignoreTicks = noteStruct.ignoreTicks || false;\n this.justification = TextJustification.LEFT;\n }\n\n /** Set the horizontal justification of the TextNote. */\n setJustification(just: TextJustification): this {\n this.justification = just;\n return this;\n }\n\n /** Set the Stave line on which the note should be placed. */\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n /** Return the Stave line on which the TextNote is placed. */\n getLine(): number {\n return this.line;\n }\n\n /** Pre-render formatting. */\n override preFormat(): void {\n if (this.preFormatted) return;\n const tickContext = this.checkTickContext(`Can't preformat without a TickContext.`);\n\n if (this.justification === TextJustification.CENTER) {\n this.leftDisplacedHeadPx = this.width / 2;\n } else if (this.justification === TextJustification.RIGHT) {\n this.leftDisplacedHeadPx = this.width;\n }\n\n // We reposition to the center of the note head\n this.rightDisplacedHeadPx = tickContext.getMetrics().glyphPx / 2;\n this.preFormatted = true;\n }\n\n /**\n * Renders the TextNote.\n * `TextNote` has to be assigned to a `Stave` before rendering by means of `setStave`.\n */\n override draw(): void {\n const ctx = this.checkContext();\n const stave = this.checkStave();\n const tickContext = this.checkTickContext(`Can't draw without a TickContext.`);\n\n this.setRendered();\n\n // Reposition to center of note head\n let x = this.getAbsoluteX() + tickContext.getMetrics().glyphPx / 2;\n\n // Align based on tick-context width.\n const width = this.getWidth();\n\n if (this.justification === TextJustification.CENTER) {\n x -= width / 2;\n } else if (this.justification === TextJustification.RIGHT) {\n x -= width;\n }\n\n const y = stave.getYForLine(this.line + -3);\n this.renderText(ctx, x, y);\n\n const height = this.getHeight();\n\n if (this.superscript) {\n this.superscript.renderText(ctx, x + this.width + 2, y - height / 2.2);\n }\n\n if (this.subscript) {\n this.subscript.renderText(ctx, x + this.width + 2, y + height / 2.2 - 1);\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Taehoon Moon 2014\n\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { TextJustification, TextNote } from './textnote';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport class StaveText extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.StaveText;\n }\n\n protected justification: number;\n\n constructor(\n text: string,\n position: number,\n options: { shiftX?: number; shiftY?: number; justification?: number } = {}\n ) {\n super();\n\n this.setText(text);\n this.setXShift(options.shiftX ?? 0);\n this.setYShift(options.shiftY ?? 0);\n this.position = position;\n this.justification = options.justification ?? TextNote.Justification.CENTER;\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n this.setRendered();\n\n let x;\n let y;\n switch (this.position) {\n case StaveModifierPosition.LEFT:\n case StaveModifierPosition.RIGHT:\n y = (stave.getYForLine(0) + stave.getBottomLineY()) / 2;\n if (this.position === StaveModifierPosition.LEFT) {\n x = stave.getX() - this.width - 24;\n } else {\n x = stave.getX() + stave.getWidth() + 24;\n }\n break;\n case StaveModifierPosition.ABOVE:\n case StaveModifierPosition.BELOW:\n x = stave.getX();\n if (this.justification === TextJustification.CENTER) {\n x += stave.getWidth() / 2 - this.width / 2;\n } else if (this.justification === TextJustification.RIGHT) {\n x += stave.getWidth() - this.width;\n }\n\n if (this.position === StaveModifierPosition.ABOVE) {\n y = stave.getYForTopText(2);\n } else {\n y = stave.getYForBottomText(2);\n }\n break;\n default:\n throw new RuntimeError('InvalidPosition', 'Value Must be in Modifier.Position.');\n }\n\n this.renderText(ctx, x, y + 4);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Larry Kuhns 2011\n\nimport { StaveModifier } from './stavemodifier';\nimport { Category } from './typeguard';\n\nexport enum VoltaType {\n NONE = 1,\n BEGIN = 2,\n MID = 3,\n END = 4,\n BEGIN_END = 5,\n}\n\nexport class Volta extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.Volta;\n }\n\n static get type(): typeof VoltaType {\n return VoltaType;\n }\n\n protected type: number;\n\n constructor(type: number, label: string, x: number, yShift: number) {\n super();\n this.type = type;\n this.x = x;\n this.yShift = yShift;\n this.text = label;\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const x = stave.getModifierXShift(this.getPosition());\n const ctx = stave.checkContext();\n this.setRendered();\n\n let width = stave.getWidth() - x; // don't include x (offset) for width\n const topY = stave.getYForTopText(stave.getNumLines()) + this.yShift;\n const vertHeight = 1.5 * stave.getSpacingBetweenLines();\n switch (this.type) {\n case VoltaType.BEGIN:\n ctx.fillRect(this.x + x, topY, 1, vertHeight);\n break;\n case VoltaType.END:\n width -= 5;\n ctx.fillRect(this.x + x + width, topY, 1, vertHeight);\n break;\n case VoltaType.BEGIN_END:\n width -= 3;\n ctx.fillRect(this.x + x, topY, 1, vertHeight);\n ctx.fillRect(this.x + x + width, topY, 1, vertHeight);\n break;\n default:\n break;\n }\n // If the beginning of a volta, draw measure number\n if (this.type === VoltaType.BEGIN || this.type === VoltaType.BEGIN_END) {\n this.renderText(ctx, x + 5, topY - this.yShift + 15);\n }\n\n ctx.fillRect(this.x + x, topY, width, 1);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n// Implements time signatures glyphs for staffs\n// See tables.js for the internal time signatures\n// representation\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { RenderContext } from './rendercontext';\nimport { Stave } from './stave';\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface TimeSignatureInfo {\n glyph: string;\n line: number;\n num: boolean;\n}\n\nconst assertIsValidTimeSig = (timeSpec: string) => {\n const numbers = timeSpec.split('/');\n\n numbers.forEach((number) => {\n // Characters consisting in number 0..9, '+', '-', '(' or ')'\n if (/^[0-9+\\-()]+$/.test(number) === false) {\n throw new RuntimeError('BadTimeSignature', `Invalid time spec: ${timeSpec}. Must contain valid signatures.`);\n }\n });\n};\n\n/**\n * A TimeSignature is a StaveModifier that can make its appropriate Glyphs directly from\n * a provided \"timeSpec\" such as \"4/4\", \"C|\" (cut time), or even something more advanced\n * such as \"3/4(6/8)\" or \"2/4+5/8\".\n */\nexport class TimeSignature extends StaveModifier {\n static override get CATEGORY(): string {\n return Category.TimeSignature;\n }\n\n bottomLine: number; // bottomLine and topLine are used to calculate the position of the\n topLine: number; // top row of digits in a numeric TimeSignature.\n\n protected topRenderY: number = 0; // topRenderY and botRenderY are used for BoundingBox calcs and drawing and\n protected botRenderY: number = 0; // give the proper Y locations for placing topText and botText.\n\n protected timeSpec: string = '4/4';\n protected line: number = 0;\n protected topText: Element;\n protected botText: Element;\n protected isNumeric: boolean = true;\n protected validateArgs: boolean;\n protected topStartX: number = 0;\n protected botStartX: number = 0;\n protected lineShift: number = 0;\n\n constructor(timeSpec: string = '4/4', customPadding = 15, validateArgs = true) {\n super();\n this.topText = new Element();\n this.botText = new Element();\n this.validateArgs = validateArgs;\n\n const padding = customPadding;\n\n this.topLine = 1;\n this.bottomLine = 3;\n this.setPosition(StaveModifierPosition.BEGIN);\n this.setTimeSig(timeSpec);\n this.setPadding(padding);\n }\n\n static getTimeSigCode(key: string, smallSig = false): string {\n let code: string = Glyphs.null;\n switch (key) {\n case 'C':\n code = Glyphs.timeSigCommon;\n break;\n case 'C|':\n code = Glyphs.timeSigCutCommon;\n break;\n case '+':\n code = smallSig ? Glyphs.timeSigPlusSmall : Glyphs.timeSigPlus;\n break;\n case '-':\n code = Glyphs.timeSigMinus;\n break;\n case '(':\n code = smallSig ? Glyphs.timeSigParensLeftSmall : Glyphs.timeSigParensLeft;\n break;\n case ')':\n code = smallSig ? Glyphs.timeSigParensRightSmall : Glyphs.timeSigParensRight;\n break;\n default:\n code = String.fromCodePoint(0xe080 + Number(key[0])) /* timeSigN = Glyphs.timeSig0 + N */;\n break;\n }\n return code;\n }\n\n /**\n * Returns a new TimeSignatureGlyph (a Glyph subclass that knows how to draw both\n * top and bottom digits along with plus signs etc.)\n */\n makeTimeSignatureGlyph(topDigits: string, botDigits: string): void {\n // note that 'code' is ignored by TimeSignatureGlyph when rendering.\n let txt = '';\n let topWidth = 0;\n let height = 0;\n for (let i = 0; i < topDigits.length; ++i) {\n const code = TimeSignature.getTimeSigCode(topDigits[i], botDigits.length > 0);\n txt += code;\n }\n this.topText.setText(txt);\n topWidth = this.topText.getWidth();\n height = this.topText.getHeight();\n\n let botWidth = 0;\n txt = '';\n for (let i = 0; i < botDigits.length; ++i) {\n const code = TimeSignature.getTimeSigCode(botDigits[i], true);\n txt += code;\n }\n this.botText.setText(txt);\n botWidth = this.botText.getWidth();\n height = Math.max(height, this.botText.getHeight());\n\n // If the height of the digits is more than three staff spaces (30), shift half a line line\n // in order to center the digits on lines 1.5 and 4.5 rather than 2 and 4.\n this.lineShift = height > 30 ? 0.5 : 0;\n\n this.width = Math.max(topWidth, botWidth);\n this.topStartX = (this.width - topWidth) / 2.0;\n this.botStartX = (this.width - botWidth) / 2.0;\n }\n\n /**\n * Set a new time signature specification without changing customPadding, etc.\n *\n * The getter for this is `getTimeSpec` not `getTimeSig`.\n */\n setTimeSig(timeSpec: string): this {\n this.timeSpec = timeSpec;\n if (timeSpec === 'C' || timeSpec === 'C|') {\n const code = TimeSignature.getTimeSigCode(timeSpec);\n this.line = 2;\n this.text = code;\n this.isNumeric = false;\n } else {\n if (this.validateArgs) {\n assertIsValidTimeSig(timeSpec);\n }\n const parts = timeSpec.split('/');\n this.line = 0;\n this.isNumeric = true;\n this.makeTimeSignatureGlyph(parts[0] ?? '', parts[1] ?? '');\n }\n return this;\n }\n\n /**\n * Return the timeSpec (such as '4/4' or 'C|' or even '2/4+3/8') of the TimeSignature\n */\n getTimeSpec(): string {\n return this.timeSpec;\n }\n\n /**\n * Return the staff line that the TimeSignature sits on. Generally 0 for numerator/\n * denominator time signatures such as 3/4 and 2 for cut/common.\n */\n getLine(): number {\n return this.line;\n }\n\n /**\n * Set the line number that the TimeSignature sits on. Half-values are acceptable\n * for spaces, etc. Can be altered, for instance, for signatures that sit above the\n * staff in large orchestral scores.\n */\n setLine(line: number) {\n this.line = line;\n }\n\n /**\n * Return a boolean on whether this TimeSignature is drawn with one or more numbers\n * (such as 4/4) or not (as in cut time).\n */\n getIsNumeric(): boolean {\n return this.isNumeric;\n }\n\n /**\n * Set whether this TimeSignature is drawn with one or more numbers.\n */\n setIsNumeric(isNumeric: boolean) {\n this.isNumeric = isNumeric;\n }\n\n /**\n * Draw the time signature on a Stave using its RenderContext. Both setStave\n * and setContext must already be run.\n */\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n this.setRendered();\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('timesignature' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n this.drawAt(ctx, stave, this.x);\n this.drawPointerRect();\n ctx.closeGroup();\n }\n\n drawAt(ctx: RenderContext, stave: Stave, x: number): void {\n this.setRendered();\n\n if (this.isNumeric) {\n // render top text\n let startX = x + this.topStartX;\n if (this.botText.getText().length > 0) {\n this.topRenderY = stave.getYForLine(this.topLine - this.lineShift);\n } else {\n this.topRenderY = (stave.getYForLine(this.topLine) + stave.getYForLine(this.bottomLine)) / 2;\n }\n this.topText.renderText(ctx, startX, this.topRenderY);\n\n // render bottom text\n startX = x + this.botStartX;\n this.botRenderY = stave.getYForLine(this.bottomLine + this.lineShift);\n this.botText.renderText(ctx, startX, this.botRenderY);\n } else {\n this.renderText(ctx, x - this.x, stave.getYForLine(this.line));\n }\n }\n\n // gets combined bounding box of time sig\n // NOTE: should be called after drawAt initializes top/botRenderY to get proper position\n override getBoundingBox(): BoundingBox {\n if (this.isNumeric) {\n // these always return boxes so no need to handle case where one/both are null/undefined\n const topBoundingBox = this.topText.getBoundingBox();\n const botBoundingBox = this.botText.getBoundingBox();\n\n // move boxes to offset positions to be inline with the rendered text from drawAt.\n topBoundingBox.move(this.x + this.topStartX, this.topRenderY);\n botBoundingBox.move(this.x + this.botStartX, this.botRenderY);\n\n // combine the two boxes\n const mergedBox = topBoundingBox.mergeWith(botBoundingBox);\n return mergedBox;\n } else {\n // use element bounding box call when only simple text (like \"C\" or \"C|\")\n const stave = this.checkStave();\n const textBoundingBox = super.getBoundingBox();\n textBoundingBox.move(0, stave.getYForLine(this.line));\n return textBoundingBox;\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { BoundingBox, Bounds } from './boundingbox';\nimport { Clef } from './clef';\nimport { Element, ElementStyle } from './element';\nimport { KeySignature } from './keysignature';\nimport { Metrics } from './metrics';\nimport { Barline, BarlineType, RepeatBracketType } from './stavebarline';\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { Repetition } from './staverepetition';\nimport { StaveSection } from './stavesection';\nimport { StaveTempo, StaveTempoOptions } from './stavetempo';\nimport { StaveText } from './stavetext';\nimport { Volta } from './stavevolta';\nimport { Tables } from './tables';\nimport { TimeSignature } from './timesignature';\nimport { Category, isBarline } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface StaveLineConfig {\n visible?: boolean;\n}\n\nexport interface StaveOptions {\n bottomTextPosition?: number;\n lineConfig?: StaveLineConfig[];\n spaceBelowStaffLn?: number;\n spaceAboveStaffLn?: number;\n verticalBarWidth?: number;\n leftBar?: boolean;\n rightBar?: boolean;\n spacingBetweenLinesPx?: number;\n topTextPosition?: number;\n numLines?: number;\n}\n\n// Used by Stave.format() to sort the modifiers at the beginning and end of a stave.\n// The keys (computed property names) match the CATEGORY property in the\n// Barline, Clef, KeySignature, TimeSignature classes.\nconst SORT_ORDER_BEG_MODIFIERS = {\n [Barline.CATEGORY]: 0,\n [Clef.CATEGORY]: 1,\n [KeySignature.CATEGORY]: 2,\n [TimeSignature.CATEGORY]: 3,\n};\n\nconst SORT_ORDER_END_MODIFIERS = {\n [TimeSignature.CATEGORY]: 0,\n [KeySignature.CATEGORY]: 1,\n [Barline.CATEGORY]: 2,\n [Clef.CATEGORY]: 3,\n};\n\nexport class Stave extends Element {\n static override get CATEGORY(): string {\n return Category.Stave;\n }\n\n readonly options: Required<StaveOptions>;\n\n protected startX: number;\n protected endX: number;\n protected clef: string;\n protected endClef?: string;\n\n protected formatted: boolean;\n protected measure: number;\n protected bounds: Bounds;\n protected readonly modifiers: StaveModifier[];\n\n protected defaultLedgerLineStyle: ElementStyle;\n\n // This is the sum of the padding that normally goes on left + right of a stave during\n // drawing. Used to size staves correctly with content width.\n static get defaultPadding(): number {\n return Metrics.get('Stave.padding') + Metrics.get('Stave.endPaddingMax');\n }\n\n // Right padding, used by system if startX is already determined.\n static get rightPadding(): number {\n return Metrics.get('Stave.endPaddingMax');\n }\n\n constructor(x: number, y: number, width: number, options?: StaveOptions) {\n super();\n\n this.x = x;\n this.y = y;\n this.width = width;\n this.formatted = false;\n this.startX = x + 5;\n this.endX = x + width;\n this.modifiers = []; // stave modifiers (clef, key, time, barlines, coda, segno, etc.)\n this.measure = 0;\n this.clef = 'treble';\n this.endClef = undefined;\n\n this.options = {\n verticalBarWidth: 10, // Width around vertical bar end-marker\n numLines: 5,\n leftBar: true, // draw vertical bar on left\n rightBar: true, // draw vertical bar on right\n spacingBetweenLinesPx: Tables.STAVE_LINE_DISTANCE, // in pixels\n spaceAboveStaffLn: 4, // in staff lines\n spaceBelowStaffLn: 4, // in staff lines\n topTextPosition: 1, // in staff lines\n bottomTextPosition: 4, // in staff lines\n lineConfig: [],\n ...options,\n };\n this.bounds = { x: this.x, y: this.y, w: this.width, h: 0 };\n this.defaultLedgerLineStyle = { strokeStyle: '#444', lineWidth: 2 };\n\n this.resetLines();\n\n // beg bar\n this.addModifier(new Barline(this.options.leftBar ? BarlineType.SINGLE : BarlineType.NONE));\n // end bar\n this.addEndModifier(new Barline(this.options.rightBar ? BarlineType.SINGLE : BarlineType.NONE));\n }\n\n /** Set default style for ledger lines. */\n setDefaultLedgerLineStyle(style: ElementStyle): void {\n this.defaultLedgerLineStyle = style;\n }\n\n /** Get default style for ledger lines. */\n getDefaultLedgerLineStyle(): ElementStyle {\n return { ...this.getStyle(), ...this.defaultLedgerLineStyle };\n }\n\n space(spacing: number): number {\n return this.options.spacingBetweenLinesPx * spacing;\n }\n\n resetLines(): void {\n this.options.lineConfig = [];\n for (let i = 0; i < this.options.numLines; i++) {\n this.options.lineConfig.push({ visible: true });\n }\n this.height = (this.options.numLines + this.options.spaceAboveStaffLn) * this.options.spacingBetweenLinesPx;\n this.options.bottomTextPosition = this.options.numLines;\n }\n\n setNoteStartX(x: number): this {\n if (!this.formatted) this.format();\n\n this.startX = x;\n return this;\n }\n\n getNoteStartX(): number {\n if (!this.formatted) this.format();\n\n return this.startX;\n }\n\n getNoteEndX(): number {\n if (!this.formatted) this.format();\n\n return this.endX;\n }\n\n getTieStartX(): number {\n return this.startX;\n }\n\n getTieEndX(): number {\n return this.endX;\n }\n\n getNumLines(): number {\n return this.options.numLines;\n }\n\n setNumLines(n: number): this {\n this.options.numLines = n;\n this.resetLines();\n return this;\n }\n\n getTopLineTopY(): number {\n return this.getYForLine(0);\n }\n\n getBottomLineBottomY(): number {\n return this.getYForLine(this.getNumLines() - 1) + (this.getStyle().lineWidth ?? 1);\n }\n\n override setX(x: number): this {\n const shift = x - this.x;\n this.formatted = false;\n this.x = x;\n this.startX += shift;\n this.endX += shift;\n for (let i = 0; i < this.modifiers.length; i++) {\n const mod = this.modifiers[i];\n mod.setX(mod.getX() + shift);\n }\n return this;\n }\n\n override setWidth(width: number): this {\n this.formatted = false;\n this.width = width;\n this.endX = this.x + width;\n\n // reset the x position of the end barline (TODO(0xfe): This makes no sense)\n // this.modifiers[1].setX(this.endX);\n return this;\n }\n\n /**\n * Set the measure number of this Stave.\n */\n setMeasure(measure: number): this {\n this.measure = measure;\n return this;\n }\n\n /**\n * Return the measure number of this Stave.\n */\n getMeasure(): number {\n return this.measure;\n }\n\n /**\n * Gets the pixels to shift from the beginning of the stave\n * following the modifier at the provided index\n * @param {Number} index The index from which to determine the shift\n * @return {Number} The amount of pixels shifted\n */\n getModifierXShift(index: number = 0): number {\n if (typeof index !== 'number') {\n throw new RuntimeError('InvalidIndex', 'Must be of number type');\n }\n\n if (!this.formatted) this.format();\n\n if (this.getModifiers(StaveModifierPosition.BEGIN).length === 1) {\n return 0;\n }\n\n // for right position modifiers zero shift seems correct, see 'Volta + Modifier Measure Test'\n if (this.modifiers[index].getPosition() === StaveModifierPosition.RIGHT) {\n return 0;\n }\n\n let startX = this.startX - this.x;\n const begBarline = this.modifiers[0] as Barline;\n if (begBarline.getType() === BarlineType.REPEAT_BEGIN && startX > begBarline.getWidth()) {\n startX -= begBarline.getWidth();\n }\n\n return startX;\n }\n\n /** Coda & Segno Symbol functions */\n setRepetitionType(type: number, yShift: number = 0): this {\n this.modifiers.push(new Repetition(type, this.x, yShift));\n return this;\n }\n\n // Volta functions\n setVoltaType(type: number, label: string, y: number): this {\n this.modifiers.push(new Volta(type, label, this.x, y));\n return this;\n }\n\n // Section functions\n setSection(section: string, y: number, xOffset = 0, fontSize?: number, drawRect = true) {\n const staveSection = new StaveSection(section).setYShift(y).setXShift(xOffset).setDrawRect(drawRect);\n if (fontSize) {\n staveSection.setFontSize(fontSize);\n }\n this.addModifier(staveSection);\n return this;\n }\n\n // Tempo functions\n setTempo(tempo: StaveTempoOptions, y: number): this {\n this.modifiers.push(new StaveTempo(tempo, this.x, y));\n return this;\n }\n\n // Text functions\n setStaveText(\n text: string,\n position: number,\n options: {\n shiftX?: number;\n shiftY?: number;\n justification?: number;\n } = {}\n ): this {\n this.modifiers.push(new StaveText(text, position, options));\n return this;\n }\n\n getSpacingBetweenLines(): number {\n return this.options.spacingBetweenLinesPx;\n }\n\n override getBoundingBox(): BoundingBox {\n return new BoundingBox(this.x, this.y, this.width, this.getBottomY() - this.y);\n }\n\n getBottomY(): number {\n const options = this.options;\n const spacing = options.spacingBetweenLinesPx;\n const scoreBottom = this.getYForLine(options.numLines) + options.spaceBelowStaffLn * spacing;\n return scoreBottom;\n }\n\n getBottomLineY(): number {\n return this.getYForLine(this.options.numLines);\n }\n\n // This returns\n /** @returns the y for the *center* of a staff line */\n getYForLine(line: number): number {\n const options = this.options;\n const spacing = options.spacingBetweenLinesPx;\n const headroom = options.spaceAboveStaffLn;\n\n const y = this.y + line * spacing + headroom * spacing;\n\n return y;\n }\n\n getLineForY(y: number): number {\n // Does the reverse of getYForLine - somewhat dumb and just calls\n // getYForLine until the right value is reaches\n\n const options = this.options;\n const spacing = options.spacingBetweenLinesPx;\n const headroom = options.spaceAboveStaffLn;\n return (y - this.y) / spacing - headroom;\n }\n\n getYForTopText(line: number = 0): number {\n return this.getYForLine(-line - this.options.topTextPosition);\n }\n\n getYForBottomText(line: number = 0): number {\n return this.getYForLine(this.options.bottomTextPosition + line);\n }\n\n getYForNote(line: number): number {\n const options = this.options;\n const spacing = options.spacingBetweenLinesPx;\n const headroom = options.spaceAboveStaffLn;\n return this.y + headroom * spacing + 5 * spacing - line * spacing;\n }\n\n getYForGlyphs(): number {\n return this.getYForLine(3);\n }\n\n // This method adds a stave modifier to the stave. Note that the first two\n // modifiers (BarLines) are automatically added upon construction.\n addModifier(modifier: StaveModifier, position?: number): this {\n if (position !== undefined) {\n modifier.setPosition(position);\n }\n\n modifier.setStave(this);\n this.formatted = false;\n this.modifiers.push(modifier);\n return this;\n }\n\n addEndModifier(modifier: StaveModifier): this {\n this.addModifier(modifier, StaveModifierPosition.END);\n return this;\n }\n\n // Bar Line functions\n setBegBarType(type: number | BarlineType, repeatBracket: RepeatBracketType = RepeatBracketType.NONE): this {\n // Only valid bar types at beginning of stave is none, single or begin repeat\n const { SINGLE, REPEAT_BEGIN, NONE } = BarlineType;\n if (type === SINGLE || type === REPEAT_BEGIN || type === NONE) {\n (this.modifiers[0] as Barline).setType(type).setRepeatBracket(repeatBracket);\n this.formatted = false;\n }\n return this;\n }\n\n setEndBarType(type: number | BarlineType, repeatBracket: RepeatBracketType = RepeatBracketType.NONE): this {\n // Repeat end not valid at end of stave\n if (type !== BarlineType.REPEAT_BEGIN) {\n (this.modifiers[1] as Barline).setType(type).setRepeatBracket(repeatBracket);\n this.formatted = false;\n }\n return this;\n }\n\n setClef(clefSpec: string, size?: string, annotation?: string, position?: number): this {\n if (position === undefined) {\n position = StaveModifierPosition.BEGIN;\n }\n\n if (position === StaveModifierPosition.END) {\n this.endClef = clefSpec;\n } else {\n this.clef = clefSpec;\n }\n\n const clefs = this.getModifiers(position, Clef.CATEGORY) as Clef[];\n if (clefs.length === 0) {\n this.addClef(clefSpec, size, annotation, position);\n } else {\n clefs[0].setType(clefSpec, size, annotation);\n }\n\n return this;\n }\n\n getClef(): string {\n return this.clef;\n }\n\n setEndClef(clefSpec: string, size?: string, annotation?: string): this {\n this.setClef(clefSpec, size, annotation, StaveModifierPosition.END);\n return this;\n }\n\n getEndClef(): string | undefined {\n return this.endClef;\n }\n\n setKeySignature(keySpec: string, cancelKeySpec?: string, position?: number): this {\n if (position === undefined) {\n position = StaveModifierPosition.BEGIN;\n }\n\n const keySignatures = this.getModifiers(position, KeySignature.CATEGORY) as KeySignature[];\n if (keySignatures.length === 0) {\n this.addKeySignature(keySpec, cancelKeySpec, position);\n } else {\n keySignatures[0].setKeySig(keySpec, cancelKeySpec);\n }\n\n return this;\n }\n\n setEndKeySignature(keySpec: string, cancelKeySpec?: string): this {\n this.setKeySignature(keySpec, cancelKeySpec, StaveModifierPosition.END);\n return this;\n }\n\n setTimeSignature(timeSpec: string, customPadding?: number, position?: number): this {\n if (position === undefined) {\n position = StaveModifierPosition.BEGIN;\n }\n\n const timeSignatures = this.getModifiers(position, TimeSignature.CATEGORY) as TimeSignature[];\n if (timeSignatures.length === 0) {\n this.addTimeSignature(timeSpec, customPadding, position);\n } else {\n timeSignatures[0].setTimeSig(timeSpec);\n }\n\n return this;\n }\n\n setEndTimeSignature(timeSpec: string, customPadding?: number): this {\n this.setTimeSignature(timeSpec, customPadding, StaveModifierPosition.END);\n return this;\n }\n\n /**\n * Add a key signature to the stave.\n *\n * Example:\n * `stave.addKeySignature('Db');`\n * @param keySpec new key specification `[A-G][b|#]?` or `[flats|sharps]_[0-14]?`\n * @param cancelKeySpec\n * @param position\n * @returns\n */\n addKeySignature(keySpec: string, cancelKeySpec?: string, position?: number): this {\n if (position === undefined) {\n position = StaveModifierPosition.BEGIN;\n }\n this.addModifier(new KeySignature(keySpec, cancelKeySpec).setPosition(position), position);\n return this;\n }\n\n /**\n * Add a clef to the stave.\n *\n * Example:\n *\n * stave.addClef('treble')\n * @param clef clef (treble|bass|...) see {@link Clef.types}\n * @param size\n * @param annotation\n * @param position\n * @returns\n */\n addClef(clef: string, size?: string, annotation?: string, position?: number): this {\n if (position === undefined || position === StaveModifierPosition.BEGIN) {\n this.clef = clef;\n } else if (position === StaveModifierPosition.END) {\n this.endClef = clef;\n }\n\n this.addModifier(new Clef(clef, size, annotation), position);\n return this;\n }\n\n addEndClef(clef: string, size?: string, annotation?: string): this {\n this.addClef(clef, size, annotation, StaveModifierPosition.END);\n return this;\n }\n\n /**\n * Add a time signature to the stave\n *\n * Example:\n *\n * `stave.addTimeSignature('4/4');`\n * @param timeSpec time signature specification `(C\\||C|\\d\\/\\d)`\n * @param customPadding\n * @param position\n * @returns\n */\n addTimeSignature(timeSpec: string, customPadding?: number, position?: number): this {\n this.addModifier(new TimeSignature(timeSpec, customPadding), position);\n return this;\n }\n\n addEndTimeSignature(timeSpec: string, customPadding?: number): this {\n this.addTimeSignature(timeSpec, customPadding, StaveModifierPosition.END);\n return this;\n }\n\n // Deprecated\n addTrebleGlyph(): this {\n this.addClef('treble');\n return this;\n }\n\n /**\n * @param position\n * @param category\n * @returns array of StaveModifiers that match the provided position and category.\n */\n getModifiers(position?: number, category?: string): StaveModifier[] {\n const noPosition = position === undefined;\n const noCategory = category === undefined;\n if (noPosition && noCategory) {\n return this.modifiers; // Should this be [...this.modifiers]?\n } else if (noPosition) {\n // A category was provided.\n return this.modifiers.filter((m: StaveModifier) => category === m.getCategory());\n } else if (noCategory) {\n // A position was provided.\n return this.modifiers.filter((m: StaveModifier) => position === m.getPosition());\n } else {\n // Both position and category were provided!\n return this.modifiers.filter((m: StaveModifier) => position === m.getPosition() && category === m.getCategory());\n }\n }\n\n /**\n * Use the modifier's `getCategory()` as a key for the `order` array.\n * The retrieved value is used to sort modifiers from left to right (0 to to 3).\n */\n sortByCategory(items: StaveModifier[], order: Record<string, number>): void {\n for (let i = items.length - 1; i >= 0; i--) {\n for (let j = 0; j < i; j++) {\n if (order[items[j].getCategory()] > order[items[j + 1].getCategory()]) {\n const temp = items[j];\n items[j] = items[j + 1];\n items[j + 1] = temp;\n }\n }\n }\n }\n\n format(): void {\n const begBarline = this.modifiers[0] as Barline;\n const endBarline = this.modifiers[1];\n\n const begModifiers = this.getModifiers(StaveModifierPosition.BEGIN);\n const endModifiers = this.getModifiers(StaveModifierPosition.END);\n\n this.sortByCategory(begModifiers, SORT_ORDER_BEG_MODIFIERS);\n this.sortByCategory(endModifiers, SORT_ORDER_END_MODIFIERS);\n\n if (begModifiers.length > 1 && begBarline.getType() === BarlineType.REPEAT_BEGIN) {\n begModifiers.push(begModifiers.splice(0, 1)[0]);\n begModifiers.splice(0, 0, new Barline(BarlineType.SINGLE));\n }\n\n if (endModifiers.indexOf(endBarline) > 0) {\n endModifiers.splice(0, 0, new Barline(BarlineType.NONE));\n }\n\n let width;\n let padding;\n let modifier;\n let offset = 0;\n let x = this.x;\n for (let i = 0; i < begModifiers.length; i++) {\n modifier = begModifiers[i];\n padding = modifier.getPadding(i + offset);\n width = modifier.getWidth();\n\n x += padding;\n modifier.setX(x);\n x += width;\n\n if (padding + width === 0) offset--;\n }\n\n this.startX = x;\n x = this.x + this.width;\n\n const widths = {\n left: 0,\n right: 0,\n paddingRight: 0,\n paddingLeft: 0,\n };\n\n let lastBarlineIdx = 0;\n\n for (let i = 0; i < endModifiers.length; i++) {\n modifier = endModifiers[i];\n lastBarlineIdx = isBarline(modifier) ? i : lastBarlineIdx;\n\n widths.right = 0;\n widths.left = 0;\n widths.paddingRight = 0;\n widths.paddingLeft = 0;\n const layoutMetrics = modifier.getLayoutMetrics();\n\n if (layoutMetrics) {\n if (i !== 0) {\n widths.right = layoutMetrics.xMax ?? 0;\n widths.paddingRight = layoutMetrics.paddingRight ?? 0;\n }\n widths.left = -(layoutMetrics.xMin ?? 0);\n widths.paddingLeft = layoutMetrics.paddingLeft ?? 0;\n\n if (i === endModifiers.length - 1) {\n widths.paddingLeft = 0;\n }\n } else {\n widths.paddingRight = modifier.getPadding(i - lastBarlineIdx);\n if (i !== 0) {\n widths.right = modifier.getWidth();\n }\n if (i === 0) {\n widths.left = modifier.getWidth();\n }\n }\n x -= widths.paddingRight;\n x -= widths.right;\n\n modifier.setX(x);\n\n x -= widths.left;\n x -= widths.paddingLeft;\n }\n\n this.endX = endModifiers.length === 1 ? this.x + this.width : x;\n this.formatted = true;\n }\n\n /**\n * All drawing functions below need the context to be set.\n */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('stave' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n if (!this.formatted) this.format();\n\n const numLines = this.options.numLines;\n const width = this.width;\n const x = this.x;\n let y;\n\n const lineWidth = this.getStyle().lineWidth ?? 1;\n const lineWidthCorrection = lineWidth % 2 === 0 ? 0 : 0.5;\n\n // Render lines\n for (let line = 0; line < numLines; line++) {\n y = this.getYForLine(line);\n\n if (this.options.lineConfig[line].visible) {\n ctx.beginPath();\n ctx.moveTo(x, y + lineWidthCorrection);\n ctx.lineTo(x + width, y + lineWidthCorrection);\n ctx.stroke();\n }\n }\n\n this.drawPointerRect();\n ctx.closeGroup();\n\n // Draw the modifiers (bar lines, coda, segno, repeat brackets, etc.)\n for (let i = 0; i < this.modifiers.length; i++) {\n const modifier: StaveModifier = this.modifiers[i];\n modifier.setContext(ctx);\n modifier.setStave(this);\n modifier.drawWithStyle();\n }\n\n // Render measure numbers\n if (this.measure > 0) {\n ctx.setFont(this.fontInfo);\n const textWidth = ctx.measureText('' + this.measure).width;\n y = this.getYForTopText(0) + 3;\n ctx.fillText('' + this.measure, this.x - textWidth / 2, y);\n }\n }\n\n getVerticalBarWidth(): number {\n return this.options.verticalBarWidth;\n }\n\n /**\n * Get the current configuration for the Stave.\n * @return {Array} An array of configuration objects.\n */\n getConfigForLines(): StaveLineConfig[] {\n return this.options.lineConfig;\n }\n\n /**\n * Configure properties of the lines in the Stave\n * @param lineNumber The index of the line to configure.\n * @param lineConfig An configuration object for the specified line.\n * @throws RuntimeError \"StaveConfigError\" When the specified line number is out of\n * range of the number of lines specified in the constructor.\n */\n setConfigForLine(lineNumber: number, lineConfig: StaveLineConfig): this {\n if (lineNumber >= this.options.numLines || lineNumber < 0) {\n throw new RuntimeError(\n 'StaveConfigError',\n 'The line number must be within the range of the number of lines in the Stave.'\n );\n }\n\n if (lineConfig.visible === undefined) {\n throw new RuntimeError('StaveConfigError', \"The line configuration object is missing the 'visible' property.\");\n }\n\n if (typeof lineConfig.visible !== 'boolean') {\n throw new RuntimeError(\n 'StaveConfigError',\n \"The line configuration objects 'visible' property must be true or false.\"\n );\n }\n\n this.options.lineConfig[lineNumber] = lineConfig;\n\n return this;\n }\n\n /**\n * Set the staff line configuration array for all of the lines at once.\n * @param linesConfiguration An array of line configuration objects. These objects\n * are of the same format as the single one passed in to setLineConfiguration().\n * The caller can set null for any line config entry if it is desired that the default be used\n * @throws RuntimeError \"StaveConfigError\" When the lines_configuration array does not have\n * exactly the same number of elements as the numLines configuration object set in\n * the constructor.\n */\n setConfigForLines(linesConfiguration: StaveLineConfig[]): this {\n if (linesConfiguration.length !== this.options.numLines) {\n throw new RuntimeError(\n 'StaveConfigError',\n 'The length of the lines configuration array must match the number of lines in the Stave'\n );\n }\n\n // Make sure the defaults are present in case an incomplete set of\n // configuration options were supplied.\n\n for (const lineConfig in linesConfiguration) {\n // Allow '{}' to be used if the caller just wants the default for a particular node.\n if (linesConfiguration[lineConfig].visible === undefined) {\n linesConfiguration[lineConfig] = this.options.lineConfig[lineConfig];\n }\n this.options.lineConfig[lineConfig] = {\n ...this.options.lineConfig[lineConfig],\n ...linesConfiguration[lineConfig],\n };\n }\n\n this.options.lineConfig = linesConfiguration;\n\n return this;\n }\n\n static formatBegModifiers(staves: Stave[]): void {\n const adjustCategoryStartX = (category: Category) => {\n let minStartX = 0;\n // Calculate min start X for the category\n staves.forEach((stave) => {\n const modifiers = stave.getModifiers(StaveModifierPosition.BEGIN, category);\n // Consider only the first instance\n if (modifiers.length > 0 && modifiers[0].getX() > minStartX) minStartX = modifiers[0].getX();\n });\n let adjustX = 0;\n staves.forEach((stave) => {\n adjustX = 0;\n const modifiers = stave.getModifiers(StaveModifierPosition.BEGIN, category);\n // Calculate adjustement required for the stave\n modifiers.forEach((modifier) => {\n if (minStartX - modifier.getX() > adjustX) adjustX = minStartX - modifier.getX();\n });\n const allModifiers = stave.getModifiers(StaveModifierPosition.BEGIN);\n let bAdjust = false;\n // Apply adjustment to all the modifiers in and beyond the category\n allModifiers.forEach((modifier) => {\n if (modifier.getCategory() === category) bAdjust = true;\n if (bAdjust && adjustX > 0) modifier.setX(modifier.getX() + adjustX);\n });\n // Apply adjustment also to note start.\n stave.setNoteStartX(stave.getNoteStartX() + adjustX);\n });\n };\n\n // Make sure that staves are formatted\n staves.forEach((stave) => {\n if (!stave.formatted) stave.format();\n });\n // Align Clefs\n adjustCategoryStartX(Category.Clef);\n // Align key signatures\n adjustCategoryStartX(Category.KeySignature);\n // Align time signatures\n adjustCategoryStartX(Category.TimeSignature);\n\n let maxX = 0;\n // align note start\n staves.forEach((stave) => {\n if (stave.getNoteStartX() > maxX) maxX = stave.getNoteStartX();\n });\n staves.forEach((stave) => {\n stave.setNoteStartX(maxX);\n });\n\n maxX = 0;\n // align REPEAT_BEGIN\n staves.forEach((stave) => {\n const modifiers = stave.getModifiers(StaveModifierPosition.BEGIN, Category.Barline);\n modifiers.forEach((modifier) => {\n if ((modifier as Barline).getType() === BarlineType.REPEAT_BEGIN)\n if (modifier.getX() > maxX) maxX = modifier.getX();\n });\n });\n staves.forEach((stave) => {\n const modifiers = stave.getModifiers(StaveModifierPosition.BEGIN, Category.Barline);\n modifiers.forEach((modifier) => {\n if ((modifier as Barline).getType() === BarlineType.REPEAT_BEGIN) modifier.setX(maxX);\n });\n });\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { RenderContext } from './rendercontext';\nimport { Stave } from './stave';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nfunction drawBoldDoubleLine(ctx: RenderContext, type: number, topX: number, topY: number, botY: number) {\n if (type !== StaveConnector.type.BOLD_DOUBLE_LEFT && type !== StaveConnector.type.BOLD_DOUBLE_RIGHT) {\n throw new RuntimeError('InvalidConnector', 'A REPEAT_BEGIN or REPEAT_END type must be provided.');\n }\n\n let xShift = 3;\n let variableWidth = 3.5; // Width for avoiding anti-aliasing width issues\n const thickLineOffset = 2; // For aesthetics\n\n if (type === StaveConnector.type.BOLD_DOUBLE_RIGHT) {\n xShift = -5; // Flips the side of the thin line\n variableWidth = 3;\n }\n\n // Thin line\n ctx.fillRect(topX + xShift, topY, 1, botY - topY);\n // Thick line\n ctx.fillRect(topX - thickLineOffset, topY, variableWidth, botY - topY);\n}\n\n/**\n * see {@link StaveConnector.type} & {@link StaveConnector.typeString}\n */\nexport type StaveConnectorType =\n | 'singleRight'\n | 'singleLeft'\n | 'single'\n | 'double'\n | 'brace'\n | 'bracket'\n | 'boldDoubleLeft'\n | 'boldDoubleRight'\n | 'thinDouble'\n | 'none'\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8;\n\n/** StaveConnector implements the connector lines between staves of a system. */\nexport class StaveConnector extends Element {\n static override get CATEGORY(): string {\n return Category.StaveConnector;\n }\n\n /**\n * SINGLE_LEFT and SINGLE are the same value for compatibility\n * with older versions of vexflow which didn't have right sided\n * stave connectors.\n */\n static readonly type: Record<string, Exclude<StaveConnectorType, string>> = {\n SINGLE_RIGHT: 0,\n SINGLE_LEFT: 1,\n SINGLE: 1,\n DOUBLE: 2,\n BRACE: 3,\n BRACKET: 4,\n BOLD_DOUBLE_LEFT: 5,\n BOLD_DOUBLE_RIGHT: 6,\n THIN_DOUBLE: 7,\n NONE: 8,\n } as const;\n\n /**\n * Connector type:\n * * \"singleRight\"\n * * \"singleLeft\"\n * * \"single\"\n * * \"double\"\n * * \"brace\"\n * * \"bracket\"\n * * \"boldDoubleLeft\"\n * * \"boldDoubleRight\"\n * * \"thinDouble\"\n * * \"none\"\n */\n static readonly typeString: Record<Exclude<StaveConnectorType, number>, Exclude<StaveConnectorType, string>> = {\n singleRight: StaveConnector.type.SINGLE_RIGHT,\n singleLeft: StaveConnector.type.SINGLE_LEFT,\n single: StaveConnector.type.SINGLE,\n double: StaveConnector.type.DOUBLE,\n brace: StaveConnector.type.BRACE,\n bracket: StaveConnector.type.BRACKET,\n boldDoubleLeft: StaveConnector.type.BOLD_DOUBLE_LEFT,\n boldDoubleRight: StaveConnector.type.BOLD_DOUBLE_RIGHT,\n thinDouble: StaveConnector.type.THIN_DOUBLE,\n none: StaveConnector.type.NONE,\n } as const;\n\n protected texts: Element[];\n\n protected type: (typeof StaveConnector)['type'][keyof (typeof StaveConnector)['type']];\n\n readonly topStave: Stave;\n readonly bottomStave: Stave;\n readonly thickness: number;\n\n constructor(topStave: Stave, bottomStave: Stave) {\n super();\n\n this.thickness = Tables.STAVE_LINE_THICKNESS;\n this.topStave = topStave;\n this.bottomStave = bottomStave;\n this.type = StaveConnector.type.DOUBLE;\n\n // 1. Offset Bold Double Left to align with offset Repeat Begin bars\n // 2. Offset BRACE type not to overlap with another StaveConnector\n this.xShift = 0;\n this.texts = [];\n }\n\n /**\n * Set type.\n * @param type see {@link StaveConnector.type} & {@link StaveConnector.typeString}\n */\n setType(type: StaveConnectorType): this {\n const newType = typeof type === 'string' ? StaveConnector.typeString[type] : type;\n\n // Be certain that the type is a valid type:\n if (Object.values(StaveConnector.type).includes(newType)) {\n this.type = newType;\n }\n\n return this;\n }\n\n /**\n * Get type.\n * @returns number {@link StaveConnector.type}\n */\n getType(): number {\n return this.type;\n }\n\n /** Set optional associated Text. */\n override setText(text: string, options: { shiftX?: number; shiftY?: number } = {}): this {\n const textElement = new Element('StaveConnector.text');\n textElement.setText(text);\n textElement.setXShift(options.shiftX ?? 0);\n textElement.setYShift(options.shiftY ?? 0);\n this.texts.push(textElement);\n return this;\n }\n\n /** Render connector and associated text. */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n\n let topY = this.topStave.getYForLine(0);\n let botY = this.bottomStave.getYForLine(this.bottomStave.getNumLines() - 1) + this.thickness;\n let width = 3;\n let topX = this.topStave.getX();\n\n const isRightSidedConnector =\n this.type === StaveConnector.type.SINGLE_RIGHT ||\n this.type === StaveConnector.type.BOLD_DOUBLE_RIGHT ||\n this.type === StaveConnector.type.THIN_DOUBLE;\n\n if (isRightSidedConnector) {\n topX = this.topStave.getX() + this.topStave.getWidth();\n }\n\n let attachmentHeight = botY - topY;\n const element = new Element();\n switch (this.type) {\n case StaveConnector.type.SINGLE:\n width = 1;\n break;\n case StaveConnector.type.SINGLE_LEFT:\n width = 1;\n break;\n case StaveConnector.type.SINGLE_RIGHT:\n width = 1;\n break;\n case StaveConnector.type.DOUBLE:\n topX -= 5;\n topY -= this.thickness;\n attachmentHeight += 0.5;\n break;\n case StaveConnector.type.BRACE: {\n width = 12;\n // May need additional code to draw brace\n const x1 = this.topStave.getX() - 2 + this.xShift;\n const y1 = topY;\n const x3 = x1;\n const y3 = botY;\n const x2 = x1 - width;\n const y2 = y1 + attachmentHeight / 2.0;\n const cpx1 = x2 - 0.9 * width;\n const cpy1 = y1 + 0.2 * attachmentHeight;\n const cpx2 = x1 + 1.1 * width;\n const cpy2 = y2 - 0.135 * attachmentHeight;\n const cpx3 = cpx2;\n const cpy3 = y2 + 0.135 * attachmentHeight;\n const cpx4 = cpx1;\n const cpy4 = y3 - 0.2 * attachmentHeight;\n const cpx5 = x2 - width;\n const cpy5 = cpy4;\n const cpx6 = x1 + 0.4 * width;\n const cpy6 = y2 + 0.135 * attachmentHeight;\n const cpx7 = cpx6;\n const cpy7 = y2 - 0.135 * attachmentHeight;\n const cpx8 = cpx5;\n const cpy8 = cpy1;\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x2, y2);\n ctx.bezierCurveTo(cpx3, cpy3, cpx4, cpy4, x3, y3);\n ctx.bezierCurveTo(cpx5, cpy5, cpx6, cpy6, x2, y2);\n ctx.bezierCurveTo(cpx7, cpy7, cpx8, cpy8, x1, y1);\n ctx.fill();\n ctx.stroke();\n break;\n }\n case StaveConnector.type.BRACKET:\n topY -= 6;\n botY += 6;\n attachmentHeight = botY - topY;\n element.setText(Glyphs.bracketTop);\n element.renderText(ctx, topX - 5, topY);\n element.setText(Glyphs.bracketBottom);\n element.renderText(ctx, topX - 5, botY);\n topX -= 5;\n break;\n case StaveConnector.type.BOLD_DOUBLE_LEFT:\n drawBoldDoubleLine(ctx, this.type, topX + this.xShift, topY, botY - this.thickness);\n break;\n case StaveConnector.type.BOLD_DOUBLE_RIGHT:\n drawBoldDoubleLine(ctx, this.type, topX, topY, botY - this.thickness);\n break;\n case StaveConnector.type.THIN_DOUBLE:\n width = 1;\n attachmentHeight -= this.thickness;\n break;\n case StaveConnector.type.NONE:\n break;\n default:\n throw new RuntimeError('InvalidType', `The provided StaveConnector.type (${this.type}) is invalid.`);\n }\n\n if (\n this.type !== StaveConnector.type.BRACE &&\n this.type !== StaveConnector.type.BOLD_DOUBLE_LEFT &&\n this.type !== StaveConnector.type.BOLD_DOUBLE_RIGHT &&\n this.type !== StaveConnector.type.NONE\n ) {\n ctx.fillRect(topX, topY, width, attachmentHeight);\n }\n\n // If the connector is a thin double barline, draw the paralell line\n if (this.type === StaveConnector.type.THIN_DOUBLE) {\n ctx.fillRect(topX - 3, topY, width, attachmentHeight);\n }\n\n // Add stave connector text\n for (let i = 0; i < this.texts.length; i++) {\n const textElement = this.texts[i];\n const x = this.topStave.getX() - textElement.getWidth() - 24;\n const y = (this.topStave.getYForLine(0) + this.bottomStave.getBottomLineY()) / 2;\n\n textElement.renderText(ctx, x, y + 4);\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n// A formatter for abstract tickable objects, such as notes, chords,\n// tabs, etc.\n\nimport { Fraction } from './fraction';\nimport { NoteMetrics } from './note';\nimport { Tickable } from './tickable';\nimport { RuntimeError, sumArray } from './util';\n\nexport interface TickContextMetrics extends NoteMetrics {\n totalLeftPx: number;\n totalRightPx: number;\n}\n\nexport interface TickContextOptions {\n tickID: number;\n}\n\n/**\n * TickContext formats abstract tickable objects, such as notes, chords, tabs, etc.\n *\n * It has a public attribute of `tContexts` which is a parent array of the TickContexts\n * in which this TickContext belongs.\n */\nexport class TickContext {\n protected readonly tickID: number;\n protected readonly tickables: Tickable[];\n // because we do Object.keys(tickablesByVoice).forEach, the record has to be\n // typed as Record<string, Tickable>, but the key is actually a number.\n // TODO(msac): convert to a Map() object later, which allows numeric keys.\n protected readonly tickablesByVoice: Record<string, Tickable>;\n protected currentTick: Fraction;\n protected maxTicks: Fraction;\n protected padding: number;\n protected xBase: number;\n protected x: number;\n protected xOffset: number;\n protected notePx: number;\n protected glyphPx: number;\n protected leftDisplacedHeadPx: number;\n protected rightDisplacedHeadPx: number;\n protected modLeftPx: number;\n protected modRightPx: number;\n protected totalLeftPx: number;\n protected totalRightPx: number;\n protected maxTickable?: Tickable;\n protected minTicks?: Fraction;\n protected minTickable?: Tickable;\n tContexts: TickContext[];\n\n protected preFormatted: boolean = false;\n protected postFormatted: boolean = false;\n protected width: number;\n protected formatterMetrics: { freedom: { left: number; right: number } };\n\n /**\n * Get the next TickContext from another TickContext, from the `.tContexts` array.\n */\n static getNextContext(tContext: TickContext): TickContext | undefined {\n const contexts = tContext.tContexts;\n const index = contexts.indexOf(tContext);\n\n if (index + 1 < contexts.length) return contexts[index + 1];\n }\n\n constructor(options?: TickContextOptions) {\n this.tickID = options?.tickID ?? 0;\n this.currentTick = new Fraction(0, 1);\n\n this.maxTicks = new Fraction(0, 1);\n this.maxTickable = undefined; // Biggest tickable\n this.minTicks = undefined; // this can remain null if all tickables have ignoreTicks\n this.minTickable = undefined;\n\n this.padding = 1; // padding on each side (width += padding * 2)\n this.x = 0;\n this.xBase = 0; // base x position without xOffset\n this.xOffset = 0; // xBase and xOffset are an alternative way to describe x (x = xB + xO)\n this.tickables = []; // Notes, tabs, chords, lyrics.\n this.tickablesByVoice = {}; // Tickables indexed by voice number (as string)\n\n // Formatting metrics\n this.notePx = 0; // width of widest note in this context\n this.glyphPx = 0; // width of glyph (note head)\n this.leftDisplacedHeadPx = 0; // Extra left pixels for displaced notes\n this.rightDisplacedHeadPx = 0; // Extra right pixels for displaced notes\n this.modLeftPx = 0; // Left modifier pixels\n this.modRightPx = 0; // Right modifier pixels\n this.totalLeftPx = 0; // Total left pixels\n this.totalRightPx = 0; // Total right pixels\n this.tContexts = []; // Parent array of tick contexts\n\n this.width = 0; // in pixels\n this.formatterMetrics = {\n // The freedom of a tickcontext is the distance it can move without colliding\n // with neighboring elements. A formatter can set these values during its\n // formatting pass, which a different formatter can then use to fine tune.\n freedom: { left: 0, right: 0 },\n };\n }\n\n getTickID(): number {\n return this.tickID;\n }\n\n getX(): number {\n return this.x;\n }\n\n setX(x: number): this {\n this.x = x;\n this.xBase = x;\n this.xOffset = 0;\n return this;\n }\n\n getXBase(): number {\n return this.xBase;\n } // use of xBase and xOffset is optional, avoids offset creep\n\n setXBase(xBase: number): void {\n this.xBase = xBase;\n this.x = xBase + this.xOffset;\n }\n\n getXOffset(): number {\n return this.xOffset;\n }\n\n setXOffset(xOffset: number): void {\n this.xOffset = xOffset;\n this.x = this.xBase + xOffset;\n }\n\n getWidth(): number {\n return this.width + this.padding * 2;\n }\n\n setPadding(padding: number): this {\n this.padding = padding;\n return this;\n }\n\n getMaxTicks(): Fraction {\n return this.maxTicks;\n }\n\n getMinTicks(): Fraction | undefined {\n return this.minTicks;\n }\n\n getMaxTickable(): Tickable | undefined {\n return this.maxTickable;\n }\n\n getMinTickable(): Tickable | undefined {\n return this.minTickable;\n }\n\n getTickables(): Tickable[] {\n return this.tickables;\n }\n\n /**\n * Introduced on 2020-04-17 as getTickablesForVoice(voiceIndex).\n * https://github.com/0xfe/vexflow/blame/dc97b0cc5bb93171c0038638c34362dc958222ca/src/tickcontext.js#L63\n * Renamed on 2021-08-05 to getTickableForVoice(voiceIndex). Method renamed to singular, since it returns one Tickable.\n */\n getTickableForVoice(voiceIndex: number): Tickable {\n return this.tickablesByVoice[voiceIndex];\n }\n\n getTickablesByVoice(): Record<string, Tickable> {\n return this.tickablesByVoice;\n }\n\n getCenterAlignedTickables(): Tickable[] {\n return this.tickables.filter((tickable) => tickable.isCenterAligned());\n }\n\n /** Gets widths context, note and left/right modifiers for formatting. */\n getMetrics(): TickContextMetrics {\n const {\n width,\n glyphPx,\n notePx,\n leftDisplacedHeadPx,\n rightDisplacedHeadPx,\n modLeftPx,\n modRightPx,\n totalLeftPx,\n totalRightPx,\n } = this;\n return {\n width, // Width of largest tickable in context\n glyphPx, // Width of largest glyph (note head)\n notePx, // Width of notehead + stem\n leftDisplacedHeadPx, // Left modifiers\n rightDisplacedHeadPx, // Right modifiers\n modLeftPx,\n modRightPx,\n totalLeftPx,\n totalRightPx,\n };\n }\n\n getCurrentTick(): Fraction {\n return this.currentTick;\n }\n\n setCurrentTick(tick: Fraction): void {\n this.currentTick = tick;\n this.preFormatted = false;\n }\n\n addTickable(tickable: Tickable, voiceIndex?: number): this {\n if (!tickable) {\n throw new RuntimeError('BadArgument', 'Invalid tickable added.');\n }\n\n if (!tickable.shouldIgnoreTicks()) {\n const ticks = tickable.getTicks();\n\n if (ticks.greaterThan(this.maxTicks)) {\n this.maxTicks = ticks.clone();\n this.maxTickable = tickable;\n }\n\n if (this.minTicks === undefined) {\n this.minTicks = ticks.clone();\n this.minTickable = tickable;\n } else if (ticks.lessThan(this.minTicks)) {\n this.minTicks = ticks.clone();\n this.minTickable = tickable;\n }\n }\n\n tickable.setTickContext(this);\n this.tickables.push(tickable);\n this.tickablesByVoice[voiceIndex ?? 0] = tickable;\n this.preFormatted = false;\n return this;\n }\n\n preFormat(): this {\n if (this.preFormatted) return this;\n\n for (let i = 0; i < this.tickables.length; ++i) {\n const tickable = this.tickables[i];\n tickable.preFormat();\n const metrics = tickable.getMetrics();\n\n // Maintain max displaced head pixels from all tickables in the context\n this.leftDisplacedHeadPx = Math.max(this.leftDisplacedHeadPx, metrics.leftDisplacedHeadPx);\n this.rightDisplacedHeadPx = Math.max(this.rightDisplacedHeadPx, metrics.rightDisplacedHeadPx);\n\n // Maintain the widest note for all tickables in the context\n this.notePx = Math.max(this.notePx, metrics.notePx);\n\n // Maintain the widest note head\n this.glyphPx = Math.max(this.glyphPx, metrics.glyphWidth ?? 0);\n\n // Total modifier shift\n this.modLeftPx = Math.max(this.modLeftPx, metrics.modLeftPx);\n this.modRightPx = Math.max(this.modRightPx, metrics.modRightPx);\n\n // Total shift\n this.totalLeftPx = Math.max(this.totalLeftPx, metrics.modLeftPx + metrics.leftDisplacedHeadPx);\n this.totalRightPx = Math.max(this.totalRightPx, metrics.modRightPx + metrics.rightDisplacedHeadPx);\n\n // Recalculate the tick context total width\n this.width = this.notePx + this.totalLeftPx + this.totalRightPx;\n }\n\n return this;\n }\n\n postFormat(): this {\n if (this.postFormatted) return this;\n this.postFormatted = true;\n return this;\n }\n\n getFormatterMetrics(): { freedom: { left: number; right: number } } {\n return this.formatterMetrics;\n }\n\n /**\n * Move this tick context by `shift` pixels rightward, and adjust the\n * freedom on adjacent tickcontexts.\n * @param shift pixels to shift rightward.\n * @param prev the previous TickContext, whose right freedom will be increased by `shift`.\n * @param next the next TickContext, whose left freedom will be decreased by `shift`.\n */\n move(shift: number, prev?: TickContext, next?: TickContext): void {\n this.setX(this.getX() + shift);\n this.getFormatterMetrics().freedom.left += shift;\n this.getFormatterMetrics().freedom.right -= shift;\n\n if (prev) prev.getFormatterMetrics().freedom.right += shift;\n if (next) next.getFormatterMetrics().freedom.left -= shift;\n }\n\n /**\n * Return the total cost of space deviations from formatter metrics for\n * each tickable in the context. Used by formatters.\n *\n * Since FormatterMetrics.space.deviation is the amount each tickable is smaller\n * (negative) or wider (positive) than the mean amount of space allocated to that\n * duration, a negative return value means the tickables at this position are on average\n * getting less space than they should, while a positive number means they are getting\n * more space than they should.\n */\n getDeviationCost(): number {\n return sumArray(this.tickables.map((t) => t.getFormatterMetrics().space.deviation));\n }\n\n /**\n * Like getDeviationCost, but averages the cost of space deviations so that TickContexts\n * with more Tickables are not weighted more heavily.\n */\n getAverageDeviationCost(): number {\n if (!this.tickables.length) return 0;\n return this.getDeviationCost() / this.tickables.length;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Beam } from './beam';\nimport { BoundingBox } from './boundingbox';\nimport { Fraction } from './fraction';\nimport { Metrics } from './metrics';\nimport { ModifierContext } from './modifiercontext';\nimport { RenderContext } from './rendercontext';\nimport { Stave } from './stave';\nimport { StaveConnector } from './staveconnector';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { TabNote } from './tabnote';\nimport { TabStave } from './tabstave';\nimport { Tickable } from './tickable';\nimport { TickContext } from './tickcontext';\nimport { isNote, isStaveNote } from './typeguard';\nimport { defined, log, midLine, RuntimeError, sumArray } from './util';\nimport { Voice } from './voice';\n\ninterface Distance {\n maxNegativeShiftPx: number;\n expectedDistance: number;\n fromTickable?: Tickable;\n errorPx?: number;\n fromTickablePx?: number;\n}\n\nexport interface FormatterOptions {\n /** Defaults to Tables.SOFTMAX_FACTOR. */\n softmaxFactor?: number;\n\n /** Defaults to `false`. */\n globalSoftmax?: boolean;\n\n /** Defaults to 5. */\n maxIterations?: number;\n}\n\n/** An interface for passing options to various formatters **/\nexport interface FormatParams {\n /** Should rests align vertically with neighboring notes (default false) **/\n alignRests?: boolean;\n /** Should notes be automatically beamed **/\n autoBeam?: boolean;\n /** Stave object to render to **/\n stave?: Stave;\n /** The RenderContext **/\n context?: RenderContext;\n}\n\nexport interface AlignmentTickContexts {\n list: number[];\n map: Record<number, TickContext>;\n array: TickContext[];\n resolutionMultiplier: number;\n}\n\nexport interface AlignmentModifierContexts {\n map: Map<Stave | undefined, Record<number, ModifierContext>>;\n array: ModifierContext[];\n resolutionMultiplier: number;\n}\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Formatter.DEBUG) log('VexFlow.Formatter', args);\n}\n\n/**\n * Get the rest line number of the next non-rest note(s).\n * @param notes array of Notes\n * @param currRestLine\n * @param currNoteIndex current note index\n * @param compare if true, return the midpoint between the current rest line and the next rest line\n * @returns a line number, which determines the vertical position of a rest.\n */\nfunction getRestLineForNextNoteGroup(\n notes: Tickable[],\n currRestLine: number,\n currNoteIndex: number,\n compare: boolean\n): number {\n // If no valid next note group, nextRestLine is same as current.\n let nextRestLine = currRestLine;\n\n // Start with the next note and keep going until we find a valid non-rest note group.\n for (let noteIndex = currNoteIndex + 1; noteIndex < notes.length; noteIndex++) {\n const note = notes[noteIndex];\n if (isNote(note) && !note.isRest() && !note.shouldIgnoreTicks()) {\n nextRestLine = note.getLineForRest();\n break;\n }\n }\n\n // Locate the midpoint between two lines.\n if (compare && currRestLine !== nextRestLine) {\n const top = Math.max(currRestLine, nextRestLine);\n const bot = Math.min(currRestLine, nextRestLine);\n nextRestLine = midLine(top, bot);\n }\n return nextRestLine;\n}\n\n/**\n * Format implements the formatting and layout algorithms that are used\n * to position notes in a voice. The algorithm can align multiple voices both\n * within a stave, and across multiple staves.\n *\n * To do this, the formatter breaks up voices into a grid of rational-valued\n * `ticks`, to which each note is assigned. Then, minimum widths are assigned\n * to each tick based on the widths of the notes and modifiers in that tick. This\n * establishes the smallest amount of space required for each tick.\n *\n * Finally, the formatter distributes the leftover space proportionally to\n * all the ticks, setting the `x` values of the notes in each tick.\n *\n * See `tests/formatter_tests.ts` for usage examples. The helper functions included\n * here (`FormatAndDraw`, `FormatAndDrawTab`) also serve as useful usage examples.\n */\nexport class Formatter {\n // To enable logging for this class. Set `VexFlow.Formatter.DEBUG` to `true`.\n static DEBUG: boolean = false;\n protected hasMinTotalWidth: boolean;\n protected minTotalWidth: number;\n protected contextGaps: {\n total: number;\n gaps: { x1: number; x2: number }[];\n };\n protected justifyWidth: number;\n protected totalCost: number;\n protected totalShift: number;\n // note: this is poorly named because there is an object type TickContext,\n // and this does not store it (similarly with modifierContexts).\n protected tickContexts: AlignmentTickContexts;\n protected formatterOptions: Required<FormatterOptions>;\n // note that this is an array of AlignmentModifierContexts, not one like tickContexts.\n protected modifierContexts: AlignmentModifierContexts[];\n protected voices: Voice[];\n protected lossHistory: number[];\n protected durationStats: Record<string, { mean: number; count: number; total: number }>;\n\n /**\n * Helper function to layout \"notes\" one after the other without\n * regard for proportions. Useful for tests and debugging.\n */\n static SimpleFormat(notes: Tickable[], x = 0, { paddingBetween = 10 } = {}): void {\n notes.reduce((accumulator, note) => {\n note.addToModifierContext(new ModifierContext());\n const tickContext = new TickContext().addTickable(note).preFormat();\n const metrics = tickContext.getMetrics();\n tickContext.setX(accumulator + metrics.totalLeftPx);\n\n return accumulator + tickContext.getWidth() + metrics.totalRightPx + paddingBetween;\n }, x);\n }\n\n /** Helper function to plot formatter debug info. */\n static plotDebugging(\n ctx: RenderContext,\n formatter: Formatter,\n xPos: number,\n y1: number,\n y2: number,\n options?: { stavePadding: number }\n ): void {\n options = {\n stavePadding: Metrics.get('Stave.padding'),\n ...options,\n };\n\n const x = xPos + options.stavePadding;\n const contextGaps = formatter.contextGaps;\n\n function stroke(x1: number, x2: number, color: string) {\n ctx.beginPath();\n ctx.setStrokeStyle(color);\n ctx.setFillStyle(color);\n ctx.setLineWidth(1);\n ctx.fillRect(x1, y1, Math.max(x2 - x1, 0), y2 - y1);\n }\n\n ctx.save();\n ctx.setFont(Metrics.get('fontFamily'), 8);\n\n contextGaps.gaps.forEach((gap) => {\n stroke(x + gap.x1, x + gap.x2, 'rgba(100,200,100,0.4)');\n ctx.setFillStyle('green');\n ctx.fillText(Math.round(gap.x2 - gap.x1).toString(), x + gap.x1, y2 + 12);\n });\n\n ctx.setFillStyle('red');\n ctx.fillText(\n `Loss: ${(formatter.totalCost ?? 0).toFixed(2)} Shift: ${(formatter.totalShift ?? 0).toFixed(\n 2\n )} Gap: ${contextGaps.total.toFixed(2)}`,\n x - 20,\n y2 + 27\n );\n ctx.restore();\n }\n\n /**\n * Helper function to format and draw a single voice. Returns a bounding\n * box for the notation.\n * @param ctx the rendering context\n * @param stave the stave to which to draw (`Stave` or `TabStave`)\n * @param notes array of `Note` instances (`Note`, `TextNote`, `TabNote`, etc.)\n * @param params one of below:\n * * Setting `autoBeam` only `(context, stave, notes, true)` or\n * `(ctx, stave, notes, {autoBeam: true})`\n * * Setting `alignRests` a struct is needed `(context, stave, notes, {alignRests: true})`\n * * Setting both a struct is needed `(context, stave, notes, {\n * autoBeam: true, alignRests: true})`\n * * `autoBeam` automatically generates beams for the notes.\n * * `alignRests` aligns rests with nearby notes.\n */\n static FormatAndDraw(\n ctx: RenderContext,\n stave: Stave,\n notes: StemmableNote[],\n params?: FormatParams | boolean\n ): BoundingBox | undefined {\n let options = {\n autoBeam: false,\n alignRests: false,\n };\n\n if (typeof params === 'object') {\n options = { ...options, ...params };\n } else if (typeof params === 'boolean') {\n options.autoBeam = params;\n }\n\n // Start by creating a voice and adding all the notes to it.\n const voice = new Voice(Tables.TIME4_4).setMode(Voice.Mode.SOFT).addTickables(notes);\n\n // Then create beams, if requested.\n const beams = options.autoBeam ? Beam.applyAndGetBeams(voice) : [];\n\n // Instantiate a `Formatter` and format the notes.\n new Formatter()\n .joinVoices([voice]) // , { alignRests: options.alignRests })\n .formatToStave([voice], stave, { alignRests: options.alignRests, stave });\n\n // Render the voice and beams to the stave.\n voice.setContext(ctx).setStave(stave).drawWithStyle();\n beams.forEach((beam) => beam.setContext(ctx).drawWithStyle());\n\n // Return the bounding box of the voice.\n return voice.getBoundingBox();\n }\n\n /**\n * Helper function to format and draw aligned tab and stave notes in two\n * separate staves.\n * @param ctx the rendering context\n * @param tabstave a `TabStave` instance on which to render `TabNote`s.\n * @param stave a `Stave` instance on which to render `Note`s.\n * @param notes array of `Note` instances for the stave (`Note`, `BarNote`, etc.)\n * @param tabnotes array of `Note` instances for the tab stave (`TabNote`, `BarNote`, etc.)\n * @param autoBeam automatically generate beams.\n * @param params a FormatParams configuration object:\n * * `autoBeam` automatically generates beams for the notes. (overrides autoBeam setting above)\n * * `alignRests` aligns rests with nearby notes. (default false)\n */\n static FormatAndDrawTab(\n ctx: RenderContext,\n tabstave: TabStave,\n stave: Stave,\n tabnotes: TabNote[],\n notes: Tickable[],\n autoBeam: boolean,\n params: FormatParams\n ): void {\n let opts = {\n autoBeam,\n alignRests: false,\n };\n\n if (typeof params === 'object') {\n opts = { ...opts, ...params };\n } else if (typeof params === 'boolean') {\n opts.autoBeam = params;\n }\n\n // Create a `4/4` voice for `notes`.\n const notevoice = new Voice(Tables.TIME4_4).setMode(Voice.Mode.SOFT).addTickables(notes);\n\n // Create a `4/4` voice for `tabnotes`.\n const tabvoice = new Voice(Tables.TIME4_4).setMode(Voice.Mode.SOFT).addTickables(tabnotes);\n\n // Then create beams, if requested.\n const beams = opts.autoBeam ? Beam.applyAndGetBeams(notevoice) : [];\n\n // Instantiate a `Formatter` and align tab and stave notes.\n new Formatter()\n .joinVoices([notevoice]) // , { alignRests: opts.alignRests })\n .joinVoices([tabvoice])\n .formatToStave([notevoice, tabvoice], stave, { alignRests: opts.alignRests });\n\n // Render voices and beams to staves.\n notevoice.draw(ctx, stave);\n tabvoice.draw(ctx, tabstave);\n beams.forEach((beam) => beam.setContext(ctx).drawWithStyle());\n\n // Draw a connector between tab and note staves.\n new StaveConnector(stave, tabstave).setContext(ctx).drawWithStyle();\n }\n\n /**\n * Automatically set the vertical position of rests based on previous/next note positions.\n * Useful for multiple voices on the same staff or for rests within beam groups.\n * Ignores rests that have already been set to a line other than 3 (middle line).\n * @param tickables an array of Tickables.\n * @param alignAllNotes If `false`, only align rests that are within a group of beamed notes.\n * @param alignTuplets If `false` (default), ignores tuplets.\n */\n static AlignRestsToNotes(tickables: Tickable[], alignAllNotes: boolean, alignTuplets: boolean = false): void {\n tickables.forEach((currTickable: Tickable, index: number): void => {\n if (isStaveNote(currTickable) && currTickable.isRest()) {\n if (currTickable.getTuplet() && !alignTuplets) {\n return;\n }\n\n // If activated rests not on default can be rendered as specified.\n const line = currTickable.getLineForRest();\n if (line !== 3) {\n return;\n }\n\n if (alignAllNotes || currTickable.getBeam()) {\n // Align rests with previous/next notes.\n const props = currTickable.getKeyProps()[0];\n if (index === 0) {\n props.line = getRestLineForNextNoteGroup(tickables, props.line, index, false);\n } else if (index > 0 && index < tickables.length) {\n // If previous tickable is a rest, use its line number.\n const prevTickable = tickables[index - 1];\n if (isStaveNote(prevTickable)) {\n if (prevTickable.isRest()) {\n props.line = prevTickable.getKeyProps()[0].line;\n } else {\n const restLine = prevTickable.getLineForRest();\n // Get the rest line for next valid non-rest note group.\n props.line = getRestLineForNextNoteGroup(tickables, restLine, index, true);\n }\n }\n }\n currTickable.setKeyLine(0, props.line);\n }\n }\n });\n }\n\n constructor(options?: FormatterOptions) {\n this.formatterOptions = {\n globalSoftmax: false,\n softmaxFactor: Tables.SOFTMAX_FACTOR,\n maxIterations: 5,\n ...options,\n };\n this.justifyWidth = 0;\n this.totalCost = 0;\n this.totalShift = 0;\n this.durationStats = {};\n\n // Minimum width required to render all the notes in the voices.\n this.minTotalWidth = 0;\n\n // This is set to `true` after `minTotalWidth` is calculated.\n this.hasMinTotalWidth = false;\n\n // Arrays of tick and modifier contexts.\n this.tickContexts = {\n map: {},\n array: [],\n list: [],\n resolutionMultiplier: 0,\n };\n\n this.modifierContexts = [];\n\n // Gaps between contexts, for free movement of notes post\n // formatting.\n this.contextGaps = {\n total: 0,\n gaps: [],\n };\n\n this.voices = [];\n this.lossHistory = [];\n }\n\n /**\n * Find all the rests in each of the `voices` and align them vertically to neighboring notes.\n *\n * @param voices\n * @param alignAllNotes If `false`, only align rests within beamed groups of notes. If `true`, align all rests.\n */\n alignRests(voices: Voice[], alignAllNotes: boolean): void {\n if (!voices || !voices.length) {\n throw new RuntimeError('BadArgument', 'No voices to format rests');\n }\n\n voices.forEach((voice) => Formatter.AlignRestsToNotes(voice.getTickables(), alignAllNotes));\n }\n\n /**\n * Estimate the width required to render 'voices'. This is done by:\n * 1. Sum the widths of all the tick contexts\n * 2. Estimate the padding.\n * The latter is done by calculating the padding 3 different ways, and taking the\n * greatest value:\n * 1. the padding required for unaligned notes in different voices\n * 2. the padding based on the stddev of the tickable widths\n * 3. the padding based on the stddev of the tickable durations.\n *\n * The last 2 quantities estimate a 'width entropy', where notes might need more\n * room than the proportional formatting gives them. A measure of all same duration\n * and width will need no extra padding, and all these quantities will be\n * zero in that case.\n *\n * Note: joinVoices has to be called before calling preCalculateMinTotalWidth.\n *\n * @param voices the voices that contain the notes\n * @returns the estimated width in pixels\n */\n preCalculateMinTotalWidth(voices: Voice[]): number {\n const unalignedPadding = Metrics.get('Stave.unalignedNotePadding');\n // Calculate additional padding based on 3 methods:\n // 1) unaligned beats in voices, 2) variance of width, 3) variance of durations\n let unalignedCtxCount = 0;\n let wsum = 0;\n let dsum = 0;\n const widths: number[] = [];\n const durations: number[] = [];\n\n // Cache results.\n if (this.hasMinTotalWidth) return this.minTotalWidth;\n\n // Create tick contexts.\n if (!voices) {\n throw new RuntimeError('BadArgument', \"'voices' required to run preCalculateMinTotalWidth\");\n }\n\n this.createTickContexts(voices);\n\n const { list: contextList, map: contextMap } = this.tickContexts!;\n this.minTotalWidth = 0;\n\n // Go through each tick context and calculate total width,\n // and also accumulate values used in padding hints\n contextList.forEach((tick) => {\n const context = contextMap[tick];\n context.preFormat();\n // If this TC doesn't have all the voices on it, it's unaligned.\n // so increment the unaligned padding accumulator\n if (context.getTickables().length < voices.length) {\n unalignedCtxCount += 1;\n }\n // Calculate the 'width entropy' over all the Tickables.\n context.getTickables().forEach((t: Tickable) => {\n wsum += t.getMetrics().width;\n dsum += t.getTicks().value();\n widths.push(t.getMetrics().width);\n durations.push(t.getTicks().value());\n });\n const width = context.getWidth();\n this.minTotalWidth += width;\n });\n\n this.hasMinTotalWidth = true;\n // normalized (0-1) STDDEV of widths/durations gives us padding hints.\n const wavg = wsum > 0 ? wsum / widths.length : 1 / widths.length;\n const wvar = sumArray(widths.map((ll) => Math.pow(ll - wavg, 2)));\n const wpads = Math.pow(wvar / widths.length, 0.5) / wavg;\n\n const davg = dsum / durations.length;\n const dvar = sumArray(durations.map((ll) => Math.pow(ll - davg, 2)));\n const dpads = Math.pow(dvar / durations.length, 0.5) / davg;\n\n // Find max of 3 methods pad the width with that\n const padmax = Math.max(dpads, wpads) * contextList.length * unalignedPadding;\n const unalignedPad = unalignedPadding * unalignedCtxCount;\n\n return this.minTotalWidth + Math.max(unalignedPad, padmax);\n }\n\n /**\n * Get minimum width required to render all voices. Either `format` or\n * `preCalculateMinTotalWidth` must be called before this method.\n */\n getMinTotalWidth(): number {\n if (!this.hasMinTotalWidth) {\n throw new RuntimeError(\n 'NoMinTotalWidth',\n \"Call 'preCalculateMinTotalWidth' or 'preFormat' before calling 'getMinTotalWidth'\"\n );\n }\n\n return this.minTotalWidth;\n }\n\n /** Calculate the resolution multiplier for `voices`, which is the\n * least common multiple of all the voices' getResolutionMultiplier() results. */\n static getResolutionMultiplier(voices: Voice[]): number {\n if (!voices || !voices.length) {\n throw new RuntimeError('BadArgument', 'No voices to format');\n }\n const totalTicks = voices[0].getTotalTicks();\n const resolutionMultiplier = voices.reduce((accumulator, voice) => {\n if (!voice.getTotalTicks().equals(totalTicks)) {\n throw new RuntimeError('TickMismatch', 'Voices should have same total note duration in ticks.');\n }\n\n if (voice.getMode() === Voice.Mode.STRICT && !voice.isComplete()) {\n throw new RuntimeError('IncompleteVoice', 'Voice does not have enough notes.');\n }\n\n return Math.max(accumulator, Fraction.LCM(accumulator, voice.getResolutionMultiplier()));\n }, 1);\n return resolutionMultiplier;\n }\n\n /** Create a `ModifierContext` for each tick in `voices`. */\n createModifierContexts(voices: Voice[]) {\n if (voices.length === 0) return;\n const resolutionMultiplier = Formatter.getResolutionMultiplier(voices);\n\n // Initialize tick maps.\n const tickToContextMap: Map<Stave | undefined, Record<number, ModifierContext>> = new Map();\n const contexts: ModifierContext[] = [];\n\n // For each voice, extract notes and create a context for every\n // new tick that hasn't been seen before.\n voices.forEach((voice) => {\n // Use resolution multiplier as denominator so that no additional expansion\n // of fractional tick values is needed.\n const ticksUsed = new Fraction(0, resolutionMultiplier);\n\n voice.getTickables().forEach((tickable) => {\n const integerTicks = ticksUsed.numerator;\n let staveTickToContextMap = tickToContextMap.get(tickable.getStave());\n\n // If we have no tick context for this tick, create one.\n if (!staveTickToContextMap) {\n tickToContextMap.set(tickable.getStave(), {});\n staveTickToContextMap = tickToContextMap.get(tickable.getStave());\n }\n if (!(staveTickToContextMap ? staveTickToContextMap[integerTicks] : undefined)) {\n const newContext = new ModifierContext();\n contexts.push(newContext);\n\n staveTickToContextMap![integerTicks] = newContext;\n }\n\n // Add this tickable to the TickContext.\n\n tickable.addToModifierContext(staveTickToContextMap![integerTicks]);\n ticksUsed.add(tickable.getTicks());\n });\n });\n\n this.modifierContexts.push({\n map: tickToContextMap,\n array: contexts,\n resolutionMultiplier,\n });\n }\n\n /**\n * Create a `TickContext` for each tick in `voices`. Also calculate the\n * total number of ticks in voices.\n */\n createTickContexts(voices: Voice[]): AlignmentTickContexts {\n if (voices.length === 0) {\n // We need to short-circuit this since at present, Formatter.getResolutionMultiplier\n // throws an error on no voices.\n return {\n map: {},\n array: [],\n list: [],\n resolutionMultiplier: 0,\n } as AlignmentTickContexts;\n }\n\n // Initialize tick maps.\n const tickToContextMap: Record<number, TickContext> = {};\n const tickList: number[] = [];\n const tickContexts: TickContext[] = [];\n const resolutionMultiplier = Formatter.getResolutionMultiplier(voices);\n // For each voice, extract notes and create a context for every\n // new tick that hasn't been seen before.\n voices.forEach((voice: Voice, voiceIndex: number): void => {\n // Use resolution multiplier as denominator so that no additional expansion\n // of fractional tick values is needed.\n const ticksUsed = new Fraction(0, resolutionMultiplier);\n\n voice.getTickables().forEach((tickable: Tickable): void => {\n const integerTicks: number = ticksUsed.numerator;\n\n // If we have no tick context for this tick, create one.\n if (!tickToContextMap[integerTicks]) {\n const newContext = new TickContext({ tickID: integerTicks });\n tickContexts.push(newContext);\n tickToContextMap[integerTicks] = newContext;\n // Maintain a list of unique integerTicks.\n tickList.push(integerTicks);\n }\n\n // Add this tickable to the TickContext.\n const tickContext: TickContext = tickToContextMap[integerTicks];\n tickContext.addTickable(tickable, voiceIndex);\n ticksUsed.add(tickable.getTicks());\n });\n });\n\n const contexts: AlignmentTickContexts = {\n map: tickToContextMap,\n array: tickContexts,\n list: tickList.sort((a, b) => a - b),\n resolutionMultiplier,\n };\n\n this.tickContexts = contexts;\n // Give each TickContext a link to the array of all TickContexts\n // for moving forward and backwards.\n const contextArray: TickContext[] = this.tickContexts.array;\n\n contextArray.forEach((context: TickContext): void => {\n context.tContexts = contextArray;\n });\n return contexts;\n }\n\n /**\n * Get the AlignmentTickContexts of TickContexts that were created by createTickContexts.\n * Returns undefined if createTickContexts has not yet been run.\n */\n getTickContexts(): AlignmentTickContexts | undefined {\n return this.tickContexts;\n }\n\n /**\n * This is the core formatter logic. Format voices and justify them\n * to `justifyWidth` pixels. `renderingContext` is required to justify elements\n * that can't retrieve widths without a canvas. This method sets the `x` positions\n * of all the tickables/notes in the formatter.\n */\n preFormat(justifyWidth = 0, renderingContext?: RenderContext, voicesParam?: Voice[], stave?: Stave): number {\n // Initialize context maps.\n const contexts: AlignmentTickContexts = this.tickContexts;\n if (!contexts) {\n throw new RuntimeError('NoTickContexts', 'preFormat requires TickContexts');\n }\n\n const { list: contextList, map: contextMap } = contexts;\n\n // Reset loss history for evaluator.\n this.lossHistory = [];\n\n // If voices and a stave were provided, set the Stave for each voice\n // and preFormat to apply Y values to the notes;\n if (voicesParam && stave) {\n voicesParam.forEach((voice: Voice): Voice => voice.setStave(stave).preFormat());\n }\n\n // Now distribute the ticks to each tick context, and assign them their\n // own X positions.\n let x = 0;\n let shift = 0;\n this.minTotalWidth = 0;\n let totalTicks = 0;\n\n // Pass 1: Give each note maximum width requested by context.\n contextList.forEach((tick) => {\n const context = contextMap[tick];\n\n // Make sure that all tickables in this context have calculated their\n // space requirements.\n context.preFormat();\n\n const width = context.getWidth();\n this.minTotalWidth += width;\n\n const maxTicks = context.getMaxTicks().value();\n totalTicks += maxTicks;\n\n const metrics = context.getMetrics();\n x = x + shift + metrics.totalLeftPx;\n context.setX(x);\n\n // Calculate shift for the next tick.\n shift = width - metrics.totalLeftPx;\n });\n\n // Use softmax based on all notes across all staves. (options.globalSoftmax)\n const { globalSoftmax, softmaxFactor, maxIterations } = this.formatterOptions;\n\n const exp = (tick: number) => softmaxFactor ** (contextMap[tick].getMaxTicks().value() / totalTicks);\n const expTicksUsed = sumArray(contextList.map(exp));\n\n this.minTotalWidth = x + shift;\n this.hasMinTotalWidth = true;\n\n // No justification needed. End formatting.\n if (justifyWidth <= 0) return this.evaluate();\n\n // Start justification. Subtract the right extra pixels of the final context because the formatter\n // justifies based on the context's X position, which is the left-most part of the note head.\n const firstContext = contextMap[contextList[0]];\n const lastContext = contextMap[contextList[contextList.length - 1]];\n\n // Calculate the \"distance error\" between the tick contexts. The expected distance is the spacing proportional to\n // the softmax of the ticks.\n function calculateIdealDistances(adjustedJustifyWidth: number): Distance[] {\n const distances: Distance[] = contextList.map((tick: number, i: number) => {\n const context: TickContext = contextMap[tick];\n const voices = context.getTickablesByVoice();\n let backTickable: Tickable | undefined;\n if (i > 0) {\n const prevContext: TickContext = contextMap[contextList[i - 1]];\n // Go through each tickable and search backwards for another tickable\n // in the same voice. If found, use that duration (ticks) to calculate\n // the expected distance.\n for (let j = i - 1; j >= 0; j--) {\n const backTick: TickContext = contextMap[contextList[j]];\n const backVoices = backTick.getTickablesByVoice();\n\n // Look for matching voices between tick contexts.\n const matchingVoices: string[] = [];\n Object.keys(voices).forEach((v) => {\n if (backVoices[v]) {\n matchingVoices.push(v);\n }\n });\n\n if (matchingVoices.length > 0) {\n // Found matching voices, get largest duration\n let maxTicks = 0;\n let maxNegativeShiftPx = Infinity;\n let expectedDistance = 0;\n\n matchingVoices.forEach((v) => {\n const ticks = backVoices[v].getTicks().value();\n if (ticks > maxTicks) {\n backTickable = backVoices[v];\n maxTicks = ticks;\n }\n\n // Calculate the limits of the shift based on modifiers, etc.\n const thisTickable = voices[v];\n const insideLeftEdge =\n thisTickable.getX() -\n (thisTickable.getMetrics().modLeftPx + thisTickable.getMetrics().leftDisplacedHeadPx);\n\n const backMetrics = backVoices[v].getMetrics();\n const insideRightEdge =\n backVoices[v].getX() + backMetrics.notePx + backMetrics.modRightPx + backMetrics.rightDisplacedHeadPx;\n\n // Don't allow shifting if notes in the same voice can collide\n maxNegativeShiftPx = Math.min(maxNegativeShiftPx, insideLeftEdge - insideRightEdge);\n });\n\n // Don't shift further left than the notehead of the last context. Actually, stay at most 5% to the right\n // so that two different tick contexts don't align across staves.\n maxNegativeShiftPx = Math.min(\n maxNegativeShiftPx,\n context.getX() - (prevContext.getX() + adjustedJustifyWidth * 0.05)\n );\n\n // Calculate the expected distance of the current context from the last matching tickable. The\n // distance is scaled down by the softmax for the voice.\n if (globalSoftmax) {\n const t = totalTicks;\n expectedDistance = (softmaxFactor ** (maxTicks / t) / expTicksUsed) * adjustedJustifyWidth;\n } else if (typeof backTickable !== 'undefined') {\n expectedDistance = backTickable.getVoice().softmax(maxTicks) * adjustedJustifyWidth;\n }\n return {\n expectedDistance,\n maxNegativeShiftPx,\n fromTickable: backTickable,\n };\n }\n }\n }\n\n return { expectedDistance: 0, fromTickablePx: 0, maxNegativeShiftPx: 0 };\n });\n return distances;\n }\n\n function shiftToIdealDistances(idealDistances: Distance[]): number {\n // Distribute ticks to the contexts based on the calculated distance error.\n const centerX = adjustedJustifyWidth / 2;\n let spaceAccum = 0;\n\n contextList.forEach((tick, index) => {\n const context = contextMap[tick];\n if (index > 0) {\n const contextX = context.getX();\n const ideal = idealDistances[index];\n const errorPx = defined(ideal.fromTickable).getX() + ideal.expectedDistance - (contextX + spaceAccum);\n\n let negativeShiftPx = 0;\n if (errorPx > 0) {\n spaceAccum += errorPx;\n } else if (errorPx < 0) {\n negativeShiftPx = Math.min(ideal.maxNegativeShiftPx, Math.abs(errorPx));\n spaceAccum += -negativeShiftPx;\n }\n context.setX(contextX + spaceAccum);\n }\n // Move center aligned tickables to middle\n context.getCenterAlignedTickables().forEach((tickable: Tickable) => {\n tickable.setCenterXShift(centerX - context.getX());\n });\n });\n\n return lastContext.getX() - firstContext.getX();\n }\n\n const adjustedJustifyWidth =\n justifyWidth -\n lastContext.getMetrics().notePx -\n lastContext.getMetrics().totalRightPx -\n firstContext.getMetrics().totalLeftPx;\n const configMinPadding = Metrics.get('Stave.endPaddingMin');\n const configMaxPadding = Metrics.get('Stave.endPaddingMax');\n const leftPadding = Metrics.get('Stave.padding');\n let targetWidth = adjustedJustifyWidth;\n const distances = calculateIdealDistances(targetWidth);\n let actualWidth = shiftToIdealDistances(distances);\n\n // Just one context. Done formatting.\n if (contextList.length === 1) return 0;\n const calcMinDistance = (targetWidth: number, distances: Distance[]) => {\n let mdCalc = targetWidth / 2;\n if (distances.length > 1) {\n for (let di = 1; di < distances.length; ++di) {\n mdCalc = Math.min(distances[di].expectedDistance / 2, mdCalc);\n }\n }\n return mdCalc;\n };\n const minDistance = calcMinDistance(targetWidth, distances);\n\n // right justify to either the configured padding, or the min distance between notes, whichever is greatest.\n // This * 2 keeps the existing formatting unless there is 'a lot' of extra whitespace, which won't break\n // existing visual regression tests.\n const paddingMaxCalc = (curTargetWidth: number) => {\n let lastTickablePadding = 0;\n const lastTickable = lastContext && lastContext.getMaxTickable();\n if (lastTickable) {\n const voice = lastTickable.getVoice();\n // If the number of actual ticks in the measure <> configured ticks, right-justify\n // because the softmax won't yield the correct value\n if (voice.getTicksUsed().value() > voice.getTotalTicks().value()) {\n return configMaxPadding * 2 < minDistance ? minDistance : configMaxPadding;\n }\n const tickWidth = lastTickable.getWidth();\n lastTickablePadding =\n voice.softmax(lastContext.getMaxTicks().value()) * curTargetWidth - (tickWidth + leftPadding);\n }\n return configMaxPadding * 2 < lastTickablePadding ? lastTickablePadding : configMaxPadding;\n };\n let paddingMax = paddingMaxCalc(targetWidth);\n let paddingMin = paddingMax - (configMaxPadding - configMinPadding);\n const maxX = adjustedJustifyWidth - paddingMin;\n\n let iterations = maxIterations;\n // Adjust justification width until the right margin is as close as possible to the calculated padding,\n // without going over\n while ((actualWidth > maxX && iterations > 0) || (actualWidth + paddingMax < maxX && iterations > 1)) {\n targetWidth -= actualWidth - maxX;\n paddingMax = paddingMaxCalc(targetWidth);\n paddingMin = paddingMax - (configMaxPadding - configMinPadding);\n actualWidth = shiftToIdealDistances(calculateIdealDistances(targetWidth));\n iterations--;\n }\n\n this.justifyWidth = justifyWidth;\n return this.evaluate();\n }\n\n /** Calculate the total cost of this formatting decision. */\n evaluate(): number {\n const contexts = this.tickContexts;\n const justifyWidth = this.justifyWidth;\n // Calculate available slack per tick context. This works out how much freedom\n // to move a context has in either direction, without affecting other notes.\n this.contextGaps = { total: 0, gaps: [] };\n contexts.list.forEach((tick, index) => {\n if (index === 0) return;\n const prevTick = contexts.list[index - 1];\n const prevContext = contexts.map[prevTick];\n const context = contexts.map[tick];\n const prevMetrics = prevContext.getMetrics();\n const currMetrics = context.getMetrics();\n\n // Calculate X position of right edge of previous note\n const insideRightEdge = prevContext.getX() + prevMetrics.notePx + prevMetrics.totalRightPx;\n // Calculate X position of left edge of current note\n const insideLeftEdge = context.getX() - currMetrics.totalLeftPx;\n const gap = insideLeftEdge - insideRightEdge;\n this.contextGaps.total += gap;\n this.contextGaps.gaps.push({ x1: insideRightEdge, x2: insideLeftEdge });\n\n // Tell the tick contexts how much they can reposition themselves.\n context.getFormatterMetrics().freedom.left = gap;\n prevContext.getFormatterMetrics().freedom.right = gap;\n });\n\n // Calculate mean distance in each voice for each duration type, then calculate\n // how far each note is from the mean.\n this.durationStats = {};\n const durationStats = this.durationStats;\n\n function updateStats(duration: string, space: number) {\n const stats = durationStats[duration];\n if (stats === undefined) {\n durationStats[duration] = { mean: space, count: 1, total: space };\n } else {\n stats.count += 1;\n stats.total += space;\n stats.mean = stats.total / stats.count;\n }\n }\n\n this.voices.forEach((voice) => {\n voice.getTickables().forEach((note, i, notes) => {\n const duration = note.getTicks().clone().simplify().toString();\n const metrics = note.getMetrics();\n const formatterMetrics = note.getFormatterMetrics();\n const leftNoteEdge = note.getX() + metrics.notePx + metrics.modRightPx + metrics.rightDisplacedHeadPx;\n let space = 0;\n\n if (i < notes.length - 1) {\n const rightNote = notes[i + 1];\n const rightMetrics = rightNote.getMetrics();\n const rightNoteEdge = rightNote.getX() - rightMetrics.modLeftPx - rightMetrics.leftDisplacedHeadPx;\n\n space = rightNoteEdge - leftNoteEdge;\n formatterMetrics.space.used = rightNote.getX() - note.getX();\n rightNote.getFormatterMetrics().freedom.left = space;\n } else {\n space = justifyWidth - leftNoteEdge;\n formatterMetrics.space.used = justifyWidth - note.getX();\n }\n\n formatterMetrics.freedom.right = space;\n updateStats(duration, formatterMetrics.space.used);\n });\n });\n\n // Calculate how much each note deviates from the mean. Loss function is square\n // root of the sum of squared deviations.\n let totalDeviation = 0;\n this.voices.forEach((voice) => {\n voice.getTickables().forEach((note) => {\n const duration = note.getTicks().clone().simplify().toString();\n const metrics = note.getFormatterMetrics();\n\n metrics.space.mean = durationStats[duration].mean;\n metrics.duration = duration;\n metrics.iterations += 1;\n metrics.space.deviation = metrics.space.used - metrics.space.mean;\n\n totalDeviation += metrics.space.deviation ** 2;\n });\n });\n\n this.totalCost = Math.sqrt(totalDeviation);\n this.lossHistory.push(this.totalCost);\n return this.totalCost;\n }\n\n /**\n * Run a single iteration of rejustification. At a high level, this method calculates\n * the overall \"loss\" (or cost) of this layout, and repositions tickcontexts in an\n * attempt to reduce the cost. You can call this method multiple times until it finds\n * and oscillates around a global minimum.\n * @param options parameters for tuning, currently just \"alpha\".\n * @param options[alpha] the \"learning rate\" for the formatter. It determines how much of a shift\n * the formatter should make based on its cost function. Defaults to 0.5.\n */\n tune(options?: { alpha?: number }): number {\n const contexts = this.tickContexts;\n if (!contexts) {\n return 0;\n }\n\n const alpha = options?.alpha ?? 0.5;\n\n // function `move` moved to tickcontext.\n let shift = 0;\n this.totalShift = 0;\n contexts.list.forEach((tick, index, list) => {\n const context = contexts.map[tick];\n const prevContext = index > 0 ? contexts.map[list[index - 1]] : undefined;\n const nextContext = index < list.length - 1 ? contexts.map[list[index + 1]] : undefined;\n\n context.move(shift, prevContext, nextContext);\n\n // Q(msac): Should the cost by normalized by the number\n // of tickables at this position? If so, switch this to getAverageDeviationCost()\n const cost = -context.getDeviationCost();\n if (cost > 0) {\n shift = -Math.min(context.getFormatterMetrics().freedom.right, Math.abs(cost));\n } else if (cost < 0) {\n if (nextContext) {\n shift = Math.min(nextContext.getFormatterMetrics().freedom.right, Math.abs(cost));\n } else {\n shift = 0;\n }\n }\n\n shift *= alpha;\n this.totalShift += shift;\n });\n\n return this.evaluate();\n }\n\n /**\n * This is the top-level call for all formatting logic completed\n * after `x` *and* `y` values have been computed for the notes\n * in the voices.\n * Calls postFormat on each ModifierContext and TickContext.\n */\n postFormat(): this {\n this.modifierContexts.forEach((modifierContexts) => {\n modifierContexts.array.forEach((mc) => mc.postFormat());\n });\n\n this.tickContexts.list.forEach((tick: number): void => {\n this.tickContexts.map[tick].postFormat();\n });\n\n return this;\n }\n\n /**\n * Take all `voices` and create `ModifierContext`s out of them. This tells\n * the formatters that the voices belong on a single stave.\n */\n joinVoices(voices: Voice[]): this {\n this.createModifierContexts(voices);\n this.hasMinTotalWidth = false;\n return this;\n }\n\n /**\n * Align rests in voices, justify the contexts, and position the notes\n * so voices are aligned and ready to render onto the stave. This method\n * mutates the `x` positions of all tickables in `voices`.\n *\n * Voices are full justified to fit in `justifyWidth` pixels.\n *\n * Set `options.context` to the rendering context. Set `options.alignRests`\n * to true to enable rest vertical alignment.\n */\n format(voices: Voice[], justifyWidth?: number, options?: FormatParams): this {\n const opts = {\n alignRests: false,\n ...options,\n };\n\n this.voices = voices;\n const softmaxFactor = this.formatterOptions.softmaxFactor;\n if (softmaxFactor) {\n this.voices.forEach((v) => v.setSoftmaxFactor(softmaxFactor));\n }\n\n this.alignRests(voices, opts.alignRests);\n this.createTickContexts(voices);\n this.preFormat(justifyWidth, opts.context, voices, opts.stave);\n\n // Only postFormat if a stave was supplied for y value formatting\n if (opts.stave) this.postFormat();\n\n return this;\n }\n\n // This method is just like `format` except that the `justifyWidth` is inferred from the `stave`.\n formatToStave(voices: Voice[], stave: Stave, optionsParam?: FormatParams): this {\n const options: FormatParams = { context: stave.getContext(), ...optionsParam };\n\n const justifyWidth = stave.getNoteEndX() - stave.getNoteStartX() - Stave.defaultPadding;\n L('Formatting voices to width: ', justifyWidth);\n return this.format(voices, justifyWidth, options);\n }\n\n getTickContext(tick: number): TickContext | undefined {\n return this.tickContexts?.map[tick];\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n\n/**\n * ## Description\n *\n * Create a new tuplet from the specified notes. The notes must\n * be part of the same voice. If they are of different rhythmic\n * values, then options.numNotes must be set.\n *\n * @constructor\n * @param {Array.<VexFlow.StaveNote>} A set of notes: staveNotes,\n * notes, etc... any class that inherits stemmableNote at some\n * point in its prototype chain.\n * @param options: object {\n *\n * numNotes: fit this many notes into...\n * notesOccupied: ...the space of this many notes\n *\n * Together, these two properties make up the tuplet ratio\n * in the form of numNotes : notesOccupied.\n * numNotes defaults to the number of notes passed in, so\n * it is important that if you omit this property, all of\n * the notes passed should be of the same note value.\n * notesOccupied defaults to 2 -- so you should almost\n * certainly pass this parameter for anything other than\n * a basic triplet.\n *\n * location:\n * default 1, which is above the notes: ┌─── 3 ───┐\n * -1 is below the notes └─── 3 ───┘\n *\n * bracketed: boolean, draw a bracket around the tuplet number\n * when true: ┌─── 3 ───┐ when false: 3\n * defaults to true if notes are not beamed, false otherwise\n *\n * ratioed: boolean\n * when true: ┌─── 7:8 ───┐, when false: ┌─── 7 ───┐\n * defaults to true if the difference between numNotes and\n * notesOccupied is greater than 1.\n *\n * yOffset: int, default 0\n * manually offset a tuplet, for instance to avoid collisions\n * with articulations, etc...\n *\n * suffix: string\n * suffix to show after ratio.\n * NOTE: any of the Glyphs.met... work well for note glyphs\n * }\n */\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Formatter } from './formatter';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Note } from './note';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface TupletOptions {\n bracketed?: boolean;\n location?: number;\n notesOccupied?: number;\n numNotes?: number;\n ratioed?: boolean;\n yOffset?: number;\n textYOffset?: number;\n suffix?: string;\n}\n\nexport const enum TupletLocation {\n BOTTOM = -1,\n TOP = +1,\n}\n\nexport class Tuplet extends Element {\n static override get CATEGORY(): string {\n return Category.Tuplet;\n }\n\n notes: Note[];\n protected options: Required<TupletOptions>;\n protected textElement: Element;\n protected suffixElement: Element;\n\n static get LOCATION_TOP(): number {\n return TupletLocation.TOP;\n }\n static get LOCATION_BOTTOM(): number {\n return TupletLocation.BOTTOM;\n }\n static get NESTING_OFFSET(): number {\n return 15;\n }\n\n constructor(notes: Note[], options: TupletOptions = {}) {\n super();\n\n if (!notes || !notes.length) {\n throw new RuntimeError('BadArguments', 'No notes provided for tuplet.');\n }\n\n this.notes = notes;\n const numNotes = options.numNotes !== undefined ? options.numNotes : notes.length;\n const notesOccupied = options.notesOccupied || 2;\n const bracketed = options.bracketed !== undefined ? options.bracketed : notes.some((note) => !note.hasBeam());\n const ratioed = options.ratioed !== undefined ? options.ratioed : Math.abs(notesOccupied - numNotes) > 1;\n const location = options.location || Tuplet.LOCATION_TOP;\n const yOffset = options.yOffset || Metrics.get('Tuplet.yOffset');\n const textYOffset = options.textYOffset || Metrics.get('Tuplet.textYOffset');\n const suffix = options.suffix || '';\n\n this.options = {\n bracketed,\n location,\n notesOccupied,\n numNotes,\n ratioed,\n yOffset,\n textYOffset,\n suffix,\n };\n this.textElement = new Element('Tuplet');\n this.suffixElement = new Element('Tuplet.suffix');\n\n this.setTupletLocation(location || Tuplet.LOCATION_TOP);\n\n Formatter.AlignRestsToNotes(notes, true, true);\n this.resolveGlyphs();\n this.attach();\n }\n\n attach(): void {\n for (let i = 0; i < this.notes.length; i++) {\n const note = this.notes[i];\n if (!note.getTupletStack().includes(this)) {\n note.addTuplet(this);\n }\n }\n }\n\n detach(): void {\n for (let i = 0; i < this.notes.length; i++) {\n const note = this.notes[i];\n note.removeTuplet(this);\n }\n }\n\n /**\n * Set whether or not the bracket is drawn.\n */\n setBracketed(bracketed: boolean): this {\n this.options.bracketed = bracketed;\n return this;\n }\n\n /**\n * Set whether or not the ratio is shown.\n */\n setRatioed(ratioed: boolean): this {\n this.options.ratioed = ratioed;\n return this;\n }\n\n /**\n * Set the tuplet indicator to be displayed either on the top or bottom of the stave.\n */\n setTupletLocation(location: number): this {\n if (location !== Tuplet.LOCATION_TOP && location !== Tuplet.LOCATION_BOTTOM) {\n // eslint-disable-next-line\n console.warn(`Invalid tuplet location [${location}]. Using Tuplet.LOCATION_TOP.`);\n location = Tuplet.LOCATION_TOP;\n }\n\n this.options.location = location;\n return this;\n }\n\n getNotes(): Note[] {\n return this.notes;\n }\n\n getNoteCount(): number {\n return this.options.numNotes;\n }\n\n getNotesOccupied(): number {\n return this.options.notesOccupied;\n }\n\n setNotesOccupied(notes: number): void {\n this.detach();\n this.options.notesOccupied = notes;\n this.resolveGlyphs();\n this.attach();\n }\n\n resolveGlyphs(): void {\n // Ratio glyph calculations\n let numerator = '';\n let denominator = '';\n let n = this.options.numNotes;\n while (n >= 1) {\n numerator = String.fromCharCode(0xe880 /* tuplet0 */ + (n % 10)) + numerator;\n n = Math.floor(n / 10);\n }\n\n if (this.options.ratioed) {\n n = this.options.notesOccupied;\n while (n >= 1) {\n denominator = String.fromCharCode(0xe880 /* tuplet0 */ + (n % 10)) + denominator;\n n = Math.floor(n / 10);\n }\n denominator = Glyphs.tupletColon + denominator;\n }\n this.textElement.setText(numerator + denominator);\n\n // resolve shown glyph if needed\n if (this.options.suffix) {\n this.suffixElement.setText(this.options.suffix);\n }\n }\n\n // determine how many tuplets are nested within this tuplet\n // on the same side (above/below), to calculate a y\n // offset for this tuplet:\n getNestedTupletCount(): number {\n const { location } = this.options;\n\n let maxOffset = 0;\n for (const note of this.notes) {\n // Find the array of tuplets that note belongs to\n const stack = note\n .getTupletStack()\n // Count the tuplets that are on the same side (above/below) as this tuplet.\n .filter((tuplet) => tuplet.options.location === location);\n\n // Find where “this” appears in that filtered stack\n const index = stack.indexOf(this);\n if (index >= 0 && index > maxOffset) {\n maxOffset = index;\n }\n }\n\n return maxOffset;\n }\n\n // determine the y position of the tuplet:\n getYPosition(): number {\n // offset the tuplet for any nested tuplets between\n // it and the notes:\n const nestedTupletYOffset = this.getNestedTupletCount() * Tuplet.NESTING_OFFSET * -this.options.location;\n\n // offset the tuplet for any manual yOffset:\n const yOffset = this.options.yOffset ?? 0;\n\n // now iterate through the notes and find our highest\n // or lowest locations, to form a base yPosition\n const firstNote = this.notes[0];\n let yPosition;\n if (this.options.location === Tuplet.LOCATION_TOP) {\n yPosition = firstNote.checkStave().getYForLine(0) - 1.5 * Tables.STAVE_LINE_DISTANCE;\n\n // check modifiers above note to see if they will collide with tuplet beam\n for (let i = 0; i < this.notes.length; ++i) {\n const note = this.notes[i];\n let modLines = 0;\n const mc = note.getModifierContext();\n if (mc) {\n modLines = Math.max(modLines, mc.getState().topTextLine);\n }\n const modY = note.getYForTopText(modLines) - 2 * Tables.STAVE_LINE_DISTANCE;\n if (note.hasStem() || note.isRest()) {\n const topY =\n note.getStemDirection() === Stem.UP\n ? note.getStemExtents().topY - Tables.STAVE_LINE_DISTANCE\n : note.getStemExtents().baseY - 2 * Tables.STAVE_LINE_DISTANCE;\n yPosition = Math.min(topY, yPosition);\n if (modLines > 0) {\n yPosition = Math.min(modY, yPosition);\n }\n }\n }\n } else {\n let lineCheck = 4; // tuplet default on line 4\n // check modifiers below note to see if they will collide with tuplet beam\n this.notes.forEach((nn) => {\n const mc = nn.getModifierContext();\n if (mc) {\n lineCheck = Math.max(lineCheck, mc.getState().textLine + 1);\n }\n });\n yPosition = firstNote.checkStave().getYForLine(lineCheck) + 2 * Tables.STAVE_LINE_DISTANCE;\n\n for (let i = 0; i < this.notes.length; ++i) {\n if (this.notes[i].hasStem() || this.notes[i].isRest()) {\n const bottomY =\n this.notes[i].getStemDirection() === Stem.UP\n ? this.notes[i].getStemExtents().baseY + 2 * Tables.STAVE_LINE_DISTANCE\n : this.notes[i].getStemExtents().topY + Tables.STAVE_LINE_DISTANCE;\n if (bottomY > yPosition) {\n yPosition = bottomY;\n }\n }\n }\n }\n\n return yPosition + nestedTupletYOffset + yOffset;\n }\n\n override draw(): void {\n const { location, bracketed, textYOffset, suffix } = this.options;\n\n const bracketPadding = Metrics.get('Tuplet.bracket.padding');\n const bracketThickness = Metrics.get('Tuplet.bracket.lineWidth');\n const bracketLegLength = Metrics.get('Tuplet.bracket.legLength');\n const extraSpacing = Metrics.get('Tuplet.suffix.extraSpacing');\n const suffixOffsetY = Metrics.get('Tuplet.suffix.suffixOffsetY');\n\n const ctx = this.checkContext();\n let xPos = 0;\n let yPos = 0;\n\n // determine x value of left bound of tuplet\n const firstNote = this.notes[0] as StemmableNote;\n const lastNote = this.notes[this.notes.length - 1] as StemmableNote;\n let bodyWidth = 0;\n if (!bracketed) {\n xPos = firstNote.getStemX();\n bodyWidth = lastNote.getStemX() - xPos;\n this.setWidth(bodyWidth);\n } else {\n xPos = firstNote.getTieLeftX() - bracketPadding;\n bodyWidth = lastNote.getTieRightX() - xPos + bracketPadding;\n // value added to fully include right bracket leg in bounding box\n this.setWidth(bodyWidth + bracketThickness);\n }\n\n this.setX(xPos);\n\n // determine y value for tuplet\n yPos = this.getYPosition();\n\n // set y and height for bounding box calculations\n this.setY(location === TupletLocation.TOP ? yPos : yPos - bracketLegLength + bracketThickness);\n this.height = bracketLegLength;\n\n // calculate width taken by all text elements\n const ratioWidth = this.textElement.getWidth();\n let totalTextWidth = ratioWidth;\n let noteWidth = 0;\n if (suffix) {\n noteWidth = this.suffixElement.getWidth();\n totalTextWidth = ratioWidth + extraSpacing + noteWidth;\n }\n\n // find center of notation for text placement\n const notationCenterX = xPos + bodyWidth / 2;\n const notationStartX = notationCenterX - totalTextWidth / 2;\n\n // Compute a common vertical coordinate for text rendering.\n // (Using the text element’s height as a reference)\n const commonTextY =\n yPos + this.textElement.getHeight() / 2 + (location === Tuplet.LOCATION_TOP ? -1 : 1) * textYOffset;\n\n // start grouping\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('tuplet' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n // draw bracket if the tuplet is not beamed\n if (bracketed) {\n const lineWidth = bodyWidth / 2 - totalTextWidth / 2 - bracketPadding;\n const isTupletBottom = location === Tuplet.LOCATION_BOTTOM;\n\n if (lineWidth > 0) {\n ctx.fillRect(xPos, yPos, lineWidth, bracketThickness);\n ctx.fillRect(xPos + bodyWidth / 2 + totalTextWidth / 2 + bracketPadding, yPos, lineWidth, bracketThickness);\n ctx.fillRect(xPos, yPos + (isTupletBottom ? 1 : 0), bracketThickness, location * bracketLegLength);\n ctx.fillRect(xPos + bodyWidth, yPos + (isTupletBottom ? 1 : 0), bracketThickness, location * bracketLegLength);\n }\n }\n\n // draw ratio text (x:y)\n let currentX = notationStartX;\n this.textElement.renderText(ctx, currentX, commonTextY);\n // set text element proper x and y\n this.textElement.setX(currentX);\n this.textElement.setY(commonTextY);\n currentX += ratioWidth + extraSpacing;\n\n // draw note glyph if wanted\n if (suffix) {\n const suffixY = commonTextY + suffixOffsetY;\n this.suffixElement.renderText(ctx, currentX, suffixY);\n this.suffixElement.setX(currentX);\n this.suffixElement.setY(suffixY);\n currentX += noteWidth;\n }\n\n this.drawPointerRect();\n ctx.closeGroup();\n this.setRendered();\n }\n\n override getBoundingBox(): BoundingBox {\n const { bracketed, suffix } = this.options;\n\n const ratioBounding = this.textElement.getBoundingBox();\n const suffixBounding = this.suffixElement.getBoundingBox();\n\n const mergedText = suffix ? ratioBounding.mergeWith(suffixBounding) : ratioBounding;\n\n if (!bracketed) {\n return mergedText;\n }\n\n const bracketBounding = new BoundingBox(this.x, this.y, this.width, this.height);\n\n return bracketBounding.mergeWith(mergedText);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { Fraction } from './fraction';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Tables } from './tables';\nimport { Tuplet, TupletLocation } from './tuplet';\nimport { Category, isStaveNote, isTabNote } from './typeguard';\nimport { RuntimeError } from './util';\nimport { Voice } from './voice';\n\nfunction calculateStemDirection(notes: StemmableNote[]) {\n let lineSum = 0;\n notes.forEach((note) => {\n if (note.keyProps) {\n note.keyProps.forEach((keyProp) => {\n lineSum += keyProp.line - 3;\n });\n }\n });\n\n if (lineSum >= 0) {\n return Stem.DOWN;\n }\n return Stem.UP;\n}\n\nfunction getStemSlope(firstNote: StemmableNote, lastNote: StemmableNote) {\n const firstStemTipY = firstNote.getStemExtents().topY;\n const firstStemX = firstNote.getStemX();\n const lastStemTipY = lastNote.getStemExtents().topY;\n const lastStemX = lastNote.getStemX();\n return (lastStemTipY - firstStemTipY) / (lastStemX - firstStemX);\n}\n\nexport const BEAM_LEFT = 'L';\nexport const BEAM_RIGHT = 'R';\nexport const BEAM_BOTH = 'B';\n\nexport type PartialBeamDirection = typeof BEAM_LEFT | typeof BEAM_RIGHT | typeof BEAM_BOTH;\n\n/** `Beams` span over a set of `StemmableNotes`. */\nexport class Beam extends Element {\n static override get CATEGORY(): string {\n return Category.Beam;\n }\n\n public renderOptions: {\n flatBeamOffset?: number;\n flatBeams: boolean;\n secondaryBreakTicks?: number;\n showStemlets: boolean;\n beamWidth: number;\n maxSlope: number;\n minSlope: number;\n slopeIterations: number;\n slopeCost: number;\n stemletExtension: number;\n partialBeamLength: number;\n minFlatBeamOffset: number;\n };\n\n notes: StemmableNote[];\n postFormatted: boolean;\n slope: number = 0;\n\n private readonly _stemDirection: number;\n private readonly _ticks: number;\n\n protected override yShift: number = 0;\n private breakOnIndexes: number[];\n private _beamCount: number;\n // note that this is never set and is a private property. Remove?\n private unbeamable?: boolean;\n\n /**\n * Overrides to default beam directions for secondary-level beams that do not\n * connect to any other note. See further explanation at\n * `setPartialBeamSideAt`\n */\n private forcedPartialDirections: {\n [noteIndex: number]: PartialBeamDirection;\n } = {};\n\n /** Get the direction of the beam */\n getStemDirection(): number {\n return this._stemDirection;\n }\n\n /**\n * Get the default beam groups for a provided time signature.\n * Attempt to guess if the time signature is not found in table.\n * Currently this is fairly naive.\n */\n static getDefaultBeamGroups(timeSig: string): Fraction[] {\n if (!timeSig || timeSig === 'c') {\n timeSig = '4/4';\n }\n\n const defaults: { [key: string]: [string] } = {\n '1/2': ['1/2'],\n '2/2': ['1/2'],\n '3/2': ['1/2'],\n '4/2': ['1/2'],\n\n '1/4': ['1/4'],\n '2/4': ['1/4'],\n '3/4': ['1/4'],\n '4/4': ['1/4'],\n\n '1/8': ['1/8'],\n '2/8': ['2/8'],\n '3/8': ['3/8'],\n '4/8': ['2/8'],\n\n '1/16': ['1/16'],\n '2/16': ['2/16'],\n '3/16': ['3/16'],\n '4/16': ['2/16'],\n };\n\n const groups: string[] = defaults[timeSig];\n\n if (groups === undefined) {\n // If no beam groups found, naively determine\n // the beam groupings from the time signature\n const beatTotal = parseInt(timeSig.split('/')[0], 10);\n const beatValue = parseInt(timeSig.split('/')[1], 10);\n\n const tripleMeter = beatTotal % 3 === 0;\n\n if (tripleMeter) {\n return [new Fraction(3, beatValue)];\n } else if (beatValue > 4) {\n return [new Fraction(2, beatValue)];\n } else if (beatValue <= 4) {\n return [new Fraction(1, beatValue)];\n }\n } else {\n return groups.map((group) => new Fraction().parse(group));\n }\n\n return [new Fraction(1, 4)];\n }\n\n /**\n * A helper function to automatically build basic beams for a voice. For more\n * complex auto-beaming use `Beam.generateBeams()`.\n * @param voice the voice to generate the beams for\n * @param stemDirection a stem direction to apply to the entire voice\n * @param groups an array of `Fraction` representing beat groupings for the beam\n */\n static applyAndGetBeams(voice: Voice, stemDirection?: number, groups?: Fraction[]): Beam[] {\n return Beam.generateBeams(voice.getTickables() as StemmableNote[], { groups, stemDirection });\n }\n\n /**\n * A helper function to autimatically build beams for a voice with\n * configuration options.\n *\n * Example configuration object:\n *\n * ```\n * config = {\n * groups: [new VexFlow.Fraction(2, 8)],\n * stemDirection: -1,\n * beamRests: true,\n * beamMiddleOnly: true,\n * showStemlets: false\n * };\n * ```\n * @param notes an array of notes to create the beams for\n * @param config the configuration object\n * @param config.stemDirection set to apply the same direction to all notes\n * @param config.beamRests set to `true` to include rests in the beams\n * @param config.beamMiddleOnly set to `true` to only beam rests in the middle of the beat\n * @param config.showStemlets set to `true` to draw stemlets for rests\n * @param config.maintainStemDirections set to `true` to not apply new stem directions\n * @param config.groups array of `Fractions` that represent the beat structure to beam the notes\n *\n */\n static generateBeams(\n notes: StemmableNote[],\n config: {\n flatBeamOffset?: number;\n flatBeams?: boolean;\n secondaryBreaks?: string;\n showStemlets?: boolean;\n maintainStemDirections?: boolean;\n beamMiddleOnly?: boolean;\n beamRests?: boolean;\n groups?: Fraction[];\n stemDirection?: number;\n } = {}\n ): Beam[] {\n if (!config.groups || !config.groups.length) {\n config.groups = [new Fraction(2, 8)];\n }\n\n // Convert beam groups to tick amounts\n const tickGroups = config.groups.map((group) => {\n if (!group.multiply) {\n throw new RuntimeError('InvalidBeamGroups', 'The beam groups must be an array of VexFlow.Fractions');\n }\n return group.clone().multiply(Tables.RESOLUTION, 1);\n });\n\n const unprocessedNotes: StemmableNote[] = notes;\n let currentTickGroup = 0;\n let noteGroups: StemmableNote[][] = [];\n let currentGroup: StemmableNote[] = [];\n\n function getTotalTicks(notes: Note[]) {\n return notes.reduce((memo, note) => note.getTicks().clone().add(memo), new Fraction(0, 1));\n }\n\n function nextTickGroup() {\n if (tickGroups.length - 1 > currentTickGroup) {\n currentTickGroup += 1;\n } else {\n currentTickGroup = 0;\n }\n }\n\n function createGroups() {\n let nextGroup: StemmableNote[] = [];\n // number of ticks in current group\n let currentGroupTotalTicks = new Fraction(0, 1);\n unprocessedNotes.forEach((unprocessedNote) => {\n nextGroup = [];\n if (unprocessedNote.shouldIgnoreTicks()) {\n noteGroups.push(currentGroup);\n currentGroup = nextGroup;\n return; // Ignore untickables (like bar notes)\n }\n currentGroup.push(unprocessedNote);\n const ticksPerGroup = tickGroups[currentTickGroup].clone();\n const totalTicks = getTotalTicks(currentGroup).add(currentGroupTotalTicks);\n\n // Double the amount of ticks in a group, if it's an unbeamable tuplet\n const unbeamable = Tables.durationToNumber(unprocessedNote.getDuration()) < 8;\n if (unbeamable && unprocessedNote.getTuplet()) {\n ticksPerGroup.numerator *= 2;\n }\n\n // If the note that was just added overflows the group tick total\n if (totalTicks.greaterThan(ticksPerGroup)) {\n // If the overflow note can be beamed, start the next group\n // with it. Unbeamable notes leave the group overflowed.\n if (!unbeamable) {\n const note = currentGroup.pop();\n if (note) nextGroup.push(note);\n }\n noteGroups.push(currentGroup);\n\n // We have overflown, so we're going to next tick group. As we might have\n // overflown by more than 1 group, we need to go forward as many times as\n // needed, decreasing currentGroupTotalTicks by as many ticks as there are\n // in current groups as we go forward.\n do {\n currentGroupTotalTicks = totalTicks.subtract(tickGroups[currentTickGroup]);\n nextTickGroup();\n } while (currentGroupTotalTicks.greaterThanEquals(tickGroups[currentTickGroup]));\n currentGroup = nextGroup;\n } else if (totalTicks.equals(ticksPerGroup)) {\n noteGroups.push(currentGroup);\n currentGroupTotalTicks = new Fraction(0, 1);\n currentGroup = nextGroup;\n nextTickGroup();\n }\n });\n\n // Adds any remainder notes beam\n if (currentGroup.length > 0) {\n noteGroups.push(currentGroup);\n }\n }\n function getBeamGroups() {\n return noteGroups.filter((group) => {\n if (group.length > 1) {\n let beamable = true;\n group.forEach((note) => {\n if (note.getIntrinsicTicks() >= Tables.durationToTicks('4')) {\n beamable = false;\n }\n });\n return beamable;\n }\n return false;\n });\n }\n\n // Splits up groups by Rest\n function sanitizeGroups() {\n const sanitizedGroups: StemmableNote[][] = [];\n noteGroups.forEach((group) => {\n let tempGroup: StemmableNote[] = [];\n group.forEach((note, index, group) => {\n const isFirstOrLast = index === 0 || index === group.length - 1;\n const prevNote = group[index - 1];\n\n const breaksOnEachRest = !config.beamRests && note.isRest();\n const breaksOnFirstOrLastRest = config.beamRests && config.beamMiddleOnly && note.isRest() && isFirstOrLast;\n\n let breakOnStemChange = false;\n if (config.maintainStemDirections && prevNote && !note.isRest() && !prevNote.isRest()) {\n const prevDirection = prevNote.getStemDirection();\n const currentDirection = note.getStemDirection();\n breakOnStemChange = currentDirection !== prevDirection;\n }\n\n const isUnbeamableDuration = parseInt(note.getDuration(), 10) < 8;\n\n // Determine if the group should be broken at this note\n const shouldBreak = breaksOnEachRest || breaksOnFirstOrLastRest || breakOnStemChange || isUnbeamableDuration;\n\n if (shouldBreak) {\n // Add current group\n if (tempGroup.length > 0) {\n sanitizedGroups.push(tempGroup);\n }\n\n // Start a new group. Include the current note if the group\n // was broken up by stem direction, as that note needs to start\n // the next group of notes\n tempGroup = breakOnStemChange ? [note] : [];\n } else {\n // Add note to group\n tempGroup.push(note);\n }\n });\n\n // If there is a remaining group, add it as well\n if (tempGroup.length > 0) {\n sanitizedGroups.push(tempGroup);\n }\n });\n\n noteGroups = sanitizedGroups;\n }\n\n function formatStems() {\n noteGroups.forEach((group) => {\n let stemDirection;\n if (config.maintainStemDirections) {\n const note = findFirstNote(group);\n stemDirection = note ? note.getStemDirection() : Stem.UP;\n } else {\n if (config.stemDirection) {\n stemDirection = config.stemDirection;\n } else {\n stemDirection = calculateStemDirection(group);\n }\n }\n applyStemDirection(group, stemDirection);\n });\n }\n\n function findFirstNote(group: StemmableNote[]) {\n for (let i = 0; i < group.length; i++) {\n const note = group[i];\n if (!note.isRest()) {\n return note;\n }\n }\n\n return false;\n }\n\n function applyStemDirection(group: StemmableNote[], direction: number) {\n group.forEach((note) => {\n note.setStemDirection(direction);\n });\n }\n\n // Get all of the tuplets in all of the note groups\n function getTuplets() {\n const uniqueTuplets: Tuplet[] = [];\n\n // Go through all of the note groups and inspect for tuplets\n noteGroups.forEach((group) => {\n let tuplet: Tuplet;\n group.forEach((note) => {\n const noteTuplet = note.getTuplet();\n if (noteTuplet && tuplet !== noteTuplet) {\n tuplet = noteTuplet;\n uniqueTuplets.push(tuplet);\n }\n });\n });\n return uniqueTuplets;\n }\n\n // Using closures to store the variables throughout the various functions\n // IMO Keeps it this process lot cleaner - but not super consistent with\n // the rest of the API's style - Silverwolf90 (Cyril)\n createGroups();\n sanitizeGroups();\n formatStems();\n\n // Get the notes to be beamed\n const beamedNoteGroups = getBeamGroups();\n\n // Get the tuplets in order to format them accurately\n const allTuplets = getTuplets();\n\n // Create a VexFlow.Beam from each group of notes to be beamed\n const beams: Beam[] = [];\n beamedNoteGroups.forEach((group) => {\n const beam = new Beam(group);\n\n if (config.showStemlets) {\n beam.renderOptions.showStemlets = true;\n }\n if (config.secondaryBreaks) {\n beam.renderOptions.secondaryBreakTicks = Tables.durationToTicks(config.secondaryBreaks);\n }\n if (config.flatBeams === true) {\n beam.renderOptions.flatBeams = true;\n beam.renderOptions.flatBeamOffset = config.flatBeamOffset;\n }\n beams.push(beam);\n });\n\n // Reformat tuplets\n allTuplets.forEach((tuplet) => {\n // Set the tuplet location based on the stem direction\n const direction =\n (tuplet.notes[0] as StemmableNote).stemDirection === Stem.DOWN ? TupletLocation.BOTTOM : TupletLocation.TOP;\n tuplet.setTupletLocation(direction);\n\n // If any of the notes in the tuplet are not beamed, draw a bracket.\n let bracketed = false;\n for (let i = 0; i < tuplet.notes.length; i++) {\n const note = tuplet.notes[i];\n if (!note.hasBeam()) {\n bracketed = true;\n break;\n }\n }\n tuplet.setBracketed(bracketed);\n });\n\n return beams;\n }\n\n constructor(notes: StemmableNote[], autoStem: boolean = false) {\n super();\n\n if (!notes || notes.length === 0) {\n throw new RuntimeError('BadArguments', 'No notes provided for beam.');\n }\n\n if (notes.length === 1) {\n throw new RuntimeError('BadArguments', 'Too few notes for beam.');\n }\n\n // Validate beam line, direction and ticks.\n this._ticks = notes[0].getIntrinsicTicks();\n\n if (this._ticks >= Tables.durationToTicks('4')) {\n // Q(MSAC) -- what about beamed half-note measured tremolos?\n throw new RuntimeError('BadArguments', 'Beams can only be applied to notes shorter than a quarter note.');\n }\n\n let i; // shared iterator\n let note;\n\n this._stemDirection = notes[0].getStemDirection();\n\n let stemDirection = this._stemDirection;\n // Figure out optimal stem direction based on given notes\n\n if (autoStem && isStaveNote(notes[0])) {\n stemDirection = calculateStemDirection(notes);\n } else if (autoStem && isTabNote(notes[0])) {\n // Auto Stem TabNotes\n const stemWeight = notes.reduce((memo, note) => memo + note.getStemDirection(), 0);\n stemDirection = stemWeight > -1 ? Stem.UP : Stem.DOWN;\n }\n\n // Apply stem directions and attach beam to notes\n for (i = 0; i < notes.length; ++i) {\n note = notes[i];\n if (autoStem) {\n note.setStemDirection(stemDirection);\n this._stemDirection = stemDirection;\n }\n note.setBeam(this);\n }\n\n this.postFormatted = false;\n this.notes = notes;\n this._beamCount = this.getBeamCount();\n this.breakOnIndexes = [];\n this.renderOptions = {\n beamWidth: 5,\n maxSlope: 0.25,\n minSlope: -0.25,\n slopeIterations: 20,\n slopeCost: 100,\n showStemlets: false,\n stemletExtension: 7,\n partialBeamLength: 10,\n flatBeams: false,\n minFlatBeamOffset: 15,\n };\n }\n\n /** Get the notes in this beam. */\n getNotes(): StemmableNote[] {\n return this.notes;\n }\n\n /** Get the max number of beams in the set of notes. */\n getBeamCount(): number {\n const beamCounts = this.notes.map((note) => note.getGlyphProps().beamCount);\n\n const maxBeamCount = beamCounts.reduce((max, beamCount) => (beamCount > max ? beamCount : max));\n\n return maxBeamCount;\n }\n\n /** Set which note `indexes` to break the secondary beam at. */\n breakSecondaryAt(indexes: number[]): this {\n this.breakOnIndexes = indexes;\n return this;\n }\n\n /**\n * Forces the direction of a partial beam (a secondary-level beam that exists\n * on one note only of the beam group). This is useful in rhythms such as 6/8\n * eighth-sixteenth-eighth-sixteenth, where the direction of the beam on the\n * first sixteenth note can help imply whether the rhythm is to be felt as\n * three groups of eighth notes (typical) or as two groups of three-sixteenths\n * (less common):\n * ```\n * ┌───┬──┬──┐ ┌──┬──┬──┐\n * │ ├─ │ ─┤ vs │ ─┤ │ ─┤\n * │ │ │ │ │ │ │ │\n * ```\n */\n setPartialBeamSideAt(noteIndex: number, side: PartialBeamDirection) {\n this.forcedPartialDirections[noteIndex] = side;\n return this;\n }\n\n /**\n * Restore the default direction of a partial beam (a secondary-level beam\n * that does not connect to any other notes).\n */\n unsetPartialBeamSideAt(noteIndex: number) {\n delete this.forcedPartialDirections[noteIndex];\n return this;\n }\n\n /**\n * @param firstX specified in pixels.\n * @param firstY specified in pixels.\n *\n * @return the y coordinate for linear function.\n */\n getSlopeY(x: number, firstX: number, firstY: number, slope: number): number {\n return firstY + (x - firstX) * slope;\n }\n\n /** Calculate the best possible slope for the provided notes. */\n calculateSlope(): void {\n const {\n notes,\n renderOptions: { maxSlope, minSlope, slopeIterations, slopeCost },\n } = this;\n\n const stemDirection = this._stemDirection;\n\n const firstNote = notes[0];\n const initialSlope = getStemSlope(firstNote, notes[notes.length - 1]);\n const increment = (maxSlope - minSlope) / slopeIterations;\n let minCost = Number.MAX_VALUE;\n let bestSlope = 0;\n let yShift = 0;\n\n // iterate through slope values to find best weighted fit\n for (let slope = minSlope; slope <= maxSlope; slope += increment) {\n let totalStemExtension = 0;\n let yShiftTemp = 0;\n\n // iterate through notes, calculating y shift and stem extension\n for (let i = 1; i < notes.length; ++i) {\n const note = notes[i];\n if (note.hasStem() || note.isRest()) {\n const adjustedStemTipY =\n this.getSlopeY(note.getStemX(), firstNote.getStemX(), firstNote.getStemExtents().topY, slope) + yShiftTemp;\n\n const stemTipY = note.getStemExtents().topY;\n // beam needs to be shifted up to accommodate note\n if (stemTipY * stemDirection < adjustedStemTipY * stemDirection) {\n const diff = Math.abs(stemTipY - adjustedStemTipY);\n yShiftTemp += diff * -stemDirection;\n totalStemExtension += diff * i;\n } else {\n // beam overshoots note, account for the difference\n totalStemExtension += (stemTipY - adjustedStemTipY) * stemDirection;\n }\n }\n }\n\n // most engraving books suggest aiming for a slope about half the angle of the\n // difference between the first and last notes' stem length;\n const idealSlope = initialSlope / 2;\n const distanceFromIdeal = Math.abs(idealSlope - slope);\n\n // This tries to align most beams to something closer to the idealSlope, but\n // doesn't go crazy. To disable, set this.renderOptions.slopeCost = 0\n const cost = slopeCost * distanceFromIdeal + Math.abs(totalStemExtension);\n\n // update state when a more ideal slope is found\n if (cost < minCost) {\n minCost = cost;\n bestSlope = slope;\n yShift = yShiftTemp;\n }\n }\n\n this.slope = bestSlope;\n this.yShift = yShift;\n }\n\n /** Calculate a slope and y-shift for flat beams. */\n calculateFlatSlope(): void {\n const {\n notes,\n renderOptions: { beamWidth, minFlatBeamOffset, flatBeamOffset },\n } = this;\n\n const stemDirection = this._stemDirection;\n\n // If a flat beam offset has not yet been supplied or calculated,\n // generate one based on the notes in this particular note group\n let total = 0;\n let extremeY = 0; // Store the highest or lowest note here\n let extremeBeamCount = 0; // The beam count of the extreme note\n let currentExtreme = 0;\n for (let i = 0; i < notes.length; i++) {\n // Total up all of the offsets so we can average them out later\n const note = notes[i];\n const stemTipY = note.getStemExtents().topY;\n total += stemTipY;\n\n // Store the highest (stems-up) or lowest (stems-down) note so the\n // offset can be adjusted in case the average isn't enough\n if (stemDirection === Stem.DOWN && currentExtreme < stemTipY) {\n currentExtreme = stemTipY;\n extremeY = Math.max(...note.getYs());\n extremeBeamCount = note.getBeamCount();\n } else if (stemDirection === Stem.UP && (currentExtreme === 0 || currentExtreme > stemTipY)) {\n currentExtreme = stemTipY;\n extremeY = Math.min(...note.getYs());\n extremeBeamCount = note.getBeamCount();\n }\n }\n\n // Average the offsets to try and come up with a reasonable one that\n // works for all of the notes in the beam group.\n let offset = total / notes.length;\n\n // In case the average isn't long enough, add or subtract some more\n // based on the highest or lowest note (again, based on the stem\n // direction). This also takes into account the added height due to\n // the width of the beams.\n const extremeTest = minFlatBeamOffset + extremeBeamCount * beamWidth * 1.5;\n const newOffset = extremeY + extremeTest * -stemDirection;\n if (stemDirection === Stem.DOWN && offset < newOffset) {\n offset = extremeY + extremeTest;\n } else if (stemDirection === Stem.UP && offset > newOffset) {\n offset = extremeY - extremeTest;\n }\n\n if (!flatBeamOffset) {\n // Set the offset for the group based on the calculations above.\n this.renderOptions.flatBeamOffset = offset;\n } else if (stemDirection === Stem.DOWN && offset > flatBeamOffset) {\n this.renderOptions.flatBeamOffset = offset;\n } else if (stemDirection === Stem.UP && offset < flatBeamOffset) {\n this.renderOptions.flatBeamOffset = offset;\n }\n\n // For flat beams, the slope and yShift are 0.\n this.slope = 0;\n this.yShift = 0;\n }\n\n /** Return the Beam y offset. */\n getBeamYToDraw(): number {\n const firstNote = this.notes[0];\n const firstStemTipY = firstNote.getStemExtents().topY;\n let beamY = firstStemTipY;\n\n // For flat beams, set the first and last Y to the offset, rather than\n // using the note's stem extents.\n if (this.renderOptions.flatBeams && this.renderOptions.flatBeamOffset) {\n beamY = this.renderOptions.flatBeamOffset;\n }\n return beamY;\n }\n\n /**\n * Create new stems for the notes in the beam, so that each stem\n * extends into the beams.\n */\n applyStemExtensions(): void {\n const {\n notes,\n slope,\n renderOptions: { showStemlets, stemletExtension, beamWidth },\n } = this;\n\n const yShift = this.yShift;\n const beamCount = this._beamCount;\n\n const firstNote = notes[0];\n const firstStemTipY = this.getBeamYToDraw();\n const firstStemX = firstNote.getStemX();\n\n for (let i = 0; i < notes.length; ++i) {\n const note = notes[i];\n const stem = note.getStem();\n if (stem) {\n const stemX = note.getStemX();\n const { topY: stemTipY } = note.getStemExtents();\n const beamedStemTipY = this.getSlopeY(stemX, firstStemX, firstStemTipY, slope) + yShift;\n const preBeamExtension = stem.getExtension();\n const beamExtension =\n note.getStemDirection() === Stem.UP ? stemTipY - beamedStemTipY : beamedStemTipY - stemTipY;\n // Determine necessary extension for cross-stave notes in the beam group\n let crossStemExtension = 0;\n if (note.getStemDirection() !== this._stemDirection) {\n const beamCount = note.getGlyphProps().beamCount;\n crossStemExtension = (1 + (beamCount - 1) * 1.5) * this.renderOptions.beamWidth;\n\n /* This will be required if the partial beams are moved to the note side.\n if (i > 0 && note.getGlyph().beamCount > 1) {\n const prevBeamCount = this.notes[i - 1].getGlyph().beamCount;\n const beamDiff = Math.abs(prevBeamCount - beamCount);\n if (beamDiff > 0) crossStemExtension -= beamDiff * (this.renderOptions.beamWidth * 1.5);\n }\n */\n }\n\n stem.setExtension(preBeamExtension + beamExtension + crossStemExtension);\n stem.adjustHeightForBeam();\n\n if (note.isRest() && showStemlets) {\n const totalBeamWidth = (beamCount - 1) * beamWidth * 1.5 + beamWidth;\n stem.setVisibility(true).setStemlet(true, totalBeamWidth + stemletExtension);\n }\n }\n }\n }\n\n /** Return upper level beam direction. */\n lookupBeamDirection(\n duration: string,\n prevTick: number,\n tick: number,\n nextTick: number,\n noteIndex: number\n ): PartialBeamDirection {\n if (duration === '4') {\n return BEAM_LEFT;\n }\n\n const forcedBeamDirection = this.forcedPartialDirections[noteIndex];\n if (forcedBeamDirection) return forcedBeamDirection;\n\n const lookupDuration = `${Tables.durationToNumber(duration) / 2}`;\n const prevNoteGetsBeam = prevTick < Tables.durationToTicks(lookupDuration);\n const nextNoteGetsBeam = nextTick < Tables.durationToTicks(lookupDuration);\n const noteGetsBeam = tick < Tables.durationToTicks(lookupDuration);\n\n if (prevNoteGetsBeam && nextNoteGetsBeam && noteGetsBeam) {\n return BEAM_BOTH;\n } else if (prevNoteGetsBeam && !nextNoteGetsBeam && noteGetsBeam) {\n return BEAM_LEFT;\n } else if (!prevNoteGetsBeam && nextNoteGetsBeam && noteGetsBeam) {\n return BEAM_RIGHT;\n }\n\n return this.lookupBeamDirection(lookupDuration, prevTick, tick, nextTick, noteIndex);\n }\n\n /** Get the x coordinates for the beam lines of specific `duration`. */\n getBeamLines(duration: string): { start: number; end?: number }[] {\n const tickOfDuration = Tables.durationToTicks(duration);\n let beamStarted = false;\n\n type BeamInfo = { start: number; end?: number };\n const beamLines: BeamInfo[] = [];\n let currentBeam: BeamInfo | undefined = undefined;\n const partialBeamLength = this.renderOptions.partialBeamLength;\n let previousShouldBreak = false;\n let tickTally = 0;\n for (let i = 0; i < this.notes.length; ++i) {\n const note = this.notes[i];\n\n // See if we need to break secondary beams on this note.\n const ticks = note.getTicks().value();\n tickTally += ticks;\n let shouldBreak = false;\n\n // 8th note beams are always drawn.\n if (parseInt(duration, 10) >= 8) {\n // First, check to see if any indexes were set up through breakSecondaryAt()\n shouldBreak = this.breakOnIndexes.indexOf(i) !== -1;\n\n // If the secondary breaks were auto-configured in the render options,\n // handle that as well.\n if (this.renderOptions.secondaryBreakTicks && tickTally >= this.renderOptions.secondaryBreakTicks) {\n tickTally = 0;\n shouldBreak = true;\n }\n }\n const noteGetsBeam = note.getIntrinsicTicks() < tickOfDuration;\n\n const stemX = note.getStemX() - Stem.WIDTH / 2;\n\n // Check to see if the next note in the group will get a beam at this\n // level. This will help to inform the partial beam logic below.\n const prevNote = this.notes[i - 1];\n const nextNote = this.notes[i + 1];\n const nextNoteGetsBeam = nextNote && nextNote.getIntrinsicTicks() < tickOfDuration;\n const prevNoteGetsBeam = prevNote && prevNote.getIntrinsicTicks() < tickOfDuration;\n const beamAlone = prevNote && nextNote && noteGetsBeam && !prevNoteGetsBeam && !nextNoteGetsBeam;\n // const beamAlone = noteGetsBeam && !prevNoteGetsBeam && !nextNoteGetsBeam;\n if (noteGetsBeam) {\n // This note gets a beam at the current level\n if (beamStarted) {\n // We're currently in the middle of a beam. Just continue it on to\n // the stem X of the current note.\n currentBeam = beamLines[beamLines.length - 1];\n currentBeam.end = stemX;\n\n // If a secondary beam break is set up, end the beam right now.\n if (shouldBreak) {\n beamStarted = false;\n if (nextNote && !nextNoteGetsBeam && currentBeam.end === undefined) {\n // This note gets a beam,.but the next one does not. This means\n // we need a partial pointing right.\n currentBeam.end = currentBeam.start - partialBeamLength;\n }\n }\n } else {\n // No beam started yet. Start a new one.\n currentBeam = { start: stemX, end: undefined };\n beamStarted = true;\n\n if (beamAlone) {\n // previous and next beam exists and does not get a beam but current gets it.\n const prevTick = prevNote.getIntrinsicTicks();\n const nextTick = nextNote.getIntrinsicTicks();\n const tick = note.getIntrinsicTicks();\n const beamDirection = this.lookupBeamDirection(duration, prevTick, tick, nextTick, i);\n\n if ([BEAM_LEFT, BEAM_BOTH].includes(beamDirection)) {\n currentBeam.end = currentBeam.start - partialBeamLength;\n } else {\n currentBeam.end = currentBeam.start + partialBeamLength;\n }\n } else if (!nextNoteGetsBeam) {\n // The next note doesn't get a beam. Draw a partial.\n if ((previousShouldBreak || i === 0) && nextNote) {\n // This is the first note (but not the last one), or it is\n // following a secondary break. Draw a partial to the right.\n currentBeam.end = currentBeam.start + partialBeamLength;\n } else {\n // By default, draw a partial to the left.\n currentBeam.end = currentBeam.start - partialBeamLength;\n }\n } else if (shouldBreak) {\n // This note should have a secondary break after it. Even though\n // we just started a beam, it needs to end immediately.\n currentBeam.end = currentBeam.start - partialBeamLength;\n beamStarted = false;\n }\n beamLines.push(currentBeam);\n }\n } else {\n // The current note does not get a beam.\n beamStarted = false;\n }\n\n // Store the secondary break flag to inform the partial beam logic in\n // the next iteration of the loop.\n previousShouldBreak = shouldBreak;\n }\n\n // Add a partial beam pointing left if this is the last note in the group\n const lastBeam = beamLines[beamLines.length - 1];\n if (lastBeam && lastBeam.end === undefined) {\n lastBeam.end = lastBeam.start - partialBeamLength;\n }\n return beamLines;\n }\n\n /** Render the stems for each note. */\n protected drawStems(ctx: RenderContext): void {\n this.notes.forEach((note) => {\n const stem = note.getStem();\n if (stem) {\n const stemX = note.getStemX();\n stem.setNoteHeadXBounds(stemX, stemX);\n stem.setContext(ctx).drawWithStyle();\n }\n }, this);\n }\n\n // Render the beam lines\n protected drawBeamLines(ctx: RenderContext): void {\n const validBeamDurations = ['4', '8', '16', '32', '64', '128', '256', '512', '1024'];\n\n const firstNote = this.notes[0];\n let beamY = this.getBeamYToDraw();\n const firstStemX = firstNote.getStemX();\n const beamThickness = this.renderOptions.beamWidth * this._stemDirection;\n\n // Draw the beams.\n for (let i = 0; i < validBeamDurations.length; ++i) {\n const duration = validBeamDurations[i];\n const beamLines = this.getBeamLines(duration);\n\n for (let j = 0; j < beamLines.length; ++j) {\n const beamLine = beamLines[j];\n const startBeamX = beamLine.start;\n\n const startBeamY = this.getSlopeY(startBeamX, firstStemX, beamY, this.slope);\n const lastBeamX = beamLine.end;\n if (lastBeamX) {\n const lastBeamY = this.getSlopeY(lastBeamX, firstStemX, beamY, this.slope);\n\n ctx.beginPath();\n ctx.moveTo(startBeamX, startBeamY);\n ctx.lineTo(startBeamX, startBeamY + beamThickness);\n ctx.lineTo(lastBeamX + 1, lastBeamY + beamThickness);\n ctx.lineTo(lastBeamX + 1, lastBeamY);\n ctx.closePath();\n ctx.fill();\n } else {\n throw new RuntimeError('NoLastBeamX', 'lastBeamX undefined.');\n }\n }\n\n beamY += beamThickness * 1.5;\n }\n }\n\n /** Pre-format the beam. */\n preFormat(): this {\n return this;\n }\n\n /**\n * Post-format the beam. This can only be called after\n * the notes in the beam have both `x` and `y` values. ie: they've\n * been formatted and have staves.\n */\n postFormat(): void {\n if (this.postFormatted) return;\n\n // Calculate a smart slope if we're not forcing the beams to be flat.\n if (isTabNote(this.notes[0]) || this.renderOptions.flatBeams) {\n this.calculateFlatSlope();\n } else {\n this.calculateSlope();\n }\n this.applyStemExtensions();\n\n this.postFormatted = true;\n }\n\n /** Render the beam to the canvas context */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n if (this.unbeamable) return;\n\n if (!this.postFormatted) {\n this.postFormat();\n }\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('beam' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n this.drawStems(ctx);\n this.drawBeamLines(ctx);\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Taehoon Moon 2014\n// MIT License\n\nimport { BoundingBox } from './boundingbox';\nimport { Clef } from './clef';\nimport { Note } from './note';\nimport { Category } from './typeguard';\n\n/** ClefNote implements clef annotations in measures. */\nexport class ClefNote extends Note {\n static override get CATEGORY(): string {\n return Category.ClefNote;\n }\n\n protected clef!: Clef;\n\n constructor(type: string, size: string = 'default', annotation?: string) {\n super({ duration: 'b' });\n this.setType(type, size, annotation);\n this.ignoreTicks = true;\n }\n\n /** Set clef type, size and annotation. */\n setType(type: string, size: string, annotation?: string): this {\n this.clef = new Clef(type, size, annotation);\n this.setWidth(this.clef.getWidth());\n\n return this;\n }\n\n /** Get associated clef. */\n getClef(): Clef {\n return this.clef;\n }\n\n override preFormat(): this {\n this.preFormatted = true;\n return this;\n }\n\n /** Render clef note. */\n override draw(): void {\n const stave = this.checkStave();\n const ctx = this.checkContext();\n\n this.setRendered();\n this.clef.setX(this.getAbsoluteX());\n this.clef.setY(stave.getYForLine(this.clef.line));\n this.clef.renderText(ctx, 0, 0);\n }\n\n override getBoundingBox(): BoundingBox {\n return this.clef.getBoundingBox();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// This file implements the `Crescendo` object which draws crescendos and\n// decrescendo dynamics markings. A `Crescendo` is initialized with a\n// duration and formatted as part of a `Voice` like any other `Note`\n// type in VexFlow. This object would most likely be formatted in a Voice\n// with `TextNotes` - which are used to represent other dynamics markings.\n\nimport { Note, NoteStruct } from './note';\nimport { RenderContext } from './rendercontext';\nimport { TickContext } from './tickcontext';\nimport { Category } from './typeguard';\nimport { log } from './util';\n\nexport interface CrescendoParams {\n reverse: boolean;\n height: number;\n y: number;\n beginX: number;\n endX: number;\n}\n\n// To enable logging for this class. Set `VexFlow.Crescendo.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Crescendo.DEBUG) log('VexFlow.Crescendo', args);\n}\n\n// Helper to draw the hairpin.\nfunction renderHairpin(ctx: RenderContext, params: CrescendoParams) {\n const beginX = params.beginX;\n const endX = params.endX;\n const y = params.y;\n const halfHeight = params.height / 2;\n\n ctx.beginPath();\n\n if (params.reverse) {\n ctx.moveTo(beginX, y - halfHeight);\n ctx.lineTo(endX, y);\n ctx.lineTo(beginX, y + halfHeight);\n } else {\n ctx.moveTo(endX, y - halfHeight);\n ctx.lineTo(beginX, y);\n ctx.lineTo(endX, y + halfHeight);\n }\n\n ctx.stroke();\n ctx.closePath();\n}\n\nexport class Crescendo extends Note {\n static DEBUG: boolean = false;\n\n /** Crescendo category string. */\n static override get CATEGORY(): string {\n return Category.Crescendo;\n }\n\n protected decrescendo: boolean;\n protected line: number;\n protected options = {\n // Extensions to the length of the crescendo on either side\n extendLeft: 0,\n extendRight: 0,\n // Vertical shift\n yShift: 0,\n };\n\n // Initialize the crescendo's properties\n constructor(noteStruct: NoteStruct) {\n super(noteStruct);\n\n // Whether the object is a decrescendo\n this.decrescendo = false;\n\n // The staff line to be placed on\n this.line = noteStruct.line ?? 0;\n\n // The height at the open end of the cresc/decresc\n this.height = 15;\n }\n\n // Set the line to center the element on\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n // Set the full height at the open end\n setHeight(height: number): this {\n this.height = height;\n return this;\n }\n\n // Set whether the sign should be a descresendo by passing a bool\n // to `decresc`\n setDecrescendo(decresc: boolean): this {\n this.decrescendo = decresc;\n return this;\n }\n\n // Preformat the note\n override preFormat(): this {\n this.preFormatted = true;\n return this;\n }\n\n // Render the Crescendo object onto the canvas\n override draw(): void {\n const ctx = this.checkContext();\n const stave = this.checkStave();\n this.setRendered();\n\n const tickContext = this.getTickContext();\n const nextContext = TickContext.getNextContext(tickContext);\n\n const beginX = this.getAbsoluteX();\n const endX = nextContext ? nextContext.getX() : stave.getX() + stave.getWidth();\n const y = stave.getYForLine(this.line + -3) + 1;\n\n L('Drawing ', this.decrescendo ? 'decrescendo ' : 'crescendo ', this.height, 'x', beginX - endX);\n\n renderHairpin(ctx, {\n beginX: beginX - this.options.extendLeft,\n endX: endX + this.options.extendRight,\n y: y + this.options.yShift,\n height: this.height,\n reverse: this.decrescendo,\n });\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// This class implements curves (for slurs)\n\nimport { Element } from './element';\nimport { Note } from './note';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface CurveOptions {\n /** Two control points for the bezier curves. */\n cps?: { x: number; y: number }[];\n thickness?: number;\n xShift?: number;\n yShift?: number;\n position?: string | number;\n positionEnd?: string | number;\n invert?: boolean;\n openingDirection?: 'up' | 'down' | 'auto';\n}\n\nexport enum CurvePosition {\n NEAR_HEAD = 1,\n NEAR_TOP = 2,\n}\n\nexport class Curve extends Element {\n static override get CATEGORY(): string {\n return Category.Curve;\n }\n\n public renderOptions: Required<CurveOptions>;\n protected from?: Note;\n protected to?: Note;\n\n static get Position(): typeof CurvePosition {\n return CurvePosition;\n }\n\n static get PositionString(): Record<string, number> {\n return {\n nearHead: CurvePosition.NEAR_HEAD,\n nearTop: CurvePosition.NEAR_TOP,\n };\n }\n\n // from: Start note\n // to: End note\n // options:\n // cps: List of control points\n // xShift: pixels to shift\n // yShift: pixels to shift\n constructor(from: Note | undefined, to: Note | undefined, options: CurveOptions) {\n super();\n\n this.renderOptions = {\n thickness: 2,\n xShift: 0,\n yShift: 10,\n position: CurvePosition.NEAR_HEAD,\n positionEnd: CurvePosition.NEAR_HEAD,\n invert: false,\n cps: [\n { x: 0, y: 10 },\n { x: 0, y: 10 },\n ],\n openingDirection: 'auto',\n ...options,\n };\n\n this.setNotes(from, to);\n }\n\n setNotes(from: Note | undefined, to: Note | undefined): this {\n if (!from && !to) {\n throw new RuntimeError('BadArguments', 'Curve needs to have either `from` or `to` set.');\n }\n\n this.from = from;\n this.to = to;\n return this;\n }\n\n /**\n * @return {boolean} Returns true if this is a partial bar.\n */\n isPartial(): boolean {\n return !this.from || !this.to;\n }\n\n renderCurve(params: { lastY: number; lastX: number; firstY: number; firstX: number; direction: number }): void {\n const ctx = this.checkContext();\n\n const xShift = this.renderOptions.xShift;\n const yShift = this.renderOptions.yShift * params.direction;\n\n const firstX = params.firstX + xShift;\n const firstY = params.firstY + yShift;\n const lastX = params.lastX - xShift;\n const lastY = params.lastY + yShift;\n const thickness = this.renderOptions.thickness;\n\n const cps = this.renderOptions.cps;\n const { x: cp0x, y: cp0y } = cps[0];\n const { x: cp1x, y: cp1y } = cps[1];\n\n const controlPointSpacing = (lastX - firstX) / (cps.length + 2);\n\n ctx.beginPath();\n ctx.moveTo(firstX, firstY);\n ctx.bezierCurveTo(\n firstX + controlPointSpacing + cp0x,\n firstY + cp0y * params.direction,\n lastX - controlPointSpacing + cp1x,\n lastY + cp1y * params.direction,\n lastX,\n lastY\n );\n if (!this.style?.lineDash)\n ctx.bezierCurveTo(\n lastX - controlPointSpacing + cp1x,\n lastY + (cp1y + thickness) * params.direction,\n firstX + controlPointSpacing + cp0x,\n firstY + (cp0y + thickness) * params.direction,\n firstX,\n firstY\n );\n ctx.stroke();\n ctx.closePath();\n if (!this.style?.lineDash) ctx.fill();\n }\n\n override draw(): boolean {\n this.checkContext();\n this.setRendered();\n\n const firstNote = this.from;\n const lastNote = this.to;\n let firstX;\n let lastX;\n let firstY;\n let lastY;\n let stemDirection = 0;\n\n let metric = 'baseY';\n let endMetric = 'baseY';\n\n function getPosition(position: string | number) {\n return typeof position === 'string' ? Curve.PositionString[position] : position;\n }\n const position = getPosition(this.renderOptions.position);\n const positionEnd = getPosition(this.renderOptions.positionEnd);\n\n if (position === CurvePosition.NEAR_TOP) {\n metric = 'topY';\n endMetric = 'topY';\n }\n\n if (positionEnd === CurvePosition.NEAR_HEAD) {\n endMetric = 'baseY';\n } else if (positionEnd === CurvePosition.NEAR_TOP) {\n endMetric = 'topY';\n }\n\n if (firstNote) {\n firstX = firstNote.getTieRightX();\n stemDirection = firstNote.getStemDirection();\n firstY = firstNote.getStemExtents()[metric];\n } else {\n const stave = lastNote!.checkStave();\n firstX = stave.getTieStartX();\n firstY = lastNote!.getStemExtents()[metric];\n }\n\n if (lastNote) {\n lastX = lastNote.getTieLeftX();\n stemDirection = lastNote.getStemDirection();\n lastY = lastNote.getStemExtents()[endMetric];\n } else {\n const stave = firstNote!.checkStave();\n lastX = stave.getTieEndX();\n lastY = firstNote!.getStemExtents()[endMetric];\n }\n\n if (this.renderOptions.openingDirection === 'up') {\n stemDirection = 1;\n }\n if (this.renderOptions.openingDirection === 'down') {\n stemDirection = -1;\n }\n\n this.renderCurve({\n firstX,\n lastX,\n firstY,\n lastY,\n direction: stemDirection * (this.renderOptions.invert === true ? -1 : 1),\n });\n return true;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// A generic text parsing class for VexFlow.\n\nimport { log, RuntimeError } from './util';\n\n// To enable logging for this class. Set `VexFlow.Parser.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]): void {\n if (Parser.DEBUG) log('VexFlow.Parser', args);\n}\n\nconst NO_ERROR_POS = -1;\n\nexport type Match = string | Match[] | null;\nexport type RuleFunction = () => Rule;\nexport type TriggerFunction = (state?: { matches: Match[] }) => void;\n\nexport interface Rule {\n // Lexer Rules\n token?: string; // The token property is a string that is compiled into a RegExp.\n noSpace?: boolean;\n\n // Parser Rules\n expect?: RuleFunction[];\n zeroOrMore?: boolean;\n oneOrMore?: boolean;\n maybe?: boolean;\n or?: boolean;\n run?: TriggerFunction;\n}\n\nexport interface Result {\n success: boolean;\n\n // Lexer Results\n pos?: number;\n incrementPos?: number;\n matchedString?: string;\n\n // Parser Results\n matches?: Match[];\n numMatches?: number;\n results?: GroupedResults;\n errorPos?: number; // Set to NO_ERROR if successful. N if there is an error in the string.\n}\n\n// Represents a mixed array containing Result and/or Result[].\n// The grouping is determined by the structure of the Grammar.\nexport type GroupedResults = (Result | Result[])[];\n\n// Converts parser results into an easy to reference list that can be\n// used in triggers. This function returns:\n// - nested array in which the leaf elements are string or null\n// - string (including empty strings)\n// - null\nfunction flattenMatches(r: Result | Result[]): Match {\n if ('matchedString' in r) return r.matchedString as string; // string\n if ('results' in r) return flattenMatches(r.results as Result[]);\n const results = r as Result[];\n if (results.length === 1) return flattenMatches(results[0]);\n if (results.length === 0) return null;\n return results.map(flattenMatches); // nested array\n}\n\nexport interface Grammar {\n begin(): RuleFunction;\n}\n\n// This is the base parser class. Given an arbitrary context-free grammar, it\n// can parse any line and execute code when specific rules are met (e.g.,\n// when a string is terminated.)\nexport class Parser {\n static DEBUG: boolean = false;\n\n protected grammar: Grammar;\n\n protected line: string; // Use RegExp to extract tokens from this line.\n protected pos: number;\n protected errorPos: number;\n\n // For an example of a simple grammar, take a look at tests/parser_tests.ts or\n // the EasyScore grammar in easyscore.ts.\n constructor(grammar: Grammar) {\n this.grammar = grammar;\n this.line = '';\n this.pos = 0;\n this.errorPos = NO_ERROR_POS;\n }\n\n // Parse `line` using current grammar. Returns `{success: true}` if the\n // line parsed correctly, otherwise returns `{success: false, errorPos: N}`\n // where `errorPos` is the location of the error in the string.\n parse(line: string): Result {\n this.line = line;\n this.pos = 0;\n this.errorPos = NO_ERROR_POS;\n const result = this.expect(this.grammar.begin());\n result.errorPos = this.errorPos;\n return result;\n }\n\n matchFail(returnPos: number): void {\n if (this.errorPos === NO_ERROR_POS) this.errorPos = this.pos;\n this.pos = returnPos;\n }\n\n matchSuccess(): void {\n this.errorPos = NO_ERROR_POS;\n }\n\n // Look for `token` in this.line[this.pos], and return success\n // if one is found. `token` is specified as a regular expression.\n matchToken(token: string, noSpace: boolean = false): Result {\n const regexp = noSpace ? new RegExp('^((' + token + '))') : new RegExp('^((' + token + ')\\\\s*)');\n const workingLine = this.line.slice(this.pos);\n const result = workingLine.match(regexp);\n if (result !== null) {\n return {\n success: true,\n matchedString: result[2],\n incrementPos: result[1].length,\n pos: this.pos,\n };\n } else {\n return { success: false, pos: this.pos };\n }\n }\n\n // Execute rule to match a sequence of tokens (or rules). If `maybe` is\n // set, then return success even if the token is not found, but reset\n // the position before exiting.\n // TODO: expectOne(...) is never called with the `maybe` parameter.\n expectOne(rule: Rule, maybe: boolean = false): Result {\n const results: GroupedResults = [];\n const pos = this.pos;\n\n let allMatches = true;\n let oneMatch = false;\n maybe = maybe === true || rule.maybe === true;\n\n // Execute all sub rules in sequence.\n if (rule.expect) {\n for (const next of rule.expect) {\n const localPos = this.pos;\n const result = this.expect(next);\n\n // If `rule.or` is set, then return success if any one\n // of the subrules match, else all subrules must match.\n if (result.success) {\n results.push(result);\n oneMatch = true;\n if (rule.or) break;\n } else {\n allMatches = false;\n if (!rule.or) {\n this.pos = localPos;\n break;\n }\n }\n }\n }\n\n const gotOne = (rule.or && oneMatch) || allMatches;\n const success = gotOne || maybe === true;\n const numMatches = gotOne ? 1 : 0;\n if (maybe && !gotOne) this.pos = pos;\n if (success) {\n this.matchSuccess();\n } else {\n this.matchFail(pos);\n }\n return { success, results, numMatches };\n }\n\n // Try to match multiple (one or more) instances of the rule. If `maybe` is set,\n // then a failed match is also a success (but the position is reset).\n expectOneOrMore(rule: Rule, maybe: boolean = false): Result {\n const results: GroupedResults = [];\n const pos = this.pos;\n let numMatches = 0;\n let more = true;\n\n do {\n const result = this.expectOne(rule);\n if (result.success && result.results) {\n numMatches++;\n results.push(result.results as Result[]);\n } else {\n more = false;\n }\n } while (more);\n\n const success = numMatches > 0 || maybe === true;\n if (maybe && !(numMatches > 0)) this.pos = pos;\n if (success) {\n this.matchSuccess();\n } else {\n this.matchFail(pos);\n }\n return { success, results, numMatches };\n }\n\n // Match zero or more instances of `rule`. Offloads to `expectOneOrMore`.\n expectZeroOrMore(rule: Rule): Result {\n return this.expectOneOrMore(rule, true);\n }\n\n // Execute the rule produced by the provided `rules` function. This\n // offloads to one of the above matchers and consolidates the results. It is also\n // responsible for executing any code triggered by the rule (in `rule.run`.)\n expect(ruleFunc: RuleFunction): Result {\n L('Evaluating rule function:', ruleFunc);\n if (!ruleFunc) {\n throw new RuntimeError('Invalid rule function');\n }\n let result: Result;\n\n // Get rule from Grammar class.\n // expect(...) handles both lexing & parsing:\n // - lexer rules produce tokens.\n // - parser rules produce expressions which may trigger code via the\n // { run: () => ... } trigger functions in easyscore.ts.\n // These functions build the VexFlow objects that are displayed on screen.\n const rule: Rule = ruleFunc.bind(this.grammar)();\n if (rule.token) {\n // A lexer rule has a `token` property.\n // Base case: parse the regex and throw an error if the\n // line doesn't match.\n result = this.matchToken(rule.token, rule.noSpace === true);\n if (result.success) {\n // Token match! Update position and throw away parsed portion\n // of string.\n this.pos += result.incrementPos as number;\n }\n } else if (rule.expect) {\n // A parser rule has an `expect` property.\n if (rule.oneOrMore) {\n result = this.expectOneOrMore(rule);\n } else if (rule.zeroOrMore) {\n result = this.expectZeroOrMore(rule);\n } else {\n result = this.expectOne(rule);\n }\n } else {\n L(rule);\n throw new RuntimeError('Bad grammar! No `token` or `expect` property ' + rule);\n }\n\n // If there's a trigger attached to this rule, then run it.\n // Make the matches accessible through `state.matches` in the\n // `run: (state) => ...` trigger.\n const matches: Match[] = [];\n result.matches = matches;\n if (result.results) {\n result.results.forEach((r) => matches.push(flattenMatches(r)));\n }\n if (rule.run && result.success) {\n rule.run({ matches });\n }\n return result;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Accidental } from './accidental';\nimport { Articulation } from './articulation';\nimport { PartialBeamDirection } from './beam';\nimport { Dot } from './dot';\nimport { Factory } from './factory';\nimport { FretHandFinger } from './frethandfinger';\nimport { Music } from './music';\nimport { Note } from './note';\nimport { Grammar, Match, Parser, Result, Rule, RuleFunction } from './parser';\nimport { RenderContext } from './rendercontext';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { TupletOptions } from './tuplet';\nimport { defined, log, RuntimeError } from './util';\nimport { Voice } from './voice';\n\n// To enable logging for this class. Set `VexFlow.EasyScore.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]): void {\n if (EasyScore.DEBUG) log('VexFlow.EasyScore', args);\n}\n\n// eslint-disable-next-line\nexport type CommitHook = (obj: any, note: StemmableNote, builder: Builder) => void;\n\nexport class EasyScoreGrammar implements Grammar {\n builder: Builder;\n\n constructor(builder: Builder) {\n this.builder = builder;\n }\n\n begin(): RuleFunction {\n return this.LINE;\n }\n\n LINE(): Rule {\n return {\n expect: [this.PIECE, this.PIECES, this.EOL],\n };\n }\n PIECE(): Rule {\n return {\n expect: [this.CHORDORNOTE, this.PARAMS],\n run: () => this.builder.commitPiece(),\n };\n }\n PIECES(): Rule {\n return {\n expect: [this.COMMA, this.PIECE],\n zeroOrMore: true,\n };\n }\n PARAMS(): Rule {\n return {\n expect: [this.DURATION, this.TYPE, this.DOTS, this.OPTS],\n };\n }\n CHORDORNOTE(): Rule {\n return {\n expect: [this.CHORD, this.SINGLENOTE],\n or: true,\n };\n }\n CHORD(): Rule {\n return {\n expect: [this.LPAREN, this.NOTES, this.RPAREN],\n\n run: (state) => this.builder.addChord(state!.matches[1] as Match[]),\n };\n }\n NOTES(): Rule {\n return {\n expect: [this.NOTE],\n oneOrMore: true,\n };\n }\n NOTE(): Rule {\n return {\n expect: [this.NOTENAME, this.ACCIDENTAL, this.OCTAVE],\n };\n }\n SINGLENOTE(): Rule {\n return {\n expect: [this.NOTENAME, this.ACCIDENTAL, this.OCTAVE],\n run: (state) => {\n const s = state!;\n this.builder.addSingleNote(s.matches[0] as string, s.matches[1] as string, s.matches[2] as string);\n },\n };\n }\n ACCIDENTAL(): Rule {\n return {\n expect: [this.MICROTONES, this.ACCIDENTALS],\n maybe: true,\n or: true,\n };\n }\n DOTS(): Rule {\n return {\n expect: [this.DOT],\n zeroOrMore: true,\n\n run: (state) => this.builder.setNoteDots(state!.matches),\n };\n }\n TYPE(): Rule {\n return {\n expect: [this.SLASH, this.MAYBESLASH, this.TYPES],\n maybe: true,\n\n run: (state) => this.builder.setNoteType(state!.matches[2] as string),\n };\n }\n DURATION(): Rule {\n return {\n expect: [this.SLASH, this.DURATIONS],\n maybe: true,\n\n run: (state) => this.builder.setNoteDuration(state!.matches[1] as string),\n };\n }\n OPTS(): Rule {\n return {\n expect: [this.LBRACKET, this.KEYVAL, this.KEYVALS, this.RBRACKET],\n maybe: true,\n };\n }\n KEYVALS(): Rule {\n return {\n expect: [this.COMMA, this.KEYVAL],\n zeroOrMore: true,\n };\n }\n KEYVAL(): Rule {\n const unquote = (str: string) => str.slice(1, -1);\n\n return {\n expect: [this.KEY, this.EQUALS, this.VAL],\n\n run: (state) => this.builder.addNoteOption(state!.matches[0] as string, unquote(state!.matches[2] as string)),\n };\n }\n VAL(): Rule {\n return {\n expect: [this.SVAL, this.DVAL],\n or: true,\n };\n }\n\n KEY(): Rule {\n return { token: '[a-zA-Z][a-zA-Z0-9]*' };\n }\n DVAL(): Rule {\n return { token: '[\"][^\"]*[\"]' };\n }\n SVAL(): Rule {\n return { token: \"['][^']*[']\" };\n }\n NOTENAME(): Rule {\n return { token: '[a-gA-G]' };\n }\n OCTAVE(): Rule {\n return { token: '[0-9]+' };\n }\n ACCIDENTALS(): Rule {\n return { token: 'bb|b|##|#|n' };\n }\n MICROTONES(): Rule {\n return { token: 'bbs|bss|bs|db|d|\\\\+\\\\+-|\\\\+-|\\\\+\\\\+|\\\\+|k|o' };\n }\n DURATIONS(): Rule {\n return { token: '[0-9whq]+' };\n }\n TYPES(): Rule {\n return { token: '[rRsSmMhHgG]' };\n }\n LPAREN(): Rule {\n return { token: '[(]' };\n }\n RPAREN(): Rule {\n return { token: '[)]' };\n }\n COMMA(): Rule {\n return { token: '[,]' };\n }\n DOT(): Rule {\n return { token: '[.]' };\n }\n SLASH(): Rule {\n return { token: '[/]' };\n }\n MAYBESLASH(): Rule {\n return { token: '[/]?' };\n }\n EQUALS(): Rule {\n return { token: '[=]' };\n }\n LBRACKET(): Rule {\n return { token: '\\\\[' };\n }\n RBRACKET(): Rule {\n return { token: '\\\\]' };\n }\n EOL(): Rule {\n return { token: '$' };\n }\n}\n\nexport interface NotePiece {\n key: string;\n accid?: string | null;\n octave?: string;\n}\n\nexport class Piece {\n chord: NotePiece[] = [];\n duration: string;\n dots: number = 0;\n type?: string;\n options: { [x: string]: string } = {};\n constructor(duration: string) {\n this.duration = duration;\n }\n}\n\nexport interface BuilderElements {\n notes: StemmableNote[];\n accidentals: (Accidental | undefined)[][];\n}\n\n// Extending Record<string, any> allows arbitrary properties via Builder.reset() & EasyScore.parse().\n// eslint-disable-next-line\nexport interface BuilderOptions extends Record<string, any> {\n stem?: string;\n clef?: string;\n}\n\nexport class Builder {\n factory: Factory;\n // Initialized by the constructor via this.reset().\n elements!: BuilderElements;\n // Initialized by the constructor via this.reset().\n options!: BuilderOptions;\n // Initialized by the constructor via this.resetPiece().\n piece!: Piece;\n commitHooks: CommitHook[] = [];\n rollingDuration!: string;\n\n constructor(factory: Factory) {\n this.factory = factory;\n this.reset();\n }\n\n reset(options?: BuilderOptions): void {\n this.options = {\n stem: 'auto',\n clef: 'treble',\n ...options,\n };\n this.elements = { notes: [], accidentals: [] };\n this.rollingDuration = '8';\n this.resetPiece();\n }\n\n getFactory(): Factory {\n return this.factory;\n }\n\n getElements(): BuilderElements {\n return this.elements;\n }\n\n addCommitHook(commitHook: CommitHook): void {\n this.commitHooks.push(commitHook);\n }\n\n resetPiece(): void {\n L('resetPiece');\n this.piece = new Piece(this.rollingDuration);\n }\n\n setNoteDots(dots: Match[]): void {\n L('setNoteDots:', dots);\n if (dots) this.piece.dots = dots.length;\n }\n\n setNoteDuration(duration?: string): void {\n L('setNoteDuration:', duration);\n this.rollingDuration = this.piece.duration = duration || this.rollingDuration;\n }\n\n setNoteType(type?: string): void {\n L('setNoteType:', type);\n if (type) this.piece.type = type;\n }\n\n addNoteOption(key: string, value: string): void {\n L('addNoteOption: key:', key, 'value:', value);\n this.piece.options[key] = value;\n }\n\n addNote(key?: string, accid?: string | null, octave?: string): void {\n L('addNote:', key, accid, octave);\n this.piece.chord.push({\n key: key as string,\n accid,\n octave,\n });\n }\n\n addSingleNote(key: string, accid?: string | null, octave?: string): void {\n L('addSingleNote:', key, accid, octave);\n this.addNote(key, accid, octave);\n }\n\n // notes is an array with 3 entries\n addChord(notes: Match[]): void {\n L('startChord');\n if (typeof notes[0] !== 'object') {\n this.addSingleNote(notes[0]);\n } else {\n notes.forEach((n) => {\n if (n) this.addNote(...(n as string[])); // n => [string, string | null, string]\n });\n }\n L('endChord');\n }\n\n commitPiece(): void {\n L('commitPiece');\n const { factory } = this;\n\n if (!factory) return;\n\n const options = { ...this.options, ...this.piece.options };\n\n // reset() sets this.options.stem & this.options.clef but we check to make sure nothing has changed.\n // e.g., auto | up | down\n const stem = defined(options.stem, 'BadArguments', 'options.stem is not defined').toLowerCase();\n // e.g., treble | bass\n const clef = defined(options.clef, 'BadArguments', 'options.clef is not defined').toLowerCase();\n\n const { chord, duration, dots, type } = this.piece;\n\n // Create a string[] that will be assigned to the .keys property of the StaveNote.\n // Each string in the array represents a note pitch and is of the form: {NoteName}{Accidental}/{Octave}\n // Only standard accidentals are included in the .keys property. Microtonal accidentals are not included.\n const standardAccidentals = Music.accidentals;\n const keys = chord.map(\n (notePiece) =>\n notePiece.key +\n (standardAccidentals.includes(notePiece.accid ?? '') ? notePiece.accid : '') +\n '/' +\n notePiece.octave\n );\n const autoStem = stem === 'auto'; // StaveNoteStruct expects the underscore & lowercase.\n\n // Build a GhostNote or StaveNote using the information we gathered.\n const note =\n type?.toLowerCase() === 'g'\n ? factory.GhostNote({ duration, dots })\n : factory.StaveNote({ keys, duration, dots, type, clef, autoStem });\n if (!autoStem) note.setStemDirection(stem === 'up' ? Stem.UP : Stem.DOWN);\n\n // Attach accidentals.\n const accidentals: (Accidental | undefined)[] = [];\n chord.forEach((notePiece: NotePiece, index: number) => {\n const accid = notePiece.accid;\n if (typeof accid === 'string') {\n const accidental = factory.Accidental({ type: accid });\n note.addModifier(accidental, index);\n accidentals.push(accidental);\n } else {\n accidentals.push(undefined);\n }\n });\n\n // Attach dots.\n for (let i = 0; i < dots; i++) Dot.buildAndAttach([note], { all: true });\n\n this.commitHooks.forEach((commitHook) => commitHook(options, note, this));\n\n this.elements.notes.push(note);\n this.elements.accidentals.push(accidentals);\n this.resetPiece();\n }\n}\n\nexport interface EasyScoreOptions {\n factory?: Factory;\n builder?: Builder;\n commitHooks?: CommitHook[];\n throwOnError?: boolean;\n}\n\n// Extending Record<string, any> allows arbitrary properties via set(defaults).\n// eslint-disable-next-line\nexport interface EasyScoreDefaults extends Record<string, any> {\n clef?: string;\n time?: string;\n stem?: string;\n}\n\n/**\n * Commit hook used by EasyScore.setOptions().\n */\nfunction setId(options: { id?: string }, note: StemmableNote) {\n if (options.id === undefined) return;\n note.setAttribute('id', options.id);\n}\n\n// Used by setClass() below.\nconst commaSeparatedRegex = /\\s*,\\s*/;\n\n/**\n * Commit hook used by EasyScore.setOptions().\n */\nfunction setClass(options: { class?: string }, note: StemmableNote) {\n if (options.class === undefined) return;\n options.class.split(commaSeparatedRegex).forEach((className: string) => note.addClass(className));\n}\n\n/**\n * EasyScore implements a parser for a simple language to generate VexFlow objects.\n */\nexport class EasyScore {\n static DEBUG: boolean = false;\n\n defaults: EasyScoreDefaults = {\n clef: 'treble',\n time: '4/4',\n stem: 'auto',\n };\n\n // options, factory, builder, grammar, and parser are all\n // initialized by the constructor via this.setOptions().\n options!: EasyScoreOptions;\n factory!: Factory;\n builder!: Builder;\n grammar!: EasyScoreGrammar;\n parser!: Parser;\n\n constructor(options: EasyScoreOptions = {}) {\n this.setOptions(options);\n }\n\n /**\n * Set the score defaults.\n * clef must be set appropriately to avoid errors when adding Staves.\n * @param defaults.clef default clef ( treble | bass ...) see {@link Clef.types}\n * @param defaults.time default time signature ( 4/4 | 9/8 ...)\n * @param defaults.stem default stem arrangement (auto | up | down)\n * @returns this\n */\n set(defaults: EasyScoreDefaults): this {\n this.defaults = { ...this.defaults, ...defaults };\n return this;\n }\n\n /**\n * @param options.factory is required.\n * @returns this\n */\n setOptions(options: EasyScoreOptions): this {\n const factory = options.factory!; // ! operator, because options.factory was set in Factory.EasyScore().\n const builder = options.builder ?? new Builder(factory);\n\n this.options = {\n commitHooks: [setId, setClass, Articulation.easyScoreHook, FretHandFinger.easyScoreHook],\n throwOnError: false,\n ...options,\n factory,\n builder,\n };\n\n this.factory = factory;\n this.builder = builder;\n this.grammar = new EasyScoreGrammar(this.builder);\n this.parser = new Parser(this.grammar);\n this.options.commitHooks?.forEach((commitHook) => this.addCommitHook(commitHook));\n return this;\n }\n\n setContext(context: RenderContext): this {\n this.factory.setContext(context);\n return this;\n }\n\n parse(line: string, options: BuilderOptions = {}): Result {\n this.builder.reset(options);\n const result = this.parser.parse(line);\n if (!result.success && this.options.throwOnError) {\n L(result);\n throw new RuntimeError('Error parsing line: ' + line);\n }\n return result;\n }\n\n beam(\n notes: StemmableNote[],\n options?: {\n autoStem?: boolean;\n secondaryBeamBreaks?: number[];\n partialBeamDirections?: {\n [noteIndex: number]: PartialBeamDirection;\n };\n }\n ): StemmableNote[] {\n this.factory.Beam({ notes, options });\n return notes;\n }\n\n tuplet(notes: StemmableNote[], options?: TupletOptions): StemmableNote[] {\n this.factory.Tuplet({ notes, options });\n return notes;\n }\n\n notes(line: string, options: BuilderOptions = {}): StemmableNote[] {\n options = { clef: this.defaults.clef, stem: this.defaults.stem, ...options };\n this.parse(line, options);\n return this.builder.getElements().notes;\n }\n\n voice(notes: Note[], options: { time?: string; options?: { softmaxFactor: number } } = {}): Voice {\n options = { time: this.defaults.time, ...options };\n return this.factory.Voice(options).addTickables(notes);\n }\n\n addCommitHook(commitHook: CommitHook): void {\n this.builder.addCommitHook(commitHook);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n\nimport { ModifierContext } from './modifiercontext';\nimport { NoteStruct } from './note';\nimport { Stave } from './stave';\nimport { StemmableNote } from './stemmablenote';\nimport { Category, isAnnotation } from './typeguard';\nimport { RuntimeError } from './util';\n\nconst ERROR_MSG = 'Ghost note must have valid initialization data to identify duration.';\n\nexport class GhostNote extends StemmableNote {\n static override get CATEGORY(): string {\n return Category.GhostNote;\n }\n\n constructor(parameter: string | NoteStruct) {\n if (!parameter) {\n throw new RuntimeError('BadArguments', ERROR_MSG);\n }\n\n let noteStruct;\n if (typeof parameter === 'string') {\n // Preserve backwards-compatibility\n noteStruct = { duration: parameter };\n } else if (typeof parameter === 'object') {\n noteStruct = parameter;\n } else {\n throw new RuntimeError('BadArguments', ERROR_MSG);\n }\n\n super(noteStruct);\n\n // Note properties\n this.setWidth(0);\n }\n\n /**\n * @returns true if this note is a type of rest. Rests don't have pitches, but take up space in the score.\n */\n override isRest(): boolean {\n return true;\n }\n\n override setStave(stave: Stave): this {\n super.setStave(stave);\n return this;\n }\n\n /* Overridden to ignore */\n // eslint-disable-next-line\n override addToModifierContext(mc: ModifierContext): this {\n // DO NOTHING.\n return this;\n }\n\n override preFormat(): this {\n this.preFormatted = true;\n return this;\n }\n\n override draw(): void {\n // Draw Annotations\n this.setRendered();\n for (let i = 0; i < this.modifiers.length; ++i) {\n const modifier = this.modifiers[i];\n if (isAnnotation(modifier)) {\n modifier.setContext(this.getContext());\n modifier.drawWithStyle();\n }\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// Any glyph that is set to appear on a Stave and take up musical time and graphical space.\n\nimport { Note, NoteStruct } from './note';\nimport { Category } from './typeguard';\n\nexport interface GlyphNoteOptions {\n ignoreTicks?: boolean;\n line?: number;\n}\n\nexport class GlyphNote extends Note {\n static override get CATEGORY(): string {\n return Category.GlyphNote;\n }\n\n protected options: Required<GlyphNoteOptions>;\n\n constructor(glyph: string, noteStruct: NoteStruct, options?: GlyphNoteOptions) {\n super(noteStruct);\n this.options = {\n ignoreTicks: false,\n line: 2,\n ...options,\n };\n\n // Note properties\n this.ignoreTicks = this.options.ignoreTicks;\n this.setGlyph(glyph);\n }\n\n setGlyph(glyph: string): this {\n this.text = glyph;\n return this;\n }\n\n override preFormat(): this {\n if (!this.preFormatted && this.modifierContext) {\n this.modifierContext.preFormat();\n }\n this.preFormatted = true;\n return this;\n }\n\n drawModifiers(): void {\n const ctx = this.checkContext();\n for (let i = 0; i < this.modifiers.length; i++) {\n const modifier = this.modifiers[i];\n modifier.setContext(ctx);\n modifier.drawWithStyle();\n }\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const ctx = stave.checkContext();\n this.setRendered();\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('glyphNote' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n\n this.x = this.isCenterAligned() ? this.getAbsoluteX() - this.getWidth() / 2 : this.getAbsoluteX();\n this.y = stave.getYForLine(this.options.line);\n this.renderText(ctx, 0, 0);\n this.drawModifiers();\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n\nimport { StaveNote, StaveNoteStruct } from './stavenote';\nimport { Stem } from './stem';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface GraceNoteStruct extends StaveNoteStruct {\n slash?: boolean;\n}\n\nexport class GraceNote extends StaveNote {\n static override get CATEGORY(): string {\n return Category.GraceNote;\n }\n\n static override get LEDGER_LINE_OFFSET(): number {\n return 2;\n }\n\n protected slash: boolean;\n protected slur: boolean;\n\n constructor(noteStruct: GraceNoteStruct) {\n super({\n strokePx: GraceNote.LEDGER_LINE_OFFSET,\n ...noteStruct,\n });\n\n this.slash = noteStruct.slash || false;\n this.slur = true;\n\n this.buildNoteHeads();\n\n this.width = 3;\n }\n\n override getStemExtension(): number {\n if (this.stemExtensionOverride) {\n return this.stemExtensionOverride;\n }\n\n let ret = super.getStemExtension();\n ret = Stem.HEIGHT * this.getFontScale() - Stem.HEIGHT + ret;\n return ret;\n }\n\n override draw(): void {\n super.draw();\n this.setRendered();\n const stem = this.stem;\n if (this.slash && stem) {\n const scale = this.getFontScale();\n\n let slashBBox = undefined;\n const beam = this.beam;\n if (beam) {\n // FIXME: should render slash after beam?\n if (!beam.postFormatted) {\n beam.postFormat();\n }\n\n slashBBox = this.calcBeamedNotesSlashBBox(8 * scale, 8 * scale, {\n stem: 6 * scale,\n beam: 5 * scale,\n });\n } else {\n const stemDirection = this.getStemDirection();\n const noteHeadBounds = this.getNoteHeadBounds();\n const noteHeadWidth = this.noteHeads[0].getWidth();\n const x = stemDirection === Stem.DOWN ? this.getAbsoluteX() : this.getAbsoluteX() + noteHeadWidth;\n const defaultOffsetY = (Tables.STEM_HEIGHT * scale) / 2;\n const y =\n stemDirection === Stem.DOWN ? noteHeadBounds.yBottom + defaultOffsetY : noteHeadBounds.yTop - defaultOffsetY;\n\n if (stemDirection === Stem.DOWN) {\n slashBBox = {\n x1: x - noteHeadWidth,\n y1: y - noteHeadWidth,\n x2: x + noteHeadWidth,\n y2: y + noteHeadWidth,\n };\n } else {\n slashBBox = {\n x1: x - noteHeadWidth,\n y1: y + noteHeadWidth,\n x2: x + noteHeadWidth,\n y2: y - noteHeadWidth,\n };\n }\n }\n\n // FIXME: avoid staff lines, ledger lines or others.\n\n const ctx = this.checkContext();\n ctx.setLineWidth(1 * scale); // FIXME: use more appropriate value.\n ctx.beginPath();\n ctx.moveTo(slashBBox.x1, slashBBox.y1);\n ctx.lineTo(slashBBox.x2, slashBBox.y2);\n ctx.closePath();\n ctx.stroke();\n }\n }\n\n calcBeamedNotesSlashBBox(\n slashStemOffset: number,\n slashBeamOffset: number,\n protrusions: { beam: number; stem: number }\n ): Record<string, number> {\n const beam = this.beam;\n if (!beam) throw new RuntimeError('NoBeam', \"Can't calculate without a beam.\");\n\n const beamSlope = beam.slope;\n const isBeamEndNote = beam.notes[beam.notes.length - 1] === this;\n const scaleX = isBeamEndNote ? -1 : 1;\n const beamAngle = Math.atan(beamSlope * scaleX);\n\n // slash line intersecting point on beam.\n const iPointOnBeam = {\n dx: Math.cos(beamAngle) * slashBeamOffset,\n dy: Math.sin(beamAngle) * slashBeamOffset,\n };\n\n slashStemOffset *= this.getStemDirection();\n const slashAngle = Math.atan((iPointOnBeam.dy - slashStemOffset) / iPointOnBeam.dx);\n const protrusionStemDeltaX = Math.cos(slashAngle) * protrusions.stem * scaleX;\n const protrusionStemDeltaY = Math.sin(slashAngle) * protrusions.stem;\n const protrusionBeamDeltaX = Math.cos(slashAngle) * protrusions.beam * scaleX;\n const protrusionBeamDeltaY = Math.sin(slashAngle) * protrusions.beam;\n\n const stemX = this.getStemX();\n const stem0X = beam.notes[0].getStemX();\n const stemY = beam.getBeamYToDraw() + (stemX - stem0X) * beamSlope;\n\n const ret = {\n x1: stemX - protrusionStemDeltaX,\n y1: stemY + slashStemOffset - protrusionStemDeltaY,\n x2: stemX + iPointOnBeam.dx * scaleX + protrusionBeamDeltaX,\n y2: stemY + iPointOnBeam.dy + protrusionBeamDeltaY,\n };\n return ret;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Mark Meeus 2019\n\nimport { KeySignature } from './keysignature';\nimport { ModifierContext } from './modifiercontext';\nimport { Note } from './note';\nimport { Category } from './typeguard';\n\nexport class KeySigNote extends Note {\n static override get CATEGORY(): string {\n return Category.KeySigNote;\n }\n\n protected keySignature: KeySignature;\n\n constructor(keySpec: string, cancelKeySpec?: string, alterKeySpec?: string[]) {\n super({ duration: 'b' });\n\n this.keySignature = new KeySignature(keySpec, cancelKeySpec, alterKeySpec);\n\n // Note properties\n this.ignoreTicks = true;\n }\n\n /* Overridden to ignore */\n // eslint-disable-next-line\n override addToModifierContext(mc: ModifierContext): this {\n // DO NOTHING.\n return this;\n }\n\n override preFormat(): this {\n this.preFormatted = true;\n this.keySignature.setStave(this.checkStave());\n this.setWidth(this.keySignature.getWidth());\n return this;\n }\n\n override draw(): void {\n const ctx = this.checkStave().checkContext();\n this.setRendered();\n this.keySignature.setX(this.getAbsoluteX());\n this.keySignature.setContext(ctx);\n this.keySignature.drawWithStyle();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// This class implements multiple measure rests.\n\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { RenderContext } from './rendercontext';\nimport { Stave } from './stave';\nimport { StaveModifierPosition } from './stavemodifier';\nimport { Tables } from './tables';\nimport { Category, isBarline } from './typeguard';\nimport { defined, RuntimeError } from './util';\n\nexport interface MultimeasureRestRenderOptions {\n /** Extracted by Factory.MultiMeasureRest() and passed to the MultiMeasureRest constructor. */\n numberOfMeasures: number;\n\n /** Use rest symbols. Defaults to `false`, which renders a thick horizontal line with serifs at both ends. */\n useSymbols?: boolean;\n\n /** Horizontal spacing between rest symbol glyphs (if `useSymbols` is `true`).*/\n symbolSpacing?: number;\n\n /** Show the number of measures at the top. Defaults to `true`. */\n showNumber?: boolean;\n\n /** Vertical position of the \"number of measures\" text (measured in stave lines). Defaults to -0.5, which is above the stave. 6.5 is below the stave. */\n numberLine?: number;\n\n /** Font size of the \"number of measures\" text. */\n numberGlyphPoint?: number;\n\n /** Left padding from `stave.getX()`. */\n paddingLeft?: number;\n\n /** Right padding from `stave.getX() + stave.getWidth()` */\n paddingRight?: number;\n\n /** Vertical position of the rest line or symbols, expressed as stave lines. Default: 2. The top stave line is 1, and the bottom stave line is 5. */\n line?: number;\n\n /** Defaults to the number of vertical pixels between stave lines. Used for serif height or 2-bar / 4-bar symbol height. */\n spacingBetweenLinesPx?: number;\n\n /** Size of the semibreve (1-bar) rest symbol. Other symbols are scaled accordingly. */\n semibreveRestGlyphScale?: number;\n\n /** Thickness of the rest line. Used when `useSymbols` is false. Defaults to half the space between stave lines. */\n lineThickness?: number;\n\n /** Thickness of the rest line's serif. Used when `useSymbols` is false. */\n serifThickness?: number;\n}\n\nexport class MultiMeasureRest extends Element {\n static override get CATEGORY(): string {\n return Category.MultiMeasureRest;\n }\n\n public renderOptions: Required<MultimeasureRestRenderOptions>;\n protected xs = { left: NaN, right: NaN };\n protected numberOfMeasures: number;\n\n protected stave?: Stave;\n\n protected hasPaddingLeft = false;\n protected hasPaddingRight = false;\n protected hasLineThickness = false;\n protected hasSymbolSpacing = false;\n\n /**\n *\n * @param numberOfMeasures Number of measures.\n * @param options The options object.\n */\n constructor(numberOfMeasures: number, options: MultimeasureRestRenderOptions) {\n super();\n const fontSize = options.numberGlyphPoint ?? Metrics.get('MultiMeasureRest.fontSize'); // same as TimeSignature.\n this.fontInfo.size = fontSize;\n\n this.numberOfMeasures = numberOfMeasures;\n this.text = '';\n const t = `${this.numberOfMeasures}`;\n for (const digit of t) {\n // 0xe080 is timeSig0. We calculate the code point for timeSigN to assemble the digits via SMuFL glyphs.\n this.text += String.fromCodePoint(0xe080 + Number(digit));\n }\n\n // Keep track of whether these four options were provided.\n this.hasPaddingLeft = typeof options.paddingLeft === 'number';\n this.hasPaddingRight = typeof options.paddingRight === 'number';\n this.hasLineThickness = typeof options.lineThickness === 'number';\n this.hasSymbolSpacing = typeof options.symbolSpacing === 'number';\n\n this.renderOptions = {\n useSymbols: false,\n showNumber: true,\n numberLine: -0.5,\n numberGlyphPoint: fontSize,\n line: 2,\n spacingBetweenLinesPx: Tables.STAVE_LINE_DISTANCE, // same as Stave.\n serifThickness: 2,\n semibreveRestGlyphScale: Metrics.get('fontSize'), // same as NoteHead.\n paddingLeft: 0,\n paddingRight: 0,\n lineThickness: 5,\n symbolSpacing: 0,\n ...options,\n };\n }\n\n getXs(): { left: number; right: number } {\n return this.xs;\n }\n\n setStave(stave: Stave): this {\n this.stave = stave;\n return this;\n }\n\n getStave(): Stave | undefined {\n return this.stave;\n }\n\n checkStave(): Stave {\n return defined(this.stave, 'NoStave', 'No stave attached to instance.');\n }\n\n drawLine(stave: Stave, ctx: RenderContext, left: number, right: number): void {\n const options = this.renderOptions;\n\n const y = stave.getYForLine(options.line);\n const padding = (right - left) * 0.1;\n left += padding;\n right -= padding;\n let txt = '\\ue4ef'; /*restHBarLeft*/\n const el = new Element();\n el.setText(txt);\n // Add middle bars until the right padding is reached\n const elWidth = el.getWidth();\n if (!elWidth) {\n throw new RuntimeError('Cannot drawLine if width is 0');\n }\n for (let i = 1; (i + 2) * elWidth + left <= right; i++) {\n txt += '\\ue4f0'; /*restHBarMiddle*/\n }\n txt += '\\ue4f1'; /*restHBarRight*/\n\n el.setText(txt);\n el.renderText(ctx, left + (right - left) * 0.5 - el.getWidth() * 0.5, y);\n }\n\n drawSymbols(stave: Stave, ctx: RenderContext, left: number, right: number): void {\n const n4 = Math.floor(this.numberOfMeasures / 4);\n const n = this.numberOfMeasures % 4;\n const n2 = Math.floor(n / 2);\n const n1 = n % 2;\n\n const options = this.renderOptions;\n\n const elMiddle = new Element();\n let txt = '';\n for (let i = 0; i < n4; ++i) {\n txt += Glyphs.restLonga + ' ';\n }\n for (let i = 0; i < n2; ++i) {\n txt += Glyphs.restDoubleWhole + ' ';\n }\n elMiddle.setText(txt);\n const elTop = new Element();\n txt = '';\n for (let i = 0; i < n1; ++i) {\n txt += Glyphs.restWhole + ' ';\n }\n elTop.setText(txt);\n\n const width = elMiddle.getWidth() + elTop.getWidth();\n let x = left + (right - left) * 0.5 - width * 0.5;\n const line = options.line;\n const yTop = stave.getYForLine(line - 1);\n const yMiddle = stave.getYForLine(line);\n\n elMiddle.renderText(ctx, x, yMiddle);\n x += elMiddle.getWidth();\n elTop.renderText(ctx, x, yTop);\n x += elTop.getWidth();\n }\n\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n\n const stave = this.checkStave();\n\n let left = stave.getNoteStartX();\n let right = stave.getNoteEndX();\n\n // FIXME: getNoteStartX() returns x + 5(barline width)\n // getNoteEndX() returns x + width(no barline width)\n // See Stave constructor. How do we fix this?\n // Here, we subtract the barline width.\n const begModifiers = stave.getModifiers(StaveModifierPosition.BEGIN);\n if (begModifiers.length === 1 && isBarline(begModifiers[0])) {\n left -= begModifiers[0].getWidth();\n }\n\n const options = this.renderOptions;\n if (this.hasPaddingLeft) {\n left = stave.getX() + options.paddingLeft;\n }\n if (this.hasPaddingRight) {\n right = stave.getX() + stave.getWidth() - options.paddingRight;\n }\n\n this.xs.left = left;\n this.xs.right = right;\n\n if (options.useSymbols) {\n this.drawSymbols(stave, ctx, left, right);\n } else {\n this.drawLine(stave, ctx, left, right);\n }\n\n if (options.showNumber) {\n this.renderText(\n ctx,\n left + (right - left) * 0.5 - this.width * 0.5,\n stave.getYForLine(options.numberLine) - this.height * 0.5\n );\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { StaveNote } from './stavenote';\nimport { Category } from './typeguard';\nimport { log, RuntimeError } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (PedalMarking.DEBUG) log('VexFlow.PedalMarking', args);\n}\n\n/**\n * PedalMarking implements different types of pedal markings. These notation\n * elements indicate to the performer when to depress and release the a pedal.\n *\n * In order to create \"Sostenuto\", and \"una corda\" markings, you must set\n * custom text for the release/depress pedal markings.\n */\nexport class PedalMarking extends Element {\n /** To enable logging for this class. Set `VexFlow.PedalMarking.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.PedalMarking;\n }\n\n protected line: number;\n protected type: number;\n protected depressText: string;\n protected releaseText: string;\n\n public renderOptions: {\n color: string;\n bracketHeight: number;\n textMarginRight: number;\n bracketLineWidth: number;\n };\n protected notes: StaveNote[];\n\n /** Glyph data */\n static readonly GLYPHS: Record<string, string> = {\n pedalDepress: Glyphs.keyboardPedalPed,\n pedalRelease: Glyphs.keyboardPedalUp,\n };\n\n /** Pedal type as number. */\n static readonly type = {\n TEXT: 1,\n BRACKET: 2,\n MIXED: 3,\n };\n\n /** Pedal type as string. */\n static readonly typeString: Record<string, number> = {\n text: PedalMarking.type.TEXT,\n bracket: PedalMarking.type.BRACKET,\n mixed: PedalMarking.type.MIXED,\n };\n\n /**\n * Create a sustain pedal marking. Returns the defaults PedalMarking.\n * Which uses the traditional \"Ped\" and \"*\"\" markings.\n */\n static createSustain(notes: StaveNote[]): PedalMarking {\n const pedal = new PedalMarking(notes);\n return pedal;\n }\n\n /** Create a sostenuto pedal marking */\n static createSostenuto(notes: StaveNote[]): PedalMarking {\n const pedal = new PedalMarking(notes);\n pedal.setType(PedalMarking.type.MIXED);\n pedal.setCustomText('Sost. Ped.');\n return pedal;\n }\n\n /** Create an una corda pedal marking */\n static createUnaCorda(notes: StaveNote[]): PedalMarking {\n const pedal = new PedalMarking(notes);\n pedal.setType(PedalMarking.type.TEXT);\n pedal.setCustomText('una corda', 'tre corda');\n return pedal;\n }\n\n constructor(notes: StaveNote[]) {\n super();\n\n this.notes = notes;\n this.type = PedalMarking.type.TEXT;\n this.line = 0;\n\n // Text for the release/depress markings\n this.depressText = PedalMarking.GLYPHS.pedalDepress;\n this.releaseText = PedalMarking.GLYPHS.pedalRelease;\n\n this.renderOptions = {\n bracketHeight: 10,\n textMarginRight: 6,\n bracketLineWidth: 1,\n color: 'black',\n };\n }\n\n /** Set pedal type. */\n setType(type: string | number): this {\n type = typeof type === 'string' ? PedalMarking.typeString[type] : type;\n\n if (type >= PedalMarking.type.TEXT && type <= PedalMarking.type.MIXED) {\n this.type = type;\n }\n return this;\n }\n\n /**\n * Set custom text for the `depress`/`release` pedal markings. No text is\n * set if the parameter is falsy.\n */\n setCustomText(depress: string, release?: string): this {\n this.depressText = depress || '';\n this.releaseText = release || '';\n this.setFont(Metrics.getFontInfo('PedalMarking.text'));\n return this;\n }\n\n /** Set the staff line to render the markings on. */\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n /** Draw the bracket based pedal markings. */\n drawBracketed(): void {\n const ctx = this.checkContext();\n let isPedalDepressed = false;\n let prevX: number;\n let prevY: number;\n let textWidth = 0;\n\n // Iterate through each note\n this.notes.forEach((note, index, notes) => {\n // Each note triggers the opposite pedal action\n isPedalDepressed = !isPedalDepressed;\n\n // Get the initial coordinates for the note\n const x = note.getAbsoluteX();\n const y = note.checkStave().getYForBottomText(this.line + 3);\n\n // Throw if current note is positioned before the previous note\n if (x < prevX) {\n throw new RuntimeError('InvalidConfiguration', 'The notes provided must be in order of ascending x positions');\n }\n\n // Determine if the previous or next note are the same\n // as the current note. We need to keep track of this for\n // when adjustments are made for the release+depress action\n const nextNoteIsSame = notes[index + 1] === note;\n const prevNoteIsSame = notes[index - 1] === note;\n\n let xShift = 0;\n\n if (isPedalDepressed) {\n // Adjustment for release+depress\n xShift = prevNoteIsSame ? 5 : 0;\n\n if (this.type === PedalMarking.type.MIXED && !prevNoteIsSame) {\n // For MIXED style, start with text instead of bracket\n textWidth = ctx.measureText(this.depressText).width;\n ctx.fillText(this.depressText, x, y);\n // Adjust the xShift for the next note\n xShift = textWidth + this.renderOptions.textMarginRight;\n } else {\n // Draw start bracket\n ctx.beginPath();\n ctx.moveTo(x, y - this.renderOptions.bracketHeight);\n ctx.lineTo(x + xShift, y);\n ctx.stroke();\n ctx.closePath();\n }\n } else {\n // Get the current note index and the total notes in the associated voice\n const noteNdx = note.getVoice().getTickables().indexOf(note);\n const voiceNotes = note.getVoice().getTickables().length;\n // Get the absolute x position of the end of the current note\n const noteEndX =\n noteNdx + 1 < voiceNotes\n ? // If the next note is in the same voice, use the x position of the next note\n note.getVoice().getTickables()[noteNdx + 1].getAbsoluteX()\n : // If this is the last note is the voice, use the x position of the next stave\n (note.getStave()?.getX() ?? 0) + (note.getStave()?.getWidth() ?? 0);\n\n // Draw end bracket\n ctx.beginPath();\n ctx.moveTo(prevX, prevY);\n ctx.lineTo(nextNoteIsSame ? x - 5 : noteEndX - 5, y);\n // No shift if next note is the same\n ctx.lineTo(nextNoteIsSame ? x : noteEndX - 5, y - this.renderOptions.bracketHeight);\n ctx.stroke();\n ctx.closePath();\n }\n\n // Store previous coordinates\n prevX = x + xShift;\n prevY = y;\n });\n }\n\n /**\n * Draw the text based pedal markings. This defaults to the traditional\n * \"Ped\" and \"*\"\" symbols if no custom text has been provided.\n */\n drawText(): void {\n const ctx = this.checkContext();\n let isPedalDepressed = false;\n let textWidth = 0;\n\n // Iterate through each note, placing glyphs or custom text accordingly\n this.notes.forEach((note) => {\n isPedalDepressed = !isPedalDepressed;\n const stave = note.checkStave();\n const x = note.getAbsoluteX();\n const y = stave.getYForBottomText(this.line + 3);\n\n if (isPedalDepressed) {\n textWidth = ctx.measureText(this.depressText).width;\n ctx.fillText(this.depressText, x, y);\n } else {\n const noteNdx = note.getVoice().getTickables().indexOf(note);\n const voiceNotes = note.getVoice().getTickables().length;\n // Get the shift for the next note\n const noteEndX =\n noteNdx + 1 < voiceNotes\n ? // If the next note is in the same voice, use the x position of the next note\n note.getVoice().getTickables()[noteNdx + 1].getAbsoluteX()\n : // If this is the last note is the voice, use the x position of the next stave\n (note.getStave()?.getX() ?? 0) + (note.getStave()?.getWidth() ?? 0);\n textWidth = ctx.measureText(this.releaseText).width;\n ctx.fillText(this.releaseText, noteEndX - textWidth, y);\n }\n });\n }\n\n /** Render the pedal marking in position on the rendering context. */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n\n ctx.setStrokeStyle(this.renderOptions.color);\n ctx.setFillStyle(this.renderOptions.color);\n ctx.setFont(this.font);\n L('Rendering Pedal Marking');\n\n if (this.type === PedalMarking.type.BRACKET || this.type === PedalMarking.type.MIXED) {\n ctx.setLineWidth(this.renderOptions.bracketLineWidth);\n this.drawBracketed();\n } else if (this.type === PedalMarking.type.TEXT) {\n this.drawText();\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n\nimport { GlyphNote, GlyphNoteOptions } from './glyphnote';\nimport { Glyphs } from './glyphs';\nimport { NoteStruct } from './note';\nimport { Category } from './typeguard';\n\n// Map `type` to SMuFL glyph code.\nconst CODES: Record<string, string> = {\n '1': Glyphs.repeat1Bar,\n '2': Glyphs.repeat2Bars,\n '4': Glyphs.repeat4Bars,\n slash: Glyphs.repeatBarSlash,\n};\n\nexport class RepeatNote extends GlyphNote {\n static override get CATEGORY(): string {\n return Category.RepeatNote;\n }\n\n constructor(type: string, noteStruct?: NoteStruct, options?: GlyphNoteOptions) {\n const glyphCode = CODES[type] || '\\uE500'; /*repeat1Bar*/\n super(glyphCode, { duration: 'q', alignCenter: type !== 'slash', ...noteStruct }, options);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n//\n// This file implements `StaveLine` which are simply lines that connect\n// two notes. This object is highly configurable, see the `renderOptions`.\n// A simple line is often used for notating glissando articulations, but you\n// can format a `StaveLine` with arrows or colors for more pedagogical\n// purposes, such as diagrams.\n\nimport { Element } from './element';\nimport { RenderContext } from './rendercontext';\nimport { StaveNote } from './stavenote';\nimport { Tables } from './tables';\nimport { TextJustification } from './textnote';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface StaveLineNotes {\n firstNote: StaveNote;\n firstIndexes: number[];\n lastNote: StaveNote;\n lastIndexes: number[];\n}\n\n// Attribution: Arrow rendering implementations based off of\n// Patrick Horgan's article, \"Drawing lines and arcs with\n// arrow heads on HTML5 Canvas\"\n//\n// Draw an arrow head that connects between 3 coordinates.\nfunction drawArrowHead(\n ctx: RenderContext,\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number\n): void {\n // all cases do this.\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x0, y0);\n ctx.closePath();\n\n ctx.fill();\n}\n\nexport class StaveLine extends Element {\n static override get CATEGORY(): string {\n return Category.StaveLine;\n }\n\n // Text Positioning\n static readonly TextVerticalPosition = {\n TOP: 1,\n BOTTOM: 2,\n };\n\n static readonly TextJustification = TextJustification;\n\n public renderOptions: {\n paddingLeft: number;\n paddingRight: number;\n lineWidth: number;\n lineDash?: number[];\n roundedEnd: boolean;\n color?: string;\n drawStartArrow: boolean;\n drawEndArrow: boolean;\n arrowheadLength: number;\n arrowheadAngle: number;\n textPositionVertical: number;\n textJustification: number;\n };\n\n // These five instance variables are all initialized by the constructor via this.setNotes(notes).\n protected notes!: StaveLineNotes;\n protected firstNote!: StaveNote;\n protected firstIndexes!: number[];\n protected lastNote!: StaveNote;\n protected lastIndexes!: number[];\n\n // Initialize the StaveLine with the given `notes`.\n //\n // `notes` is a struct that has:\n //\n // ```\n // {\n // firstNote: Note,\n // lastNote: Note,\n // firstIndexes: [n1, n2, n3],\n // lastIndexes: [n1, n2, n3]\n // }\n // ```\n constructor(notes: StaveLineNotes) {\n super();\n\n this.setNotes(notes);\n\n this.text = '';\n\n this.renderOptions = {\n // Space to add to the left or the right\n paddingLeft: 4,\n paddingRight: 3,\n\n // The width of the line in pixels\n lineWidth: 1,\n // An array of line/space lengths. (TODO/QUESTION: Is this supported in SVG?).\n lineDash: undefined,\n // Can draw rounded line end, instead of a square. (TODO/QUESTION: Is this supported in SVG?).\n roundedEnd: true,\n // The color of the line and arrowheads\n color: undefined,\n\n // Flags to draw arrows on each end of the line\n drawStartArrow: false,\n drawEndArrow: false,\n\n // The length of the arrowhead sides\n arrowheadLength: 10,\n // The angle of the arrowhead\n arrowheadAngle: Math.PI / 8,\n\n // The position of the text\n textPositionVertical: StaveLine.TextVerticalPosition.TOP,\n textJustification: StaveLine.TextJustification.CENTER,\n };\n }\n\n // The the annotation for the `StaveLine`\n override setText(text: string): this {\n this.text = text;\n return this;\n }\n\n // Set the notes for the `StaveLine`\n setNotes(notes: StaveLineNotes): this {\n if (!notes.firstNote && !notes.lastNote) {\n throw new RuntimeError('BadArguments', 'Notes needs to have either firstNote or lastNote set.');\n }\n\n if (!notes.firstIndexes) notes.firstIndexes = [0];\n if (!notes.lastIndexes) notes.lastIndexes = [0];\n\n if (notes.firstIndexes.length !== notes.lastIndexes.length) {\n throw new RuntimeError('BadArguments', 'Connected notes must have same number of indexes.');\n }\n\n this.notes = notes;\n this.firstNote = notes.firstNote;\n this.firstIndexes = notes.firstIndexes;\n this.lastNote = notes.lastNote;\n this.lastIndexes = notes.lastIndexes;\n return this;\n }\n\n // Apply the style of the `StaveLine` to the context\n applyLineStyle(): void {\n const ctx = this.checkContext();\n const renderOptions = this.renderOptions;\n\n if (renderOptions.lineDash) {\n ctx.setLineDash(renderOptions.lineDash);\n }\n\n if (renderOptions.lineWidth) {\n ctx.setLineWidth(renderOptions.lineWidth);\n }\n\n if (renderOptions.roundedEnd) {\n ctx.setLineCap('round');\n } else {\n ctx.setLineCap('square');\n }\n }\n\n // Helper function to draw a line with arrow heads\n protected drawArrowLine(ctx: RenderContext, pt1: { x: number; y: number }, pt2: { x: number; y: number }): void {\n const bothArrows = this.renderOptions.drawStartArrow && this.renderOptions.drawEndArrow;\n\n const x1 = pt1.x;\n const y1 = pt1.y;\n const x2 = pt2.x;\n const y2 = pt2.y;\n\n // For ends with arrow we actually want to stop before we get to the arrow\n // so that wide lines won't put a flat end on the arrow.\n const distance = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n const ratio = (distance - this.renderOptions.arrowheadLength / 3) / distance;\n let endX;\n let endY;\n let startX;\n let startY;\n if (this.renderOptions.drawEndArrow || bothArrows) {\n endX = Math.round(x1 + (x2 - x1) * ratio);\n endY = Math.round(y1 + (y2 - y1) * ratio);\n } else {\n endX = x2;\n endY = y2;\n }\n\n if (this.renderOptions.drawStartArrow || bothArrows) {\n startX = x1 + (x2 - x1) * (1 - ratio);\n startY = y1 + (y2 - y1) * (1 - ratio);\n } else {\n startX = x1;\n startY = y1;\n }\n\n if (this.renderOptions.color) {\n ctx.setStrokeStyle(this.renderOptions.color);\n ctx.setFillStyle(this.renderOptions.color);\n }\n\n // Draw the shaft of the arrow\n ctx.beginPath();\n ctx.moveTo(startX, startY);\n ctx.lineTo(endX, endY);\n ctx.stroke();\n ctx.closePath();\n\n // calculate the angle of the line\n const lineAngle = Math.atan2(y2 - y1, x2 - x1);\n // h is the line length of a side of the arrow head\n const h = Math.abs(this.renderOptions.arrowheadLength / Math.cos(this.renderOptions.arrowheadAngle));\n\n let angle1;\n let angle2;\n let topX;\n let topY;\n let bottomX;\n let bottomY;\n\n if (this.renderOptions.drawEndArrow || bothArrows) {\n angle1 = lineAngle + Math.PI + this.renderOptions.arrowheadAngle;\n topX = x2 + Math.cos(angle1) * h;\n topY = y2 + Math.sin(angle1) * h;\n\n angle2 = lineAngle + Math.PI - this.renderOptions.arrowheadAngle;\n bottomX = x2 + Math.cos(angle2) * h;\n bottomY = y2 + Math.sin(angle2) * h;\n\n drawArrowHead(ctx, topX, topY, x2, y2, bottomX, bottomY);\n }\n\n if (this.renderOptions.drawStartArrow || bothArrows) {\n angle1 = lineAngle + this.renderOptions.arrowheadAngle;\n topX = x1 + Math.cos(angle1) * h;\n topY = y1 + Math.sin(angle1) * h;\n\n angle2 = lineAngle - this.renderOptions.arrowheadAngle;\n bottomX = x1 + Math.cos(angle2) * h;\n bottomY = y1 + Math.sin(angle2) * h;\n\n drawArrowHead(ctx, topX, topY, x1, y1, bottomX, bottomY);\n }\n }\n\n // Renders the `StaveLine` on the context\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n\n const firstNote = this.firstNote;\n const lastNote = this.lastNote;\n const renderOptions = this.renderOptions;\n\n this.applyLineStyle();\n\n // Cycle through each set of indexes and draw lines\n let startPosition = { x: 0, y: 0 };\n let endPosition = { x: 0, y: 0 };\n this.firstIndexes.forEach((firstIndex, i) => {\n const lastIndex = this.lastIndexes[i];\n\n // Get initial coordinates for the start/end of the line\n startPosition = firstNote.getModifierStartXY(2, firstIndex);\n endPosition = lastNote.getModifierStartXY(1, lastIndex);\n const upwardsSlope = startPosition.y > endPosition.y;\n\n // Adjust `x` coordinates for modifiers\n startPosition.x += firstNote.getMetrics().modRightPx + renderOptions.paddingLeft;\n endPosition.x -= lastNote.getMetrics().modLeftPx + renderOptions.paddingRight;\n\n // Adjust first `x` coordinates for displacements\n const noteheadWidth = firstNote.getGlyphWidth();\n const firstDisplaced = firstNote.getKeyProps()[firstIndex].displaced;\n if (firstDisplaced && firstNote.getStemDirection() === 1) {\n startPosition.x += noteheadWidth + renderOptions.paddingLeft;\n }\n\n // Adjust last `x` coordinates for displacements\n const lastDisplaced = lastNote.getKeyProps()[lastIndex].displaced;\n if (lastDisplaced && lastNote.getStemDirection() === -1) {\n endPosition.x -= noteheadWidth + renderOptions.paddingRight;\n }\n\n // Adjust y position better if it's not coming from the center of the note\n startPosition.y += upwardsSlope ? -3 : 1;\n endPosition.y += upwardsSlope ? 2 : 0;\n\n this.drawArrowLine(ctx, startPosition, endPosition);\n });\n\n // Determine the x coordinate where to start the text\n const textWidth = this.width;\n const justification = renderOptions.textJustification;\n let x = 0;\n if (justification === StaveLine.TextJustification.LEFT) {\n x = startPosition.x;\n } else if (justification === StaveLine.TextJustification.CENTER) {\n const deltaX = endPosition.x - startPosition.x;\n const centerX = deltaX / 2 + startPosition.x;\n x = centerX - textWidth / 2;\n } else if (justification === StaveLine.TextJustification.RIGHT) {\n x = endPosition.x - textWidth;\n }\n\n // Determine the y value to start the text\n let y = 0;\n const verticalPosition = renderOptions.textPositionVertical;\n if (verticalPosition === StaveLine.TextVerticalPosition.TOP) {\n y = firstNote.checkStave().getYForTopText();\n } else if (verticalPosition === StaveLine.TextVerticalPosition.BOTTOM) {\n y = firstNote.checkStave().getYForBottomText(Tables.TEXT_HEIGHT_OFFSET_HACK);\n }\n\n // Draw the text\n const color = renderOptions.color;\n this.applyStyle(ctx, { fillStyle: color, strokeStyle: color });\n this.renderText(ctx, x, y);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { BoundingBox } from './boundingbox';\nimport { Element } from './element';\nimport { Factory } from './factory';\nimport { FormatParams, Formatter, FormatterOptions } from './formatter';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { Stave, StaveOptions } from './stave';\nimport { StaveConnector, StaveConnectorType } from './staveconnector';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\nimport { Voice } from './voice';\n\nexport interface SystemFormatterOptions extends FormatterOptions {\n alpha?: number;\n}\n\nexport interface SystemStave {\n voices: Voice[];\n stave?: Stave;\n noJustification?: boolean;\n options?: StaveOptions;\n spaceAbove?: number;\n spaceBelow?: number;\n debugNoteMetrics?: boolean;\n}\n\ninterface StaveInfo {\n noJustification: boolean;\n options: StaveOptions;\n spaceAbove: number;\n spaceBelow: number;\n debugNoteMetrics: boolean;\n}\n\n/**\n * Formatting for systems created/drawn from factory:\n *\n * If width is provided, the system will use the specified width.\n *\n * If noJustification flag is 'true', there is no justification between voices\n * Otherwise, autoWidth defaults to true.\n *\n * If autowidth is true, the system uses format.preCalculateMinWidth\n * for the width of all voices, and default stave padding\n */\nexport interface SystemOptions {\n factory?: Factory;\n noPadding?: boolean;\n debugFormatter?: boolean;\n spaceBetweenStaves?: number;\n formatIterations?: number;\n autoWidth?: boolean;\n x?: number;\n width?: number;\n y?: number;\n details?: SystemFormatterOptions;\n formatOptions?: FormatParams;\n noJustification?: boolean;\n}\n\n/**\n * System implements a musical system, which is a collection of staves,\n * each which can have one or more voices. All voices across all staves in\n * the system are formatted together.\n */\nexport class System extends Element {\n static override get CATEGORY(): string {\n return Category.System;\n }\n\n protected options!: Required<SystemOptions>;\n protected factory!: Factory;\n protected formatter?: Formatter;\n protected startX?: number;\n protected lastY?: number;\n protected partStaves: Stave[];\n protected partStaveInfos: StaveInfo[];\n protected partVoices: Voice[];\n protected connector?: StaveConnector;\n protected debugNoteMetricsYs?: { y: number; stave: Stave }[];\n\n constructor(params: SystemOptions = {}) {\n super();\n this.setOptions(params);\n this.partStaves = [];\n this.partStaveInfos = [];\n this.partVoices = [];\n }\n\n /** Set formatting options. */\n setOptions(options: SystemOptions = {}): void {\n if (!options.factory) {\n throw new RuntimeError('NoFactory', 'System.setOptions(options) requires a factory.');\n }\n this.factory = options.factory;\n this.options = {\n factory: this.factory,\n x: 10,\n y: 10,\n width: 500,\n spaceBetweenStaves: 12, // stave spaces\n autoWidth: false,\n noJustification: false,\n debugFormatter: false,\n formatIterations: 0, // number of formatter tuning steps\n noPadding: false,\n ...options,\n details: {\n alpha: 0.5, // formatter tuner learning/shifting rate\n ...options.details,\n },\n formatOptions: {\n ...options.formatOptions,\n },\n };\n\n if (this.options.noJustification === false && typeof options.width === 'undefined') {\n this.options.autoWidth = true;\n }\n }\n\n /** Get origin X. */\n override getX(): number {\n return this.options.x;\n }\n\n /** Set origin X. */\n override setX(x: number): this {\n this.options.x = x;\n this.partStaves.forEach((s) => {\n s.setX(x);\n });\n return this;\n }\n\n /** Get origin y. */\n override getY(): number {\n return this.options.y;\n }\n\n /** Set origin y. */\n override setY(y: number): this {\n this.options.y = y;\n this.partStaves.forEach((s) => {\n s.setY(y);\n });\n return this;\n }\n\n /** Get associated staves. */\n getStaves(): Stave[] {\n return this.partStaves;\n }\n\n /** Get associated voices. */\n getVoices(): Voice[] {\n return this.partVoices;\n }\n\n /** Set associated context. */\n override setContext(context: RenderContext): this {\n super.setContext(context);\n this.factory.setContext(context);\n return this;\n }\n\n /**\n * Add connector between staves.\n * @param type see {@link StaveConnector.typeString}\n */\n addConnector(type: StaveConnectorType = 'double'): StaveConnector {\n this.connector = this.factory.StaveConnector({\n topStave: this.partStaves[0],\n bottomStave: this.partStaves[this.partStaves.length - 1],\n type,\n });\n return this.connector;\n }\n\n /**\n * Add a stave to the system.\n *\n * Example (one voice):\n *\n * `system.addStave({voices: [score.voice(score.notes('C#5/q, B4, A4, G#4'))]});`\n *\n * Example (two voices):\n *\n * `system.addStave({voices: [`\n * `score.voice(score.notes('C#5/q, B4, A4, G#4', {stem: 'up'})),`\n * `score.voice(score.notes('C#4/h, C#4', {stem: 'down'}))`\n * `]});`\n */\n addStave(params: SystemStave): Stave {\n const staveOptions: StaveOptions = { leftBar: false, ...params.options };\n\n const stave =\n params.stave ??\n this.factory.Stave({ x: this.options.x, y: this.options.y, width: this.options.width, options: staveOptions });\n\n const p = {\n spaceAbove: 0, // stave spaces\n spaceBelow: 0, // stave spaces\n debugNoteMetrics: false,\n noJustification: false,\n ...params,\n options: staveOptions, // this needs to go after ...params, so we can override the options field.\n };\n\n const ctx = this.getContext();\n p.voices.forEach((voice) => {\n voice\n .setContext(ctx)\n .setStave(stave)\n .getTickables()\n .forEach((tickable) => tickable.setStave(stave));\n this.partVoices.push(voice);\n });\n\n this.partStaves.push(stave);\n this.partStaveInfos.push(p);\n return stave;\n }\n\n /**\n * Add voices to the system with stave already assigned.\n */\n addVoices(voices: Voice[]) {\n const ctx = this.getContext();\n voices.forEach((voice) => {\n voice.setContext(ctx);\n this.partVoices.push(voice);\n });\n }\n\n /** Format the system. */\n format(): void {\n const optionsDetails = this.options.details;\n let justifyWidth = 0;\n const formatter = new Formatter(optionsDetails);\n this.formatter = formatter;\n\n let y = this.options.y;\n let startX = 0;\n const debugNoteMetricsYs: { y: number; stave: Stave }[] = [];\n\n this.partStaves.forEach((part, index) => {\n y = y + part.space(this.partStaveInfos[index].spaceAbove);\n part.setY(y);\n y = y + part.space(this.partStaveInfos[index].spaceBelow);\n y = y + part.space(this.options.spaceBetweenStaves);\n if (this.partStaveInfos[index].debugNoteMetrics) {\n debugNoteMetricsYs.push({ y, stave: part });\n y += 15;\n }\n startX = Math.max(startX, part.getNoteStartX());\n });\n\n // Re-assign Stave to update y position\n this.partVoices.forEach((voice) => {\n voice.getTickables().forEach((tickable) => {\n const stave = tickable.getStave();\n if (stave) tickable.setStave(stave);\n });\n });\n\n // Join the voices\n formatter.joinVoices(this.partVoices);\n\n // Update the start position of all staves.\n this.partStaves.forEach((part) => part.setNoteStartX(startX));\n if (this.options.autoWidth && this.partVoices.length > 0) {\n justifyWidth = formatter.preCalculateMinTotalWidth(this.partVoices);\n this.options.width = justifyWidth + Stave.rightPadding + (startX - this.options.x);\n this.partStaves.forEach((part) => {\n part.setWidth(this.options.width);\n });\n } else {\n justifyWidth = this.options.noPadding\n ? this.options.width - (startX - this.options.x)\n : this.options.width - (startX - this.options.x) - Stave.defaultPadding;\n }\n if (this.partVoices.length > 0) {\n formatter.format(this.partVoices, this.options.noJustification ? 0 : justifyWidth, this.options.formatOptions);\n }\n formatter.postFormat();\n\n for (let i = 0; i < this.options.formatIterations; i++) {\n formatter.tune(optionsDetails);\n }\n\n this.startX = startX;\n this.debugNoteMetricsYs = debugNoteMetricsYs;\n this.lastY = y;\n Stave.formatBegModifiers(this.partStaves);\n }\n\n /** Get the boundingBox. */\n override getBoundingBox(): BoundingBox {\n return new BoundingBox(this.options.x, this.options.y, this.options.width, (this.lastY ?? 0) - this.options.y);\n }\n\n /** Render the system. */\n override draw(): void {\n // Render debugging information, if requested.\n const ctx = this.checkContext();\n if (!this.formatter || !this.startX || !this.lastY || !this.debugNoteMetricsYs) {\n throw new RuntimeError('NoFormatter', 'format() must be called before draw()');\n }\n this.setRendered();\n\n if (this.options.debugFormatter) {\n Formatter.plotDebugging(ctx, this.formatter, this.startX, this.options.y, this.lastY);\n }\n\n this.debugNoteMetricsYs.forEach((d) => {\n this.partVoices.forEach((voice) => {\n voice.getTickables().forEach((tickable) => {\n if (tickable.getStave() === d.stave) Note.plotMetrics(ctx, tickable, d.y);\n });\n });\n });\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n//\n// The file implements notes for Tablature notation. This consists of one or\n// more fret positions, and can either be drawn with or without stems.\n//\n// See `tests/tabnote_tests.ts` for usage examples.\n\nimport { Element } from './element';\nimport { Glyphs } from './glyphs';\nimport { Modifier } from './modifier';\nimport { Note } from './note';\nimport { Stave } from './stave';\nimport { StaveNoteStruct } from './stavenote';\nimport { Stem } from './stem';\nimport { StemmableNote } from './stemmablenote';\nimport { Category, isDot } from './typeguard';\nimport { defined, RuntimeError } from './util';\n\nexport interface TabNotePosition {\n // For example, on a six stringed instrument, `str` ranges from 1 to 6.\n str: number;\n\n // fret: 'X' indicates an unused/muted string.\n // fret: 3 indicates the third fret.\n fret: number | string;\n}\n\nexport interface TabNoteStruct extends StaveNoteStruct {\n positions: TabNotePosition[];\n}\n\n/**\n * Gets the unused strings grouped together if consecutive.\n * @param numLines The number of lines.\n * @param stringsUsed An array of numbers representing which strings have fret positions.\n * @returns\n */\nfunction getUnusedStringGroups(numLines: number, stringsUsed: number[]): number[][] {\n const stemThrough = [];\n let group = [];\n for (let string = 1; string <= numLines; string++) {\n const isUsed = stringsUsed.indexOf(string) > -1;\n\n if (!isUsed) {\n group.push(string);\n } else {\n stemThrough.push(group);\n group = [];\n }\n }\n if (group.length > 0) stemThrough.push(group);\n\n return stemThrough;\n}\n\n// Gets groups of points that outline the partial stem lines\n// between fret positions\n//\n// Parameters:\n// * stemY - The `y` coordinate the stem is located on\n// * unusedStrings - An array of groups of unused strings\n// * stave - The stave to use for reference\n// * stemDirection - The direction of the stem\nfunction getPartialStemLines(stemY: number, unusedStrings: number[][], stave: Stave, stemDirection: number) {\n const upStem = stemDirection !== 1;\n const downStem = stemDirection !== -1;\n\n const lineSpacing = stave.getSpacingBetweenLines();\n const totalLines = stave.getNumLines();\n\n const stemLines: number[][] = [];\n\n unusedStrings.forEach((strings) => {\n const containsLastString = strings.indexOf(totalLines) > -1;\n const containsFirstString = strings.indexOf(1) > -1;\n\n if ((upStem && containsFirstString) || (downStem && containsLastString)) {\n return;\n }\n\n // If there's only one string in the group, push a duplicate value.\n // We do this because we need 2 strings to convert into upper/lower y\n // values.\n if (strings.length === 1) {\n strings.push(strings[0]);\n }\n\n const lineYs: number[] = [];\n // Iterate through each group string and store it's y position\n strings.forEach((string, index, strings) => {\n const isTopBound = string === 1;\n const isBottomBound = string === totalLines;\n\n // Get the y value for the appropriate staff line,\n // we adjust for a 0 index array, since string numbers are index 1\n let y = stave.getYForLine(string - 1);\n\n // Unless the string is the first or last, add padding to each side\n // of the line\n if (index === 0 && !isTopBound) {\n y -= lineSpacing / 2 - 1;\n } else if (index === strings.length - 1 && !isBottomBound) {\n y += lineSpacing / 2 - 1;\n }\n\n // Store the y value\n lineYs.push(y);\n\n // Store a subsequent y value connecting this group to the main\n // stem above/below the stave if it's the top/bottom string\n if (stemDirection === 1 && isTopBound) {\n lineYs.push(stemY - 2);\n } else if (stemDirection === -1 && isBottomBound) {\n lineYs.push(stemY + 2);\n }\n });\n\n // Add the sorted y values to the\n stemLines.push(lineYs.sort((a, b) => a - b));\n });\n\n return stemLines;\n}\n\nexport class TabNote extends StemmableNote {\n static override get CATEGORY(): string {\n return Category.TabNote;\n }\n\n protected ghost: boolean;\n protected fretElement: Element[] = [];\n protected positions: TabNotePosition[];\n\n // Initialize the TabNote with a `noteStruct` full of properties\n // and whether to `drawStem` when rendering the note\n constructor(noteStruct: TabNoteStruct, drawStem: boolean = false) {\n super(noteStruct);\n\n this.ghost = false; // Renders parenthesis around notes\n\n // Note properties\n // The fret positions in the note. An array of `{ str: X, fret: X }`\n this.positions = noteStruct.positions || [];\n\n // Render Options\n this.renderOptions = {\n ...this.renderOptions,\n // Flag to draw a stem\n drawStem,\n // Flag to draw dot modifiers\n drawDots: drawStem,\n // Flag to extend the main stem through the stave and fret positions\n drawStemThroughStave: false,\n // vertical shift from stave line\n yShift: 0,\n };\n\n this.glyphProps = Note.getGlyphProps(this.duration, this.noteType);\n defined(\n this.glyphProps,\n 'BadArguments',\n `No glyph found for duration '${this.duration}' and type '${this.noteType}'`\n );\n\n this.buildStem();\n\n if (noteStruct.stemDirection) {\n this.setStemDirection(noteStruct.stemDirection);\n } else {\n this.setStemDirection(Stem.UP);\n }\n\n // Renders parenthesis around notes\n this.ghost = false;\n this.updateWidth();\n }\n // Return the number of the greatest string, which is the string lowest on the display\n greatestString = (): number => {\n return this.positions.map((x) => x.str).reduce((a, b) => (a > b ? a : b));\n };\n // Return the number of the least string, which is the string highest on the display\n leastString = (): number => {\n return this.positions.map((x) => x.str).reduce((a, b) => (a < b ? a : b));\n };\n\n override reset(): this {\n super.reset();\n if (this.stave) this.setStave(this.stave);\n return this;\n }\n\n // Set as ghost `TabNote`, surrounds the fret positions with parenthesis.\n // Often used for indicating frets that are being bent to\n setGhost(ghost: boolean): this {\n this.ghost = ghost;\n this.updateWidth();\n return this;\n }\n\n // Determine if the note has a stem\n override hasStem(): boolean {\n if (this.renderOptions.drawStem) return true;\n return false;\n }\n\n // Get the default stem extension for the note\n override getStemExtension(): number {\n if (this.stemExtensionOverride !== undefined) {\n return this.stemExtensionOverride;\n }\n\n return this.flag.getHeight() > Stem.HEIGHT ? this.flag.getHeight() - Stem.HEIGHT : 0;\n }\n\n static tabToElement(fret: string): Element {\n let el: Element;\n\n if (fret.toUpperCase() === 'X') {\n el = new Element('TabNote');\n el.setText(Glyphs.accidentalDoubleSharp);\n } else {\n el = new Element('TabNote.text');\n el.setText(fret);\n el.setYShift(el.getHeight() / 2);\n }\n\n return el;\n }\n\n // Calculate and store the width of the note\n updateWidth(): void {\n this.fretElement = [];\n this.width = 0;\n for (let i = 0; i < this.positions.length; ++i) {\n let fret = this.positions[i].fret;\n if (this.ghost) fret = '(' + fret + ')';\n const el = TabNote.tabToElement(fret.toString());\n this.fretElement.push(el);\n this.width = Math.max(el.getWidth(), this.width);\n }\n }\n\n // Set the `stave` to the note\n override setStave(stave: Stave): this {\n super.setStave(stave);\n const ctx = stave.getContext();\n this.setContext(ctx);\n\n // we subtract 1 from `line` because getYForLine expects a 0-based index,\n // while the position.str is a 1-based index\n const ys = this.positions.map(({ str: line }) => stave.getYForLine(Number(line) - 1));\n\n this.setYs(ys);\n\n if (this.stem) {\n this.stem.setYBounds(this.getStemY(), this.getStemY());\n }\n\n return this;\n }\n\n // Get the fret positions for the note\n getPositions(): TabNotePosition[] {\n return this.positions;\n }\n\n // Get the default `x` and `y` coordinates for a modifier at a specific\n // `position` at a fret position `index`\n override getModifierStartXY(position: number, index: number): { x: number; y: number } {\n if (!this.preFormatted) {\n throw new RuntimeError('UnformattedNote', \"Can't call GetModifierStartXY on an unformatted note\");\n }\n\n if (this.ys.length === 0) {\n throw new RuntimeError('NoYValues', 'No Y-Values calculated for this note.');\n }\n\n let x = 0;\n if (position === Modifier.Position.LEFT) {\n x = -1 * 2; // FIXME: modifier padding, move to font file\n } else if (position === Modifier.Position.RIGHT) {\n x = this.width + 2; // FIXME: modifier padding, move to font file\n } else if (position === Modifier.Position.BELOW || position === Modifier.Position.ABOVE) {\n const noteGlyphWidth = this.width;\n x = noteGlyphWidth / 2;\n }\n\n return {\n x: this.getAbsoluteX() + x,\n y: this.ys[index],\n };\n }\n\n // Get the default line for rest\n override getLineForRest(): number {\n return Number(this.positions[0].str);\n }\n\n // Pre-render formatting\n override preFormat(): void {\n if (this.preFormatted) return;\n if (this.modifierContext) this.modifierContext.preFormat();\n // width is already set during init()\n this.preFormatted = true;\n }\n\n // Get the x position for the stem\n override getStemX(): number {\n return this.getCenterGlyphX();\n }\n\n // Get the y position for the stem\n getStemY(): number {\n const numLines = this.checkStave().getNumLines();\n\n // The decimal staff line amounts provide optimal spacing between the\n // fret number and the stem\n const stemUpLine = -0.5;\n const stemDownLine = numLines - 0.5;\n const stemStartLine = Stem.UP === this.stemDirection ? stemUpLine : stemDownLine;\n\n return this.checkStave().getYForLine(stemStartLine);\n }\n\n // Get the stem extents for the tabnote\n override getStemExtents(): { topY: number; baseY: number } {\n return this.checkStem().getExtents();\n }\n\n // Draw the fal onto the context\n drawFlag(): void {\n const {\n beam,\n glyphProps,\n renderOptions: { drawStem },\n } = this;\n const context = this.checkContext();\n\n const shouldDrawFlag = beam === undefined && drawStem;\n\n // Now it's the flag's turn.\n if (glyphProps.codeFlagUp && shouldDrawFlag) {\n const flagX = this.getStemX();\n const flagY =\n this.getStemDirection() === Stem.DOWN\n ? // Down stems are below the note head and have flags on the right.\n this.getStemY() - this.checkStem().getHeight() - this.getStemExtension()\n : // Up stems are above the note head and have flags on the right.\n this.getStemY() - this.checkStem().getHeight() + this.getStemExtension();\n\n // Draw the Flag\n this.flag.setContext(context).setX(flagX).setY(flagY).drawWithStyle();\n }\n }\n\n // Render the modifiers onto the context.\n drawModifiers(): void {\n this.modifiers.forEach((modifier) => {\n // Only draw the dots if enabled.\n if (isDot(modifier) && !this.renderOptions.drawDots) {\n return;\n }\n\n modifier.setContext(this.getContext());\n modifier.drawWithStyle();\n });\n }\n\n // Render the stem extension through the fret positions\n drawStemThrough(): void {\n const stemX = this.getStemX();\n const stemY = this.getStemY();\n const ctx = this.checkContext();\n\n const drawStem = this.renderOptions.drawStem;\n const stemThrough = this.renderOptions.drawStemThroughStave;\n if (drawStem && stemThrough) {\n const numLines = this.checkStave().getNumLines();\n const stringsUsed = this.positions.map((position) => Number(position.str));\n\n const unusedStrings = getUnusedStringGroups(numLines, stringsUsed);\n const stemLines = getPartialStemLines(stemY, unusedStrings, this.checkStave(), this.getStemDirection());\n\n ctx.setLineWidth(Stem.WIDTH);\n stemLines.forEach((bounds) => {\n if (bounds.length === 0) return;\n\n ctx.beginPath();\n ctx.moveTo(stemX, bounds[0]);\n ctx.lineTo(stemX, bounds[bounds.length - 1]);\n ctx.stroke();\n ctx.closePath();\n });\n }\n }\n\n // Render the fret positions onto the context\n drawPositions(): void {\n const ctx = this.checkContext();\n const x = this.getAbsoluteX();\n const ys = this.ys;\n for (let i = 0; i < this.positions.length; ++i) {\n const y = ys[i] + this.renderOptions.yShift;\n const el = this.fretElement[i];\n\n // Center the fret text beneath the stem\n const tabX = x - el.getWidth() / 2;\n\n // FIXME: Magic numbers.\n ctx.clearRect(tabX - 2, y - 3, el.getWidth() + 4, 6);\n\n el.renderText(ctx, tabX, y);\n }\n }\n\n // The main rendering function for the entire note.\n override draw(): void {\n const ctx = this.checkContext();\n\n if (this.ys.length === 0) {\n throw new RuntimeError('NoYValues', \"Can't draw note without Y values.\");\n }\n\n this.setRendered();\n const renderStem = this.beam === undefined && this.renderOptions.drawStem;\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('tabnote' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n this.drawPositions();\n this.drawStemThrough();\n\n if (this.stem && renderStem) {\n const stemX = this.getStemX();\n this.stem.setNoteHeadXBounds(stemX, stemX);\n this.stem.setContext(ctx).drawWithStyle();\n }\n\n this.drawFlag();\n this.drawModifiers();\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n\nimport { Stave, StaveOptions } from './stave';\nimport { Category } from './typeguard';\n\nexport class TabStave extends Stave {\n static override get CATEGORY(): string {\n return Category.TabStave;\n }\n\n constructor(x: number, y: number, width: number, options?: StaveOptions) {\n const tabOptions = {\n spacingBetweenLinesPx: 13,\n numLines: 6,\n topTextPosition: 1,\n ...options,\n };\n\n super(x, y, width, tabOptions);\n }\n\n override getYForGlyphs(): number {\n return this.getYForLine(2.5);\n }\n\n // Deprecated\n addTabGlyph(): this {\n this.addClef('tab');\n return this;\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Cyril Silverman\n//\n// This file implements `TextBrackets` which extend between two notes.\n// The octave transposition markings (8va, 8vb, 15va, 15vb) can be created\n// using this class.\n\nimport { Element } from './element';\nimport { Font } from './font';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { Renderer } from './renderer';\nimport { Tables } from './tables';\nimport { Category } from './typeguard';\nimport { log, RuntimeError } from './util';\n\nexport interface TextBracketParams {\n start: Note;\n stop: Note;\n text?: string;\n superscript?: string;\n position?: number | string;\n}\n\n// To enable logging for this class. Set `VexFlow.TextBracket.DEBUG` to `true`.\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (TextBracket.DEBUG) log('VexFlow.TextBracket', args);\n}\n\nexport enum TextBracketPosition {\n TOP = 1,\n BOTTOM = -1,\n}\n\nexport class TextBracket extends Element {\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.TextBracket;\n }\n\n public renderOptions: {\n dashed: boolean;\n color: string;\n lineWidth: number;\n underlineSuperscript: boolean;\n showBracket: boolean;\n dash: number[];\n bracketHeight: number;\n };\n\n protected textElement: Element;\n protected superscriptElement: Element;\n\n protected line: number;\n\n readonly position: TextBracketPosition;\n readonly start: Note;\n readonly stop: Note;\n\n static get Position(): typeof TextBracketPosition {\n return TextBracketPosition;\n }\n\n static get PositionString(): Record<string, number> {\n return {\n top: TextBracketPosition.TOP,\n bottom: TextBracketPosition.BOTTOM,\n };\n }\n\n constructor({ start, stop, text = '', superscript = '', position = TextBracketPosition.TOP }: TextBracketParams) {\n super();\n\n this.start = start;\n this.stop = stop;\n\n this.textElement = new Element('TextBracket');\n this.textElement.setText(text);\n this.superscriptElement = new Element('TextBracket');\n this.superscriptElement.setText(superscript);\n const smallerFontSize = Font.scaleSize(this.fontInfo.size, 0.714286);\n this.superscriptElement.setFontSize(smallerFontSize);\n\n this.position = typeof position === 'string' ? TextBracket.PositionString[position] : position;\n\n this.line = 1;\n\n this.renderOptions = {\n dashed: true,\n dash: [5],\n color: 'black',\n lineWidth: 1,\n showBracket: true,\n bracketHeight: 8,\n\n // In the BOTTOM position, the bracket line can extend\n // under the superscript.\n underlineSuperscript: true,\n };\n }\n\n /**\n * Apply the text backet styling to the provided context.\n * @param ctx\n * @returns this\n */\n override applyStyle(ctx: RenderContext): this {\n this.textElement.setFont(this.fontInfo);\n // We called this.resetFont() in the constructor, so we know this.textFont is available.\n const { family, size, weight, style } = this.fontInfo;\n // To draw the superscript, we scale the font size by 1/1.4.\n const smallerFontSize = Font.scaleSize(size, 0.714286);\n this.superscriptElement.setFont(family, smallerFontSize, weight, style);\n\n const options = this.renderOptions;\n ctx.setStrokeStyle(options.color);\n ctx.setFillStyle(options.color);\n ctx.setLineWidth(options.lineWidth);\n\n return this;\n }\n\n // Set whether the bracket line should be `dashed`. You can also\n // optionally set the `dash` pattern by passing in an array of numbers\n setDashed(dashed: boolean, dash?: number[]): this {\n this.renderOptions.dashed = dashed;\n if (dash) this.renderOptions.dash = dash;\n return this;\n }\n\n // Set the rendering `context` for the octave bracket\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n // Draw the octave bracket on the rendering context\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n\n let y = 0;\n switch (this.position) {\n case TextBracketPosition.TOP:\n y = this.start.checkStave().getYForTopText(this.line);\n break;\n case TextBracketPosition.BOTTOM:\n y = this.start.checkStave().getYForBottomText(this.line + Tables.TEXT_HEIGHT_OFFSET_HACK);\n break;\n default:\n throw new RuntimeError('InvalidPosition', `The position ${this.position} is invalid.`);\n }\n\n // Get the preliminary start and stop coordintates for the bracket\n const start = { x: this.start.getAbsoluteX(), y };\n const stop = { x: this.stop.getAbsoluteX(), y };\n\n L('Rendering TextBracket: start:', start, 'stop:', stop, 'y:', y);\n\n const bracketHeight = this.renderOptions.bracketHeight * this.position;\n\n // Draw text\n this.textElement.renderText(ctx, start.x, start.y);\n\n // Get the width and height for the octave number\n const mainWidth = this.textElement.getWidth();\n const mainHeight = this.textElement.getHeight();\n\n // Calculate the y position for the super script\n const superY = start.y - mainHeight / 2.5;\n\n // To draw the superscript, we scale the font size by 1/1.4.\n this.superscriptElement.renderText(ctx, start.x + mainWidth + 1, superY);\n\n // Determine width and height of the superscript\n const superWidth = this.superscriptElement.getWidth();\n const superHeight = this.superscriptElement.getHeight();\n\n // Setup initial coordinates for the bracket line\n let startX = start.x;\n let lineY = superY;\n const endX = stop.x + this.stop.getGlyphWidth();\n\n // Adjust x and y coordinates based on position\n if (this.position === TextBracketPosition.TOP) {\n startX += mainWidth + superWidth + 5;\n lineY -= superHeight / 2.7;\n } else if (this.position === TextBracketPosition.BOTTOM) {\n lineY += superHeight / 2.7;\n startX += mainWidth + 2;\n\n if (!this.renderOptions.underlineSuperscript) {\n startX += superWidth;\n }\n }\n\n if (this.renderOptions.dashed) {\n // Main line\n Renderer.drawDashedLine(ctx, startX, lineY, endX, lineY, this.renderOptions.dash);\n // Ending Bracket\n if (this.renderOptions.showBracket) {\n Renderer.drawDashedLine(\n ctx,\n endX,\n lineY + 1 * this.position,\n endX,\n lineY + bracketHeight,\n this.renderOptions.dash\n );\n }\n } else {\n ctx.beginPath();\n ctx.moveTo(startX, lineY);\n // Main line\n ctx.lineTo(endX, lineY);\n if (this.renderOptions.showBracket) {\n // Ending bracket\n ctx.lineTo(endX, lineY + bracketHeight);\n }\n ctx.stroke();\n ctx.closePath();\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Glyphs } from './glyphs';\nimport { Note } from './note';\nimport { TextNoteStruct } from './textnote';\nimport { Category } from './typeguard';\nimport { log, RuntimeError } from './util';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (TextDynamics.DEBUG) log('VexFlow.TextDynamics', args);\n}\n\n/**\n * `TextDynamics` renders traditional\n * text dynamics markings, **ie: p, f, sfz, rfz, ppp**\n *\n * You can render any dynamics string that contains a combination of\n * the following letters: P, M, F, Z, R, S\n */\nexport class TextDynamics extends Note {\n /** To enable logging for this class. Set `VexFlow.TextDynamics.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.TextDynamics;\n }\n\n protected sequence: string;\n\n protected line: number;\n\n /** The glyph data for each dynamics letter. */\n static get GLYPHS(): Record<string, string> {\n return {\n f: Glyphs.dynamicForte,\n p: Glyphs.dynamicPiano,\n m: Glyphs.dynamicMezzo,\n s: Glyphs.dynamicSforzando,\n z: Glyphs.dynamicZ,\n r: Glyphs.dynamicRinforzando,\n };\n }\n\n /**\n * Create the dynamics marking.\n *\n * A `TextDynamics` object inherits from `Note` so that it can be formatted\n * within a `Voice`.\n *\n * @param noteStruct an object that contains a `duration` property and a\n * `sequence` of letters that represents the letters to render.\n */\n constructor(noteStruct: TextNoteStruct) {\n super(noteStruct);\n\n this.sequence = (noteStruct.text ?? '').toLowerCase();\n this.line = noteStruct.line ?? 0;\n this.text = '';\n\n L('New Dynamics Text: ', this.sequence);\n }\n\n /** Set the Stave line on which the note should be placed. */\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n /** Preformat the dynamics text. */\n override preFormat(): this {\n // length of this.glyphs must be <=\n // length of this.sequence, so if we're formatted before\n // create new glyphs.\n this.text = '';\n // Iterate through each letter\n this.sequence.split('').forEach((letter) => {\n // Get the glyph data for the letter\n const glyph = TextDynamics.GLYPHS[letter];\n if (!glyph) throw new RuntimeError('Invalid dynamics character: ' + letter);\n\n // Add the glyph\n this.text += glyph;\n });\n\n this.preFormatted = true;\n return this;\n }\n\n /** Draw the dynamics text on the rendering context. */\n override draw(): void {\n this.setRendered();\n const x = this.getAbsoluteX();\n const y = this.checkStave().getYForLine(this.line + -3);\n\n L('Rendering Dynamics: ', this.sequence);\n\n this.renderText(this.checkContext(), x, y);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author: Taehoon Moon 2014\n\nimport { ModifierContext } from './modifiercontext';\nimport { Note } from './note';\nimport { TimeSignature } from './timesignature';\nimport { Category } from './typeguard';\n\nexport class TimeSigNote extends Note {\n static override get CATEGORY(): string {\n return Category.TimeSigNote;\n }\n\n protected timeSig: TimeSignature;\n\n constructor(timeSpec: string, customPadding?: number) {\n super({ duration: 'b' });\n\n this.timeSig = new TimeSignature(timeSpec, customPadding);\n this.setWidth(this.timeSig.getWidth());\n\n // Note properties\n this.ignoreTicks = true;\n }\n\n /* Overridden to ignore */\n // eslint-disable-next-line\n override addToModifierContext(mc: ModifierContext): this {\n // DO NOTHING.\n return this;\n }\n\n override preFormat(): this {\n this.preFormatted = true;\n return this;\n }\n\n override draw(): void {\n const stave = this.checkStave();\n const ctx = this.checkContext();\n this.setRendered();\n\n const clsAttribute = this.getAttribute('class');\n ctx.openGroup('timesignote' + (clsAttribute ? ' ' + clsAttribute : ''), this.getAttribute('id'));\n this.timeSig.drawAt(ctx, stave, this.getAbsoluteX());\n this.drawPointerRect();\n ctx.closeGroup();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Balazs Forian-Szabo\n// MIT License\n\nimport { Element } from './element';\nimport { Note } from './note';\nimport { Category } from './typeguard';\nimport { log } from './util';\nimport { Vibrato } from './vibrato';\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (VibratoBracket.DEBUG) log('VexFlow.VibratoBracket', args);\n}\n\n/** `VibratoBracket` renders vibrato effect between two notes. */\nexport class VibratoBracket extends Element {\n /** To enable logging for this class. Set `VexFlow.VibratoBracket.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n static override get CATEGORY(): string {\n return Category.VibratoBracket;\n }\n\n protected line: number;\n protected vibrato = new Vibrato();\n\n protected start?: Note;\n protected stop?: Note;\n\n /**\n * Either the stop or start note must be set, or both of them.\n * An undefined value for the start or stop note indicates that the vibrato\n * is drawn from the beginning or until the end of the stave accordingly.\n */\n constructor(bracketData: { stop?: Note | null; start?: Note | null }) {\n super();\n\n if (bracketData.start) this.start = bracketData.start;\n if (bracketData.stop) this.stop = bracketData.stop;\n\n this.line = 1;\n }\n\n /** Set line position of the vibrato bracket. */\n setLine(line: number): this {\n this.line = line;\n return this;\n }\n\n /** Set vibrato code. */\n setVibratoCode(code: number): this {\n this.vibrato.setVibratoCode(code);\n return this;\n }\n\n /** Draw the vibrato bracket on the rendering context. */\n override draw(): void {\n const ctx = this.checkContext();\n this.setRendered();\n const y: number =\n (this.start && this.start.checkStave().getYForTopText(this.line)) ||\n (this.stop && this.stop.checkStave().getYForTopText(this.line)) ||\n 0;\n // If start note is not set then vibrato will be drawn\n // from the beginning of the stave\n const startX: number =\n (this.start && this.start.getAbsoluteX()) || (this.stop && this.stop.checkStave().getTieStartX()) || 0;\n // If stop note is not set then vibrato will be drawn\n // until the end of the stave\n const stopX: number =\n (this.stop && this.stop.getAbsoluteX() - this.stop.getWidth() - 5) ||\n (this.start && this.start.checkStave().getTieEndX() - 10) ||\n 0;\n\n this.vibrato.setVibratoWidth(stopX - startX);\n\n L('Rendering VibratoBracket: startX:', startX, 'stopX:', stopX, 'y:', y);\n this.vibrato.renderText(ctx, startX, y);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n// @author Mohit Cheppudira\n// MIT License\n\nimport { Accidental } from './accidental';\nimport { Annotation, AnnotationHorizontalJustify, AnnotationVerticalJustify } from './annotation';\nimport { Articulation } from './articulation';\nimport { BarNote } from './barnote';\nimport { Beam, PartialBeamDirection } from './beam';\nimport { ChordSymbol } from './chordsymbol';\nimport { ClefNote } from './clefnote';\nimport { Curve, CurveOptions } from './curve';\nimport { EasyScore, EasyScoreOptions } from './easyscore';\nimport { Element } from './element';\nimport { FontInfo } from './font';\nimport { Formatter, FormatterOptions } from './formatter';\nimport { FretHandFinger } from './frethandfinger';\nimport { GhostNote } from './ghostnote';\nimport { GlyphNote, GlyphNoteOptions } from './glyphnote';\nimport { GraceNote, GraceNoteStruct } from './gracenote';\nimport { GraceNoteGroup } from './gracenotegroup';\nimport { KeySigNote } from './keysignote';\nimport { ModifierContext } from './modifiercontext';\nimport { MultiMeasureRest, MultimeasureRestRenderOptions } from './multimeasurerest';\nimport { Note, NoteStruct } from './note';\nimport { NoteSubGroup } from './notesubgroup';\nimport { Ornament } from './ornament';\nimport { PedalMarking } from './pedalmarking';\nimport { RenderContext } from './rendercontext';\nimport { Renderer } from './renderer';\nimport { RepeatNote } from './repeatnote';\nimport { Stave, StaveOptions } from './stave';\nimport { BarlineType } from './stavebarline';\nimport { StaveConnector, StaveConnectorType } from './staveconnector';\nimport { StaveLine } from './staveline';\nimport { StaveNote, StaveNoteStruct } from './stavenote';\nimport { StaveTie } from './stavetie';\nimport { StemmableNote } from './stemmablenote';\nimport { StringNumber } from './stringnumber';\nimport { System, SystemOptions } from './system';\nimport { TabNote, TabNoteStruct } from './tabnote';\nimport { TabStave } from './tabstave';\nimport { TextBracket } from './textbracket';\nimport { TextDynamics } from './textdynamics';\nimport { TextNote, TextNoteStruct } from './textnote';\nimport { TickContext } from './tickcontext';\nimport { TimeSigNote } from './timesignote';\nimport { Tuplet, TupletOptions } from './tuplet';\nimport { defined, log, RuntimeError } from './util';\nimport { VibratoBracket } from './vibratobracket';\nimport { Voice, VoiceTime } from './voice';\nimport { isHTMLCanvas } from './web';\n\nexport interface FactoryOptions {\n stave?: {\n space: number;\n };\n renderer?: {\n elementId: string | null;\n backend?: number;\n width: number;\n height: number;\n background?: string;\n };\n}\n\n// eslint-disable-next-line\nfunction L(...args: any[]) {\n if (Factory.DEBUG) log('VexFlow.Factory', args);\n}\n\n/**\n * Factory implements a high level API around VexFlow.\n */\nexport class Factory {\n /** To enable logging for this class. Set `VexFlow.Factory.DEBUG` to `true`. */\n static DEBUG: boolean = false;\n\n /**\n * Static simplified function to access constructor without providing FactoryOptions\n *\n * Example:\n *\n * Create an SVG renderer and attach it to the DIV element named \"boo\" to render using <page-width> 1200 and <page-height> 600\n *\n * `const vf: Factory = VexFlow.Factory.newFromElementId('boo', 1200, 600 );`\n */\n static newFromElementId(elementId: string | null, width = 500, height = 200): Factory {\n return new Factory({ renderer: { elementId, width, height } });\n }\n\n protected options: Required<FactoryOptions>;\n\n protected stave?: Stave;\n protected context!: RenderContext;\n protected staves!: Stave[];\n protected voices!: Voice[];\n protected renderQ!: Element[];\n protected systems!: System[];\n\n /**\n * Example:\n *\n * Create an SVG renderer and attach it to the DIV element named \"boo\" to render using <page-width> 1200 and <page-height> 600\n *\n * `const vf: Factory = new VexFlow.Factory({renderer: { elementId: 'boo', width: 1200, height: 600 }});`\n */\n constructor(options: FactoryOptions = {}) {\n L('New factory: ', options);\n this.options = {\n stave: {\n space: 10,\n },\n renderer: {\n elementId: '',\n width: 500,\n height: 200,\n background: '#FFF',\n },\n };\n\n this.setOptions(options);\n }\n\n reset(): void {\n this.renderQ = [];\n this.systems = [];\n this.staves = [];\n this.voices = [];\n this.stave = undefined; // current stave\n }\n\n setOptions(options?: FactoryOptions): void {\n this.options = { ...this.options, ...options };\n this.initRenderer();\n this.reset();\n }\n\n initRenderer(): void {\n const { elementId, width, height, background } = this.options.renderer;\n if (elementId === null) {\n return;\n }\n\n if (elementId === '') {\n L(this);\n throw new RuntimeError('renderer.elementId not set in FactoryOptions');\n }\n\n let backend = this.options.renderer.backend;\n if (backend === undefined) {\n const elem = document.getElementById(elementId);\n // We use a custom type check here, because node-canvas mimics canvas,\n // but is not an instance of window.HTMLCanvasElement.\n // In fact, `window` might be undefined here.\n // See: https://www.npmjs.com/package/canvas\n if (isHTMLCanvas(elem)) {\n backend = Renderer.Backends.CANVAS;\n } else {\n backend = Renderer.Backends.SVG;\n }\n }\n\n this.context = Renderer.buildContext(elementId, backend, width, height, background);\n }\n\n getContext(): RenderContext {\n return this.context;\n }\n\n setContext(context: RenderContext): this {\n this.context = context;\n return this;\n }\n\n getStave(): Stave | undefined {\n return this.stave;\n }\n\n getVoices(): Voice[] {\n return this.voices;\n }\n\n /** Return pixels from current stave spacing. */\n\n Stave(params?: { x?: number; y?: number; width?: number; options?: StaveOptions }): Stave {\n const staveSpace = this.options.stave.space;\n const p = {\n x: 0,\n y: 0,\n width: this.options.renderer.width - staveSpace * 1.0,\n options: { spacingBetweenLinesPx: staveSpace * 1.0 },\n ...params,\n };\n\n const stave: Stave = new Stave(p.x, p.y, p.width, p.options);\n this.staves.push(stave);\n stave.setContext(this.context);\n this.stave = stave;\n return stave;\n }\n\n TabStave(params?: { x?: number; y?: number; width?: number; options?: StaveOptions }): TabStave {\n const staveSpace = this.options.stave.space;\n const p = {\n x: 0,\n y: 0,\n width: this.options.renderer.width - staveSpace * 1.0,\n options: { spacingBetweenLinesPx: staveSpace * 1.3 },\n ...params,\n };\n\n const stave = new TabStave(p.x, p.y, p.width, p.options);\n this.staves.push(stave);\n stave.setContext(this.context);\n this.stave = stave;\n return stave;\n }\n\n StaveNote(noteStruct: StaveNoteStruct): StaveNote {\n const note = new StaveNote(noteStruct);\n if (this.stave) note.setStave(this.stave);\n note.setContext(this.context);\n this.renderQ.push(note);\n return note;\n }\n\n GlyphNote(glyph: string, noteStruct: NoteStruct, options?: GlyphNoteOptions): GlyphNote {\n const note = new GlyphNote(glyph, noteStruct, options);\n if (this.stave) note.setStave(this.stave);\n note.setContext(this.context);\n this.renderQ.push(note);\n return note;\n }\n\n RepeatNote(type: string, noteStruct?: NoteStruct, options?: GlyphNoteOptions): RepeatNote {\n const note = new RepeatNote(type, noteStruct, options);\n if (this.stave) note.setStave(this.stave);\n note.setContext(this.context);\n this.renderQ.push(note);\n return note;\n }\n\n GhostNote(noteStruct: string | NoteStruct): GhostNote {\n const ghostNote = new GhostNote(noteStruct);\n if (this.stave) ghostNote.setStave(this.stave);\n ghostNote.setContext(this.context);\n this.renderQ.push(ghostNote);\n return ghostNote;\n }\n\n TextNote(noteStruct: TextNoteStruct): TextNote {\n const textNote = new TextNote(noteStruct);\n if (this.stave) textNote.setStave(this.stave);\n textNote.setContext(this.context);\n this.renderQ.push(textNote);\n return textNote;\n }\n\n BarNote(params: { type?: BarlineType | string } = {}): BarNote {\n const barNote = new BarNote(params.type);\n if (this.stave) barNote.setStave(this.stave);\n barNote.setContext(this.context);\n this.renderQ.push(barNote);\n return barNote;\n }\n\n ClefNote(params?: { type?: string; options?: { size?: string; annotation?: string } }): ClefNote {\n const p = {\n type: 'treble',\n options: {\n size: 'default',\n annotation: undefined,\n },\n ...params,\n };\n\n const clefNote = new ClefNote(p.type, p.options.size, p.options.annotation);\n if (this.stave) clefNote.setStave(this.stave);\n clefNote.setContext(this.context);\n this.renderQ.push(clefNote);\n return clefNote;\n }\n\n TimeSigNote(params?: { time?: string }): TimeSigNote {\n const p = {\n time: '4/4',\n ...params,\n };\n\n const timeSigNote = new TimeSigNote(p.time);\n if (this.stave) timeSigNote.setStave(this.stave);\n timeSigNote.setContext(this.context);\n this.renderQ.push(timeSigNote);\n return timeSigNote;\n }\n\n KeySigNote(params: { key: string; cancelKey?: string; alterKey?: string[] }): KeySigNote {\n const keySigNote = new KeySigNote(params.key, params.cancelKey, params.alterKey);\n if (this.stave) keySigNote.setStave(this.stave);\n keySigNote.setContext(this.context);\n this.renderQ.push(keySigNote);\n return keySigNote;\n }\n\n TabNote(noteStruct: TabNoteStruct): TabNote {\n const note = new TabNote(noteStruct);\n if (this.stave) note.setStave(this.stave);\n note.setContext(this.context);\n this.renderQ.push(note);\n return note;\n }\n\n GraceNote(noteStruct: GraceNoteStruct): GraceNote {\n const note = new GraceNote(noteStruct);\n if (this.stave) note.setStave(this.stave);\n note.setContext(this.context);\n return note;\n }\n\n GraceNoteGroup(params: { notes: StemmableNote[]; slur?: boolean }): GraceNoteGroup {\n const group = new GraceNoteGroup(params.notes, params.slur);\n group.setContext(this.context);\n return group;\n }\n\n Accidental(params: { type: string }): Accidental {\n const accid = new Accidental(params.type);\n accid.setContext(this.context);\n return accid;\n }\n\n Annotation(params?: {\n text?: string;\n hJustify?: string | AnnotationHorizontalJustify;\n vJustify?: string | AnnotationVerticalJustify;\n font?: FontInfo;\n }): Annotation {\n const p = {\n text: 'p',\n hJustify: AnnotationHorizontalJustify.CENTER,\n vJustify: AnnotationVerticalJustify.BOTTOM,\n ...params,\n };\n\n const annotation = new Annotation(p.text);\n annotation.setJustification(p.hJustify);\n annotation.setVerticalJustification(p.vJustify);\n annotation.setFont(p.font);\n annotation.setContext(this.context);\n return annotation;\n }\n\n ChordSymbol(params?: {\n vJustify?: string;\n hJustify?: string;\n fontFamily?: string;\n fontSize?: number;\n fontWeight?: string;\n }): ChordSymbol {\n const p = {\n vJustify: 'top',\n hJustify: 'center',\n ...params,\n };\n\n const chordSymbol = new ChordSymbol();\n chordSymbol.setHorizontal(p.hJustify);\n chordSymbol.setVertical(p.vJustify);\n // There is a default font based on the engraving font. Only set then\n // font if it is specific, else use the default\n if (typeof p.fontFamily === 'string' && typeof p.fontSize === 'number') {\n if (typeof p.fontWeight === 'string') chordSymbol.setFont(p.fontFamily, p.fontSize, p.fontWeight);\n else chordSymbol.setFont(p.fontFamily, p.fontSize, '');\n } else if (typeof p.fontSize === 'number') {\n chordSymbol.setFontSize(p.fontSize);\n }\n chordSymbol.setContext(this.context);\n return chordSymbol;\n }\n\n Articulation(params?: { betweenLines?: boolean; type?: string; position?: string | number }): Articulation {\n const articulation = new Articulation(params?.type ?? 'a.');\n\n if (params?.position !== undefined) articulation.setPosition(params.position);\n if (params?.betweenLines !== undefined) articulation.setBetweenLines(params.betweenLines);\n articulation.setContext(this.context);\n return articulation;\n }\n\n Ornament(\n type: string,\n params?: { position?: string | number; upperAccidental?: string; lowerAccidental?: string; delayed?: boolean }\n ) {\n const options = {\n type,\n accidental: '',\n ...params,\n };\n const ornament = new Ornament(type);\n if (params?.position !== undefined) {\n ornament.setPosition(params.position);\n }\n if (options.upperAccidental) {\n ornament.setUpperAccidental(options.upperAccidental);\n }\n if (options.lowerAccidental) {\n ornament.setLowerAccidental(options.lowerAccidental);\n }\n if (typeof options.delayed !== 'undefined') {\n ornament.setDelayed(options.delayed);\n }\n ornament.setContext(this.context);\n return ornament;\n }\n\n TextDynamics(params?: { text?: string; duration?: string; dots?: number; line?: number }): TextDynamics {\n const p = {\n text: 'p',\n duration: 'q',\n dots: 0,\n line: 0,\n ...params,\n };\n\n const text = new TextDynamics({\n text: p.text,\n line: p.line,\n duration: p.duration,\n dots: p.dots,\n });\n\n if (this.stave) text.setStave(this.stave);\n text.setContext(this.context);\n this.renderQ.push(text);\n return text;\n }\n\n Fingering(params: { number?: string; position?: string }): FretHandFinger {\n const p = {\n number: '0',\n position: 'left',\n ...params,\n };\n\n const fingering = new FretHandFinger(p.number);\n fingering.setPosition(p.position);\n fingering.setContext(this.context);\n return fingering;\n }\n\n StringNumber(params: { number: string; position: string }, drawCircle = true): StringNumber {\n const stringNumber = new StringNumber(params.number);\n stringNumber.setPosition(params.position);\n stringNumber.setContext(this.context);\n stringNumber.setDrawCircle(drawCircle);\n return stringNumber;\n }\n\n TickContext(): TickContext {\n return new TickContext();\n }\n\n ModifierContext(): ModifierContext {\n return new ModifierContext();\n }\n\n MultiMeasureRest(params: MultimeasureRestRenderOptions): MultiMeasureRest {\n const numMeasures = defined(params.numberOfMeasures, 'NoNumberOfMeasures');\n const multiMeasureRest = new MultiMeasureRest(numMeasures, params);\n multiMeasureRest.setContext(this.context);\n this.renderQ.push(multiMeasureRest);\n return multiMeasureRest;\n }\n\n Voice(params?: { time?: VoiceTime | string }): Voice {\n const p = {\n time: '4/4',\n ...params,\n };\n const voice = new Voice(p.time);\n this.voices.push(voice);\n return voice;\n }\n\n StaveConnector(params: { topStave: Stave; bottomStave: Stave; type: StaveConnectorType }): StaveConnector {\n const connector = new StaveConnector(params.topStave, params.bottomStave);\n connector.setType(params.type).setContext(this.context);\n this.renderQ.push(connector);\n return connector;\n }\n\n Formatter(options?: FormatterOptions): Formatter {\n return new Formatter(options);\n }\n\n Tuplet(params?: { notes?: Note[]; options?: TupletOptions }): Tuplet {\n const p = {\n notes: [],\n options: {},\n ...params,\n };\n\n const tuplet = new Tuplet(p.notes, p.options).setContext(this.context);\n this.renderQ.push(tuplet);\n return tuplet;\n }\n\n Beam(params: {\n notes: StemmableNote[];\n options?: {\n autoStem?: boolean;\n secondaryBeamBreaks?: number[];\n partialBeamDirections?: {\n [noteIndex: number]: PartialBeamDirection;\n };\n };\n }): Beam {\n const beam = new Beam(params.notes, params.options?.autoStem).setContext(this.context);\n beam.breakSecondaryAt(params.options?.secondaryBeamBreaks ?? []);\n if (params.options?.partialBeamDirections) {\n Object.entries(params.options?.partialBeamDirections).forEach(([noteIndex, direction]) => {\n beam.setPartialBeamSideAt(Number(noteIndex), direction);\n });\n }\n this.renderQ.push(beam);\n return beam;\n }\n\n Curve(params: { from: Note | undefined; to: Note | undefined; options: CurveOptions }): Curve {\n const curve = new Curve(params.from, params.to, params.options).setContext(this.context);\n this.renderQ.push(curve);\n return curve;\n }\n\n StaveTie(params: {\n from?: Note | null;\n to?: Note | null;\n firstIndexes?: number[];\n lastIndexes?: number[];\n text?: string;\n options?: { direction?: number };\n }): StaveTie {\n const tie = new StaveTie(\n {\n firstNote: params.from,\n lastNote: params.to,\n firstIndexes: params.firstIndexes,\n lastIndexes: params.lastIndexes,\n },\n params.text\n );\n\n if (params.options?.direction) tie.setDirection(params.options.direction);\n tie.setContext(this.context);\n this.renderQ.push(tie);\n return tie;\n }\n\n StaveLine(params: {\n from: StaveNote;\n to: StaveNote;\n firstIndexes: number[];\n lastIndexes: number[];\n options?: { text?: string; font?: FontInfo };\n }): StaveLine {\n const line = new StaveLine({\n firstNote: params.from,\n lastNote: params.to,\n firstIndexes: params.firstIndexes,\n lastIndexes: params.lastIndexes,\n });\n\n if (params.options?.text) line.setText(params.options.text);\n if (params.options?.font) line.setFont(params.options.font);\n\n line.setContext(this.context);\n this.renderQ.push(line);\n return line;\n }\n\n VibratoBracket(params: {\n from: Note | null;\n to: Note | null;\n options: {\n code?: number;\n line?: number;\n };\n }): VibratoBracket {\n const vibratoBracket = new VibratoBracket({\n start: params.from,\n stop: params.to,\n });\n\n if (params.options.line) vibratoBracket.setLine(params.options.line);\n if (params.options.code) vibratoBracket.setVibratoCode(params.options.code);\n\n vibratoBracket.setContext(this.context);\n this.renderQ.push(vibratoBracket);\n\n return vibratoBracket;\n }\n\n TextBracket(params: {\n from: Note;\n to: Note;\n text: string;\n options: {\n superscript: string;\n position: string;\n line?: number;\n font?: FontInfo;\n };\n }): TextBracket {\n const textBracket = new TextBracket({\n start: params.from,\n stop: params.to,\n text: params.text,\n superscript: params.options.superscript,\n position: params.options.position,\n });\n\n if (params.options.line) textBracket.setLine(params.options.line);\n if (params.options.font) textBracket.setFont(params.options.font);\n\n textBracket.setContext(this.context);\n this.renderQ.push(textBracket);\n return textBracket;\n }\n\n System(params: SystemOptions = {}): System {\n params.factory = this;\n const system = new System(params).setContext(this.context);\n this.systems.push(system);\n return system;\n }\n\n /**\n * Creates EasyScore. Normally the first step after constructing a Factory. For example:\n * ```\n * const vf: Factory = new VexFlow.Factory({renderer: { elementId: 'boo', width: 1200, height: 600 }});\n * const score: EasyScore = vf.EasyScore();\n * ```\n * @param options.factory optional instance of Factory\n * @param options.builder instance of Builder\n * @param options.commitHooks function to call after a note element is created\n * @param options.throwOnError throw error in case of parsing error\n */\n EasyScore(options: EasyScoreOptions = {}): EasyScore {\n options.factory = this;\n return new EasyScore(options);\n }\n\n PedalMarking(params?: { notes?: StaveNote[]; options?: { style: string } }): PedalMarking {\n const p = {\n notes: [],\n options: {\n style: 'mixed',\n },\n ...params,\n };\n\n const pedal = new PedalMarking(p.notes);\n pedal.setType(PedalMarking.typeString[p.options.style]);\n pedal.setContext(this.context);\n this.renderQ.push(pedal);\n return pedal;\n }\n\n NoteSubGroup(params?: { notes?: Note[] }): NoteSubGroup {\n const p = {\n notes: [],\n ...params,\n };\n\n const group = new NoteSubGroup(p.notes);\n group.setContext(this.context);\n return group;\n }\n\n /** Render the score. */\n draw(): void {\n const ctx = this.context;\n this.systems.forEach((s) => s.setContext(ctx).format());\n this.staves.forEach((s) => s.setContext(ctx).drawWithStyle());\n this.voices.forEach((v) => v.setContext(ctx).drawWithStyle());\n this.renderQ.forEach((e) => {\n if (!e.isRendered()) e.setContext(ctx).drawWithStyle();\n });\n this.systems.forEach((s) => s.setContext(ctx).drawWithStyle());\n this.reset();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Balazs Forian-Szabo\n//\n// ## Description\n//\n// A basic implementation of grace notes\n// to be rendered on a tab stave.\n//\n// See `tests/gracetabnote_tests.ts` for usage examples.\n\nimport { TabNote, TabNoteStruct } from './tabnote';\nimport { Category } from './typeguard';\n\nexport class GraceTabNote extends TabNote {\n static override get CATEGORY(): string {\n return Category.GraceTabNote;\n }\n\n constructor(noteStruct: TabNoteStruct) {\n super(noteStruct, false);\n\n this.renderOptions = {\n ...this.renderOptions,\n // vertical shift from stave line\n yShift: 0.3,\n };\n\n this.updateWidth();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n//\n// This class implements diatonic key management.\n\nimport { KeyParts, Music } from './music';\nimport { RuntimeError } from './util';\n\nexport class KeyManager {\n protected music: Music;\n // all attributes below are initialised in setKey which calls reset in the constructor\n protected keyParts!: KeyParts;\n protected keyString!: string;\n protected key!: string;\n protected scale!: number[];\n protected scaleMap!: Record<string, string>;\n protected scaleMapByValue!: Record<number, string>;\n protected originalScaleMapByValue!: Record<number, string>;\n\n constructor(key: string) {\n this.music = new Music();\n this.setKey(key);\n }\n\n setKey(key: string): this {\n this.key = key;\n this.reset();\n return this;\n }\n\n getKey(): string {\n return this.key;\n }\n\n reset(): this {\n this.keyParts = this.music.getKeyParts(this.key);\n\n this.keyString = this.keyParts.root;\n if (this.keyParts.accidental) this.keyString += this.keyParts.accidental;\n\n const isSupportedType = Music.scaleTypes[this.keyParts.type];\n if (!isSupportedType) {\n throw new RuntimeError('BadArguments', `Unsupported key type: ${this.key}`);\n }\n\n this.scale = this.music.getScaleTones(\n this.music.getNoteValue(this.keyString),\n Music.scaleTypes[this.keyParts.type]\n );\n\n this.scaleMap = {};\n this.scaleMapByValue = {};\n this.originalScaleMapByValue = {};\n\n const noteLocation = Music.rootIndexes[this.keyParts.root];\n\n for (let i = 0; i < Music.roots.length; ++i) {\n const index = (noteLocation + i) % Music.roots.length;\n const rootName = Music.roots[index];\n\n const noteName = this.music.getRelativeNoteName(rootName, this.scale[i]);\n this.scaleMap[rootName] = noteName;\n this.scaleMapByValue[this.scale[i]] = noteName;\n this.originalScaleMapByValue[this.scale[i]] = noteName;\n }\n\n return this;\n }\n\n getAccidental(key: string): {\n note: string;\n accidental?: string;\n change?: boolean;\n } {\n const root = this.music.getKeyParts(key).root;\n const parts = this.music.getNoteParts(this.scaleMap[root]);\n\n return {\n note: this.scaleMap[root],\n accidental: parts.accidental,\n };\n }\n\n selectNote(note: string): {\n note: string;\n accidental?: string;\n change: boolean;\n } {\n note = note.toLowerCase();\n const parts = this.music.getNoteParts(note);\n\n // First look for matching note in our altered scale\n const scaleNote = this.scaleMap[parts.root];\n const modparts = this.music.getNoteParts(scaleNote);\n\n if (scaleNote === note) {\n return {\n note: scaleNote,\n accidental: parts.accidental,\n change: false,\n };\n }\n\n // Then search for a note of equivalent value in our altered scale\n const valueNote = this.scaleMapByValue[this.music.getNoteValue(note)];\n if (valueNote !== undefined) {\n return {\n note: valueNote,\n accidental: this.music.getNoteParts(valueNote).accidental,\n change: false,\n };\n }\n\n // Then search for a note of equivalent value in the original scale\n const originalValueNote = this.originalScaleMapByValue[this.music.getNoteValue(note)];\n if (originalValueNote !== undefined) {\n this.scaleMap[modparts.root] = originalValueNote;\n delete this.scaleMapByValue[this.music.getNoteValue(scaleNote)];\n this.scaleMapByValue[this.music.getNoteValue(note)] = originalValueNote;\n return {\n note: originalValueNote,\n accidental: this.music.getNoteParts(originalValueNote).accidental,\n change: true,\n };\n }\n\n // Then try to unmodify a currently modified note.\n if (modparts.root === note) {\n delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[parts.root])];\n this.scaleMapByValue[this.music.getNoteValue(modparts.root)] = modparts.root;\n this.scaleMap[modparts.root] = modparts.root;\n return {\n note: modparts.root,\n accidental: undefined,\n change: true,\n };\n }\n\n // Last resort -- shitshoot\n delete this.scaleMapByValue[this.music.getNoteValue(this.scaleMap[parts.root])];\n this.scaleMapByValue[this.music.getNoteValue(note)] = note;\n\n delete this.scaleMap[modparts.root];\n this.scaleMap[modparts.root] = note;\n\n return {\n note,\n accidental: parts.accidental,\n change: true,\n };\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n//\n// ## Description\n// @author Raffaele Viglianti, 2012 http://itisnotsound.wordpress.com/\n//\n// This class implements hairpins between notes.\n// Hairpins can be either crescendo or decrescendo.\n\nimport { Element } from './element';\nimport { Modifier } from './modifier';\nimport { Note } from './note';\nimport { RenderContext } from './rendercontext';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport interface StaveHairpinRenderOptions {\n rightShiftTicks?: number;\n leftShiftTicks?: number;\n leftShiftPx: number;\n rightShiftPx: number;\n height: number;\n yShift: number;\n}\n\nexport class StaveHairpin extends Element {\n static override get CATEGORY(): string {\n return Category.StaveHairpin;\n }\n\n protected hairpin: number;\n\n protected position: number;\n public renderOptions: StaveHairpinRenderOptions;\n\n // notes is initialized by the constructor via this.setNotes(notes).\n protected notes!: Record<string, Note>;\n\n protected firstNote?: Note;\n protected lastNote?: Note;\n\n static readonly type = {\n CRESC: 1,\n DECRESC: 2,\n };\n\n /* Helper function to convert ticks into pixels.\n * Requires a Formatter with voices joined and formatted (to\n * get pixels per tick)\n *\n * options is struct that has:\n *\n * {\n * height: px,\n * yShift: px, // vertical offset\n * leftShiftTicks: 0, // left horizontal offset expressed in ticks\n * rightShiftTicks: 0 // right horizontal offset expressed in ticks\n * }\n *\n **/\n static FormatByTicksAndDraw(\n ctx: RenderContext,\n formatter: { pixelsPerTick: number },\n notes: Record<string, Note>,\n type: number,\n position: number,\n options: StaveHairpinRenderOptions\n ): void {\n const ppt = formatter.pixelsPerTick;\n\n if (ppt === null) {\n throw new RuntimeError('BadArguments', 'A valid Formatter must be provide to draw offsets by ticks.');\n }\n\n const leftShiftPx = ppt * (options.leftShiftTicks ?? 0);\n const rightShiftPx = ppt * (options.rightShiftTicks ?? 0);\n\n const hairpinOptions = {\n height: options.height,\n yShift: options.yShift,\n leftShiftPx,\n rightShiftPx,\n rightShiftTicks: 0,\n leftShiftTicks: 0,\n };\n\n new StaveHairpin(\n {\n firstNote: notes.firstNote,\n lastNote: notes.lastNote,\n },\n type\n )\n .setContext(ctx)\n .setRenderOptions(hairpinOptions)\n .setPosition(position)\n .drawWithStyle();\n }\n\n /**\n * Create a new hairpin from the specified notes.\n *\n * @param {!Object} notes The notes to tie up.\n * Notes is a struct that has:\n *\n * {\n * firstNote: Note,\n * lastNote: Note,\n * }\n * @param {!Object} type The type of hairpin\n */\n constructor(notes: Record<string, Note>, type: number) {\n super();\n this.setNotes(notes);\n this.hairpin = type;\n this.position = Modifier.Position.BELOW;\n\n this.renderOptions = {\n height: 10,\n yShift: 0, // vertical offset\n leftShiftPx: 0, // left horizontal offset\n rightShiftPx: 0, // right horizontal offset\n rightShiftTicks: 0,\n leftShiftTicks: 0,\n };\n }\n\n setPosition(position: number): this {\n if (position === Modifier.Position.ABOVE || position === Modifier.Position.BELOW) {\n this.position = position;\n }\n return this;\n }\n\n setRenderOptions(options: StaveHairpinRenderOptions): this {\n this.renderOptions = options;\n return this;\n }\n\n /**\n * Set the notes to attach this hairpin to.\n *\n * @param {!Object} notes The start and end notes.\n */\n setNotes(notes: Record<string, Note>): this {\n if (!notes.firstNote && !notes.lastNote) {\n throw new RuntimeError('BadArguments', 'Hairpin needs to have either firstNote or lastNote set.');\n }\n\n this.notes = notes;\n this.firstNote = notes.firstNote;\n this.lastNote = notes.lastNote;\n return this;\n }\n\n renderHairpin(params: { firstX: number; lastX: number; firstY: number; lastY: number; staffHeight: number }): void {\n const ctx = this.checkContext();\n let dis = this.renderOptions.yShift + 20;\n let yShift = params.firstY;\n\n if (this.position === Modifier.Position.ABOVE) {\n dis = -dis + 30;\n yShift = params.firstY - params.staffHeight;\n }\n\n const leftShiftPx = this.renderOptions.leftShiftPx;\n const rightShiftPx = this.renderOptions.rightShiftPx;\n\n ctx.beginPath();\n\n switch (this.hairpin) {\n case StaveHairpin.type.CRESC:\n ctx.moveTo(params.lastX + rightShiftPx, yShift + dis);\n ctx.lineTo(params.firstX + leftShiftPx, yShift + this.renderOptions.height / 2 + dis);\n ctx.lineTo(params.lastX + rightShiftPx, yShift + this.renderOptions.height + dis);\n break;\n case StaveHairpin.type.DECRESC:\n ctx.moveTo(params.firstX + leftShiftPx, yShift + dis);\n ctx.lineTo(params.lastX + rightShiftPx, yShift + this.renderOptions.height / 2 + dis);\n ctx.lineTo(params.firstX + leftShiftPx, yShift + this.renderOptions.height + dis);\n break;\n default:\n // Default is NONE, so nothing to draw\n break;\n }\n\n ctx.stroke();\n ctx.closePath();\n }\n\n override draw(): void {\n this.checkContext();\n this.setRendered();\n\n const firstNote = this.firstNote;\n const lastNote = this.lastNote;\n if (!firstNote || !lastNote) throw new RuntimeError('NoNote', 'Notes required to draw');\n\n const start = firstNote.getModifierStartXY(this.position, 0);\n const end = lastNote.getModifierStartXY(this.position, 0);\n\n this.renderHairpin({\n firstX: start.x,\n lastX: end.x,\n firstY: firstNote.checkStave().getY() + firstNote.checkStave().getHeight(),\n lastY: lastNote.checkStave().getY() + lastNote.checkStave().getHeight(),\n staffHeight: firstNote.checkStave().getHeight(),\n });\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n//\n// This class implements varies types of ties between contiguous notes. The\n// ties include: regular ties, hammer ons, pull offs, and slides.\n\nimport { TieNotes } from './stavetie';\nimport { TabNote } from './tabnote';\nimport { TabTie } from './tabtie';\nimport { Category } from './typeguard';\nimport { RuntimeError } from './util';\n\nexport class TabSlide extends TabTie {\n static override get CATEGORY(): string {\n return Category.TabSlide;\n }\n\n static get SLIDE_UP(): number {\n return 1;\n }\n\n static get SLIDE_DOWN(): number {\n return -1;\n }\n\n static createSlideUp(notes: TieNotes): TabSlide {\n return new TabSlide(notes, TabSlide.SLIDE_UP);\n }\n\n static createSlideDown(notes: TieNotes): TabSlide {\n return new TabSlide(notes, TabSlide.SLIDE_DOWN);\n }\n\n /**\n * @param notes is a struct of the form:\n * {\n * firstNote: Note,\n * lastNote: Note,\n * firstIndexes: [n1, n2, n3],\n * lastIndexes: [n1, n2, n3]\n * }\n * @param notes.firstNote the starting note of the slide\n * @param notes.lastNote the ending note of the slide\n * @param notes.firstIndexes specifies which string + fret positions of the TabNote are used in this slide. zero indexed.\n * @param notes.lastIndexes currently unused. we assume it's the same as firstIndexes.\n *\n * @param direction TabSlide.SLIDE_UP or TabSlide.SLIDE_DOWN\n */\n constructor(notes: TieNotes, direction?: number) {\n super(notes, 'sl.');\n\n // Determine the direction automatically if it is not provided.\n if (!direction) {\n let firstFret = (notes.firstNote as TabNote).getPositions()[0].fret;\n if (typeof firstFret === 'string') {\n firstFret = parseInt(firstFret, 10);\n }\n let lastFret = (notes.lastNote as TabNote).getPositions()[0].fret;\n if (typeof lastFret === 'string') {\n lastFret = parseInt(lastFret, 10);\n }\n\n // If either of the frets are 'X', parseInt() above will return NaN.\n // Choose TabSlide.SLIDE_UP by default.\n if (isNaN(firstFret) || isNaN(lastFret)) {\n direction = TabSlide.SLIDE_UP;\n } else {\n direction = firstFret > lastFret ? TabSlide.SLIDE_DOWN : TabSlide.SLIDE_UP;\n }\n }\n\n this.direction = direction;\n this.renderOptions.cp1 = 11;\n this.renderOptions.cp2 = 14;\n this.renderOptions.yShift = 0.5;\n }\n\n /**\n * @param params.firstX is specified in pixels.\n * @param params.lastX is specified in pixels.\n */\n override renderTie(params: {\n direction: number;\n firstX: number;\n lastX: number;\n lastYs: number[];\n firstYs: number[];\n }): void {\n if (params.firstYs.length === 0 || params.lastYs.length === 0) {\n throw new RuntimeError('BadArguments', 'No Y-values to render');\n }\n\n const ctx = this.checkContext();\n const firstX = params.firstX; // pixel units\n const firstYs = params.firstYs;\n const lastX = params.lastX; // pixel units\n\n const direction = params.direction;\n if (direction !== TabSlide.SLIDE_UP && direction !== TabSlide.SLIDE_DOWN) {\n throw new RuntimeError('BadSlide', 'Invalid slide direction');\n }\n\n const firstIndexes = this.notes.firstIndexes!;\n for (let i = 0; i < firstIndexes.length; ++i) {\n const slideY = firstYs[firstIndexes[i]] + this.renderOptions.yShift;\n\n if (isNaN(slideY)) {\n throw new RuntimeError('BadArguments', 'Bad indexes for slide rendering.');\n }\n\n ctx.beginPath();\n ctx.moveTo(firstX, slideY + 3 * direction);\n ctx.lineTo(lastX, slideY - 3 * direction);\n ctx.closePath();\n ctx.stroke();\n }\n\n this.setRendered();\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// @author Mike Corrigan <corrigan@gmail.com>\n// MIT License\n\nimport { Glyphs } from './glyphs';\nimport { Metrics } from './metrics';\nimport { Modifier } from './modifier';\nimport { Stem } from './stem';\nimport { Category } from './typeguard';\n\n/** Tremolo implements tremolo notation. */\nexport class Tremolo extends Modifier {\n static override get CATEGORY(): string {\n return Category.Tremolo;\n }\n\n protected readonly num: number;\n\n /**\n * @param num number of bars\n */\n constructor(num: number) {\n super();\n\n this.num = num;\n this.position = Modifier.Position.CENTER;\n this.text = Glyphs.tremolo1;\n }\n\n /** Draw the tremolo on the rendering context. */\n override draw(): void {\n const ctx = this.checkContext();\n const note = this.checkAttachedNote();\n this.setRendered();\n\n const stemDirection = note.getStemDirection();\n const scale = note.getFontScale();\n const ySpacing = Metrics.get(`Tremolo.spacing`) * stemDirection * scale;\n\n const x =\n note.getAbsoluteX() + (stemDirection === Stem.UP ? note.getGlyphWidth() - Stem.WIDTH / 2 : Stem.WIDTH / 2);\n let y = note.getStemExtents().topY + (this.num <= 3 ? ySpacing : 0);\n\n this.fontInfo.size = Metrics.get(`Tremolo.fontSize`) * scale;\n\n for (let i = 0; i < this.num; ++i) {\n this.renderText(ctx, x, y);\n y += ySpacing;\n }\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n\nimport { Tables } from './tables';\nimport { RuntimeError } from './util';\n\n/** `Tuning` implements varies types of tunings for tablature. */\nexport class Tuning {\n protected tuningValues: number[] = [];\n\n static get names(): Record<string, string> {\n return {\n standard: 'E/5,B/4,G/4,D/4,A/3,E/3',\n dagdad: 'D/5,A/4,G/4,D/4,A/3,D/3',\n dropd: 'E/5,B/4,G/4,D/4,A/3,D/3',\n eb: 'Eb/5,Bb/4,Gb/4,Db/4,Ab/3,Db/3',\n standardBanjo: 'D/5,B/4,G/4,D/4,G/5',\n };\n }\n\n /**\n * Constructor.\n * @param tuningString tuning name (eg. 'dagdad') or comma separated note strings\n */\n constructor(tuningString = 'E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2') {\n // Default to standard tuning.\n this.setTuning(tuningString);\n }\n\n /** Return the note number associated to the note string. */\n noteToInteger(noteString: string): number {\n return Tables.keyProperties(noteString).intValue ?? -1;\n }\n\n /**\n * Set tuning identified by tuning name (eg. 'dagdad')\n * @param tuningString tuning name (eg. 'dagdad') or comma separated note strings\n */\n setTuning(tuningString: string): void {\n if (Tuning.names[tuningString]) {\n tuningString = Tuning.names[tuningString];\n }\n\n this.tuningValues = [];\n\n const keys = tuningString.split(/\\s*,\\s*/);\n if (keys.length === 0) {\n throw new RuntimeError('BadArguments', `Invalid tuning string: ${tuningString}`);\n }\n\n for (let i = 0; i < keys.length; ++i) {\n this.tuningValues[i] = this.noteToInteger(keys[i]);\n }\n }\n\n /** Return the note number associated with a tablature string. */\n getValueForString(stringNum: string | number): number {\n const s = Number(stringNum);\n if (s < 1 || s > this.tuningValues.length) {\n throw new RuntimeError(\n 'BadArguments',\n `String number must be between 1 and ${this.tuningValues.length}:${stringNum}`\n );\n }\n\n return this.tuningValues[s - 1];\n }\n\n /** Return the note number associated with a tablature string and fret. */\n getValueForFret(fretNum: string | number, stringNum: string | number): number {\n const stringValue = this.getValueForString(stringNum);\n const f = Number(fretNum);\n\n if (f < 0) {\n throw new RuntimeError('BadArguments', `Fret number must be 0 or higher: ${fretNum}`);\n }\n\n return stringValue + f;\n }\n\n /** Return the note string associated with tablature string and fret. */\n getNoteForFret(fretNum: string | number, stringNum: string | number): string {\n const noteValue = this.getValueForFret(fretNum, stringNum);\n\n const octave = Math.floor(noteValue / 12);\n const value = noteValue % 12;\n\n return `${Tables.integerToNote(value)}/${octave}`;\n }\n}\n","// The Vite build replaces these values with package and Git metadata.\nexport const VERSION: string = '__VF_VERSION__';\nexport const ID: string = '__VF_GIT_COMMIT_ID__';\nexport const DATE: string = '__VF_BUILD_DATE__';\n","import { Accidental } from './accidental';\nimport { Annotation, AnnotationHorizontalJustify, AnnotationVerticalJustify } from './annotation';\nimport { Articulation } from './articulation';\nimport { BarNote } from './barnote';\nimport { Beam } from './beam';\nimport { Bend } from './bend';\nimport { BoundingBox } from './boundingbox';\nimport { CanvasContext } from './canvascontext';\nimport { ChordSymbol, ChordSymbolHorizontalJustify, ChordSymbolVerticalJustify, SymbolModifiers } from './chordsymbol';\nimport { Clef } from './clef';\nimport { ClefNote } from './clefnote';\nimport { Crescendo } from './crescendo';\nimport { Curve, CurvePosition } from './curve';\nimport { Dot } from './dot';\nimport { EasyScore } from './easyscore';\nimport { Element } from './element';\nimport { Factory } from './factory';\nimport { Font, FontStyle, FontWeight } from './font';\nimport { Formatter } from './formatter';\nimport { Fraction } from './fraction';\nimport { FretHandFinger } from './frethandfinger';\nimport { GhostNote } from './ghostnote';\nimport { GlyphNote } from './glyphnote';\nimport { Glyphs } from './glyphs';\nimport { GraceNote } from './gracenote';\nimport { GraceNoteGroup } from './gracenotegroup';\nimport { GraceTabNote } from './gracetabnote';\nimport { KeyManager } from './keymanager';\nimport { KeySignature } from './keysignature';\nimport { KeySigNote } from './keysignote';\nimport { Metrics, MetricsDefaults } from './metrics';\nimport { Modifier, ModifierPosition } from './modifier';\nimport { ModifierContext } from './modifiercontext';\nimport { MultiMeasureRest } from './multimeasurerest';\nimport { Music } from './music';\nimport { Note } from './note';\nimport { NoteHead } from './notehead';\nimport { NoteSubGroup } from './notesubgroup';\nimport { Ornament } from './ornament';\nimport { Parenthesis } from './parenthesis';\nimport { Parser } from './parser';\nimport { PedalMarking } from './pedalmarking';\nimport { Registry } from './registry';\nimport { RenderContext } from './rendercontext';\nimport { Renderer, RendererBackends, RendererLineEndType } from './renderer';\nimport { RepeatNote } from './repeatnote';\nimport { Stave } from './stave';\nimport { Barline, BarlineType, RepeatBracketType } from './stavebarline';\nimport { StaveConnector } from './staveconnector';\nimport { StaveHairpin } from './stavehairpin';\nimport { StaveLine } from './staveline';\nimport { StaveModifier, StaveModifierPosition } from './stavemodifier';\nimport { StaveNote } from './stavenote';\nimport { Repetition } from './staverepetition';\nimport { StaveTempo } from './stavetempo';\nimport { StaveText } from './stavetext';\nimport { StaveTie } from './stavetie';\nimport { Volta, VoltaType } from './stavevolta';\nimport { Stem } from './stem';\nimport { StringNumber } from './stringnumber';\nimport { Stroke } from './strokes';\nimport { SVGContext } from './svgcontext';\nimport { System } from './system';\nimport { Tables } from './tables';\nimport { TabNote } from './tabnote';\nimport { TabSlide } from './tabslide';\nimport { TabStave } from './tabstave';\nimport { TabTie } from './tabtie';\nimport { TextBracket, TextBracketPosition } from './textbracket';\nimport { TextDynamics } from './textdynamics';\nimport { TextJustification, TextNote } from './textnote';\nimport { TickContext } from './tickcontext';\nimport { TimeSignature } from './timesignature';\nimport { TimeSigNote } from './timesignote';\nimport { Tremolo } from './tremolo';\nimport { Tuning } from './tuning';\nimport { Tuplet } from './tuplet';\nimport { RuntimeError } from './util';\nimport { DATE, ID, VERSION } from './version';\nimport { Vibrato } from './vibrato';\nimport { VibratoBracket } from './vibratobracket';\nimport { Voice, VoiceMode, VoiceTime } from './voice';\n\nexport class VexFlow {\n // VERSION, ID, and DATE are imported from version.ts.\n // INFO is set by the entry file in vexflow/entry/.\n static BUILD = {\n // version number.\n VERSION: VERSION,\n // git commit ID that this library was built from.\n ID: ID,\n // The date when this library was compiled.\n DATE: DATE,\n // Which build is this? vexflow, vexflow-bravura, vexflow-core, etc.\n INFO: '',\n };\n\n static Accidental = Accidental;\n static Annotation = Annotation;\n static Articulation = Articulation;\n static Barline = Barline;\n static BarNote = BarNote;\n static Beam = Beam;\n static Bend = Bend;\n static BoundingBox = BoundingBox;\n static CanvasContext = CanvasContext;\n static ChordSymbol = ChordSymbol;\n static Clef = Clef;\n static ClefNote = ClefNote;\n static Crescendo = Crescendo;\n static Curve = Curve;\n static Dot = Dot;\n static EasyScore = EasyScore;\n static Element = Element;\n static Factory = Factory;\n static Font = Font;\n static Formatter = Formatter;\n static Fraction = Fraction;\n static FretHandFinger = FretHandFinger;\n static GhostNote = GhostNote;\n static GlyphNote = GlyphNote;\n static GraceNote = GraceNote;\n static GraceNoteGroup = GraceNoteGroup;\n static GraceTabNote = GraceTabNote;\n static KeyManager = KeyManager;\n static KeySignature = KeySignature;\n static KeySigNote = KeySigNote;\n static Modifier = Modifier;\n static ModifierContext = ModifierContext;\n static MultiMeasureRest = MultiMeasureRest;\n static Music = Music;\n static Note = Note;\n static NoteHead = NoteHead;\n static NoteSubGroup = NoteSubGroup;\n static Ornament = Ornament;\n static Parenthesis = Parenthesis;\n static Parser = Parser;\n static PedalMarking = PedalMarking;\n static Registry = Registry;\n static RenderContext = RenderContext;\n static Renderer = Renderer;\n static RepeatNote = RepeatNote;\n static Repetition = Repetition;\n static Stave = Stave;\n static StaveConnector = StaveConnector;\n static StaveHairpin = StaveHairpin;\n static StaveLine = StaveLine;\n static StaveModifier = StaveModifier;\n static StaveNote = StaveNote;\n static StaveTempo = StaveTempo;\n static StaveText = StaveText;\n static StaveTie = StaveTie;\n static Stem = Stem;\n static StringNumber = StringNumber;\n static Stroke = Stroke;\n static SVGContext = SVGContext;\n static System = System;\n static TabNote = TabNote;\n static TabSlide = TabSlide;\n static TabStave = TabStave;\n static TabTie = TabTie;\n static TextBracket = TextBracket;\n static TextDynamics = TextDynamics;\n static TextNote = TextNote;\n static TickContext = TickContext;\n static TimeSignature = TimeSignature;\n static TimeSigNote = TimeSigNote;\n static Tremolo = Tremolo;\n static Tuning = Tuning;\n static Tuplet = Tuplet;\n static Vibrato = Vibrato;\n static VibratoBracket = VibratoBracket;\n static Voice = Voice;\n static Volta = Volta;\n\n static RuntimeError = RuntimeError;\n\n static Test = undefined; // Set by vexflow_test_helpers.ts in the debug version of this library.\n\n // Exported Enums.\n // Sorted by the module / file they are exported from.\n static AnnotationHorizontalJustify = AnnotationHorizontalJustify;\n static AnnotationVerticalJustify = AnnotationVerticalJustify;\n static ChordSymbolHorizontalJustify = ChordSymbolHorizontalJustify;\n static ChordSymbolVerticalJustify = ChordSymbolVerticalJustify;\n static SymbolModifiers = SymbolModifiers;\n static CurvePosition = CurvePosition;\n static FontWeight = FontWeight;\n static FontStyle = FontStyle;\n static Glyphs = Glyphs;\n static ModifierPosition = ModifierPosition;\n static RendererBackends = RendererBackends;\n static RendererLineEndType = RendererLineEndType;\n static BarlineType = BarlineType;\n static RepeatBracketType = RepeatBracketType;\n static StaveModifierPosition = StaveModifierPosition;\n static VoltaType = VoltaType;\n static TextBracketPosition = TextBracketPosition;\n static TextJustification = TextJustification;\n static VoiceMode = VoiceMode;\n\n /**\n * Load the fonts that are used by your app.\n *\n * Call this if you are using `vexflow-core.js` to take advantage of lazy loading for fonts.\n *\n * If you are using `vexflow.js` or `vexflow-bravura.js`, this method is unnecessary, since\n * they already call loadFonts(...) and setFonts(...) for you.\n *\n * If `fontNames` is undefined, all fonts in Font.FILES will be loaded.\n * This is useful for debugging, but not recommended for production because it will load lots of fonts.\n *\n * For example, on the `flow.html` test page, you could call:\n * `await VexFlow.loadFonts();`\n *\n * Alternatively, you may load web fonts with a stylesheet link (e.g., from Google Fonts),\n * and a @font-face { font-family: ... } rule in your CSS.\n *\n * Customize `Font.HOST_URL` and `Font.FILES` to load different fonts for your app.\n */\n static async loadFonts(...fontNames: string[]): Promise<void> {\n if (!fontNames) {\n fontNames = Object.keys(Font.FILES);\n }\n\n const fontLoadPromises: Promise<FontFace>[] = [];\n for (const fontName of fontNames) {\n fontLoadPromises.push(Font.load(fontName));\n }\n\n await Promise.all(fontLoadPromises);\n }\n\n /**\n * Call this if you are using `vexflow-core.js` to take advantage of lazy loading for fonts.\n *\n * `vexflow.js` and `vexflow-bravura.js` already call setFonts('Bravura', 'Academico'), so you only\n * need to call this when switching fonts.\n *\n * Example:\n * ```\n * await VexFlow.loadFonts('Bravura', 'Academico', 'Petaluma', 'Petaluma Script');\n * VexFlow.setFonts('Bravura', 'Academico');\n * ... render a score in Bravura ...\n * VexFlow.setFonts('Petaluma', 'Petaluma Script');\n * ... render a score in Petaluma...\n * ```\n * See `demos/fonts/` for more examples.\n */\n static setFonts(...fontNames: string[]): void {\n // Convert the array of font names into an array of Font objects.\n MetricsDefaults.fontFamily = fontNames.join(',');\n Metrics.clear();\n }\n\n static getFonts(): string[] {\n return Metrics.get('fontFamily').split(',');\n }\n\n static get RENDER_PRECISION_PLACES(): number {\n return Tables.RENDER_PRECISION_PLACES;\n }\n\n static set RENDER_PRECISION_PLACES(precision: number) {\n Tables.RENDER_PRECISION_PLACES = precision;\n }\n\n static get SOFTMAX_FACTOR(): number {\n return Tables.SOFTMAX_FACTOR;\n }\n\n static set SOFTMAX_FACTOR(factor: number) {\n Tables.SOFTMAX_FACTOR = factor;\n }\n\n static get UNISON(): boolean {\n return Tables.UNISON;\n }\n\n static set UNISON(unison: boolean) {\n Tables.UNISON = unison;\n }\n\n static get NOTATION_FONT_SCALE(): number {\n return Tables.NOTATION_FONT_SCALE;\n }\n\n static set NOTATION_FONT_SCALE(value: number) {\n Tables.NOTATION_FONT_SCALE = value;\n }\n\n static get TABLATURE_FONT_SCALE(): number {\n return Tables.TABLATURE_FONT_SCALE;\n }\n\n static set TABLATURE_FONT_SCALE(value: number) {\n Tables.TABLATURE_FONT_SCALE = value;\n }\n\n static get RESOLUTION(): number {\n return Tables.RESOLUTION;\n }\n\n static set RESOLUTION(value: number) {\n Tables.RESOLUTION = value;\n }\n\n static get SLASH_NOTEHEAD_WIDTH(): number {\n return Tables.SLASH_NOTEHEAD_WIDTH;\n }\n\n static set SLASH_NOTEHEAD_WIDTH(value: number) {\n Tables.SLASH_NOTEHEAD_WIDTH = value;\n }\n\n static get STAVE_LINE_DISTANCE(): number {\n return Tables.STAVE_LINE_DISTANCE;\n }\n\n static set STAVE_LINE_DISTANCE(value: number) {\n Tables.STAVE_LINE_DISTANCE = value;\n }\n\n static get STAVE_LINE_THICKNESS(): number {\n return MetricsDefaults.Stave.lineWidth;\n }\n\n static set STAVE_LINE_THICKNESS(value: number) {\n MetricsDefaults.Stave.lineWidth = value;\n MetricsDefaults.TabStave.lineWidth = value;\n Metrics.clear('Stave');\n Metrics.clear('TabStave');\n }\n\n static get STEM_HEIGHT(): number {\n return Tables.STEM_HEIGHT;\n }\n\n static set STEM_HEIGHT(value: number) {\n Tables.STEM_HEIGHT = value;\n }\n\n static get STEM_WIDTH(): number {\n return Tables.STEM_WIDTH;\n }\n\n static set STEM_WIDTH(value: number) {\n Tables.STEM_WIDTH = value;\n }\n\n static get TIME4_4(): VoiceTime {\n return Tables.TIME4_4;\n }\n\n static get unicode(): Record<string, string> {\n return Tables.unicode;\n }\n\n static keySignature(spec: string): { type: string; line: number }[] {\n return Tables.keySignature(spec);\n }\n\n static hasKeySignature(spec: string): boolean {\n return Tables.hasKeySignature(spec);\n }\n\n static getKeySignatures(): Record<string, { acc?: string; num: number }> {\n return Tables.getKeySignatures();\n }\n\n static clefProperties(clef: string): { lineShift: number } {\n return Tables.clefProperties(clef);\n }\n\n // eslint-disable-next-line\n static keyProperties(key: string, clef?: string, params?: any): any {\n return Tables.keyProperties(key, clef, params);\n }\n\n static durationToTicks(duration: string): number {\n return Tables.durationToTicks(duration);\n }\n}\n","// Copyright (c) 2023-present VexFlow contributors: https://github.com/vexflow/vexflow/graphs/contributors\n// MIT License\n//\n//\n// vexflow-core.ts is the entry point for the vexflow-core.js build target.\n// It supports dynamic importing of fonts (woff2 / otf), and does not\n// bundle or preload any music or text fonts by default.\n// All music/text fonts need to be loaded at runtime during page load.\n//\n// The Vite config produces a minified production build from this entry point.\n\nimport { VexFlow } from \"../src/vexflow\";\n\nVexFlow.BUILD.INFO = \"vexflow-core\";\nexport * from \"../src/index\";\nexport default VexFlow;\n"],"mappings":"8MA0BA,SAAgB,EAAc,EAAU,EAAkB,EAA0B,GAAgB,CAElG,GAAI,OAAO,GAAQ,WAAY,EAC7B,MAAO,GAKT,IAAI,EAAiB,EAAI,YAIzB,GAAI,EAAgB,CAElB,KAAO,IAAQ,MAAM,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