@dsebastien/music-notation 0.22.1 → 0.23.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 (46) hide show
  1. package/README.md +1 -1
  2. package/dist/blocks/renderers.d.ts +8 -1
  3. package/dist/chord/generate.d.ts +2 -0
  4. package/dist/chord/words.d.ts +4 -0
  5. package/dist/export/image.d.ts +2 -0
  6. package/dist/fretboard/exercise.d.ts +0 -16
  7. package/dist/fretboard/positions.d.ts +0 -17
  8. package/dist/i18n/en/diagrams.d.ts +139 -0
  9. package/dist/i18n/en/index.d.ts +532 -0
  10. package/dist/i18n/en/parse.d.ts +249 -0
  11. package/dist/i18n/en/play.d.ts +82 -0
  12. package/dist/i18n/en/timed.d.ts +75 -0
  13. package/dist/i18n/fr/diagrams.d.ts +139 -0
  14. package/dist/i18n/fr/index.d.ts +7 -0
  15. package/dist/i18n/fr/parse.d.ts +249 -0
  16. package/dist/i18n/fr/play.d.ts +82 -0
  17. package/dist/i18n/fr/timed.d.ts +72 -0
  18. package/dist/i18n/index.d.ts +3 -0
  19. package/dist/i18n/language.d.ts +543 -0
  20. package/dist/i18n/messages.d.ts +11 -0
  21. package/dist/i18n/page.d.ts +7 -0
  22. package/dist/i18n/translate.d.ts +21 -0
  23. package/dist/index.d.ts +3 -0
  24. package/dist/index.js +2107 -525
  25. package/dist/index.js.map +66 -52
  26. package/dist/keyboard/scale-fingering.d.ts +1 -1
  27. package/dist/music-notation.css +21 -0
  28. package/dist/music-notation.publish.min.js +58 -37
  29. package/dist/music-notation.tab.min.js +28 -7
  30. package/dist/picking/pattern.d.ts +0 -7
  31. package/dist/playback/bar-parts.d.ts +4 -0
  32. package/dist/playback/controls.d.ts +23 -2
  33. package/dist/playback/copy-image.d.ts +6 -5
  34. package/dist/playback/engine.d.ts +34 -0
  35. package/dist/publish/auto.d.ts +2 -0
  36. package/dist/publish/index.js +2080 -527
  37. package/dist/publish/index.js.map +66 -52
  38. package/dist/tab/auto.d.ts +2 -0
  39. package/dist/tab/follow-scroll.d.ts +65 -0
  40. package/dist/tab/index.d.ts +54 -2
  41. package/dist/tab/index.js +1586 -76
  42. package/dist/tab/index.js.map +24 -9
  43. package/dist/tab/note-names.d.ts +50 -0
  44. package/dist/voicings/index.js +1323 -79
  45. package/dist/voicings/index.js.map +23 -10
  46. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Note names on a tab or a score (#112): the name of every note, written above the tablature, for
3
+ * readers who learn the notes. alphaTab has no such drawing, so the names are given to it as
4
+ * lyrics, one line per note of a beat, the highest first (on a tab, the same order as the strings).
5
+ * A staff that has lyrics of its own keeps them: its names go in the beats' text, on one line.
6
+ */
7
+ import { type Naming } from '../theory/naming.js';
8
+ /** The part of an alphaTab note read here. */
9
+ export interface NamedNote {
10
+ realValue: number;
11
+ isDead: boolean;
12
+ isTieDestination: boolean;
13
+ }
14
+ /** The part of an alphaTab beat read and written here. */
15
+ export interface NamedBeat {
16
+ isRest: boolean;
17
+ notes: NamedNote[];
18
+ lyrics: string[] | null;
19
+ text: string | null;
20
+ }
21
+ /** The part of an alphaTab score read here. */
22
+ export interface NamedScore {
23
+ tracks: {
24
+ staves: {
25
+ isPercussion: boolean;
26
+ bars: {
27
+ /** Sharps (above 0) or flats (below 0) of the key. */
28
+ keySignature?: number;
29
+ masterBar?: {
30
+ keySignature?: number;
31
+ };
32
+ voices: {
33
+ beats: NamedBeat[];
34
+ }[];
35
+ }[];
36
+ }[];
37
+ }[];
38
+ }
39
+ /**
40
+ * The names of a beat's notes, the highest first: flats in a key with flats, sharps otherwise.
41
+ * Tied notes (they don't sound again) and dead notes (no pitch) have none. Octaves aren't written.
42
+ */
43
+ export declare function namesOfBeat(beat: NamedBeat, naming: Naming, flats: boolean): string[];
44
+ /**
45
+ * Writes the name of every note of `score` on its beats. Drum staves have none. Returns a function
46
+ * that takes the names away again (the beats get back what they had).
47
+ */
48
+ export declare function nameNotes(score: NamedScore, naming?: Naming): () => void;
49
+ /** A block's `names:` value: on or off; null when it is neither. */
50
+ export declare function namesOf(value: string): boolean | null;