@dsebastien/music-notation 0.12.0 → 0.13.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 +2 -1
- package/dist/chord/fingering-words.d.ts +31 -0
- package/dist/cli.js +1 -1
- package/dist/fretboard/tuning.d.ts +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +517 -29
- package/dist/index.js.map +13 -11
- package/dist/keyboard/piano-chord.d.ts +12 -0
- package/dist/keyboard/scale-fingering.d.ts +9 -0
- package/dist/music-notation.css +33 -0
- package/dist/music-notation.publish.min.js +63 -29
- package/dist/music-notation.tab.min.js +34 -1
- package/dist/publish/index.js +480 -29
- package/dist/publish/index.js.map +13 -11
- package/dist/tab/index.js +16 -1
- package/dist/tab/index.js.map +3 -3
- package/dist/theory/harmonize.d.ts +57 -0
- package/package.json +1 -1
|
@@ -60,6 +60,18 @@ export declare function pianoVoicing(symbol: string, options?: PianoVoicingOptio
|
|
|
60
60
|
* else.
|
|
61
61
|
*/
|
|
62
62
|
export declare function triadFingering(voicing: PianoVoicing): Map<number, string> | null;
|
|
63
|
+
/**
|
|
64
|
+
* Fingers for a rootless or shell voicing (`fingering: auto`), by its spacing as spacedFingers
|
|
65
|
+
* gives them. Without `hands`, the hand that plays it where it sits: the left hand below middle C
|
|
66
|
+
* (the comping register: Dm7 rootless A F3 A3 C4 E4 is 5 3 2 1), else the right (1 2 3 5). With
|
|
67
|
+
* both hands, the left hand's root gets 5 and the right hand its notes (two notes: 1 and 5, 4, 3
|
|
68
|
+
* or 2 by their span). Null for a hand that would span more than an octave (a shell R-7, C B E).
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* The hand `fingering: auto` gives a rootless or shell voicing without `hands` (#53 captions):
|
|
72
|
+
* the left below middle C, else the right. Null for other voicings, or when `hands` names them.
|
|
73
|
+
*/
|
|
74
|
+
export declare function autoVoicingHand(voicing: PianoVoicing): 'left' | 'right' | null;
|
|
63
75
|
/** Piano voicing of a chord as a note set: close root position from octave 4, a slash chord's bass in octave 3. */
|
|
64
76
|
export declare function pianoPitches(symbol: string, options?: PianoVoicingOptions): NoteSet;
|
|
65
77
|
/**
|
|
@@ -38,4 +38,13 @@ export declare function parseFingerList(text: string): string[];
|
|
|
38
38
|
* `fingering: auto` and its hands: "auto", "auto left", "left hand", "right"… The hand, or null
|
|
39
39
|
* when the value is a list of fingers.
|
|
40
40
|
*/
|
|
41
|
+
/**
|
|
42
|
+
* True for a fingering asking for both hands' standard fingering (#49): `auto both`, `both`,
|
|
43
|
+
* `both hands`, `auto (both hands)`. A keyboard block with it draws two keyboards.
|
|
44
|
+
*/
|
|
45
|
+
export declare function isBothHandsFingering(text: string): boolean;
|
|
46
|
+
/** The message for `fingering: auto` on something other than a scale. */
|
|
47
|
+
export declare const AUTO_FINGERING_NEEDS_SCALE = "fingering: auto goes with a major or minor scale (scale: G major): write one finger per note, e.g. fingering: 1 2 3 4 5";
|
|
48
|
+
/** The message for `fingering: auto` on a scale without a standard fingering. */
|
|
49
|
+
export declare const autoFingeringUnknown: (scale: string) => string;
|
|
41
50
|
export declare function autoFingeringHand(text: string): ScaleHand | null;
|
package/dist/music-notation.css
CHANGED
|
@@ -516,6 +516,31 @@
|
|
|
516
516
|
stroke: var(--mn-fg);
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
+
/* Fingering in words (#53): a short paragraph under the diagram, at most a little wider than a
|
|
520
|
+
chord diagram, so a row of captioned chords stays a row. */
|
|
521
|
+
.mn-block .mn-captioned {
|
|
522
|
+
display: flex;
|
|
523
|
+
flex-direction: column;
|
|
524
|
+
/* The diagram centered over its words, which can be wider than a chord diagram. */
|
|
525
|
+
align-items: center;
|
|
526
|
+
gap: 0.35em;
|
|
527
|
+
margin: 0;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.mn-block .mn-fingering[hidden] {
|
|
531
|
+
display: none;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.mn-block .mn-fingering {
|
|
535
|
+
max-width: 16em;
|
|
536
|
+
margin: 0;
|
|
537
|
+
font-size: 0.85em;
|
|
538
|
+
line-height: 1.4;
|
|
539
|
+
/* Obsidian's muted text; elsewhere the page's own text color, readable on any background
|
|
540
|
+
(the grey fallback of --mn-muted is too light for small text on white). */
|
|
541
|
+
color: var(--text-muted, currentColor);
|
|
542
|
+
}
|
|
543
|
+
|
|
519
544
|
/* Several diagrams in one block: a row that wraps, or a grid of at most `columns` columns that
|
|
520
545
|
also wraps on narrow screens rather than shrinking diagrams to nothing. */
|
|
521
546
|
.mn-block .mn-row {
|
|
@@ -862,6 +887,14 @@
|
|
|
862
887
|
margin-bottom: 0.3em;
|
|
863
888
|
}
|
|
864
889
|
|
|
890
|
+
/* Degrees a harmonized scale leaves out (#43). */
|
|
891
|
+
.mn-progression-note {
|
|
892
|
+
color: var(--mn-muted);
|
|
893
|
+
font-size: 0.8em;
|
|
894
|
+
font-style: italic;
|
|
895
|
+
margin-bottom: 0.3em;
|
|
896
|
+
}
|
|
897
|
+
|
|
865
898
|
.mn-block .mn-progression-chord {
|
|
866
899
|
display: flex;
|
|
867
900
|
flex-direction: column;
|