@dsebastien/music-notation 0.13.0 → 0.15.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.
- package/README.md +3 -2
- package/dist/blocks/renderers.d.ts +11 -0
- package/dist/fretboard/fretboard.d.ts +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6020 -5313
- package/dist/index.js.map +20 -17
- package/dist/keyboard/keyboard.d.ts +5 -0
- package/dist/music-notation.css +152 -50
- package/dist/music-notation.publish.min.js +179 -77
- package/dist/music-notation.tab.min.js +159 -57
- package/dist/playback/bar-parts.d.ts +46 -0
- package/dist/playback/block-bar.d.ts +80 -0
- package/dist/playback/controls.d.ts +32 -9
- package/dist/playback/progression-bar.d.ts +3 -2
- package/dist/playback/strum-bar.d.ts +4 -4
- package/dist/publish/index.js +5849 -5246
- package/dist/publish/index.js.map +20 -17
- package/dist/render/dom.d.ts +2 -0
- package/dist/render/pick.d.ts +82 -0
- package/dist/render/render-block.d.ts +3 -0
- package/dist/tab/index.js +5 -1
- package/dist/tab/index.js.map +4 -4
- package/dist/theory/note-set.d.ts +2 -0
- package/dist/voicings/index.js +5 -1
- package/dist/voicings/index.js.map +4 -4
- package/package.json +1 -1
|
@@ -63,4 +63,6 @@ export declare function intervalFrom(root: string, name: string): string | null;
|
|
|
63
63
|
* note gets its interval from it (degrees are the interval numbers, 1 3 5) and the root its color;
|
|
64
64
|
* the root doesn't have to be in the list. Null when a note or the root isn't a note name.
|
|
65
65
|
*/
|
|
66
|
+
/** A note set with no notes: a fretboard or keyboard drawn without dots (a drill's empty neck). */
|
|
67
|
+
export declare function emptyNoteSet(title?: string): NoteSet;
|
|
66
68
|
export declare function listNoteSet(text: string, root?: string): NoteSet | null;
|
package/dist/voicings/index.js
CHANGED
|
@@ -53,6 +53,7 @@ function html(doc, tag, cls, text) {
|
|
|
53
53
|
}
|
|
54
54
|
var NAME_PREFIX = `mn-name-${Math.random().toString(36).slice(2, 8)}-`;
|
|
55
55
|
var names = 0;
|
|
56
|
+
var uniqueId = () => `${NAME_PREFIX}${++names}`;
|
|
56
57
|
function svgRoot(doc, width, height, cls, label) {
|
|
57
58
|
const id = `${NAME_PREFIX}${++names}`;
|
|
58
59
|
const title = svg(doc, "title", { class: "mn-name", id });
|
|
@@ -796,6 +797,9 @@ function intervalFrom(root, name) {
|
|
|
796
797
|
const m = /^(\d+)([PMmdA]+)$/.exec(spelled);
|
|
797
798
|
return m && m[1] !== "1" && m[1] !== "8" ? spelled : PLAIN_INTERVALS[semitones];
|
|
798
799
|
}
|
|
800
|
+
function emptyNoteSet(title = "no notes") {
|
|
801
|
+
return { title, members: [], root: null, pitches: null, preferFlats: false, list: true };
|
|
802
|
+
}
|
|
799
803
|
function listNoteSet(text, root) {
|
|
800
804
|
const tokens = text.split(/[\s,]+/).filter(Boolean);
|
|
801
805
|
if (!tokens.length)
|
|
@@ -1708,5 +1712,5 @@ export {
|
|
|
1708
1712
|
voicingCount
|
|
1709
1713
|
};
|
|
1710
1714
|
|
|
1711
|
-
//# debugId=
|
|
1715
|
+
//# debugId=E3AF920B7055E4E864756E2164756E21
|
|
1712
1716
|
//# sourceMappingURL=index.js.map
|