abcjs 6.2.3 → 6.4.0

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.
Files changed (75) hide show
  1. package/README.md +8 -0
  2. package/RELEASE.md +84 -1
  3. package/dist/abcjs-basic-min.js +2 -2
  4. package/dist/abcjs-basic.js +1775 -1034
  5. package/dist/abcjs-basic.js.map +1 -1
  6. package/dist/abcjs-plugin-min.js +2 -2
  7. package/index.js +3 -0
  8. package/package.json +1 -1
  9. package/plugin.js +1 -1
  10. package/src/api/abc_tablatures.js +48 -13
  11. package/src/api/tune-metrics.js +18 -0
  12. package/src/data/abc_tune.js +13 -2
  13. package/src/edit/abc_editarea.js +4 -1
  14. package/src/parse/abc_parse.js +2 -0
  15. package/src/parse/abc_parse_directive.js +23 -16
  16. package/src/parse/abc_parse_header.js +22 -19
  17. package/src/parse/abc_tokenizer.js +72 -7
  18. package/src/parse/tune-builder.js +60 -1
  19. package/src/synth/abc_midi_flattener.js +40 -462
  20. package/src/synth/abc_midi_sequencer.js +25 -10
  21. package/src/synth/chord-track.js +562 -0
  22. package/src/synth/create-note-map.js +2 -1
  23. package/src/synth/create-synth.js +91 -42
  24. package/src/synth/synth-controller.js +6 -2
  25. package/src/tablatures/instruments/string-patterns.js +11 -0
  26. package/src/tablatures/instruments/{violin/violin-patterns.js → tab-string-patterns.js} +6 -6
  27. package/src/tablatures/instruments/{violin/tab-violin.js → tab-string.js} +13 -11
  28. package/src/tablatures/tab-absolute-elements.js +16 -7
  29. package/src/tablatures/tab-renderer.js +22 -9
  30. package/src/test/abc_parser_lint.js +14 -12
  31. package/src/write/creation/abstract-engraver.js +6 -2
  32. package/src/write/creation/add-chord.js +102 -82
  33. package/src/write/creation/add-text-if.js +2 -2
  34. package/src/write/creation/decoration.js +16 -9
  35. package/src/write/creation/elements/bottom-text.js +62 -47
  36. package/src/write/creation/elements/rich-text.js +51 -0
  37. package/src/write/creation/elements/tie-element.js +23 -0
  38. package/src/write/creation/elements/top-text.js +37 -11
  39. package/src/write/creation/glyphs.js +1 -1
  40. package/src/write/draw/absolute.js +4 -1
  41. package/src/write/draw/draw.js +13 -4
  42. package/src/write/draw/non-music.js +3 -1
  43. package/src/write/draw/relative.js +1 -1
  44. package/src/write/draw/tempo.js +1 -1
  45. package/src/write/draw/text.js +10 -0
  46. package/src/write/engraver-controller.js +62 -17
  47. package/src/write/helpers/classes.js +1 -1
  48. package/src/write/helpers/get-font-and-attr.js +8 -1
  49. package/src/write/helpers/get-text-size.js +8 -1
  50. package/src/write/interactive/create-analysis.js +50 -0
  51. package/src/write/interactive/find-selectable-element.js +24 -0
  52. package/src/write/interactive/selection.js +5 -45
  53. package/src/write/layout/layout-in-grid.js +83 -0
  54. package/src/write/layout/layout.js +29 -24
  55. package/src/write/layout/set-upper-and-lower-elements.js +2 -0
  56. package/src/write/layout/staff-group.js +2 -2
  57. package/src/write/layout/voice-elements.js +1 -1
  58. package/src/write/layout/voice.js +1 -1
  59. package/src/write/renderer.js +3 -0
  60. package/src/write/svg.js +30 -0
  61. package/temp.txt +3 -0
  62. package/types/index.d.ts +142 -38
  63. package/version.js +1 -1
  64. package/.github/workflows/tests.yml +0 -29
  65. package/abc2xml_239/abc2xml.html +0 -769
  66. package/abc2xml_239/abc2xml.py +0 -2248
  67. package/abc2xml_239/abc2xml_changelog.html +0 -124
  68. package/abc2xml_239/lazy-river.abc +0 -26
  69. package/abc2xml_239/lazy-river.xml +0 -3698
  70. package/abc2xml_239/mean-to-me.abc +0 -22
  71. package/abc2xml_239/mean-to-me.xml +0 -2954
  72. package/abc2xml_239/pyparsing.py +0 -3672
  73. package/abc2xml_239/pyparsing.pyc +0 -0
  74. package/src/tablatures/instruments/guitar/guitar-patterns.js +0 -23
  75. package/src/tablatures/instruments/guitar/tab-guitar.js +0 -48
package/README.md CHANGED
@@ -10,6 +10,14 @@ Full documentation is here: [abcjs documentation](https://paulrosen.github.io/ab
10
10
 
11
11
  There is an organization that has a collection of useful projects related to abcjs called [abcjs-music](https://github.com/abcjs-music). See some examples there. If you have a project that you think would be of general interest and would like to add it to that organization, contact me.
12
12
 
13
+ ## Announcement: version 6.4.0
14
+
15
+ The method for creating chord accompaniment has changed. Hopefully there aren't any regressions but if you have an example that doesn't match what it used to be, please open an issue.
16
+
17
+ ## Announcement: version 6.3.0
18
+
19
+ Most users won't see any difference, but there was some changes to the underlying SVG structure for the top (the title, etc.) and bottom (the notes, etc.) text, so if your code depends on particular classes then this might be a breaking change. Hopefully the new structure will be clearer and will allow css to target particular parts easier.
20
+
13
21
  ## Announcement: version 6.2.2
14
22
 
15
23
  There was a major bug in Firefox 112 that causes some lines to disappear. That is supposed to be fixed in Firefox 113 but in the meantime this update will take care of the problem.
package/RELEASE.md CHANGED
@@ -1,3 +1,86 @@
1
+ # Version 6.4.0
2
+
3
+ ## Features
4
+
5
+ * Support custom rhythm patterns in gChords
6
+
7
+ * Add swing to the playback
8
+
9
+ * Allow swing, bassprog, bassvol, chordprog, chordvol, and gchord to be set in the options, and also on the fly.
10
+
11
+ * Add findSelectableElement and getSelectableArray functions to help with hover.
12
+
13
+ * Add `drumOff` to the parameters so that the metronome can only be for the prep beats
14
+
15
+ * Allow an element to be passed into to the EditArea object in addition to an ID
16
+
17
+ * Add left alignment option ot time-based-layout
18
+
19
+ * Add timeBasedLayout parameter
20
+
21
+ * Add "stafftopmargin" directive
22
+
23
+ * Add tuneMetrics function
24
+
25
+ ## Bugs
26
+
27
+ * Fix linespacing when using both oneSvgPerLine and scale
28
+
29
+ * fix placement of inverted fermata
30
+
31
+ * Fix end points of slurs when there are beams involved
32
+
33
+ * Fix bug with cursor not following a tie across a line break.
34
+
35
+ * Improve spacing on time-based layout when left aligned
36
+
37
+ * fix line distance when scaling
38
+
39
+ * fix abcjs-staff class appearing in two places
40
+
41
+ * fix bug in gchord sound when bass and chord programs are different
42
+
43
+ * Many small fixes to types
44
+
45
+ # Version 6.3.0
46
+
47
+ ## Features
48
+
49
+ ### Tablature
50
+ * Add tab feature `hideTabSymbol`
51
+ * Add 5-string tab named "fiveString"
52
+
53
+ ### Synth
54
+ * change the default synth control options for "play" and "progress" to be true
55
+ * expose the MIDI creator function
56
+
57
+ ### Rich Text
58
+ * allow up to 9 custom fonts in `%%setfont`
59
+ * for rich text fields, escape two dollar signs
60
+ * allow rich text in all non-music fields
61
+ * give all non-music fields a unique class
62
+
63
+ ### Miscellaneous
64
+ * add abcjs-notehead class to note heads;
65
+ * add `accentAbove` parameter
66
+ * handle numbered tune names in the reverser
67
+ * support reversing tune names with ", a" and ", an", with a variable amount of whitespace and case-insensitive
68
+
69
+ ## Bugs
70
+ * fix placement of tab staff when there is no label
71
+ * fix font placement bugs
72
+ * remove spurious quotes in font name in svg attribute
73
+ * Fix the name of the `abcjs-tab-number` class
74
+ * Fix tab staff height when there is a label
75
+ * Fix for crash when rendering multiple tab staves
76
+ * Offset breath mark to the right
77
+ * Center text when using `expandToWidest` set true
78
+
79
+ ## Documentation
80
+ * add missing typescript types
81
+ * fix synth control types
82
+ * fixed some typescript types in the TimingCallbacks
83
+
1
84
  # Version 6.2.3
2
85
 
3
86
  ## Features
@@ -24,7 +107,7 @@
24
107
 
25
108
  * various typescript fixes
26
109
 
27
- * afterParsing now works with line wrapping.
110
+ * `afterParsing` now works with line wrapping.
28
111
 
29
112
  * Put start and end char on slurs so they can be selected.
30
113