@dsebastien/music-notation 0.11.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.
@@ -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;
@@ -37,6 +37,16 @@
37
37
  height: auto;
38
38
  }
39
39
 
40
+ /* Touch screens (#73): chord diagrams and fretboards a third larger, so each string's lane (the
41
+ hit area of its marks across, 18 and 20 units) is at least 24 px, the minimum target size of
42
+ WCAG 2.5.8. max-width still keeps them inside the page. */
43
+ @media (pointer: coarse) {
44
+ .mn-svg.mn-guitar-chord,
45
+ .mn-svg.mn-fretboard {
46
+ zoom: 1.34;
47
+ }
48
+ }
49
+
40
50
  .mn-svg text {
41
51
  fill: var(--mn-fg);
42
52
  font-size: 11px;
@@ -506,6 +516,31 @@
506
516
  stroke: var(--mn-fg);
507
517
  }
508
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
+
509
544
  /* Several diagrams in one block: a row that wraps, or a grid of at most `columns` columns that
510
545
  also wraps on narrow screens rather than shrinking diagrams to nothing. */
511
546
  .mn-block .mn-row {
@@ -852,6 +887,14 @@
852
887
  margin-bottom: 0.3em;
853
888
  }
854
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
+
855
898
  .mn-block .mn-progression-chord {
856
899
  display: flex;
857
900
  flex-direction: column;
@@ -1043,3 +1086,10 @@
1043
1086
  .mn-playable .mn-svg .mn-picking-slot.mn-playing .mn-picking-fret {
1044
1087
  fill: var(--mn-on-playing);
1045
1088
  }
1089
+
1090
+ /* App controls in a timed play bar (#77): after the bar's own, styled like them. */
1091
+ .mn-play .mn-play-app {
1092
+ display: inline-flex;
1093
+ align-items: center;
1094
+ gap: 2px 6px;
1095
+ }