@sudobility/music_types 0.13.25 → 0.13.27

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.
Files changed (166) hide show
  1. package/CLAUDE.md +33 -3
  2. package/dist/domain/documents/document-state.d.ts +17 -0
  3. package/dist/domain/documents/document-state.d.ts.map +1 -0
  4. package/dist/domain/documents/document-state.js +6 -0
  5. package/dist/domain/documents/document-state.js.map +1 -0
  6. package/dist/domain/documents/export-formats.d.ts +74 -0
  7. package/dist/domain/documents/export-formats.d.ts.map +1 -0
  8. package/dist/domain/documents/export-formats.js +53 -0
  9. package/dist/domain/documents/export-formats.js.map +1 -0
  10. package/dist/domain/documents/formats.d.ts +17 -0
  11. package/dist/domain/documents/formats.d.ts.map +1 -0
  12. package/dist/domain/documents/formats.js +61 -0
  13. package/dist/domain/documents/formats.js.map +1 -0
  14. package/dist/domain/documents/project-file.d.ts +33 -0
  15. package/dist/domain/documents/project-file.d.ts.map +1 -0
  16. package/dist/domain/documents/project-file.js +14 -0
  17. package/dist/domain/documents/project-file.js.map +1 -0
  18. package/dist/domain/documents/publish.d.ts +6 -0
  19. package/dist/domain/documents/publish.d.ts.map +1 -0
  20. package/dist/domain/documents/publish.js +2 -0
  21. package/dist/domain/documents/publish.js.map +1 -0
  22. package/dist/domain/documents/templates.d.ts +21 -0
  23. package/dist/domain/documents/templates.d.ts.map +1 -0
  24. package/dist/domain/documents/templates.js +22 -0
  25. package/dist/domain/documents/templates.js.map +1 -0
  26. package/dist/domain/editor/app-errors.d.ts +16 -0
  27. package/dist/domain/editor/app-errors.d.ts.map +1 -0
  28. package/dist/domain/editor/app-errors.js +8 -0
  29. package/dist/domain/editor/app-errors.js.map +1 -0
  30. package/dist/domain/editor/context-menu.d.ts +74 -0
  31. package/dist/domain/editor/context-menu.d.ts.map +1 -0
  32. package/dist/domain/editor/context-menu.js +19 -0
  33. package/dist/domain/editor/context-menu.js.map +1 -0
  34. package/dist/domain/editor/device-prefs.d.ts +107 -0
  35. package/dist/domain/editor/device-prefs.d.ts.map +1 -0
  36. package/dist/domain/editor/device-prefs.js +66 -0
  37. package/dist/domain/editor/device-prefs.js.map +1 -0
  38. package/dist/domain/editor/docs.d.ts +56 -0
  39. package/dist/domain/editor/docs.d.ts.map +1 -0
  40. package/dist/domain/editor/docs.js +41 -0
  41. package/dist/domain/editor/docs.js.map +1 -0
  42. package/dist/domain/editor/edit-mode.d.ts +31 -0
  43. package/dist/domain/editor/edit-mode.d.ts.map +1 -0
  44. package/dist/domain/editor/edit-mode.js +40 -0
  45. package/dist/domain/editor/edit-mode.js.map +1 -0
  46. package/dist/domain/editor/editing-copy.d.ts +91 -0
  47. package/dist/domain/editor/editing-copy.d.ts.map +1 -0
  48. package/dist/domain/editor/editing-copy.js +88 -0
  49. package/dist/domain/editor/editing-copy.js.map +1 -0
  50. package/dist/domain/editor/inspector.d.ts +45 -0
  51. package/dist/domain/editor/inspector.d.ts.map +1 -0
  52. package/dist/domain/editor/inspector.js +34 -0
  53. package/dist/domain/editor/inspector.js.map +1 -0
  54. package/dist/domain/editor/labelled-option.d.ts +6 -0
  55. package/dist/domain/editor/labelled-option.d.ts.map +1 -0
  56. package/dist/domain/editor/labelled-option.js +2 -0
  57. package/dist/domain/editor/labelled-option.js.map +1 -0
  58. package/dist/domain/editor/library-copy.d.ts +61 -0
  59. package/dist/domain/editor/library-copy.d.ts.map +1 -0
  60. package/dist/domain/editor/library-copy.js +2 -0
  61. package/dist/domain/editor/library-copy.js.map +1 -0
  62. package/dist/domain/editor/print.d.ts +30 -0
  63. package/dist/domain/editor/print.d.ts.map +1 -0
  64. package/dist/domain/editor/print.js +43 -0
  65. package/dist/domain/editor/print.js.map +1 -0
  66. package/dist/domain/editor/score-input.d.ts +158 -0
  67. package/dist/domain/editor/score-input.d.ts.map +1 -0
  68. package/dist/domain/editor/score-input.js +2 -0
  69. package/dist/domain/editor/score-input.js.map +1 -0
  70. package/dist/domain/editor/toast.d.ts +32 -0
  71. package/dist/domain/editor/toast.d.ts.map +1 -0
  72. package/dist/domain/editor/toast.js +5 -0
  73. package/dist/domain/editor/toast.js.map +1 -0
  74. package/dist/domain/editor/toolbar.d.ts +62 -0
  75. package/dist/domain/editor/toolbar.d.ts.map +1 -0
  76. package/dist/domain/editor/toolbar.js +83 -0
  77. package/dist/domain/editor/toolbar.js.map +1 -0
  78. package/dist/domain/editor/view-settings.d.ts +22 -0
  79. package/dist/domain/editor/view-settings.d.ts.map +1 -0
  80. package/dist/domain/editor/view-settings.js +30 -0
  81. package/dist/domain/editor/view-settings.js.map +1 -0
  82. package/dist/domain/generation/replace-drafts.d.ts +78 -0
  83. package/dist/domain/generation/replace-drafts.d.ts.map +1 -0
  84. package/dist/domain/generation/replace-drafts.js +40 -0
  85. package/dist/domain/generation/replace-drafts.js.map +1 -0
  86. package/dist/domain/generation/request-drafts.d.ts +226 -0
  87. package/dist/domain/generation/request-drafts.d.ts.map +1 -0
  88. package/dist/domain/generation/request-drafts.js +52 -0
  89. package/dist/domain/generation/request-drafts.js.map +1 -0
  90. package/dist/domain/instruments/gm-catalogue.d.ts +27 -3
  91. package/dist/domain/instruments/gm-catalogue.d.ts.map +1 -1
  92. package/dist/domain/instruments/gm-catalogue.js +4 -3
  93. package/dist/domain/instruments/gm-catalogue.js.map +1 -1
  94. package/dist/domain/instruments/gm-polyphony.d.ts +25 -2
  95. package/dist/domain/instruments/gm-polyphony.d.ts.map +1 -1
  96. package/dist/domain/instruments/gm-polyphony.js +9 -3
  97. package/dist/domain/instruments/gm-polyphony.js.map +1 -1
  98. package/dist/domain/instruments/gm-range.d.ts +10 -6
  99. package/dist/domain/instruments/gm-range.d.ts.map +1 -1
  100. package/dist/domain/instruments/gm-range.js +18 -3
  101. package/dist/domain/instruments/gm-range.js.map +1 -1
  102. package/dist/domain/instruments/out-of-range.d.ts +70 -0
  103. package/dist/domain/instruments/out-of-range.d.ts.map +1 -0
  104. package/dist/domain/instruments/out-of-range.js +106 -0
  105. package/dist/domain/instruments/out-of-range.js.map +1 -0
  106. package/dist/domain/instruments/track-instrument.d.ts +23 -0
  107. package/dist/domain/instruments/track-instrument.d.ts.map +1 -1
  108. package/dist/domain/instruments/track-instrument.js +26 -0
  109. package/dist/domain/instruments/track-instrument.js.map +1 -1
  110. package/dist/domain/notation/music-vocabulary.d.ts +17 -0
  111. package/dist/domain/notation/music-vocabulary.d.ts.map +1 -1
  112. package/dist/domain/notation/music-vocabulary.js +25 -1
  113. package/dist/domain/notation/music-vocabulary.js.map +1 -1
  114. package/dist/domain/notation/picker-options.d.ts +42 -2
  115. package/dist/domain/notation/picker-options.d.ts.map +1 -1
  116. package/dist/domain/notation/picker-options.js +41 -2
  117. package/dist/domain/notation/picker-options.js.map +1 -1
  118. package/dist/domain/notation/toolbar-icons.d.ts +1 -16
  119. package/dist/domain/notation/toolbar-icons.d.ts.map +1 -1
  120. package/dist/domain/notation/toolbar-icons.js +0 -29
  121. package/dist/domain/notation/toolbar-icons.js.map +1 -1
  122. package/dist/domain/score/transport-settings.d.ts +29 -0
  123. package/dist/domain/score/transport-settings.d.ts.map +1 -0
  124. package/dist/domain/score/transport-settings.js +2 -0
  125. package/dist/domain/score/transport-settings.js.map +1 -0
  126. package/dist/formats/audio-import.d.ts +15 -0
  127. package/dist/formats/audio-import.d.ts.map +1 -0
  128. package/dist/formats/audio-import.js +26 -0
  129. package/dist/formats/audio-import.js.map +1 -0
  130. package/dist/formats/index.d.ts +10 -0
  131. package/dist/formats/index.d.ts.map +1 -1
  132. package/dist/formats/index.js +10 -0
  133. package/dist/formats/index.js.map +1 -1
  134. package/dist/formats/midi-import.d.ts +128 -0
  135. package/dist/formats/midi-import.d.ts.map +1 -0
  136. package/dist/formats/midi-import.js +2 -0
  137. package/dist/formats/midi-import.js.map +1 -0
  138. package/dist/formats/musicxml.d.ts +44 -0
  139. package/dist/formats/musicxml.d.ts.map +1 -0
  140. package/dist/formats/musicxml.js +2 -0
  141. package/dist/formats/musicxml.js.map +1 -0
  142. package/dist/formats/tracker-export.d.ts +55 -0
  143. package/dist/formats/tracker-export.d.ts.map +1 -0
  144. package/dist/formats/tracker-export.js +18 -0
  145. package/dist/formats/tracker-export.js.map +1 -0
  146. package/dist/index.d.ts +24 -1
  147. package/dist/index.d.ts.map +1 -1
  148. package/dist/index.js +30 -1
  149. package/dist/index.js.map +1 -1
  150. package/dist/platform/index.d.ts +2 -0
  151. package/dist/platform/index.d.ts.map +1 -1
  152. package/dist/platform/index.js +2 -0
  153. package/dist/platform/index.js.map +1 -1
  154. package/dist/platform/score-files.d.ts +36 -0
  155. package/dist/platform/score-files.d.ts.map +1 -0
  156. package/dist/platform/score-files.js +2 -0
  157. package/dist/platform/score-files.js.map +1 -0
  158. package/dist/platform/storage.d.ts +19 -0
  159. package/dist/platform/storage.d.ts.map +1 -0
  160. package/dist/platform/storage.js +10 -0
  161. package/dist/platform/storage.js.map +1 -0
  162. package/package.json +1 -1
  163. package/dist/domain/generation/credits.d.ts +0 -13
  164. package/dist/domain/generation/credits.d.ts.map +0 -1
  165. package/dist/domain/generation/credits.js +0 -17
  166. package/dist/domain/generation/credits.js.map +0 -1
@@ -1,5 +1,28 @@
1
- /** No physical limit: keyboards, plucked strings, sections, synths, drums. */
2
- export declare const UNLIMITED_POLYPHONY: number;
1
+ /**
2
+ * How many notes a General MIDI program can sound at once.
3
+ *
4
+ * General MIDI says nothing about this, so the numbers are ours. They are
5
+ * physical facts about the instruments rather than preferences: a trumpet
6
+ * player has one airstream, a guitar has six strings, a banjo five, a violinist
7
+ * can bow two at once (and briefly break three).
8
+ *
9
+ * They live in `gm-catalogue.ts`, one row per program, alongside that
10
+ * program's range and transposition — see that module for why a family default
11
+ * plus overrides turned out to be the wrong shape for this.
12
+ *
13
+ * This exists so the editor can refuse to write a chord nobody could play. It
14
+ * deliberately does NOT describe what a synthesizer patch can do — polyphony
15
+ * there is a setting, not a limit — so every synth family is unlimited.
16
+ */
17
+ import { UNLIMITED_POLYPHONY } from "./gm-catalogue.js";
18
+ /**
19
+ * `UNLIMITED_POLYPHONY` is declared in `gm-catalogue.ts` and re-exported here,
20
+ * so `./gm-polyphony.js` stays the module it is imported from. It was declared
21
+ * here, and the catalogue's rows read it while building — a cycle that threw
22
+ * `Cannot access 'UNLIMITED_POLYPHONY' before initialization` on any runtime
23
+ * that reached this module first.
24
+ */
25
+ export { UNLIMITED_POLYPHONY };
3
26
  /**
4
27
  * The most notes `program` can sound simultaneously.
5
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"gm-polyphony.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/gm-polyphony.ts"],"names":[],"mappings":"AAkBA,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,QAA2B,CAAC;AAE5D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvE"}
1
+ {"version":3,"file":"gm-polyphony.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/gm-polyphony.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAU,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;GAMG;AACH,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvE"}
@@ -14,9 +14,15 @@
14
14
  * deliberately does NOT describe what a synthesizer patch can do — polyphony
15
15
  * there is a setting, not a limit — so every synth family is unlimited.
16
16
  */
17
- import { gmSpec } from "./gm-catalogue.js";
18
- /** No physical limit: keyboards, plucked strings, sections, synths, drums. */
19
- export const UNLIMITED_POLYPHONY = Number.POSITIVE_INFINITY;
17
+ import { gmSpec, UNLIMITED_POLYPHONY } from "./gm-catalogue.js";
18
+ /**
19
+ * `UNLIMITED_POLYPHONY` is declared in `gm-catalogue.ts` and re-exported here,
20
+ * so `./gm-polyphony.js` stays the module it is imported from. It was declared
21
+ * here, and the catalogue's rows read it while building — a cycle that threw
22
+ * `Cannot access 'UNLIMITED_POLYPHONY' before initialization` on any runtime
23
+ * that reached this module first.
24
+ */
25
+ export { UNLIMITED_POLYPHONY };
20
26
  /**
21
27
  * The most notes `program` can sound simultaneously.
22
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"gm-polyphony.js","sourceRoot":"","sources":["../../../src/domain/instruments/gm-polyphony.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,YAAY,IAAI,mBAAmB,CAAC;AAC9D,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,KAAa;IAC5D,OAAO,KAAK,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"gm-polyphony.js","sourceRoot":"","sources":["../../../src/domain/instruments/gm-polyphony.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;GAMG;AACH,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,YAAY,IAAI,mBAAmB,CAAC;AAC9D,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,KAAa;IAC5D,OAAO,KAAK,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC"}
@@ -6,12 +6,16 @@
6
6
  * programs inherited a compass nobody had chosen for them — see that module's
7
7
  * doc for what that hid.
8
8
  */
9
- export type MidiRange = {
10
- min: number;
11
- max: number;
12
- };
13
- /** A0 to C8 the 88-key piano, and the widest range anything here returns. */
14
- export declare const FULL_KEYBOARD: MidiRange;
9
+ import { FULL_KEYBOARD, type MidiRange } from "./gm-catalogue.js";
10
+ /**
11
+ * `MidiRange` and `FULL_KEYBOARD` are declared in `gm-catalogue.ts` and
12
+ * re-exported here, so `./gm-range.js` stays the module they are imported from.
13
+ * They were declared here, and the rows over there read `FULL_KEYBOARD` while
14
+ * building a cycle that threw a TDZ `ReferenceError` on whichever of the two
15
+ * a runtime happened to enter first. Declaring them beside the table they
16
+ * describe is what points the arrows one way.
17
+ */
18
+ export { FULL_KEYBOARD, type MidiRange };
15
19
  /**
16
20
  * The practical range for `program`, or the full keyboard for an unknown one —
17
21
  * benefit of the doubt rather than edits blocked against a guess.
@@ -1 +1 @@
1
- {"version":3,"file":"gm-range.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/gm-range.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,+EAA+E;AAC/E,eAAO,MAAM,aAAa,EAAE,SAAiC,CAAC;AAI9D;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAE5D"}
1
+ {"version":3,"file":"gm-range.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/gm-range.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAU,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE1E;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAE5D"}
@@ -1,6 +1,21 @@
1
- /** A0 to C8 — the 88-key piano, and the widest range anything here returns. */
2
- export const FULL_KEYBOARD = { min: 21, max: 108 };
3
- import { gmSpec } from "./gm-catalogue.js";
1
+ /**
2
+ * An instrument's compass.
3
+ *
4
+ * The numbers themselves live in `gm-catalogue.ts`, one row per program. They
5
+ * used to live here as a family default plus 38 overrides, which meant 90
6
+ * programs inherited a compass nobody had chosen for them — see that module's
7
+ * doc for what that hid.
8
+ */
9
+ import { FULL_KEYBOARD, gmSpec } from "./gm-catalogue.js";
10
+ /**
11
+ * `MidiRange` and `FULL_KEYBOARD` are declared in `gm-catalogue.ts` and
12
+ * re-exported here, so `./gm-range.js` stays the module they are imported from.
13
+ * They were declared here, and the rows over there read `FULL_KEYBOARD` while
14
+ * building — a cycle that threw a TDZ `ReferenceError` on whichever of the two
15
+ * a runtime happened to enter first. Declaring them beside the table they
16
+ * describe is what points the arrows one way.
17
+ */
18
+ export { FULL_KEYBOARD };
4
19
  /**
5
20
  * The practical range for `program`, or the full keyboard for an unknown one —
6
21
  * benefit of the doubt rather than edits blocked against a guess.
@@ -1 +1 @@
1
- {"version":3,"file":"gm-range.js","sourceRoot":"","sources":["../../../src/domain/instruments/gm-range.ts"],"names":[],"mappings":"AAUA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,aAAa,GAAc,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,aAAa,CAAC;AACjD,CAAC"}
1
+ {"version":3,"file":"gm-range.js","sourceRoot":"","sources":["../../../src/domain/instruments/gm-range.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAE1E;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAkB,CAAC;AAEzC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,aAAa,CAAC;AACjD,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Notes an instrument cannot play, found in a score that already holds them.
3
+ *
4
+ * Here, beside `trackRangeIsBinding`, because two apps draw this score and its
5
+ * inspector, and "which notes are out of range, and why" having two answers is
6
+ * how the native app came to light nothing at all during playback. It is a pure
7
+ * question about the model — no geometry and no colour — so it belongs with the
8
+ * compass it reads rather than with the renderer that colours the answer.
9
+ *
10
+ * The compass lives in one place — `gm-catalogue.ts`, reached through
11
+ * `trackKeyboardRange` — and three of the four surfaces that care already read
12
+ * it: the keyboard shows exactly that span, generation now states it in the
13
+ * prompt, and `inspect.ts` judges a generated part against it. The notation is
14
+ * the exception, by design: it draws what the score holds, because a score is
15
+ * not only ever a generated one.
16
+ *
17
+ * That is the disagreement a reader actually meets. A timpani part written a
18
+ * fifth below its lowest drum draws perfectly well on the stave and cannot
19
+ * light a single key on the keyboard — measured on one project, 482 of 1,067
20
+ * notes. Nothing here rewrites those notes: they are marked, and moving them
21
+ * by an octave is a musical decision that belongs to the person reading, not
22
+ * to a scan.
23
+ *
24
+ * Gated on `trackRangeIsBinding`, the same condition the server applies, so the
25
+ * page and the server cannot disagree about what counts as out of range. A
26
+ * compass nobody verified marks nothing.
27
+ *
28
+ * ## Sounding pitch, and so the STORED score
29
+ *
30
+ * Every number in `gm-catalogue.ts` is sounding pitch, and `midiIsInRange` is
31
+ * documented as taking one. The score this package *draws* is not: the app
32
+ * hands `render` a `displayScore(score, pitchDisplay)`, which in written mode
33
+ * has moved a B-flat clarinet up a tone and, in every mode, has moved an
34
+ * `8va`'s noteheads down an octave. Scanning that would place a clarinet's
35
+ * whole part a tone above where it sounds and mark the top of it wrongly.
36
+ *
37
+ * So this takes the **stored** score — the one the app holds, before the
38
+ * lenses — and the result stays correct in either display mode because it is
39
+ * expressed as event **ids**, which both lenses preserve: `transposeEvents`
40
+ * and `ottavaScore` spread `...event` and replace only `pitch`. The renderer
41
+ * colours by id, so "which notes" survives a transposition that changes what
42
+ * those notes look like. `out-of-range.test.ts` pins that with a clarinet.
43
+ */
44
+ import { type Score } from "../../model/score.js";
45
+ import type { MidiRange } from "./gm-range.js";
46
+ export type OutOfRangeTrack = {
47
+ trackId: string;
48
+ name: string;
49
+ /** What the instrument can play. */
50
+ compass: MidiRange;
51
+ /** How many notes fall outside it. */
52
+ count: number;
53
+ /** The distinct pitches that do, lowest first. */
54
+ midis: number[];
55
+ };
56
+ export type OutOfRangeScan = {
57
+ /** Every offending note id, for the notation's colours. */
58
+ ids: string[];
59
+ /** One entry per track that has any, for the inspector's sentence. */
60
+ byTrack: OutOfRangeTrack[];
61
+ };
62
+ /**
63
+ * Every note `score` holds that its own instrument cannot play.
64
+ *
65
+ * `score` is the **stored** score — sounding pitch, before `displayScore`. Do
66
+ * not pass the score handed to `render`; see this module's doc for why, and
67
+ * why the ids come back usable in either display mode anyway.
68
+ */
69
+ export declare function outOfRangeNoteIds(score: Score | null): OutOfRangeScan;
70
+ //# sourceMappingURL=out-of-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"out-of-range.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/out-of-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,OAAO,EAAE,SAAS,CAAC;IACnB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,2DAA2D;IAC3D,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,sEAAsE;IACtE,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B,CAAC;AAIF;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,cAAc,CAiDrE"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Notes an instrument cannot play, found in a score that already holds them.
3
+ *
4
+ * Here, beside `trackRangeIsBinding`, because two apps draw this score and its
5
+ * inspector, and "which notes are out of range, and why" having two answers is
6
+ * how the native app came to light nothing at all during playback. It is a pure
7
+ * question about the model — no geometry and no colour — so it belongs with the
8
+ * compass it reads rather than with the renderer that colours the answer.
9
+ *
10
+ * The compass lives in one place — `gm-catalogue.ts`, reached through
11
+ * `trackKeyboardRange` — and three of the four surfaces that care already read
12
+ * it: the keyboard shows exactly that span, generation now states it in the
13
+ * prompt, and `inspect.ts` judges a generated part against it. The notation is
14
+ * the exception, by design: it draws what the score holds, because a score is
15
+ * not only ever a generated one.
16
+ *
17
+ * That is the disagreement a reader actually meets. A timpani part written a
18
+ * fifth below its lowest drum draws perfectly well on the stave and cannot
19
+ * light a single key on the keyboard — measured on one project, 482 of 1,067
20
+ * notes. Nothing here rewrites those notes: they are marked, and moving them
21
+ * by an octave is a musical decision that belongs to the person reading, not
22
+ * to a scan.
23
+ *
24
+ * Gated on `trackRangeIsBinding`, the same condition the server applies, so the
25
+ * page and the server cannot disagree about what counts as out of range. A
26
+ * compass nobody verified marks nothing.
27
+ *
28
+ * ## Sounding pitch, and so the STORED score
29
+ *
30
+ * Every number in `gm-catalogue.ts` is sounding pitch, and `midiIsInRange` is
31
+ * documented as taking one. The score this package *draws* is not: the app
32
+ * hands `render` a `displayScore(score, pitchDisplay)`, which in written mode
33
+ * has moved a B-flat clarinet up a tone and, in every mode, has moved an
34
+ * `8va`'s noteheads down an octave. Scanning that would place a clarinet's
35
+ * whole part a tone above where it sounds and mark the top of it wrongly.
36
+ *
37
+ * So this takes the **stored** score — the one the app holds, before the
38
+ * lenses — and the result stays correct in either display mode because it is
39
+ * expressed as event **ids**, which both lenses preserve: `transposeEvents`
40
+ * and `ottavaScore` spread `...event` and replace only `pitch`. The renderer
41
+ * colours by id, so "which notes" survives a transposition that changes what
42
+ * those notes look like. `out-of-range.test.ts` pins that with a clarinet.
43
+ */
44
+ import { isNoteEvent } from "../../model/score.js";
45
+ import { pitchToMidi } from "../pitch/pitch.js";
46
+ import { midiIsInRange, trackRangeIsBinding } from "./range-fit.js";
47
+ import { isPercussionTrack, trackKeyboardRange } from "./track-instrument.js";
48
+ const EMPTY = { ids: [], byTrack: [] };
49
+ /**
50
+ * Every note `score` holds that its own instrument cannot play.
51
+ *
52
+ * `score` is the **stored** score — sounding pitch, before `displayScore`. Do
53
+ * not pass the score handed to `render`; see this module's doc for why, and
54
+ * why the ids come back usable in either display mode anyway.
55
+ */
56
+ export function outOfRangeNoteIds(score) {
57
+ if (!score)
58
+ return EMPTY;
59
+ const ids = [];
60
+ const byTrack = [];
61
+ for (const track of score.tracks) {
62
+ /*
63
+ * A drum pitch names a drum rather than a place in a compass, so this test
64
+ * comes FIRST and is not folded into the gate below it.
65
+ *
66
+ * `trackRangeIsBinding` answers **true** for percussion on purpose — a kit
67
+ * has the pieces it has, which is the right answer for note entry and for
68
+ * generation, where refusing an address no drum sits at is a service. It is
69
+ * the wrong answer here: `percussion.ts` already handles a drum outside
70
+ * `GM_PERCUSSION_RANGE` by parking it on the middle line as `UNMAPPED`, and
71
+ * colouring it as well would be two marks for one fact.
72
+ */
73
+ if (isPercussionTrack(track))
74
+ continue;
75
+ if (!trackRangeIsBinding(track))
76
+ continue;
77
+ const compass = trackKeyboardRange(track);
78
+ const midis = new Set();
79
+ let count = 0;
80
+ for (const measure of track.measures) {
81
+ for (const voice of measure.voices) {
82
+ for (const event of voice.events) {
83
+ if (!isNoteEvent(event))
84
+ continue;
85
+ const midi = pitchToMidi(event.pitch);
86
+ if (midiIsInRange(midi, compass))
87
+ continue;
88
+ ids.push(event.id);
89
+ midis.add(midi);
90
+ count += 1;
91
+ }
92
+ }
93
+ }
94
+ if (count > 0) {
95
+ byTrack.push({
96
+ trackId: track.id,
97
+ name: track.name,
98
+ compass,
99
+ count,
100
+ midis: [...midis].sort((a, b) => a - b),
101
+ });
102
+ }
103
+ }
104
+ return ids.length > 0 ? { ids, byTrack } : EMPTY;
105
+ }
106
+ //# sourceMappingURL=out-of-range.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"out-of-range.js","sourceRoot":"","sources":["../../../src/domain/instruments/out-of-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,WAAW,EAAc,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAoB9E,MAAM,KAAK,GAAmB,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAmB;IACnD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,GAAG,GAAa,EA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,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC"}
@@ -24,6 +24,29 @@ import { type MidiRange } from "./gm-range.js";
24
24
  import type { InstrumentIconArt } from "./icon-art.js";
25
25
  /** Whether `track`'s `midiProgram` addresses a drum kit rather than an instrument. */
26
26
  export declare function isPercussionTrack(track: Pick<Track, "clef">): boolean;
27
+ /**
28
+ * What pressing a key on `track`'s keyboard should sound: a program, and
29
+ * whether it goes to the drum channel.
30
+ *
31
+ * Both keyboards built this inline — `track?.midiProgram ?? 0` beside
32
+ * `track?.clef === 'percussion'` — and both halves are needed, because on a
33
+ * percussion track `midiProgram` names a kit: program 40 is Brush there and
34
+ * Violin anywhere else, and only the flag tells a player which. Two call sites
35
+ * spelling the same pair agree right up until one of them learns a rule the
36
+ * other has not. A percussion address GM defines no kit at is resolved to the
37
+ * kit whose region contains it (`gmKitAt`), which is what playback does, so a
38
+ * key and the part it belongs to cannot sound like different kits.
39
+ *
40
+ * No track — an empty score, or a keyboard shown before a part is chosen —
41
+ * auditions a piano, program 0, which is what both keyboards fell back to.
42
+ * The instrument's *name* is deliberately not here: the player resolves that
43
+ * from the program itself, and a name read off the track would be the one
44
+ * field free to disagree with it.
45
+ */
46
+ export declare function auditionVoiceFor(track: Pick<Track, "clef" | "midiProgram"> | null | undefined): {
47
+ program: number;
48
+ isPercussion: boolean;
49
+ };
27
50
  /**
28
51
  * The notes worth showing for `track` — General MIDI's drum range on a
29
52
  * percussion track, the instrument's compass otherwise.
@@ -1 +1 @@
1
- {"version":3,"file":"track-instrument.d.ts","sourceRoot":"","sources":["../../../src/domain/instruments/track-instrument.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EACV,yBAAyB,EACzB,KAAK,EACL,KAAK,EACN,MAAM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gB,oBAAoB,CAClC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC,GACzC,MAAM,CAGR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAezD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,KAAK,GACX,yBAAyB,CAgB3B"}
@@ -9,6 +9,32 @@ import { gmInstrument } from "./gm.js";
9
9
  export function isPercussionTrack(track) {
10
10
  return track.clef === "percussion";
11
11
  }
12
+ /**
13
+ * What pressing a key on `track`'s keyboard should sound: a program, and
14
+ * whether it goes to the drum channel.
15
+ *
16
+ * Both keyboards built this inline — `track?.midiProgram ?? 0` beside
17
+ * `track?.clef === 'percussion'` — and both halves are needed, because on a
18
+ * percussion track `midiProgram` names a kit: program 40 is Brush there and
19
+ * Violin anywhere else, and only the flag tells a player which. Two call sites
20
+ * spelling the same pair agree right up until one of them learns a rule the
21
+ * other has not. A percussion address GM defines no kit at is resolved to the
22
+ * kit whose region contains it (`gmKitAt`), which is what playback does, so a
23
+ * key and the part it belongs to cannot sound like different kits.
24
+ *
25
+ * No track — an empty score, or a keyboard shown before a part is chosen —
26
+ * auditions a piano, program 0, which is what both keyboards fell back to.
27
+ * The instrument's *name* is deliberately not here: the player resolves that
28
+ * from the program itself, and a name read off the track would be the one
29
+ * field free to disagree with it.
30
+ */
31
+ export function auditionVoiceFor(track) {
32
+ if (!track)
33
+ return { program: 0, isPercussion: false };
34
+ if (isPercussionTrack(track))
35
+ return { program: gmKitAt(track.midiProgram).program, isPercussion: true };
36
+ return { program: track.midiProgram, isPercussion: false };
37
+ }
12
38
  /**
13
39
  * The notes worth showing for `track` — General MIDI's drum range on a
14
40
  * percussion track, the instrument's compass otherwise.
@@ -1 +1 @@
1
- {"version":3,"file":"track-instrument.js","sourceRoot":"","sources":["../../../src/domain/instruments/track-instr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H,MAAM,UAAU,0BAA0B,CACxC,KAAY;IAEZ,MAAM,SAAS,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC3C,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,qEAAqE;QACrE,uEAAuE;QACvE,uEAAuE;QACvE,kEAAkE;QAClE,WAAW;QACX,cAAc,EAAE,oBAAoB,CAAC,KAAK,CAAC;QAC3C,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,2EAA2E;QAC3E,8DAA8D;QAC9D,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACvE,CAAC;AACJ,CAAC"}
@@ -96,6 +96,23 @@ export declare function formatBarBeat(at: BarBeat | null): string;
96
96
  * "beat 9" in 4/4 means the end of the bar rather than an error.
97
97
  */
98
98
  export declare function tickForBarBeat(score: Score, bar: number, beat: number): number | null;
99
+ /**
100
+ * What a bar/beat field should commit when it is left: a tick, or `null` for
101
+ * "nothing to do".
102
+ *
103
+ * A position is said in two numbers and typed into two boxes, so every rule
104
+ * about leaving them is about the pair: a cleared box is "no change" and never
105
+ * bar 0 (`Number("")` is 0), a bar the score does not have is nothing to
106
+ * commit, and the tick the note already sits on is not a move. Both inspectors
107
+ * had that sequence written out — two `parseNumericDraft`s, `tickForBarBeat`,
108
+ * and the same "unchanged?" comparison — and it is arithmetic about a score
109
+ * rather than about either panel.
110
+ *
111
+ * A beat past the end of its bar is clamped by `tickForBarBeat` rather than
112
+ * refused, which is why this can answer the note's own tick: typing "beat 9" in
113
+ * 4/4 on a note already at the end of the bar commits nothing.
114
+ */
115
+ export declare function barBeatCommitTick(score: Score, barText: string, beatText: string, currentTick: number): number | null;
99
116
  /**
100
117
  * The pitch at a staff position, counted in half-spaces below the top line.
101
118
  *
@@ -1 +1 @@
1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,GAAG,OAAO,GAAG,IAAI,CAE/D;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAGxD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAef;AAuBD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,qBAAqB,EAAE,MAAM,GAC5B,KAAK,CAEP;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM;AACnB;;;;;;;GAOG;AACH,SAAS,SAAI,GACZ,MAAM,CAKR"}
1
+ {"version":3,"file":"music-vocabulary.d.ts","sourceRoot":"","sources":["../../../src/domain/notation/music-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,KAAK,EAEN,MAAM,gBAAgB,CAAC;AAQxB,2EAA2E;AAC3E,eAAO,MAAM,cAAc,EAA6B,YAAY,EAAE,CAAC;AAuBvE,uCAAuC;AACvC,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAExD;AAyCD,sEAAsE;AACtE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK3D;AAED,iFAAiF;AACjF,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AAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,qBAAqB,EAAE,MAAM,GAC5B,KAAK,CAEP;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM;AACnB;;;;;;;GAOG;AACH,SAAS,SAAI,GACZ,MAAM,CAKR"}
@@ -1,7 +1,7 @@
1
1
  import { DURATIONS, beatDurationTicks } from "../time/ticks.js";
2
2
  import { barNumberAt, indexOfBarNumber } from "../score/bar-numbers.js";
3
3
  import { shiftDiatonic } from "../pitch/transpose.js";
4
- import { clampVolume } from "./field-values.js";
4
+ import { clampVolume, parseNumericDraft } from "./field-values.js";
5
5
  // ---- durations -------------------------------------------------------------
6
6
  /** Every duration name, longest first, so a picker reads top to bottom. */
7
7
  export const DURATION_NAMES = Object.keys(DURATIONS);
@@ -177,6 +177,30 @@ export function tickForBarBeat(score, bar, beat) {
177
177
  const offset = Math.max(0, (beat - 1) * beatTicks);
178
178
  return measure.startTick + Math.min(offset, measure.durationTicks - 1);
179
179
  }
180
+ /**
181
+ * What a bar/beat field should commit when it is left: a tick, or `null` for
182
+ * "nothing to do".
183
+ *
184
+ * A position is said in two numbers and typed into two boxes, so every rule
185
+ * about leaving them is about the pair: a cleared box is "no change" and never
186
+ * bar 0 (`Number("")` is 0), a bar the score does not have is nothing to
187
+ * commit, and the tick the note already sits on is not a move. Both inspectors
188
+ * had that sequence written out — two `parseNumericDraft`s, `tickForBarBeat`,
189
+ * and the same "unchanged?" comparison — and it is arithmetic about a score
190
+ * rather than about either panel.
191
+ *
192
+ * A beat past the end of its bar is clamped by `tickForBarBeat` rather than
193
+ * refused, which is why this can answer the note's own tick: typing "beat 9" in
194
+ * 4/4 on a note already at the end of the bar commits nothing.
195
+ */
196
+ export function barBeatCommitTick(score, barText, beatText, currentTick) {
197
+ const bar = parseNumericDraft(barText);
198
+ const beat = parseNumericDraft(beatText);
199
+ if (bar === null || beat === null)
200
+ return null;
201
+ const tick = tickForBarBeat(score, bar, beat);
202
+ return tick === null || tick === currentTick ? null : tick;
203
+ }
180
204
  // ---- staff positions -------------------------------------------------------
181
205
  /**
182
206
  * The pitch printed on each clef's top staff line.
@@ -1 +1 @@
1
- {"version":3,"file":"music-vocabulary.js","sourceRoot":"","sources":["../../../src/domain/notation/music-vocabulary.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,+EAA+E;AAE/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAmB,CAAC;AAEvE,MAAM,eAAe,GAAiC;IACpD,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,MAAM;IACpB,cAAc,EAAE,cAAc;IAC9B,aAAa,EAAE,aAAa;IAC5B,gBAAgB,EAAE,gBAAgB;IAClC,eAAe,EAAE,eAAe;IAChC,kBAAkB,EAAE,aAAa;IACjC,qBAAqB,EAAE,aAAa;IACpC,eAAe,EAAE,eAAe;IAChC,cAAc,EAAE,cAAc;IAC9B,iBAAiB,EAAE,iBAAi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,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC;IACnC,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAC3D,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Accidental, Articulation, BarlineStyle, DurationName, Dynamic, KeySignature, Ornament } from "../../index.js";
1
+ import type { Accidental, Articulation, BarlineStyle, Clef, DurationName, Dynamic, KeySignature, Ornament } from "../../model/score.js";
2
2
  /** "No marking here", distinct from a marking that happens to be quiet. */
3
3
  export declare const NO_MARK = "none";
4
4
  /** An entry in a picker: the value it sets, and the key naming it. */
@@ -25,8 +25,26 @@ export declare const ARTICULATION_OPTIONS: ReadonlyArray<PickerOption<Articulati
25
25
  export declare const ORNAMENT_OPTIONS: ReadonlyArray<PickerOption<Ornament | typeof NO_MARK>>;
26
26
  /** Accidentals, keyed `accidental.<fifths>` — `accidental.-1` is Flat. */
27
27
  export declare const ACCIDENTAL_OPTIONS: ReadonlyArray<PickerOption<Accidental>>;
28
+ /**
29
+ * An entry in the dynamic picker.
30
+ *
31
+ * Only "no dynamic" carries a key. A marking is its own label — `pp` is `pp`
32
+ * in every language, the way a note name or a General MIDI program name is —
33
+ * so both apps print the value itself. The list used to hand every marking a
34
+ * `dynamic.<member>` key regardless, which neither app defined and neither
35
+ * could usefully fill: a translator has nothing to write for `mf`, and a
36
+ * published key nobody answers is a key some future picker prints raw. Leaving
37
+ * it off the type makes "label a marking by its value" something the compiler
38
+ * says rather than something each host has to know.
39
+ */
40
+ export type DynamicOption = {
41
+ value: typeof NO_MARK;
42
+ labelKey: string;
43
+ } | {
44
+ value: Dynamic;
45
+ };
28
46
  /** Dynamics, with "no dynamic" first. A level is not a loudness of zero. */
29
- export declare const DYNAMIC_OPTIONS: ReadonlyArray<PickerOption<Dynamic | typeof NO_MARK>>;
47
+ export declare const DYNAMIC_OPTIONS: ReadonlyArray<DynamicOption>;
30
48
  /**
31
49
  * The grids a MIDI import may be quantized onto, coarsest first.
32
50
  *
@@ -66,4 +84,26 @@ export declare const BARLINE_OPTIONS: ReadonlyArray<PickerOption<BarlineStyle |
66
84
  * which is how a Chinese reader came to choose a mode in English.
67
85
  */
68
86
  export declare const KEY_MODE_OPTIONS: ReadonlyArray<PickerOption<KeySignature["mode"]>>;
87
+ /**
88
+ * The word for each clef.
89
+ *
90
+ * Every clef picker used to print the model's own token — `treble`, `bass` — so
91
+ * a reader chose a clef in lower-case English whatever their language. Both
92
+ * apps then fixed that the same way and each kept its own copy of this table,
93
+ * which is exactly the drift this file exists to prevent: a `Record`, so a
94
+ * sixth clef fails to compile here rather than printing its token in somebody's
95
+ * picker.
96
+ *
97
+ * Published as the record *and* as the options below, because both shapes are
98
+ * in use: the Bar tab names the clef *in force* ("carry on with Treble"), which
99
+ * is one lookup rather than a list.
100
+ */
101
+ export declare const CLEF_LABEL_KEY: Record<Clef, string>;
102
+ /**
103
+ * Every clef, in the model's order.
104
+ *
105
+ * There is no "none" here: a stave always has a clef, so the absence a *bar*
106
+ * can express is `INHERIT_CLEF`, which the Bar tab prepends itself.
107
+ */
108
+ export declare const CLEF_OPTIONS: ReadonlyArray<PickerOption<Clef>>;
69
109
  //# sourceMappingURL=picker-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"picker-options.d.ts","sourceRoot":"","sources":["../../../src/domain/notation/picker-options.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,QAAQ,EACT,MAAM,gBAAgB,CAAC;AAExB,2EAA2E;AAC3E,eAAO,MAAM,OAA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