@barmark/score 0.6.0 → 0.6.2
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/CHANGELOG.md +24 -1
- package/dist/engrave.d.ts +2 -0
- package/dist/engrave.js +9 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ package uses [semantic versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.6.2] - 2026-11-18
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **A lyric row's rhythm slashes sit on their line.** A chart with words
|
|
14
|
+
and no melody engraves the words on a one-line staff of slashes. Each
|
|
15
|
+
slash was drawn two steps above the line, with ledger lines through it,
|
|
16
|
+
which read as an unknown symbol. Verovio draws a one-line staff's line
|
|
17
|
+
where a treble staff has E4, and `@barmark/musicxml` writes the slash at
|
|
18
|
+
B4: the score now moves it for Verovio. The exported MusicXML is
|
|
19
|
+
unchanged.
|
|
20
|
+
|
|
21
|
+
## [0.6.1] - 2026-11-14
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **Requires `barmark` 0.24.0 (with `@barmark/render` 0.20.1 and `@barmark/musicxml` 0.9.2)**, whose minor release a caret range
|
|
26
|
+
would not reach.
|
|
27
|
+
- **A chart with a flat sixth, an `add` before any tone or `Δ9` engraves**
|
|
28
|
+
(`F#m(b6)`, `Cadd13`, `CΔ9`), as `barmark` now reads them.
|
|
29
|
+
|
|
9
30
|
## [0.6.0] - 2026-11-13
|
|
10
31
|
|
|
11
32
|
### Added
|
|
@@ -293,7 +314,9 @@ First release.
|
|
|
293
314
|
needs no config; Vite 7 needs `optimizeDeps.exclude` and
|
|
294
315
|
`worker.format: "es"`.
|
|
295
316
|
|
|
296
|
-
[Unreleased]: https://github.com/kevinpeckham/barmark/compare/score-v0.6.
|
|
317
|
+
[Unreleased]: https://github.com/kevinpeckham/barmark/compare/score-v0.6.2...HEAD
|
|
318
|
+
[0.6.2]: https://github.com/kevinpeckham/barmark/compare/score-v0.6.1...score-v0.6.2
|
|
319
|
+
[0.6.1]: https://github.com/kevinpeckham/barmark/compare/score-v0.6.0...score-v0.6.1
|
|
297
320
|
[0.6.0]: https://github.com/kevinpeckham/barmark/compare/score-v0.5.0...score-v0.6.0
|
|
298
321
|
[0.5.0]: https://github.com/kevinpeckham/barmark/compare/score-v0.4.0...score-v0.5.0
|
|
299
322
|
[0.4.0]: https://github.com/kevinpeckham/barmark/compare/score-v0.3.0...score-v0.4.0
|
package/dist/engrave.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ export declare const LAYOUT: {
|
|
|
54
54
|
* The MusicXML as Verovio should read it. Verovio 6.4 appends every chord <degree> to the
|
|
55
55
|
* kind text, `print-object="no"` or not, so a degree the text already spells is drawn twice
|
|
56
56
|
* (`D7sus4(7)`); a degree that is not printed is dropped, which changes nothing it draws.
|
|
57
|
+
* And it draws a one-line staff's line where a treble staff has E4, so a lyric row's
|
|
58
|
+
* slashes, exported at B4, sat two steps above their line on ledger lines: they move to E4.
|
|
57
59
|
*/
|
|
58
60
|
export declare function forVerovio(xml: string): string;
|
|
59
61
|
/** MusicXML laid out for a width, every page as SVG in a `bms-score-page` div. Throws on unreadable XML. */
|
package/dist/engrave.js
CHANGED
|
@@ -82,12 +82,21 @@ const DEFAULT_SCALE = 40;
|
|
|
82
82
|
const MIN_WIDTH = 320;
|
|
83
83
|
const HIDDEN_DEGREE = '<degree print-object="no">';
|
|
84
84
|
const DEGREE_END = "</degree>";
|
|
85
|
+
/** Where `@barmark/musicxml` writes a rhythm staff's slash: the middle line of a five-line staff. */
|
|
86
|
+
const SLASH_AT_MIDDLE = "<unpitched><display-step>B</display-step><display-octave>4</display-octave></unpitched>";
|
|
87
|
+
/** Where Verovio draws a one-line staff's line: a treble staff's bottom line. */
|
|
88
|
+
const SLASH_ON_LINE = "<unpitched><display-step>E</display-step><display-octave>4</display-octave></unpitched>";
|
|
85
89
|
/**
|
|
86
90
|
* The MusicXML as Verovio should read it. Verovio 6.4 appends every chord <degree> to the
|
|
87
91
|
* kind text, `print-object="no"` or not, so a degree the text already spells is drawn twice
|
|
88
92
|
* (`D7sus4(7)`); a degree that is not printed is dropped, which changes nothing it draws.
|
|
93
|
+
* And it draws a one-line staff's line where a treble staff has E4, so a lyric row's
|
|
94
|
+
* slashes, exported at B4, sat two steps above their line on ledger lines: they move to E4.
|
|
89
95
|
*/
|
|
90
96
|
export function forVerovio(xml) {
|
|
97
|
+
return withoutHiddenDegrees(xml).replaceAll(SLASH_AT_MIDDLE, SLASH_ON_LINE);
|
|
98
|
+
}
|
|
99
|
+
function withoutHiddenDegrees(xml) {
|
|
91
100
|
// One pass with indexOf, never a backtracking regex: an opener with no closer ends the
|
|
92
101
|
// search, so a hostile file of openers costs linear time, not a rescan per opener.
|
|
93
102
|
const parts = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barmark/score",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Show a barmark chord chart as a full engraved score: MusicXML from @barmark/musicxml, engraved by Verovio (LGPL-3.0, a dependency loaded unchanged).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"url": "https://github.com/kevinpeckham/barmark/issues"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@barmark/musicxml": "^0.9.
|
|
53
|
-
"@barmark/render": "^0.20.
|
|
54
|
-
"barmark": "^0.
|
|
52
|
+
"@barmark/musicxml": "^0.9.2",
|
|
53
|
+
"@barmark/render": "^0.20.1",
|
|
54
|
+
"barmark": "^0.24.0",
|
|
55
55
|
"verovio": "6.4.1"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|