readme.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. VexFlowPatch
  2. base vexflow version:
  3. 1.2.93
  4. note: this patch will likely create errors when used with a different vexflow version, like 3.x
  5. if using a different vexflow version, disable this prebuild patch script in package.json.
  6. These files are custom patches for the currently installed vexflow version.
  7. They are copied by the npm prebuild script to ../../node_modules/vexflow/src/ before a build.
  8. Each .js has comments like "// VexFlowPatch: [explanation]" to indicate what was changed.
  9. (a diff can be created from the base vexflow version)
  10. articulation.js (custom addition):
  11. respect modifier.y_shift (y_shift affects y position of rendering)
  12. beam.js (custom addition):
  13. add flat_beams, flat_beam_offset, flat_beam_offset_per_beam render_option (fixed in vexflow 4)
  14. able to add svg node id+class to beam (not yet in vexflow 4)
  15. clef.js (merged vexflow 4):
  16. open group to get SVG group+class for clef
  17. formatter.js (custom addition, unnecessary in vexflow 4):
  18. comment out unnecessary error thrown, which prevents the fix to
  19. layouting improvements with whole measure rests and e.g. 12/8 rhythm in #1187.
  20. gracenotegroup.js (custom addition, needs check if necessary in vexflow 4):
  21. check for gracenotegroup.spacing set, to allow e.g. spacing = 0 by default.
  22. (with previous default 4, spacing is way too large unnecessarily, in most cases)
  23. keysignature.js (merged vexflow 4):
  24. open group to get SVG group+class for key signature
  25. pedalmarking.js (custom addition):
  26. Add rendering options for pedals that break across systems.
  27. renderer.js (vexflow4: need to check if possible):
  28. CanvasContext: getContext(): use willReadFrequently option for marginal performance potential,
  29. and for preventing chrome warning (#1242)
  30. stave.js (merged/fixed vexflow 4):
  31. prevent a bug where a modifier width is NaN, leading to a VexFlow error (fixed vexflow 4)
  32. stave.setSection(section, y, xOffset = 0, fontSize = 12):
  33. add xOffset, fontSize arguments (see stavesection.js) (merged vexflow 4.x)
  34. stavenote.js (custom addition):
  35. Fix stem/flag formatting. Instead of shifting notes by default, update the stem/flag rendering to render different voices aligned.
  36. Only offset if a note is the same voice, same note.
  37. (not yet in vexflow 4, PR 1263 open)
  38. able to add svg node id+class to stem (merged vexflow 4.x)
  39. Save and restore noteheads (e.g. slash noteheads) in reset()
  40. staverepetition.js (fixed vexflow 4):
  41. add TO_CODA enum to type() and draw()
  42. fix x-positioning for TO_CODA and DS_AL_CODA in drawSymbolText()
  43. fix y-shift
  44. stavesection.js (half-fixed vexflow 4.x, collision, box not removable):
  45. stavesection.draw():
  46. adjust rectangle positioning, make height depend on text height
  47. fix rehearsal marks not rendered with canvas backend in browser
  48. stavetie.js (merged vexflow 4.x):
  49. context opens group for stavetie, can get stavetie SVG element via getAttribute("el")
  50. stavevolta.js (merged Vexflow 3.x):
  51. Fix the length of voltas for first measures in a system
  52. (whose lengths were wrongly extended by the width of the clef, key signature, etc. (beginInstructions) in Vexflow 1.2.93)
  53. stem.js (fixed vexflow 4 (or earlier)):
  54. able to give an id+class to the stem node in SVG
  55. stemmablenote.js (custom addition, see stavenote.js):
  56. Add manual flag rendering variable so we can choose not to render flags if notes are sharing a stem.
  57. svgcontext.js (custom addition, probably not necessary for vexflow 4):
  58. able to add extra attributes (like svg node id) to a stroke (e.g. stem)
  59. fix rect() always using black color, ignoring attributes.stroke (ctx strokeStlye) -> fix defaultColorMusic ignored
  60. tabnote.js (merged Vexflow 3.x):
  61. Add a context group for each tabnote, so that it can be found in the SVG DOM ("vf-tabnote")
  62. timesignature.js (fixed vexflow 4):
  63. open group to get SVG group+class for key signature
  64. tremolo.js (fixed vexflow 4):
  65. Add extra_stroke_scale, y_spacing_scale
  66. tuplet.js (vexflow 4: need to check if this option available):
  67. Add option tuplet.RenderTupletNumber
  68. Currently, we are using Vexflow 1.2.93, because of some formatter advantages
  69. compared to Vexflow 3.x versions, see this issue:
  70. https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/issues/915
  71. Because of that, we need to patch in a few fixes that came after 1.2.93, as well as making custom additions for our needs.
  72. For vexflow 4 state of these changes, also see PR 1139 (vexflow 4 -> develop):
  73. https://github.com/opensheetmusicdisplay/opensheetmusicdisplay/pull/1139