linked-rolls 0.69.0 → 0.71.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.
- package/README.md +20 -5
- package/lib/analysis/constraints.d.ts +7 -0
- package/lib/analysis/constraints.js +1 -0
- package/lib/analysis/ownPaper.d.ts +5 -1
- package/lib/analysis/ownPaper.js +5 -1
- package/lib/analysis/paper.d.ts +22 -4
- package/lib/analysis/paper.js +6 -0
- package/lib/analysis/reservations.d.ts +24 -1
- package/lib/analysis/reservations.js +15 -1
- package/lib/analysis/sigla.d.ts +6 -1
- package/lib/analysis/sigla.js +5 -1
- package/lib/analysis/stemma.d.ts +6 -1
- package/lib/analysis/stemma.js +6 -1
- package/lib/analysis/text.d.ts +16 -2
- package/lib/analysis/text.js +16 -2
- package/lib/analysis/witnesses.d.ts +20 -1
- package/lib/analysis/witnesses.js +4 -0
- package/lib/collation/Collation.d.ts +47 -8
- package/lib/collation/Collation.js +29 -5
- package/lib/collation/alignment.d.ts +16 -3
- package/lib/collation/alignment.js +15 -3
- package/lib/collation/scatter.d.ts +50 -9
- package/lib/collation/scatter.js +11 -1
- package/lib/collation/statistics.d.ts +39 -9
- package/lib/collation/statistics.js +27 -6
- package/lib/collation/substitution.d.ts +5 -0
- package/lib/collation/substitution.js +4 -0
- package/lib/emulation/Emulation.d.ts +16 -1
- package/lib/emulation/Emulation.js +10 -0
- package/lib/emulation/negotiation.d.ts +1 -0
- package/lib/emulation/negotiation.js +1 -0
- package/lib/index.d.ts +33 -2
- package/lib/index.js +2 -1
- package/lib/io/asJsonLd.d.ts +10 -0
- package/lib/io/asJsonLd.js +10 -0
- package/lib/io/context.d.ts +16 -2
- package/lib/io/context.js +16 -2
- package/lib/io/importJsonLd.d.ts +1 -0
- package/lib/io/importJsonLd.js +1 -0
- package/lib/io/migrate.d.ts +8 -0
- package/lib/io/migrate.js +8 -0
- package/lib/lookup/lookup.d.ts +29 -5
- package/lib/lookup/lookup.js +29 -5
- package/lib/lookup/paths.d.ts +23 -3
- package/lib/lookup/paths.js +17 -3
- package/lib/model/Agent.d.ts +28 -2
- package/lib/model/Agent.js +15 -1
- package/lib/model/Assumption.d.ts +96 -7
- package/lib/model/Assumption.js +65 -7
- package/lib/model/ConditionState.d.ts +1 -0
- package/lib/model/Edit.d.ts +10 -0
- package/lib/model/Edit.js +8 -0
- package/lib/model/Edition.d.ts +12 -1
- package/lib/model/Edition.js +1 -0
- package/lib/model/Feature.d.ts +74 -7
- package/lib/model/Feature.js +41 -3
- package/lib/model/FeatureSource.d.ts +14 -1
- package/lib/model/FeatureSource.js +7 -1
- package/lib/model/Perforator.d.ts +10 -0
- package/lib/model/Perforator.js +1 -0
- package/lib/model/Quantity.d.ts +160 -13
- package/lib/model/Quantity.js +110 -6
- package/lib/model/RollCopy.d.ts +74 -12
- package/lib/model/RollCopy.js +53 -10
- package/lib/model/Symbol.d.ts +38 -1
- package/lib/model/Symbol.js +16 -0
- package/lib/model/TrackCalibration.d.ts +10 -2
- package/lib/model/TrackCalibration.js +9 -2
- package/lib/model/Version.d.ts +24 -4
- package/lib/model/Version.js +19 -4
- package/lib/model/notes.d.ts +15 -2
- package/lib/model/notes.js +9 -2
- package/lib/model/procedures.d.ts +5 -1
- package/lib/model/procedures.js +5 -1
- package/lib/model/vocabulary.d.ts +6 -1
- package/lib/model/vocabulary.js +6 -1
- package/lib/ops/beliefs.d.ts +23 -1
- package/lib/ops/beliefs.js +23 -1
- package/lib/ops/collation.d.ts +3 -0
- package/lib/ops/collation.js +3 -0
- package/lib/ops/commands.d.ts +17 -2
- package/lib/ops/commands.js +17 -2
- package/lib/ops/copies.d.ts +37 -6
- package/lib/ops/copies.js +37 -6
- package/lib/ops/draft.d.ts +2 -0
- package/lib/ops/draft.js +1 -0
- package/lib/ops/edits.d.ts +5 -1
- package/lib/ops/edits.js +5 -1
- package/lib/ops/features.d.ts +12 -1
- package/lib/ops/features.js +7 -0
- package/lib/ops/versions.d.ts +15 -3
- package/lib/ops/versions.js +15 -3
- package/lib/readers/phillipsEroll.d.ts +12 -1
- package/lib/readers/phillipsEroll.js +6 -1
- package/lib/readers/spencerBar.d.ts +12 -1
- package/lib/readers/spencerBar.js +7 -1
- package/lib/readers/stanfordAton.d.ts +15 -0
- package/lib/readers/stanfordAton.js +9 -0
- package/lib/schema.json +13 -2
- package/lib/shared/utils.d.ts +12 -0
- package/lib/spec/context.json +8 -1
- package/lib/systems/ReproducingSystem.d.ts +46 -3
- package/lib/systems/TrackerBar.d.ts +45 -4
- package/lib/systems/TrackerBar.js +20 -3
- package/lib/systems/index.d.ts +9 -2
- package/lib/systems/index.js +9 -2
- package/lib/systems/velocity.d.ts +1 -0
- package/lib/systems/velocity.js +1 -0
- package/lib/systems/welte.d.ts +18 -3
- package/lib/systems/welte.js +9 -2
- package/lib/systems/welteLicensee/bar.d.ts +1 -0
- package/lib/systems/welteLicensee/bar.js +1 -0
- package/lib/systems/welteLicensee/system.d.ts +18 -0
- package/lib/systems/welteLicensee/system.js +17 -0
- package/lib/systems/welteT100/bar.d.ts +8 -0
- package/lib/systems/welteT100/bar.js +4 -0
- package/lib/systems/welteT100/system.d.ts +46 -5
- package/lib/systems/welteT100/system.js +29 -3
- package/lib/systems/welteT98/bar.d.ts +6 -0
- package/lib/systems/welteT98/bar.js +2 -0
- package/lib/systems/welteT98/system.d.ts +58 -5
- package/lib/systems/welteT98/system.js +42 -3
- package/lib/validate.d.ts +16 -0
- package/lib/validate.js +15 -0
- package/package.json +2 -1
|
@@ -1,26 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Welte-Mignon T-100, the red Welte, as a reproducing system: the
|
|
3
|
+
* system that plays a version (`welteT100System`), the options it takes,
|
|
4
|
+
* and the instruments its emulator was fitted as. It needs the optional
|
|
5
|
+
* peer dependency welte-mignon-emulator.
|
|
6
|
+
*
|
|
7
|
+
* @module linked-rolls/welte-t100
|
|
8
|
+
*/
|
|
1
9
|
import { Half, Parameters } from "welte-mignon-emulator";
|
|
2
10
|
import { Instrument, RollNumber } from "welte-mignon-emulator/t100";
|
|
3
11
|
import { NegotiatedEvent, Performance, ReproducingSystem, RollProperties } from "../ReproducingSystem.js";
|
|
4
12
|
import { type WelteOptions } from "../welte.js";
|
|
5
13
|
export type { VelocityMap } from "../velocity.js";
|
|
6
|
-
export { pedalPresetOf, pedalPresets, secondsAt, type PedalPreset } from "../welte.js";
|
|
14
|
+
export { pedalPresetOf, pedalPresets, secondsAt, type PedalPreset, type WelteOptions } from "../welte.js";
|
|
15
|
+
/**
|
|
16
|
+
* An instrument the T-100 emulator was fitted as: its nuancing constants
|
|
17
|
+
* for each half of the keyboard, and what they were fitted to and how
|
|
18
|
+
* well.
|
|
19
|
+
* @category Systems and emulation
|
|
20
|
+
*/
|
|
7
21
|
export type { Instrument } from "welte-mignon-emulator/t100";
|
|
22
|
+
/**
|
|
23
|
+
* An instrument the T-100 emulator was fitted as, by name: the
|
|
24
|
+
* consensus, or the setting that drew one roll's nuance lines, by the
|
|
25
|
+
* roll's Welte number.
|
|
26
|
+
* @category Systems and emulation
|
|
27
|
+
*/
|
|
8
28
|
export type InstrumentName = 'consensus' | RollNumber;
|
|
9
29
|
/**
|
|
10
30
|
* The instruments the emulator was fitted as: the consensus over the six
|
|
11
31
|
* rolls with drawn nuance lines, and the setting that drew each of them,
|
|
12
32
|
* named by the roll's Welte number. The provenance beside each says what
|
|
13
33
|
* it was fitted to and how well.
|
|
34
|
+
* @category Systems and emulation
|
|
14
35
|
*/
|
|
15
36
|
export declare const instruments: Readonly<Record<InstrumentName, Instrument>>;
|
|
16
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* The instruments by name, the consensus first.
|
|
39
|
+
* @category Systems and emulation
|
|
40
|
+
*/
|
|
17
41
|
export declare const instrumentNames: readonly InstrumentName[];
|
|
18
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The nuancing constants of an instrument, one set for each half of the keyboard.
|
|
44
|
+
* @category Systems and emulation
|
|
45
|
+
*/
|
|
19
46
|
export declare const nuanceOf: (instrument: Instrument) => Record<Half, Parameters>;
|
|
20
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The instrument a pair of nuancing constants belongs to, if it is one.
|
|
49
|
+
* @category Systems and emulation
|
|
50
|
+
*/
|
|
21
51
|
export declare const instrumentNameOf: (nuance: Record<Half, Parameters>) => InstrumentName | undefined;
|
|
22
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The T-100 takes the options every Welte system does; see `WelteOptions`.
|
|
54
|
+
* @category Systems and emulation
|
|
55
|
+
*/
|
|
23
56
|
export type WelteT100Options = WelteOptions;
|
|
57
|
+
/**
|
|
58
|
+
* The options the T-100 plays a version with unless others are given:
|
|
59
|
+
* Welte's spool, the consensus instrument, the damping pedals as a
|
|
60
|
+
* continuous controller, and the keyboard divided at track 54.
|
|
61
|
+
* @category Systems and emulation
|
|
62
|
+
*/
|
|
24
63
|
export declare const defaultWelteT100Options: WelteT100Options;
|
|
25
64
|
/**
|
|
26
65
|
* The mechanism, given a way of naming the instrument on the curves it
|
|
@@ -29,6 +68,7 @@ export declare const defaultWelteT100Options: WelteT100Options;
|
|
|
29
68
|
* shares this; what it may not share is the name, since a Licensee playback
|
|
30
69
|
* runs on constants fitted to Freiburg instruments and the curve has to say
|
|
31
70
|
* so, nor the spool, which is the red one it carries over.
|
|
71
|
+
* @internal
|
|
32
72
|
*/
|
|
33
73
|
export declare const performAs: (instrumentOf: (nuance: Record<Half, Parameters>) => string, ownSpool?: boolean) => (events: readonly NegotiatedEvent[], options: WelteT100Options, roll: RollProperties) => Performance;
|
|
34
74
|
/**
|
|
@@ -38,5 +78,6 @@ export declare const performAs: (instrumentOf: (nuance: Record<Half, Parameters>
|
|
|
38
78
|
* switch. The constants are the consensus fitted across the hand-drawn
|
|
39
79
|
* nuance lines of six rolls, with the terms that describe the drawing
|
|
40
80
|
* apparatus switched off; `instruments` offers each roll's own setting.
|
|
81
|
+
* @category Systems and emulation
|
|
41
82
|
*/
|
|
42
83
|
export declare const welteT100System: ReproducingSystem<WelteT100Options>;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Welte-Mignon T-100, the red Welte, as a reproducing system: the
|
|
3
|
+
* system that plays a version (`welteT100System`), the options it takes,
|
|
4
|
+
* and the instruments its emulator was fitted as. It needs the optional
|
|
5
|
+
* peer dependency welte-mignon-emulator.
|
|
6
|
+
*
|
|
7
|
+
* @module linked-rolls/welte-t100
|
|
8
|
+
*/
|
|
1
9
|
import { DEFAULT_PUNCH_MM, TRACKER_BORE_MM, WELTE_SPOOL, } from "welte-mignon-emulator";
|
|
2
10
|
import { aperturePorts, CONSENSUS, pneumaticModel, PRESETS, runPedals, } from "welte-mignon-emulator/t100";
|
|
3
11
|
import { welteT100 } from "./bar.js";
|
|
@@ -10,14 +18,30 @@ export { pedalPresetOf, pedalPresets, secondsAt } from "../welte.js";
|
|
|
10
18
|
* rolls with drawn nuance lines, and the setting that drew each of them,
|
|
11
19
|
* named by the roll's Welte number. The provenance beside each says what
|
|
12
20
|
* it was fitted to and how well.
|
|
21
|
+
* @category Systems and emulation
|
|
13
22
|
*/
|
|
14
23
|
export const instruments = { consensus: CONSENSUS, ...PRESETS };
|
|
15
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The instruments by name, the consensus first.
|
|
26
|
+
* @category Systems and emulation
|
|
27
|
+
*/
|
|
16
28
|
export const instrumentNames = ['consensus', ...Object.keys(PRESETS)];
|
|
17
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* The nuancing constants of an instrument, one set for each half of the keyboard.
|
|
31
|
+
* @category Systems and emulation
|
|
32
|
+
*/
|
|
18
33
|
export const nuanceOf = (instrument) => ({ bass: instrument.bass, treble: instrument.treble });
|
|
19
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The instrument a pair of nuancing constants belongs to, if it is one.
|
|
36
|
+
* @category Systems and emulation
|
|
37
|
+
*/
|
|
20
38
|
export const instrumentNameOf = (nuance) => instrumentNames.find(name => sameParameters(instruments[name].bass, nuance.bass) && sameParameters(instruments[name].treble, nuance.treble));
|
|
39
|
+
/**
|
|
40
|
+
* The options the T-100 plays a version with unless others are given:
|
|
41
|
+
* Welte's spool, the consensus instrument, the damping pedals as a
|
|
42
|
+
* continuous controller, and the keyboard divided at track 54.
|
|
43
|
+
* @category Systems and emulation
|
|
44
|
+
*/
|
|
21
45
|
export const defaultWelteT100Options = {
|
|
22
46
|
spool: WELTE_SPOOL,
|
|
23
47
|
nuance: nuanceOf(instruments.consensus),
|
|
@@ -60,6 +84,7 @@ const punchOf = (event, rows) => {
|
|
|
60
84
|
* shares this; what it may not share is the name, since a Licensee playback
|
|
61
85
|
* runs on constants fitted to Freiburg instruments and the curve has to say
|
|
62
86
|
* so, nor the spool, which is the red one it carries over.
|
|
87
|
+
* @internal
|
|
63
88
|
*/
|
|
64
89
|
export const performAs = (instrumentOf, ownSpool = true) => (events, options, roll) => {
|
|
65
90
|
const { events: performed, curves } = performWelte(events, options, roll, {
|
|
@@ -79,6 +104,7 @@ export const performAs = (instrumentOf, ownSpool = true) => (events, options, ro
|
|
|
79
104
|
* switch. The constants are the consensus fitted across the hand-drawn
|
|
80
105
|
* nuance lines of six rolls, with the terms that describe the drawing
|
|
81
106
|
* apparatus switched off; `instruments` offers each roll's own setting.
|
|
107
|
+
* @category Systems and emulation
|
|
82
108
|
*/
|
|
83
109
|
export const welteT100System = {
|
|
84
110
|
name: 'Welte-Mignon T100',
|
|
@@ -7,8 +7,13 @@ import { TrackerBar } from "../TrackerBar.js";
|
|
|
7
7
|
* as long as one continuous perforation lasts (Hagmann, pp. 89 f. and
|
|
8
8
|
* 100–103; Phillips, p. 121), so none of these is an On or an Off. The
|
|
9
9
|
* two sforzando valves name the end of the range they pull towards.
|
|
10
|
+
* @category Systems and emulation
|
|
10
11
|
*/
|
|
11
12
|
export declare const welteT98ExpressionTypes: readonly ['SforzandoPiano', 'SforzandoForte', 'Mezzoforte', 'Crescendo', 'SustainPedal', 'SoftPedal'];
|
|
13
|
+
/**
|
|
14
|
+
* A command of the Welte-Mignon T-98.
|
|
15
|
+
* @category Systems and emulation
|
|
16
|
+
*/
|
|
12
17
|
export type WelteT98ExpressionType = typeof welteT98ExpressionTypes[number];
|
|
13
18
|
/**
|
|
14
19
|
* Welte-Mignon T-98 ("green Welte"), cf. Hagmann, Anhang 11 (p. 179)
|
|
@@ -40,5 +45,6 @@ export type WelteT98ExpressionType = typeof welteT98ExpressionTypes[number];
|
|
|
40
45
|
* scale to the cross-line bearing the dial number in half a minute
|
|
41
46
|
* (Skala-Rolle 98 §1b). This is documentation; what sets the emulator's
|
|
42
47
|
* time axis is the spool.
|
|
48
|
+
* @category Systems and emulation
|
|
43
49
|
*/
|
|
44
50
|
export declare const welteT98: TrackerBar;
|
|
@@ -8,6 +8,7 @@ import { metersPerMinute, mm } from "../../model/Quantity.js";
|
|
|
8
8
|
* as long as one continuous perforation lasts (Hagmann, pp. 89 f. and
|
|
9
9
|
* 100–103; Phillips, p. 121), so none of these is an On or an Off. The
|
|
10
10
|
* two sforzando valves name the end of the range they pull towards.
|
|
11
|
+
* @category Systems and emulation
|
|
11
12
|
*/
|
|
12
13
|
export const welteT98ExpressionTypes = [
|
|
13
14
|
'SforzandoPiano',
|
|
@@ -60,6 +61,7 @@ const welteT98Operations = {
|
|
|
60
61
|
* scale to the cross-line bearing the dial number in half a minute
|
|
61
62
|
* (Skala-Rolle 98 §1b). This is documentation; what sets the emulator's
|
|
62
63
|
* time axis is the spool.
|
|
64
|
+
* @category Systems and emulation
|
|
63
65
|
*/
|
|
64
66
|
export const welteT98 = describeTrackerBar({
|
|
65
67
|
id: 'welte-green',
|
|
@@ -1,11 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Welte-Mignon T-98, the green Welte, as a reproducing system: the
|
|
3
|
+
* system that plays a version (`welteT98System`), the options it takes,
|
|
4
|
+
* and the green instruments its emulator offers, genuine, derived and
|
|
5
|
+
* unfitted. It needs the optional peer dependency welte-mignon-emulator.
|
|
6
|
+
*
|
|
7
|
+
* @module linked-rolls/welte-t98
|
|
8
|
+
*/
|
|
1
9
|
import { Half, Parameters } from "welte-mignon-emulator";
|
|
2
|
-
import { instrumentT98Of, labelOf,
|
|
10
|
+
import { instrumentT98Of, labelOf, WelteT98InstrumentName } from "welte-mignon-emulator/t98";
|
|
3
11
|
import { ReproducingSystem } from "../ReproducingSystem.js";
|
|
4
12
|
import { Millimeters } from "../../model/Quantity.js";
|
|
5
13
|
import { type WelteOptions } from "../welte.js";
|
|
14
|
+
/** @category Systems and emulation */
|
|
6
15
|
export type { VelocityMap } from "../velocity.js";
|
|
7
|
-
|
|
8
|
-
export
|
|
16
|
+
/** @category Systems and emulation */
|
|
17
|
+
export { pedalPresetOf, pedalPresets, secondsAt, type PedalPreset, type WelteOptions } from "../welte.js";
|
|
18
|
+
/**
|
|
19
|
+
* A set of nuancing constants for the green Welte, with what it was
|
|
20
|
+
* fitted to: a genuine, a derived or an unfitted instrument.
|
|
21
|
+
* @category Systems and emulation
|
|
22
|
+
*/
|
|
23
|
+
export type { WelteT98Instrument } from "welte-mignon-emulator/t98";
|
|
24
|
+
/**
|
|
25
|
+
* A green instrument by name: a genuine one by the Welte number of its
|
|
26
|
+
* roll or as their consensus, a derived one by the recording it was
|
|
27
|
+
* fitted on, or the unfitted starting values.
|
|
28
|
+
* @category Systems and emulation
|
|
29
|
+
*/
|
|
30
|
+
export type { WelteT98InstrumentName } from "welte-mignon-emulator/t98";
|
|
9
31
|
/**
|
|
10
32
|
* The instruments the emulator offers for the green Welte, in three groups that
|
|
11
33
|
* answer three different questions and must not be listed as one.
|
|
@@ -32,6 +54,7 @@ export type { WelteT98Instrument, WelteT98InstrumentName } from "welte-mignon-em
|
|
|
32
54
|
* are 0.029 to 0.066, because a shared mechanism describes none of them well.
|
|
33
55
|
* That spread is a property of the instruments rather than of the fit, and
|
|
34
56
|
* Gottschewski's finding that they were out of regulation is visible in it.
|
|
57
|
+
* @category Systems and emulation
|
|
35
58
|
*/
|
|
36
59
|
export declare const instruments: {
|
|
37
60
|
genuine: Readonly<Partial<Record<"consensus" | import("welte-mignon-emulator/t98").GenuineRoll, import("welte-mignon-emulator/t98").WelteT98Instrument>>>;
|
|
@@ -40,10 +63,30 @@ export declare const instruments: {
|
|
|
40
63
|
'starting-values': import("welte-mignon-emulator/t98").WelteT98Instrument;
|
|
41
64
|
};
|
|
42
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* The names of the green instruments, the genuine ones first, then the
|
|
68
|
+
* derived ones and the unfitted starting values.
|
|
69
|
+
* @category Systems and emulation
|
|
70
|
+
*/
|
|
43
71
|
export declare const instrumentNames: readonly WelteT98InstrumentName[];
|
|
44
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* The instrument a pair of nuancing constants belongs to, if it is one.
|
|
74
|
+
* @category Systems and emulation
|
|
75
|
+
*/
|
|
45
76
|
export declare const instrumentNameOf: (nuance: Record<Half, Parameters>) => WelteT98InstrumentName | undefined;
|
|
46
|
-
|
|
77
|
+
/**
|
|
78
|
+
* The green instrument of that name, where the emulator has one.
|
|
79
|
+
* @category Systems and emulation
|
|
80
|
+
*/
|
|
81
|
+
export { instrumentT98Of };
|
|
82
|
+
/** @category Systems and emulation */
|
|
83
|
+
export { labelOf };
|
|
84
|
+
/**
|
|
85
|
+
* The nuancing constants of a green instrument, one set for each half of
|
|
86
|
+
* the keyboard.
|
|
87
|
+
* @category Systems and emulation
|
|
88
|
+
*/
|
|
89
|
+
export declare const nuanceOf: (instrument: import("welte-mignon-emulator/t98").WelteT98Instrument) => Record<Half, Parameters>;
|
|
47
90
|
/**
|
|
48
91
|
* The options every Welte system takes (see `WelteOptions`), with what the
|
|
49
92
|
* T-98 adds. No source states a T-98 spool geometry, so the default keeps the
|
|
@@ -56,6 +99,7 @@ export { instrumentT98Of, labelOf, nuanceOf };
|
|
|
56
99
|
* configuration independently gives the last bass note as MIDI 66. A green
|
|
57
100
|
* roll re-cut from a Mignon master uses only the middle 80 of the 88 note
|
|
58
101
|
* positions, so the division falls inside the used compass either way.
|
|
102
|
+
* @category Systems and emulation
|
|
59
103
|
*/
|
|
60
104
|
export type WelteT98Options = WelteOptions & {
|
|
61
105
|
/** Which instrument the nuancing constants are, so that a curve can say so. */
|
|
@@ -80,6 +124,14 @@ export type WelteT98Options = WelteOptions & {
|
|
|
80
124
|
*/
|
|
81
125
|
rewind: 'stop' | 'ignore';
|
|
82
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* The options the T-98 plays a version with unless others are given:
|
|
129
|
+
* the green spool, the consensus of the genuine instruments, the
|
|
130
|
+
* damping pedals as a continuous controller, the keyboard divided at
|
|
131
|
+
* track 52, and the performance ending where a long perforation sends
|
|
132
|
+
* the roll back.
|
|
133
|
+
* @category Systems and emulation
|
|
134
|
+
*/
|
|
83
135
|
export declare const defaultWelteT98Options: WelteT98Options;
|
|
84
136
|
/**
|
|
85
137
|
* The green Welte, as welte-mignon-emulator models it. Everything downstream of
|
|
@@ -95,5 +147,6 @@ export declare const defaultWelteT98Options: WelteT98Options;
|
|
|
95
147
|
* playback runs on the consensus across them unless the caller names another
|
|
96
148
|
* instrument. Where the roll being played is one of the five, its own instrument
|
|
97
149
|
* is the better choice and `instruments.genuine` carries it.
|
|
150
|
+
* @category Systems and emulation
|
|
98
151
|
*/
|
|
99
152
|
export declare const welteT98System: ReproducingSystem<WelteT98Options>;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Welte-Mignon T-98, the green Welte, as a reproducing system: the
|
|
3
|
+
* system that plays a version (`welteT98System`), the options it takes,
|
|
4
|
+
* and the green instruments its emulator offers, genuine, derived and
|
|
5
|
+
* unfitted. It needs the optional peer dependency welte-mignon-emulator.
|
|
6
|
+
*
|
|
7
|
+
* @module linked-rolls/welte-t98
|
|
8
|
+
*/
|
|
1
9
|
import { ROWS_PER_MM, WELTE_T98_SPOOL, } from "welte-mignon-emulator";
|
|
2
|
-
import { aperturePorts, CHAIN_GAP_MM, DERIVED, GENUINE, instrumentT98Of, labelOf, nuanceOf, PUNCH_T98_MM, pneumaticT98Model, rewindAt, runPedals, sforzandoPianoLift, STARTING_VALUES, TRACKER_BORE_T98_MM, } from "welte-mignon-emulator/t98";
|
|
10
|
+
import { aperturePorts, CHAIN_GAP_MM, DERIVED, GENUINE, instrumentT98Of, labelOf, nuanceOf as emulatorNuanceOf, PUNCH_T98_MM, pneumaticT98Model, rewindAt, runPedals, sforzandoPianoLift, STARTING_VALUES, TRACKER_BORE_T98_MM, } from "welte-mignon-emulator/t98";
|
|
3
11
|
import { welteT98 } from "./bar.js";
|
|
4
12
|
import { mm, seconds, track } from "../../model/Quantity.js";
|
|
5
13
|
import { defaultVelocityMap } from "../velocity.js";
|
|
6
14
|
import { pedalPresets, performWelte, sameParameters } from "../welte.js";
|
|
15
|
+
/** @category Systems and emulation */
|
|
7
16
|
export { pedalPresetOf, pedalPresets, secondsAt } from "../welte.js";
|
|
8
17
|
/**
|
|
9
18
|
* The instruments the emulator offers for the green Welte, in three groups that
|
|
@@ -31,21 +40,50 @@ export { pedalPresetOf, pedalPresets, secondsAt } from "../welte.js";
|
|
|
31
40
|
* are 0.029 to 0.066, because a shared mechanism describes none of them well.
|
|
32
41
|
* That spread is a property of the instruments rather than of the fit, and
|
|
33
42
|
* Gottschewski's finding that they were out of regulation is visible in it.
|
|
43
|
+
* @category Systems and emulation
|
|
34
44
|
*/
|
|
35
45
|
export const instruments = { genuine: GENUINE, derived: DERIVED, unfitted: { 'starting-values': STARTING_VALUES } };
|
|
46
|
+
/**
|
|
47
|
+
* The names of the green instruments, the genuine ones first, then the
|
|
48
|
+
* derived ones and the unfitted starting values.
|
|
49
|
+
* @category Systems and emulation
|
|
50
|
+
*/
|
|
36
51
|
export const instrumentNames = [
|
|
37
52
|
...Object.keys(GENUINE).map(genuine => ({ genuine })),
|
|
38
53
|
...Object.keys(DERIVED).map(derived => ({ derived })),
|
|
39
54
|
{ unfitted: 'starting-values' }
|
|
40
55
|
];
|
|
41
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The instrument a pair of nuancing constants belongs to, if it is one.
|
|
58
|
+
* @category Systems and emulation
|
|
59
|
+
*/
|
|
42
60
|
export const instrumentNameOf = (nuance) => instrumentNames.find(name => {
|
|
43
61
|
const instrument = instrumentT98Of(name);
|
|
44
62
|
return instrument !== undefined
|
|
45
63
|
&& sameParameters(instrument.bass, nuance.bass)
|
|
46
64
|
&& sameParameters(instrument.treble, nuance.treble);
|
|
47
65
|
});
|
|
48
|
-
|
|
66
|
+
/**
|
|
67
|
+
* The green instrument of that name, where the emulator has one.
|
|
68
|
+
* @category Systems and emulation
|
|
69
|
+
*/
|
|
70
|
+
export { instrumentT98Of };
|
|
71
|
+
/** @category Systems and emulation */
|
|
72
|
+
export { labelOf };
|
|
73
|
+
/**
|
|
74
|
+
* The nuancing constants of a green instrument, one set for each half of
|
|
75
|
+
* the keyboard.
|
|
76
|
+
* @category Systems and emulation
|
|
77
|
+
*/
|
|
78
|
+
export const nuanceOf = emulatorNuanceOf;
|
|
79
|
+
/**
|
|
80
|
+
* The options the T-98 plays a version with unless others are given:
|
|
81
|
+
* the green spool, the consensus of the genuine instruments, the
|
|
82
|
+
* damping pedals as a continuous controller, the keyboard divided at
|
|
83
|
+
* track 52, and the performance ending where a long perforation sends
|
|
84
|
+
* the roll back.
|
|
85
|
+
* @category Systems and emulation
|
|
86
|
+
*/
|
|
49
87
|
export const defaultWelteT98Options = {
|
|
50
88
|
spool: WELTE_T98_SPOOL,
|
|
51
89
|
nuance: nuanceOf(GENUINE.consensus),
|
|
@@ -135,6 +173,7 @@ const perform = (events, options, roll) => {
|
|
|
135
173
|
* playback runs on the consensus across them unless the caller names another
|
|
136
174
|
* instrument. Where the roll being played is one of the five, its own instrument
|
|
137
175
|
* is the better choice and `instruments.genuine` carries it.
|
|
176
|
+
* @category Systems and emulation
|
|
138
177
|
*/
|
|
139
178
|
export const welteT98System = {
|
|
140
179
|
name: 'Welte-Mignon T98',
|
package/lib/validate.d.ts
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks an edition's JSON-LD document, as `asJsonLd` writes one, against
|
|
3
|
+
* the schema of the format. The same `validate` is exported from the root
|
|
4
|
+
* module; this entry point offers it alone.
|
|
5
|
+
*
|
|
6
|
+
* @module linked-rolls/validate
|
|
7
|
+
*/
|
|
1
8
|
import { type ErrorObject } from "ajv";
|
|
2
9
|
import { Edition } from "./model/Edition.js";
|
|
3
10
|
/**
|
|
4
11
|
* Holds a document against the edition schema. `errors` says what the
|
|
5
12
|
* last call found wrong, and is empty where it found nothing.
|
|
13
|
+
* @category Reading and writing
|
|
6
14
|
*/
|
|
7
15
|
export interface ValidateEdition {
|
|
8
16
|
(document: unknown): document is Edition;
|
|
9
17
|
errors?: ErrorObject[] | null;
|
|
10
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Whether the document is an edition as the schema of the format
|
|
21
|
+
* describes it, such as `asJsonLd` writes. What a call found wrong is in
|
|
22
|
+
* `validate.errors` until the next call. A document written by an earlier
|
|
23
|
+
* release may fail where `importJsonLd` would still read it, since the
|
|
24
|
+
* import migrates it first (`migrate`).
|
|
25
|
+
* @category Reading and writing
|
|
26
|
+
*/
|
|
11
27
|
declare const validate: ValidateEdition;
|
|
12
28
|
export { validate };
|
package/lib/validate.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks an edition's JSON-LD document, as `asJsonLd` writes one, against
|
|
3
|
+
* the schema of the format. The same `validate` is exported from the root
|
|
4
|
+
* module; this entry point offers it alone.
|
|
5
|
+
*
|
|
6
|
+
* @module linked-rolls/validate
|
|
7
|
+
*/
|
|
1
8
|
import Ajv from "ajv";
|
|
2
9
|
// A default import, not a namespace one: Node's ESM gives a JSON module
|
|
3
10
|
// only a default export, so `import * as` hands ajv the namespace object
|
|
@@ -9,6 +16,14 @@ const compileEditionSchema = () => new Ajv({ strict: false, formats: { "date": t
|
|
|
9
16
|
* pay for it, so the compiled form is made on first use and kept.
|
|
10
17
|
*/
|
|
11
18
|
let compiled;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the document is an edition as the schema of the format
|
|
21
|
+
* describes it, such as `asJsonLd` writes. What a call found wrong is in
|
|
22
|
+
* `validate.errors` until the next call. A document written by an earlier
|
|
23
|
+
* release may fail where `importJsonLd` would still read it, since the
|
|
24
|
+
* import migrates it first (`migrate`).
|
|
25
|
+
* @category Reading and writing
|
|
26
|
+
*/
|
|
12
27
|
const validate = (document) => {
|
|
13
28
|
compiled ?? (compiled = compileEditionSchema());
|
|
14
29
|
const valid = compiled(document);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linked-rolls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0",
|
|
4
4
|
"description": "Digital editions of piano rolls: import, collation, editorial assumptions, JSON-LD export, and emulation through a reproducing system",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"lint": "oxlint -c .oxlintrc.json src test scripts schema",
|
|
47
47
|
"build:schema": "npx ts-json-schema-generator --additional-properties --validation-keywords see --path 'src/**/*.ts' --type 'Edition' > schema_.json && node schema/postprocess.js && rm schema_.json && mv schema.json src/schema.json",
|
|
48
48
|
"build:docs": "node schema/docs/generate.ts src/schema.json docs/index.html",
|
|
49
|
+
"build:api": "npm ci --prefix tools/typedoc --silent --no-audit --no-fund && tools/typedoc/node_modules/.bin/typedoc",
|
|
49
50
|
"smoke": "node scripts/smoke.mjs"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|