@dsebastien/music-notation 0.10.0 → 0.10.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/dist/blocks/properties.d.ts +14 -5
- package/dist/blocks/renderers.d.ts +1 -1
- package/dist/index.js +93 -9
- package/dist/index.js.map +6 -6
- package/dist/music-notation.publish.min.js +21 -19
- package/dist/music-notation.tab.min.js +7 -7
- package/dist/publish/index.js +83 -6
- package/dist/publish/index.js.map +5 -5
- package/dist/tab/index.js +11 -4
- package/dist/tab/index.js.map +3 -3
- package/package.json +1 -1
package/dist/tab/index.js
CHANGED
|
@@ -896,9 +896,16 @@ function splitUnbarred(measures, meter) {
|
|
|
896
896
|
if (eighths <= perBar || m.width - m.pad < span * 1.5)
|
|
897
897
|
return [m];
|
|
898
898
|
const count = Math.floor((cols.at(-1) - m.pad) / span) + 1;
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
899
|
+
const pieces = Array.from({ length: count }, () => []);
|
|
900
|
+
for (const b of m.beats) {
|
|
901
|
+
let k = Math.min(count - 1, Math.max(0, Math.floor((b.col - m.pad) / span)));
|
|
902
|
+
while (k < count - 1 && b.col >= m.pad + (k + 1) * span)
|
|
903
|
+
k++;
|
|
904
|
+
while (k > 0 && b.col < m.pad + k * span)
|
|
905
|
+
k--;
|
|
906
|
+
pieces[k].push({ notes: b.notes, col: b.col - k * span });
|
|
907
|
+
}
|
|
908
|
+
return pieces.map((beats, k) => {
|
|
902
909
|
return {
|
|
903
910
|
beats,
|
|
904
911
|
width: m.pad + span,
|
|
@@ -2079,5 +2086,5 @@ export {
|
|
|
2079
2086
|
textTabToAlphaTex
|
|
2080
2087
|
};
|
|
2081
2088
|
|
|
2082
|
-
//# debugId=
|
|
2089
|
+
//# debugId=7EA581924096D5C364756E2164756E21
|
|
2083
2090
|
//# sourceMappingURL=index.js.map
|