moontide-mcp 2.1.0 → 2.4.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.
Files changed (57) hide show
  1. package/README.md +54 -331
  2. package/dist/ask.js +59 -12
  3. package/dist/catalog.js +118 -9
  4. package/dist/instruments.js +83 -9
  5. package/dist/mcp.js +146 -20
  6. package/dist/midi-state.js +43 -1
  7. package/dist/protocol.js +123 -5
  8. package/dist/reference.js +12 -0
  9. package/dist/request-status.js +221 -0
  10. package/dist/session.js +203 -7
  11. package/dist/vocabulary.js +420 -0
  12. package/package.json +3 -2
  13. package/page/ask-view.js +118 -50
  14. package/page/ask.js +139 -169
  15. package/page/bar-model.js +44 -2
  16. package/page/change-timing.js +35 -0
  17. package/page/index.html +6 -2
  18. package/page/instruments-model.js +50 -3
  19. package/page/instruments-view.js +14 -2
  20. package/page/jam-analysis.js +68 -23
  21. package/page/jam-model.js +185 -29
  22. package/page/jam-resolve.js +271 -0
  23. package/page/jam-view.js +165 -10
  24. package/page/lights.js +29 -7
  25. package/page/main.js +807 -66
  26. package/page/midi-clock.js +22 -3
  27. package/page/midi-in.js +407 -0
  28. package/page/midi-out.js +557 -48
  29. package/page/midi-plan.js +42 -6
  30. package/page/midi-rig.js +286 -13
  31. package/page/midi-settings.js +507 -0
  32. package/page/mixer-view.js +7 -1
  33. package/page/note-panel.js +29 -8
  34. package/page/note-tag.js +19 -4
  35. package/page/page-rewrite.js +1 -1
  36. package/page/played-buffer.js +208 -0
  37. package/page/query-check.js +21 -2
  38. package/page/request-status-view.js +419 -0
  39. package/page/request-status.js +686 -0
  40. package/page/scratch-gesture.js +239 -0
  41. package/page/scratch-listen.js +260 -0
  42. package/page/scratch-model.js +1696 -0
  43. package/page/scratch-view.js +2176 -0
  44. package/page/song-grid-model.js +15 -0
  45. package/page/song-grid-view.js +1 -1
  46. package/page/structure.js +2 -1
  47. package/page/style.css +1243 -43
  48. package/page/tempo-glide.js +330 -0
  49. package/page/tempo-guard.js +62 -10
  50. package/page/timeline-edit-view.js +1 -1
  51. package/page/timeline.js +2 -1
  52. package/page/top-bar-view.js +18 -13
  53. package/page/views.js +20 -7
  54. package/reference/midi.md +2 -0
  55. package/reference/motif.md +83 -0
  56. package/reference/settings.md +161 -0
  57. package/reference/transitions.md +13 -1
@@ -353,6 +353,21 @@ export function playingSection(reading, cycle) {
353
353
  return { index: last, cycleIn: reading.sections[last].length, progress: 1 };
354
354
  }
355
355
 
356
+ /**
357
+ * The names of the sections that play in the whole cycles `from` to `to` (both included), in playing order: a section that
358
+ * plays twice in a row is listed once, and one that comes back after another section is listed again. A range across the end
359
+ * of the song goes on from its start (the rule of playingSection). A range is at most MAX_RANGE_CYCLES cycles long, so
360
+ * walking it cycle by cycle is cheap.
361
+ */
362
+ export function sectionsCrossed(reading, from, to) {
363
+ const names = [];
364
+ for (let cycle = from; cycle <= to; cycle++) {
365
+ const name = String(reading.sections[playingSection(reading, cycle).index].name);
366
+ if (names[names.length - 1] !== name) names.push(name);
367
+ }
368
+ return names;
369
+ }
370
+
356
371
  /**
357
372
  * The harmony the Jam view's Declared line shows while `section` (an entry of a read song) plays, in the shape of a
358
373
  * reading's `declared`: the section's own text or the piece's, `{ state: 'none' }` when neither is declared, and for a
@@ -16,7 +16,7 @@ const MAX_INDENT_LEVELS = 4;
16
16
  const LIST_NOTE_ID = 'song-cell-list-note';
17
17
 
18
18
  /** True for the two keyboard gestures that mean a right-click: the Menu key, and F10 with Shift (and no other modifier). */
19
- function isAskKey(event) {
19
+ export function isAskKey(event) {
20
20
  if (event.altKey || event.metaKey || event.ctrlKey) return false;
21
21
  if (event.key === 'ContextMenu') return !event.shiftKey;
22
22
  return event.key === 'F10' && event.shiftKey === true;
package/page/structure.js CHANGED
@@ -120,7 +120,8 @@ export const SONG_COPY = {
120
120
  differs: 'What plays differs from the declaration at the start of section {section}, track {track}.',
121
121
  differsMore: 'What plays differs from the declaration at the start of section {section}, track {track} (and {count} more places).',
122
122
  differsMoreOne: 'What plays differs from the declaration at the start of section {section}, track {track} (and 1 more place).',
123
- checkFailed: 'The page could not check what plays against the declaration.',
123
+ checkFailed: 'The page could not check what plays against the declaration: the check broke off.',
124
+ checkTooSlow: 'The page could not check what plays against the declaration: the check took too long.',
124
125
  // Under a fixed variation: whether its notes are in the scale of the section's harmony (words only, nothing is changed).
125
126
  fitFits: 'fits',
126
127
  fitNot: 'does not fit ({notes})',