@dsebastien/music-notation 0.24.0 → 0.26.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.
@@ -0,0 +1,45 @@
1
+ /**
2
+ * alphaTab's sound through the library's room and ceiling (#103). alphaTab has no reverb of its
3
+ * own and gives no place to plug one in: each time it starts to play, it makes an output node and
4
+ * connects it to its context's `destination`.
5
+ *
6
+ * So the context gets a `destination` of its own (a property on the object, over the browser's):
7
+ * at each start alphaTab reads it and connects its node to what it gets, the chain's entry for
8
+ * this play, or the speakers for `dry`. The node never sounds outside the chain. A first version
9
+ * moved the node after alphaTab had connected it: the first 20 ms of each play went out
10
+ * directly, then jumped into the chain (whose limiter, gone since, was 6 ms late).
11
+ *
12
+ * When the property can't be set, or the context was made too late for the first play, the node
13
+ * is moved as before. It is in a field alphaTab keeps to itself, and its name differs between
14
+ * alphaTab's builds (the minified one shortens it). So the node is found by what it is: the one
15
+ * audio node the output holds besides its `source` (a public field, like `context`). When nothing
16
+ * is found (another alphaTab, another output), nothing is changed: the sound stays as it was.
17
+ * `room.spec.ts` fails when the alphaTab in use no longer has those public fields, or no longer
18
+ * connects to its context's `destination`.
19
+ */
20
+ import type * as AT from '@coderline/alphatab';
21
+ import { type PlayEffects } from '../playback/effects.js';
22
+ import type { GuitarTone } from '../playback/guitar-tone.js';
23
+ /** What plays now, read when alphaTab starts: its effects, and its guitar for the amplifier. */
24
+ export interface RoomOf {
25
+ effects: () => PlayEffects | null | undefined;
26
+ /** The one guitar that plays (the diagrams' player); none for a score with its own tracks. */
27
+ guitar?: () => GuitarTone | null | undefined;
28
+ }
29
+ /** The output node alphaTab made for this play, and its context; null when it isn't there (yet). */
30
+ export declare function outputNodeOf(player: unknown): {
31
+ ctx: BaseAudioContext;
32
+ node: AudioNode;
33
+ } | null;
34
+ /** alphaTab's context, when it has one already (it makes it when its player opens). */
35
+ export declare function contextOf(player: unknown): BaseAudioContext | null;
36
+ /**
37
+ * Sends what alphaTab plays through the room and the ceiling, from now on: at each start, its
38
+ * new output node goes to the chain (through an electric guitar's amplifier when one is asked for
39
+ * and one guitar plays). `dry` gives it the speakers. `look` checks it now, for a play alphaTab
40
+ * starts without saying so (the one-time plays of the diagrams' player); `stop` ends it.
41
+ */
42
+ export declare function throughRoom(api: AT.AlphaTabApi, playing: (state: unknown) => boolean, room: RoomOf, win: Pick<Window, 'setTimeout' | 'clearTimeout'>): {
43
+ look: () => void;
44
+ stop: () => void;
45
+ };
@@ -525,6 +525,7 @@ var enParse = {
525
525
  "chords.chart.capo": "Capo {capo}",
526
526
  "chords.chart.tempo": "{bpm} BPM",
527
527
  "chords.chart.transposed": "Transposed {amount}",
528
+ "chords.chart.simplified": "Easier chords",
528
529
  "chords.chart.sounds": "{title} (sounds {sounding})",
529
530
  "chords.chart.moreNotDrawn": "{count} more chords not drawn (at most {max})",
530
531
  "chords.chart.missing": "No diagram for {names}: give the shape with {how}",
@@ -539,6 +540,7 @@ var enParse = {
539
540
  "chords.define.fingersCount": "{at}: fingers has {fingers} values for {strings} strings: give one per string (0 for none)",
540
541
  "chords.define.reaches": "{at}: the shape reaches fret {top}: frets go up to {max}",
541
542
  "chords.directive.diagrams": "{at}: use on, off, top or bottom",
543
+ "chords.directive.simplify": "{at}: use yes or no",
542
544
  "chord.shape.open": "Open",
543
545
  "chord.shape.caged": "{letter} shape",
544
546
  "chord.shape.cagedStrings": "{letter} shape (strings {strings})",
@@ -578,7 +580,15 @@ var enPlay = {
578
580
  "playback.click": "Click",
579
581
  "playback.sound": "Sound",
580
582
  "playback.guitar": "Guitar",
583
+ "playback.guitar.steel": "Guitar (steel)",
584
+ "playback.guitar.nylon": "Guitar (nylon)",
585
+ "playback.guitar.clean": "Guitar (clean)",
586
+ "playback.guitar.overdrive": "Guitar (overdrive)",
581
587
  "playback.piano": "Piano",
588
+ "playback.simplify": "Simplify",
589
+ "playback.simplified": "Simplified",
590
+ "playback.simplify.hint": "Show easier chords",
591
+ "playback.simplified.hint": "Show the chords as written",
582
592
  "playback.tempo": "Tempo (BPM)",
583
593
  "playback.unit.bpm": "BPM",
584
594
  "playback.unit.ms": "ms",
@@ -1080,6 +1090,7 @@ var frParse = {
1080
1090
  "chords.chart.capo": "Capodastre {capo}",
1081
1091
  "chords.chart.tempo": "{bpm} BPM",
1082
1092
  "chords.chart.transposed": "Transposé de {amount}",
1093
+ "chords.chart.simplified": "Accords simplifiés",
1083
1094
  "chords.chart.sounds": "{title} (sonne {sounding})",
1084
1095
  "chords.chart.moreNotDrawn": "{count} accords de plus non dessinés (au plus {max})",
1085
1096
  "chords.chart.missing": "Pas de diagramme pour {names} : donnez la forme avec {how}",
@@ -1094,6 +1105,7 @@ var frParse = {
1094
1105
  "chords.define.fingersCount": "{at} : fingers a {fingers} valeurs pour {strings} cordes : donnez-en une par corde (0 pour aucune)",
1095
1106
  "chords.define.reaches": "{at} : la forme atteint la case {top} : les cases vont jusqu'à {max}",
1096
1107
  "chords.directive.diagrams": "{at} : utilisez on, off, top ou bottom",
1108
+ "chords.directive.simplify": "{at} : utilisez yes ou no",
1097
1109
  "chord.shape.open": "Accord ouvert",
1098
1110
  "chord.shape.caged": "forme {letter}",
1099
1111
  "chord.shape.cagedStrings": "forme {letter} (cordes {strings})",
@@ -1133,7 +1145,15 @@ var frPlay = {
1133
1145
  "playback.click": "Clic",
1134
1146
  "playback.sound": "Son",
1135
1147
  "playback.guitar": "Guitare",
1148
+ "playback.guitar.steel": "Guitare (folk)",
1149
+ "playback.guitar.nylon": "Guitare (classique)",
1150
+ "playback.guitar.clean": "Guitare (son clair)",
1151
+ "playback.guitar.overdrive": "Guitare (son saturé)",
1136
1152
  "playback.piano": "Piano",
1153
+ "playback.simplify": "Simplifier",
1154
+ "playback.simplified": "Simplifié",
1155
+ "playback.simplify.hint": "Afficher des accords plus faciles",
1156
+ "playback.simplified.hint": "Afficher les accords écrits",
1137
1157
  "playback.tempo": "Tempo (BPM)",
1138
1158
  "playback.unit.bpm": "BPM",
1139
1159
  "playback.unit.ms": "ms",
@@ -3684,5 +3704,5 @@ export {
3684
3704
  voicingCount
3685
3705
  };
3686
3706
 
3687
- //# debugId=7610075CDCE72E8C64756E2164756E21
3707
+ //# debugId=101B147722F3B32164756E2164756E21
3688
3708
  //# sourceMappingURL=index.js.map