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
package/lib/shared/utils.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
2
|
+
/**
|
|
3
|
+
* An object that says by its type which kind of entity it is.
|
|
4
|
+
* @category Format types
|
|
5
|
+
*/
|
|
2
6
|
export type WithType<T extends string> = {
|
|
3
7
|
/**
|
|
4
8
|
* The type discriminator for this object.
|
|
@@ -6,6 +10,10 @@ export type WithType<T extends string> = {
|
|
|
6
10
|
*/
|
|
7
11
|
readonly type: T;
|
|
8
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* An object the edition identifies, so that others can refer to it.
|
|
15
|
+
* @category Format types
|
|
16
|
+
*/
|
|
9
17
|
export type WithId = {
|
|
10
18
|
/**
|
|
11
19
|
* A unique identifier for this object.
|
|
@@ -16,6 +24,10 @@ export type WithId = {
|
|
|
16
24
|
export declare const isDateString: (value: unknown) => value is string;
|
|
17
25
|
/** The items by the key each of them gives, every group in the order its first item came in. */
|
|
18
26
|
export declare const groupBy: <T>(items: readonly T[], keyOf: (item: T) => string) => Map<string, T[]>;
|
|
27
|
+
/**
|
|
28
|
+
* An object that may carry a note in free text.
|
|
29
|
+
* @category Format types
|
|
30
|
+
*/
|
|
19
31
|
export type WithNote = {
|
|
20
32
|
/**
|
|
21
33
|
* A free-text note providing additional context.
|
package/lib/spec/context.json
CHANGED
|
@@ -65,6 +65,10 @@
|
|
|
65
65
|
"used": {
|
|
66
66
|
"@id": "crm:P16_used_specific_object",
|
|
67
67
|
"@type": "@id"
|
|
68
|
+
},
|
|
69
|
+
"applies": {
|
|
70
|
+
"@id": "crminf:J3_applied",
|
|
71
|
+
"@type": "@id"
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
},
|
|
@@ -118,7 +122,10 @@
|
|
|
118
122
|
"@type": "xsd:date"
|
|
119
123
|
},
|
|
120
124
|
"collationTolerance": null,
|
|
121
|
-
"referenceCopy":
|
|
125
|
+
"referenceCopy": {
|
|
126
|
+
"@id": "reo:referenceCopy",
|
|
127
|
+
"@type": "@id"
|
|
128
|
+
},
|
|
122
129
|
"annotation": null,
|
|
123
130
|
"roll": "lrmoo:R3i_realises",
|
|
124
131
|
"catalogueNumber": "dcterms:identifier",
|
|
@@ -6,6 +6,7 @@ import { MetersPerMinute, Millimeters, Seconds } from "../model/Quantity.js";
|
|
|
6
6
|
* A note or expression of a version with the dimensions of its carriers
|
|
7
7
|
* averaged in and the editorial assumptions applied, which is all a
|
|
8
8
|
* performance needs to know of a symbol.
|
|
9
|
+
* @category Systems and emulation
|
|
9
10
|
*/
|
|
10
11
|
export type NegotiatedEvent = Omit<Note | Expression, 'carriers'> & Pick<HoleChain, 'horizontal' | 'vertical'>;
|
|
11
12
|
interface PerformedRollFeature<T> {
|
|
@@ -18,21 +19,41 @@ interface PerformedNoteEvent<T> extends PerformedRollFeature<T> {
|
|
|
18
19
|
pitch: number;
|
|
19
20
|
velocity: number;
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* A note struck, at the velocity the performance gives it.
|
|
24
|
+
* @category Systems and emulation
|
|
25
|
+
*/
|
|
21
26
|
export interface PerformedNoteOnEvent extends PerformedNoteEvent<'noteOn'> {
|
|
22
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A note released.
|
|
30
|
+
* @category Systems and emulation
|
|
31
|
+
*/
|
|
23
32
|
export interface PerformedNoteOffEvent extends PerformedNoteEvent<'noteOff'> {
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
35
|
* One step of a pedal. A pedal driven by a bellows takes time to travel,
|
|
27
36
|
* so a single command results in a run of these; `performs` is the
|
|
28
37
|
* command whose reading the step follows from.
|
|
38
|
+
* @category Systems and emulation
|
|
29
39
|
*/
|
|
30
40
|
export interface PerformedPedalEvent extends PerformedRollFeature<'damper' | 'hammerRail'> {
|
|
31
41
|
/** 0 with the pedal up and 127 with it fully down. */
|
|
32
42
|
value: number;
|
|
33
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* What a performance does at a moment: a note struck or released, or a
|
|
46
|
+
* step of a pedal.
|
|
47
|
+
* @category Systems and emulation
|
|
48
|
+
*/
|
|
34
49
|
export type AnyPerformedRollFeature = PerformedNoteOnEvent | PerformedNoteOffEvent | PerformedPedalEvent;
|
|
35
|
-
|
|
50
|
+
/**
|
|
51
|
+
* A curve sampled along the roll: where each sample lies on the paper,
|
|
52
|
+
* when it passes the tracker bar, and how far the bellows or the pedal
|
|
53
|
+
* has travelled there.
|
|
54
|
+
* @category Systems and emulation
|
|
55
|
+
*/
|
|
56
|
+
export interface CurveSamples {
|
|
36
57
|
readonly name: string;
|
|
37
58
|
/** Paper position of each sample, in mm from the beginning of the roll. */
|
|
38
59
|
readonly place: Float64Array;
|
|
@@ -53,7 +74,10 @@ interface CurveSamples {
|
|
|
53
74
|
*/
|
|
54
75
|
readonly travel: Float64Array;
|
|
55
76
|
}
|
|
56
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* The dynamics of one part of the keyboard, with the velocity the travel maps onto.
|
|
79
|
+
* @category Systems and emulation
|
|
80
|
+
*/
|
|
57
81
|
export type DynamicsCurve = CurveSamples & {
|
|
58
82
|
readonly kind: 'dynamics';
|
|
59
83
|
readonly velocity: Float64Array;
|
|
@@ -66,11 +90,24 @@ export type DynamicsCurve = CurveSamples & {
|
|
|
66
90
|
*/
|
|
67
91
|
readonly instrument: string;
|
|
68
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* How far one pedal has travelled along the roll, 0 with it up and 1
|
|
95
|
+
* with it down.
|
|
96
|
+
* @category Systems and emulation
|
|
97
|
+
*/
|
|
69
98
|
export type PedalCurve = CurveSamples & {
|
|
70
99
|
readonly kind: 'pedal';
|
|
71
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* A curve a performance yields: the dynamics of one half of the
|
|
103
|
+
* keyboard, or the travel of a pedal.
|
|
104
|
+
* @category Systems and emulation
|
|
105
|
+
*/
|
|
72
106
|
export type EmulatedCurve = DynamicsCurve | PedalCurve;
|
|
73
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* What the edition records about the roll that a mechanism may want to know.
|
|
109
|
+
* @category Systems and emulation
|
|
110
|
+
*/
|
|
74
111
|
export type RollProperties = {
|
|
75
112
|
/** Diameter of the punches, where the copies record it. */
|
|
76
113
|
punchDiameter?: Millimeters;
|
|
@@ -114,6 +151,11 @@ export type RollProperties = {
|
|
|
114
151
|
*/
|
|
115
152
|
toOwnPaper?: number;
|
|
116
153
|
};
|
|
154
|
+
/**
|
|
155
|
+
* What a reproducing system made of the events of a version: the events
|
|
156
|
+
* it performed, and the curves of its dynamics and pedals.
|
|
157
|
+
* @category Systems and emulation
|
|
158
|
+
*/
|
|
117
159
|
export type Performance = {
|
|
118
160
|
readonly events: readonly AnyPerformedRollFeature[];
|
|
119
161
|
readonly curves: readonly EmulatedCurve[];
|
|
@@ -124,6 +166,7 @@ export type Performance = {
|
|
|
124
166
|
* Implementations live outside the core of this library, so that it does
|
|
125
167
|
* not depend on any one instrument's model; `linked-rolls/welte-t100` is
|
|
126
168
|
* the first.
|
|
169
|
+
* @category Systems and emulation
|
|
127
170
|
*/
|
|
128
171
|
export interface ReproducingSystem<Options extends object> {
|
|
129
172
|
readonly name: string;
|
|
@@ -4,11 +4,13 @@ import { Millimeters, SpeedMeasure, Track } from "../model/Quantity.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* What a tracker bar position does: sound a note, or operate one of
|
|
6
6
|
* the expression valves on the bass or the treble side.
|
|
7
|
+
* @category Systems and emulation
|
|
7
8
|
*/
|
|
8
9
|
export type TrackRole = 'bass-expression' | 'note' | 'treble-expression';
|
|
9
10
|
/**
|
|
10
11
|
* A contiguous block of tracker bar positions serving one role.
|
|
11
12
|
* Both bounds are inclusive.
|
|
13
|
+
* @category Systems and emulation
|
|
12
14
|
*/
|
|
13
15
|
export interface TrackArea {
|
|
14
16
|
readonly role: TrackRole;
|
|
@@ -18,11 +20,13 @@ export interface TrackArea {
|
|
|
18
20
|
/**
|
|
19
21
|
* How a scale words a function: as a command that turns it on, one that
|
|
20
22
|
* cancels it, or one that holds it for as long as it lasts.
|
|
23
|
+
* @category Systems and emulation
|
|
21
24
|
*/
|
|
22
25
|
export type Spelling = 'on' | 'off' | 'held';
|
|
23
26
|
/**
|
|
24
27
|
* What a word of a scale operates, rather than the word itself, so that
|
|
25
28
|
* two scales can be compared at all.
|
|
29
|
+
* @category Systems and emulation
|
|
26
30
|
*/
|
|
27
31
|
export interface Operation {
|
|
28
32
|
/** The function operated, named the same wherever a scale has it. */
|
|
@@ -36,8 +40,21 @@ export interface Operation {
|
|
|
36
40
|
*/
|
|
37
41
|
sided: boolean;
|
|
38
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* What a position in the note block reads: a note of one pitch.
|
|
45
|
+
* @category Systems and emulation
|
|
46
|
+
*/
|
|
39
47
|
export type NoteMeaning = Pick<Note, 'type' | 'pitch'>;
|
|
48
|
+
/**
|
|
49
|
+
* What an expression position reads: an expression type, on the side of
|
|
50
|
+
* the keyboard the position serves.
|
|
51
|
+
* @category Systems and emulation
|
|
52
|
+
*/
|
|
40
53
|
export type ExpressionMeaning = Pick<Expression, 'type' | 'expressionType' | 'scope'>;
|
|
54
|
+
/**
|
|
55
|
+
* What a position of the bar reads: a note or an expression.
|
|
56
|
+
* @category Systems and emulation
|
|
57
|
+
*/
|
|
41
58
|
export type TrackMeaning = NoteMeaning | ExpressionMeaning;
|
|
42
59
|
/**
|
|
43
60
|
* Describes a tracker bar. Track numbers are 1-based and count from
|
|
@@ -48,6 +65,7 @@ export type TrackMeaning = NoteMeaning | ExpressionMeaning;
|
|
|
48
65
|
* Anything that needs to know where the note block ends, which side
|
|
49
66
|
* an expression belongs to, or how a track maps to a pitch, should
|
|
50
67
|
* ask the tracker bar rather than repeat the boundaries.
|
|
68
|
+
* @category Systems and emulation
|
|
51
69
|
*/
|
|
52
70
|
export interface TrackerBar {
|
|
53
71
|
/**
|
|
@@ -129,13 +147,23 @@ export interface TrackerBar {
|
|
|
129
147
|
* What a position says, as a key. Two bars read the same thing exactly
|
|
130
148
|
* where their keys agree, which is what lets a symbol cross from one
|
|
131
149
|
* system to another and what decides whether two symbols collate.
|
|
150
|
+
* @category Systems and emulation
|
|
132
151
|
*/
|
|
133
152
|
export declare const keyOf: (meaning: TrackMeaning) => string;
|
|
134
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* The roll system a tracker bar belongs to, as the roll metadata states it.
|
|
155
|
+
* @category Vocabulary
|
|
156
|
+
*/
|
|
135
157
|
export declare const systemOf: (bar: TrackerBar) => Concept;
|
|
136
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* The identifier of a system the type vocabulary knows, from the IRI naming it.
|
|
160
|
+
* @category Vocabulary
|
|
161
|
+
*/
|
|
137
162
|
export declare const systemIdIn: (id: string | undefined) => string | undefined;
|
|
138
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* The identifier of a system the type vocabulary knows, from its concept.
|
|
165
|
+
* @category Vocabulary
|
|
166
|
+
*/
|
|
139
167
|
export declare const systemIdOf: (system: Concept | undefined) => string | undefined;
|
|
140
168
|
/**
|
|
141
169
|
* Where a roll's own content ends, as far as its perforations say.
|
|
@@ -144,12 +172,16 @@ export declare const systemIdOf: (system: Concept | undefined) => string | undef
|
|
|
144
172
|
* the rewind is *punched*, not when the rewind pneumatic takes hold. The second
|
|
145
173
|
* is a matter of valve lift and belongs to whatever performs the roll. Keeping
|
|
146
174
|
* them apart is what lets collation and counting ask this without an emulator.
|
|
175
|
+
* @category Systems and emulation
|
|
147
176
|
*/
|
|
148
177
|
export type RollEnd = {
|
|
149
178
|
readonly at: Millimeters;
|
|
150
179
|
readonly because: 'rewind';
|
|
151
180
|
};
|
|
152
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* Anything carrying a place on the roll and a position on the bar.
|
|
183
|
+
* @category Systems and emulation
|
|
184
|
+
*/
|
|
153
185
|
export type PlacedOnBar = {
|
|
154
186
|
readonly horizontal: {
|
|
155
187
|
readonly from: Millimeters;
|
|
@@ -163,6 +195,7 @@ export type PlacedOnBar = {
|
|
|
163
195
|
* Where a feature lies across the bar: one place, or a run of them where
|
|
164
196
|
* `to` is given. Structural, so a feature's `vertical` passes as it is and
|
|
165
197
|
* this module need know nothing about features.
|
|
198
|
+
* @category Systems and emulation
|
|
166
199
|
*/
|
|
167
200
|
export type OnBar = {
|
|
168
201
|
readonly from: Track;
|
|
@@ -172,6 +205,7 @@ export type OnBar = {
|
|
|
172
205
|
* A tracker bar as written down, with its positions as plain numbers
|
|
173
206
|
* in the bar's own 1-based numbering; `describeTrackerBar` gives them
|
|
174
207
|
* their type.
|
|
208
|
+
* @category Systems and emulation
|
|
175
209
|
*/
|
|
176
210
|
export interface TrackerBarSpec {
|
|
177
211
|
id: string;
|
|
@@ -211,11 +245,18 @@ export interface TrackerBarSpec {
|
|
|
211
245
|
/** How the system spells a single added accent; see `TrackerBar.accents`. */
|
|
212
246
|
accents?: readonly (readonly string[])[];
|
|
213
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* The tracker bar a description gives, its positions typed and its
|
|
250
|
+
* readings worked out. Throws where the description names no rewind
|
|
251
|
+
* position, or names expression types its bar does not read.
|
|
252
|
+
* @category Systems and emulation
|
|
253
|
+
*/
|
|
214
254
|
export declare const describeTrackerBar: (spec: TrackerBarSpec) => TrackerBar;
|
|
215
255
|
/**
|
|
216
256
|
* Puts a position of one bar onto the position of another that reads
|
|
217
257
|
* the same thing, or nowhere when the other bar does not read it. This
|
|
218
258
|
* is how a copy read in one system's numbering is put into another's,
|
|
219
259
|
* as the migration does for a Licensee copy stored on T-100 tracks.
|
|
260
|
+
* @category Systems and emulation
|
|
220
261
|
*/
|
|
221
262
|
export declare const translationBetween: (from: TrackerBar, to: TrackerBar) => (position: Track) => Track | undefined;
|
|
@@ -3,16 +3,26 @@ import { mm, track } from "../model/Quantity.js";
|
|
|
3
3
|
* What a position says, as a key. Two bars read the same thing exactly
|
|
4
4
|
* where their keys agree, which is what lets a symbol cross from one
|
|
5
5
|
* system to another and what decides whether two symbols collate.
|
|
6
|
+
* @category Systems and emulation
|
|
6
7
|
*/
|
|
7
8
|
export const keyOf = (meaning) => meaning.type === 'note'
|
|
8
9
|
? `note ${meaning.pitch}`
|
|
9
10
|
: `expression ${meaning.scope} ${meaning.expressionType}`;
|
|
10
11
|
const SYSTEM_IRI = 'https://w3id.org/reo/type/system/';
|
|
11
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The roll system a tracker bar belongs to, as the roll metadata states it.
|
|
14
|
+
* @category Vocabulary
|
|
15
|
+
*/
|
|
12
16
|
export const systemOf = (bar) => ({ id: SYSTEM_IRI + bar.id, name: bar.name, sameAs: [] });
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The identifier of a system the type vocabulary knows, from the IRI naming it.
|
|
19
|
+
* @category Vocabulary
|
|
20
|
+
*/
|
|
14
21
|
export const systemIdIn = (id) => id?.startsWith(SYSTEM_IRI) ? id.slice(SYSTEM_IRI.length) : undefined;
|
|
15
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The identifier of a system the type vocabulary knows, from its concept.
|
|
24
|
+
* @category Vocabulary
|
|
25
|
+
*/
|
|
16
26
|
export const systemIdOf = (system) => systemIdIn(system?.id);
|
|
17
27
|
const areasOf = ({ notes, trackCount }) => [
|
|
18
28
|
{ role: 'bass-expression', from: track(1), to: track(notes.from - 1) },
|
|
@@ -32,6 +42,12 @@ const positionsBetween = (span) => {
|
|
|
32
42
|
const [first, last] = [Math.min(...ends), Math.max(...ends)];
|
|
33
43
|
return Array.from({ length: last - first + 1 }, (_, step) => track(first + step));
|
|
34
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* The tracker bar a description gives, its positions typed and its
|
|
47
|
+
* readings worked out. Throws where the description names no rewind
|
|
48
|
+
* position, or names expression types its bar does not read.
|
|
49
|
+
* @category Systems and emulation
|
|
50
|
+
*/
|
|
35
51
|
export const describeTrackerBar = (spec) => {
|
|
36
52
|
const areas = areasOf(spec);
|
|
37
53
|
const areaAt = (position) => areas.find(area => position >= area.from && position <= area.to)?.role;
|
|
@@ -108,6 +124,7 @@ export const describeTrackerBar = (spec) => {
|
|
|
108
124
|
* the same thing, or nowhere when the other bar does not read it. This
|
|
109
125
|
* is how a copy read in one system's numbering is put into another's,
|
|
110
126
|
* as the migration does for a Licensee copy stored on T-100 tracks.
|
|
127
|
+
* @category Systems and emulation
|
|
111
128
|
*/
|
|
112
129
|
export const translationBetween = (from, to) => (position) => {
|
|
113
130
|
const meaning = from.meaningOf(position);
|
package/lib/systems/index.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { Concept } from "../model/Agent.js";
|
|
2
2
|
import { TrackerBar } from "./TrackerBar.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The tracker bars the library knows, the T-100 first as the usual one.
|
|
5
|
+
* @category Systems and emulation
|
|
6
|
+
*/
|
|
4
7
|
export declare const trackerBars: readonly TrackerBar[];
|
|
5
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The bar of a system the type vocabulary knows, from its concept.
|
|
10
|
+
* @category Systems and emulation
|
|
11
|
+
*/
|
|
6
12
|
export declare const trackerBarOf: (system: Concept | undefined) => TrackerBar | undefined;
|
|
7
13
|
/**
|
|
8
14
|
* The bar a copy is read by where it names no system of its own: every
|
|
9
15
|
* copy was read by the T-100's before the systems were told apart, and
|
|
10
16
|
* `reservationsAbout` reports a copy that still relies on this.
|
|
17
|
+
* @category Systems and emulation
|
|
11
18
|
*/
|
|
12
19
|
export declare const defaultTrackerBar: TrackerBar;
|
package/lib/systems/index.js
CHANGED
|
@@ -2,9 +2,15 @@ import { systemIdOf } from "./TrackerBar.js";
|
|
|
2
2
|
import { welteT100 } from "./welteT100/bar.js";
|
|
3
3
|
import { welteLicensee } from "./welteLicensee/bar.js";
|
|
4
4
|
import { welteT98 } from "./welteT98/bar.js";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The tracker bars the library knows, the T-100 first as the usual one.
|
|
7
|
+
* @category Systems and emulation
|
|
8
|
+
*/
|
|
6
9
|
export const trackerBars = [welteT100, welteLicensee, welteT98];
|
|
7
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* The bar of a system the type vocabulary knows, from its concept.
|
|
12
|
+
* @category Systems and emulation
|
|
13
|
+
*/
|
|
8
14
|
export const trackerBarOf = (system) => {
|
|
9
15
|
const id = systemIdOf(system);
|
|
10
16
|
return trackerBars.find(bar => bar.id === id);
|
|
@@ -13,5 +19,6 @@ export const trackerBarOf = (system) => {
|
|
|
13
19
|
* The bar a copy is read by where it names no system of its own: every
|
|
14
20
|
* copy was read by the T-100's before the systems were told apart, and
|
|
15
21
|
* `reservationsAbout` reports a copy that still relies on this.
|
|
22
|
+
* @category Systems and emulation
|
|
16
23
|
*/
|
|
17
24
|
export const defaultTrackerBar = welteT100;
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* suction-to-velocity relation "essentially logarithmic" (pp. 215 f.). The
|
|
20
20
|
* default should change only once a red/green comparison has been run both ways
|
|
21
21
|
* and the difference measured, and then for both systems at once.
|
|
22
|
+
* @category Systems and emulation
|
|
22
23
|
*/
|
|
23
24
|
export type VelocityMap = {
|
|
24
25
|
piano: number;
|
package/lib/systems/velocity.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* suction-to-velocity relation "essentially logarithmic" (pp. 215 f.). The
|
|
20
20
|
* default should change only once a red/green comparison has been run both ways
|
|
21
21
|
* and the difference measured, and then for both systems at once.
|
|
22
|
+
* @category Systems and emulation
|
|
22
23
|
*/
|
|
23
24
|
/** midi2exp's three velocities, which is what the T-100's published results used. */
|
|
24
25
|
export const defaultVelocityMap = { piano: 35, mezzoforte: 60, forte: 90 };
|
package/lib/systems/welte.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ import { type VelocityMap } from "./velocity.js";
|
|
|
10
10
|
* performance is read off the emulator is one; what differs is in front of it,
|
|
11
11
|
* and each system says that in the `Mechanism` it hands to `performWelte`.
|
|
12
12
|
*/
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The options every Welte system takes.
|
|
15
|
+
* @category Systems and emulation
|
|
16
|
+
*/
|
|
14
17
|
export type WelteOptions = {
|
|
15
18
|
/**
|
|
16
19
|
* The take-up spool, which sets the time axis: it is held at a constant
|
|
@@ -54,13 +57,22 @@ export declare const sameParameters: (a: Parameters, b: Parameters) => boolean;
|
|
|
54
57
|
* `brushing` their fall is slowed until the quick runs of latch changes
|
|
55
58
|
* in the SUPRA corpus dip without damping, at the price that lifts
|
|
56
59
|
* shorter than about 265 ms brush as well.
|
|
60
|
+
* @category Systems and emulation
|
|
57
61
|
*/
|
|
58
62
|
export declare const pedalPresets: {
|
|
59
63
|
damping: Readonly<Record<string, number>>;
|
|
60
64
|
brushing: Readonly<Record<string, number>>;
|
|
61
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* The name of one of the readings of the pedal mechanism, `damping` or
|
|
68
|
+
* `brushing`.
|
|
69
|
+
* @category Systems and emulation
|
|
70
|
+
*/
|
|
62
71
|
export type PedalPreset = keyof typeof pedalPresets;
|
|
63
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* The preset a set of pedal constants is, if it is one.
|
|
74
|
+
* @category Systems and emulation
|
|
75
|
+
*/
|
|
64
76
|
export declare const pedalPresetOf: (pedals: Parameters) => PedalPreset | undefined;
|
|
65
77
|
/**
|
|
66
78
|
* Between the edition's shared place axis and this version's own paper.
|
|
@@ -80,7 +92,10 @@ export type Paper = {
|
|
|
80
92
|
readonly paperOfRow: (row: number) => Millimeters;
|
|
81
93
|
readonly paperOfPlace: (place: Millimeters) => Millimeters;
|
|
82
94
|
};
|
|
83
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* When the spool brings a place on the roll to the tracker bar.
|
|
97
|
+
* @category Systems and emulation
|
|
98
|
+
*/
|
|
84
99
|
export declare const secondsAt: (spool: Spool, place: Millimeters) => Seconds;
|
|
85
100
|
/** The speed the spool starts the paper at. */
|
|
86
101
|
export declare const startingSpeedOf: (spool: Spool) => MetersPerMinute;
|
package/lib/systems/welte.js
CHANGED
|
@@ -14,12 +14,16 @@ export const sameParameters = (a, b) => Object.keys(a).length === Object.keys(b)
|
|
|
14
14
|
* `brushing` their fall is slowed until the quick runs of latch changes
|
|
15
15
|
* in the SUPRA corpus dip without damping, at the price that lifts
|
|
16
16
|
* shorter than about 265 ms brush as well.
|
|
17
|
+
* @category Systems and emulation
|
|
17
18
|
*/
|
|
18
19
|
export const pedalPresets = {
|
|
19
20
|
damping: pedalDefaults,
|
|
20
21
|
brushing: pedalBrushing
|
|
21
22
|
};
|
|
22
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The preset a set of pedal constants is, if it is one.
|
|
25
|
+
* @category Systems and emulation
|
|
26
|
+
*/
|
|
23
27
|
export const pedalPresetOf = (pedals) => Object.keys(pedalPresets).find(name => sameParameters(pedalPresets[name], pedals));
|
|
24
28
|
/** Paper the grid runs on past the last hole, so that a final pedal release completes. */
|
|
25
29
|
const RUN_OUT = mm(100);
|
|
@@ -31,7 +35,10 @@ const paperOf = (toOwnPaper) => ({
|
|
|
31
35
|
paperOfRow: row => mm(row / ROWS_PER_MM),
|
|
32
36
|
paperOfPlace: place => mm(place * toOwnPaper)
|
|
33
37
|
});
|
|
34
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* When the spool brings a place on the roll to the tracker bar.
|
|
40
|
+
* @category Systems and emulation
|
|
41
|
+
*/
|
|
35
42
|
export const secondsAt = (spool, place) => seconds(paperSeconds(spool, inCentimeters(place)));
|
|
36
43
|
/** The speed the spool starts the paper at. */
|
|
37
44
|
export const startingSpeedOf = (spool) => metersPerMinute(paperSpeed(spool, 0) * 60 / 100);
|
|
@@ -7,5 +7,6 @@ import { TrackerBar } from "../TrackerBar.js";
|
|
|
7
7
|
* tracks, so the note block and the treble valves sit two positions
|
|
8
8
|
* lower. The layout is the one Stanford's midi2exp reads, checked
|
|
9
9
|
* valve by valve on roll 225 against the T-100 copies.
|
|
10
|
+
* @category Systems and emulation
|
|
10
11
|
*/
|
|
11
12
|
export declare const welteLicensee: TrackerBar;
|
|
@@ -9,6 +9,7 @@ import { welteT100Accents, welteT100Operations } from "../welteT100/bar.js";
|
|
|
9
9
|
* tracks, so the note block and the treble valves sit two positions
|
|
10
10
|
* lower. The layout is the one Stanford's midi2exp reads, checked
|
|
11
11
|
* valve by valve on roll 225 against the T-100 copies.
|
|
12
|
+
* @category Systems and emulation
|
|
12
13
|
*/
|
|
13
14
|
export const welteLicensee = describeTrackerBar({
|
|
14
15
|
id: 'welte-licensee',
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { ReproducingSystem } from "../ReproducingSystem.js";
|
|
2
2
|
import { type WelteT100Options } from "../welteT100/system.js";
|
|
3
|
+
/**
|
|
4
|
+
* The Licensee takes the options of the T-100, whose mechanism it
|
|
5
|
+
* shares; see `WelteOptions`.
|
|
6
|
+
* @category Systems and emulation
|
|
7
|
+
*/
|
|
3
8
|
export type WelteLicenseeOptions = WelteT100Options;
|
|
4
9
|
/**
|
|
5
10
|
* The one instrument on offer, and it is not a Licensee instrument.
|
|
@@ -13,15 +18,26 @@ export type WelteLicenseeOptions = WelteT100Options;
|
|
|
13
18
|
*
|
|
14
19
|
* So a Licensee playback is a Freiburg reading of American paper, and the
|
|
15
20
|
* union has one arm to keep that visible. Nothing should be published from it.
|
|
21
|
+
* @category Systems and emulation
|
|
16
22
|
*/
|
|
17
23
|
export declare const instruments: {
|
|
18
24
|
unfitted: {
|
|
19
25
|
'welte-t100-consensus': import("welte-mignon-emulator/t100").Instrument;
|
|
20
26
|
};
|
|
21
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* The one instrument on offer for the Licensee by name: the T-100
|
|
30
|
+
* consensus, named as unfitted.
|
|
31
|
+
* @category Systems and emulation
|
|
32
|
+
*/
|
|
22
33
|
export type WelteLicenseeInstrumentName = {
|
|
23
34
|
unfitted: 'welte-t100-consensus';
|
|
24
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* The names of the instruments on offer for the Licensee, of which
|
|
38
|
+
* there is one.
|
|
39
|
+
* @category Systems and emulation
|
|
40
|
+
*/
|
|
25
41
|
export declare const instrumentNames: readonly WelteLicenseeInstrumentName[];
|
|
26
42
|
/**
|
|
27
43
|
* Welte's own spool is carried over with the constants. Phillips (p. 181) says
|
|
@@ -34,6 +50,7 @@ export declare const instrumentNames: readonly WelteLicenseeInstrumentName[];
|
|
|
34
50
|
* that roll's tempo (`spoolFor`). Either way only its geometry is used, and
|
|
35
51
|
* that is better varied than trusted: it scales every conductance by k and
|
|
36
52
|
* every time constant by 1/k, and touches nothing dimensionless.
|
|
53
|
+
* @category Systems and emulation
|
|
37
54
|
*/
|
|
38
55
|
export declare const defaultWelteLicenseeOptions: WelteLicenseeOptions;
|
|
39
56
|
/**
|
|
@@ -48,5 +65,6 @@ export declare const defaultWelteLicenseeOptions: WelteLicenseeOptions;
|
|
|
48
65
|
* curve produced here names itself as such. The spool sets no tempo of its
|
|
49
66
|
* own: a version runs at the speed stated for its copies, or at that of the
|
|
50
67
|
* roll it was re-cut from times the length ratio.
|
|
68
|
+
* @category Systems and emulation
|
|
51
69
|
*/
|
|
52
70
|
export declare const welteLicenseeSystem: ReproducingSystem<WelteLicenseeOptions>;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Welte-Mignon (Licensee), the American re-cut of the T-100 rolls, as
|
|
3
|
+
* a reproducing system (`welteLicenseeSystem`). It is played by the
|
|
4
|
+
* T-100's mechanism on the T-100's constants, since no Licensee
|
|
5
|
+
* instrument has been fitted, and every curve it produces says so. It
|
|
6
|
+
* needs the optional peer dependency welte-mignon-emulator.
|
|
7
|
+
*
|
|
8
|
+
* @module linked-rolls/welte-licensee
|
|
9
|
+
*/
|
|
1
10
|
import { CONSENSUS } from "welte-mignon-emulator/t100";
|
|
2
11
|
import { track } from "../../model/Quantity.js";
|
|
3
12
|
import { welteLicensee } from "./bar.js";
|
|
@@ -14,8 +23,14 @@ import { defaultWelteT100Options, instrumentNameOf, nuanceOf, performAs } from "
|
|
|
14
23
|
*
|
|
15
24
|
* So a Licensee playback is a Freiburg reading of American paper, and the
|
|
16
25
|
* union has one arm to keep that visible. Nothing should be published from it.
|
|
26
|
+
* @category Systems and emulation
|
|
17
27
|
*/
|
|
18
28
|
export const instruments = { unfitted: { 'welte-t100-consensus': CONSENSUS } };
|
|
29
|
+
/**
|
|
30
|
+
* The names of the instruments on offer for the Licensee, of which
|
|
31
|
+
* there is one.
|
|
32
|
+
* @category Systems and emulation
|
|
33
|
+
*/
|
|
19
34
|
export const instrumentNames = [
|
|
20
35
|
{ unfitted: 'welte-t100-consensus' }
|
|
21
36
|
];
|
|
@@ -30,6 +45,7 @@ export const instrumentNames = [
|
|
|
30
45
|
* that roll's tempo (`spoolFor`). Either way only its geometry is used, and
|
|
31
46
|
* that is better varied than trusted: it scales every conductance by k and
|
|
32
47
|
* every time constant by 1/k, and touches nothing dimensionless.
|
|
48
|
+
* @category Systems and emulation
|
|
33
49
|
*/
|
|
34
50
|
export const defaultWelteLicenseeOptions = {
|
|
35
51
|
...defaultWelteT100Options,
|
|
@@ -57,6 +73,7 @@ const licenseeInstrument = (nuance) => instrumentNameOf(nuance) === 'consensus'
|
|
|
57
73
|
* curve produced here names itself as such. The spool sets no tempo of its
|
|
58
74
|
* own: a version runs at the speed stated for its copies, or at that of the
|
|
59
75
|
* roll it was re-cut from times the length ratio.
|
|
76
|
+
* @category Systems and emulation
|
|
60
77
|
*/
|
|
61
78
|
export const welteLicenseeSystem = {
|
|
62
79
|
name: 'Welte-Mignon (Licensee)',
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Operation, TrackerBar } from "../TrackerBar.js";
|
|
2
2
|
/**
|
|
3
3
|
* The commands of the Welte-Mignon T-100, as its tracker bar reads them.
|
|
4
|
+
* @category Systems and emulation
|
|
4
5
|
*/
|
|
5
6
|
export declare const welteT100ExpressionTypes: readonly ['SustainPedalOn', 'SustainPedalOff', 'SoftPedalOn', 'SoftPedalOff', 'MezzoforteOff', 'MezzoforteOn', 'SlowCrescendoOn', 'SlowCrescendoOff', 'ForzandoOn', 'ForzandoOff', 'MotorOff', 'MotorOn', 'Rewind', 'ElectricCutOff'];
|
|
7
|
+
/**
|
|
8
|
+
* A command of the Welte-Mignon T-100.
|
|
9
|
+
* @category Systems and emulation
|
|
10
|
+
*/
|
|
6
11
|
export type WelteT100ExpressionType = typeof welteT100ExpressionTypes[number];
|
|
7
12
|
/**
|
|
8
13
|
* What each T-100 command operates, so that it can be set against the
|
|
@@ -23,11 +28,13 @@ export type WelteT100ExpressionType = typeof welteT100ExpressionTypes[number];
|
|
|
23
28
|
* being an automatic mercury contact (Skala-Rolle 98 §12) and its rewind
|
|
24
29
|
* riding on the bass sforzando-piano line. A red command of those kinds
|
|
25
30
|
* has no counterpart and stays a plain deletion.
|
|
31
|
+
* @category Systems and emulation
|
|
26
32
|
*/
|
|
27
33
|
export declare const welteT100Operations: Readonly<Partial<Record<WelteT100ExpressionType, Operation>>>;
|
|
28
34
|
/**
|
|
29
35
|
* A single added accent on the T-100: a valve latched on and off again
|
|
30
36
|
* straight away.
|
|
37
|
+
* @category Systems and emulation
|
|
31
38
|
*/
|
|
32
39
|
export declare const welteT100Accents: readonly (readonly WelteT100ExpressionType[])[];
|
|
33
40
|
/**
|
|
@@ -37,5 +44,6 @@ export declare const welteT100Accents: readonly (readonly WelteT100ExpressionTyp
|
|
|
37
44
|
* The expression valves are duplicated, bass below the note block and
|
|
38
45
|
* treble above it, in mirrored order. The rolls run at three metres a
|
|
39
46
|
* minute (Phillips 2016, p. 113; Bärtsch 2020 gives 3 or 2.9).
|
|
47
|
+
* @category Systems and emulation
|
|
40
48
|
*/
|
|
41
49
|
export declare const welteT100: TrackerBar;
|
|
@@ -2,6 +2,7 @@ import { describeTrackerBar } from "../TrackerBar.js";
|
|
|
2
2
|
import { metersPerMinute, mm } from "../../model/Quantity.js";
|
|
3
3
|
/**
|
|
4
4
|
* The commands of the Welte-Mignon T-100, as its tracker bar reads them.
|
|
5
|
+
* @category Systems and emulation
|
|
5
6
|
*/
|
|
6
7
|
export const welteT100ExpressionTypes = [
|
|
7
8
|
'SustainPedalOn',
|
|
@@ -38,6 +39,7 @@ export const welteT100ExpressionTypes = [
|
|
|
38
39
|
* being an automatic mercury contact (Skala-Rolle 98 §12) and its rewind
|
|
39
40
|
* riding on the bass sforzando-piano line. A red command of those kinds
|
|
40
41
|
* has no counterpart and stays a plain deletion.
|
|
42
|
+
* @category Systems and emulation
|
|
41
43
|
*/
|
|
42
44
|
export const welteT100Operations = {
|
|
43
45
|
MezzoforteOn: { operates: 'mezzoforte', spelling: 'on', sided: true },
|
|
@@ -54,6 +56,7 @@ export const welteT100Operations = {
|
|
|
54
56
|
/**
|
|
55
57
|
* A single added accent on the T-100: a valve latched on and off again
|
|
56
58
|
* straight away.
|
|
59
|
+
* @category Systems and emulation
|
|
57
60
|
*/
|
|
58
61
|
export const welteT100Accents = [
|
|
59
62
|
['SlowCrescendoOn', 'SlowCrescendoOff'],
|
|
@@ -66,6 +69,7 @@ export const welteT100Accents = [
|
|
|
66
69
|
* The expression valves are duplicated, bass below the note block and
|
|
67
70
|
* treble above it, in mirrored order. The rolls run at three metres a
|
|
68
71
|
* minute (Phillips 2016, p. 113; Bärtsch 2020 gives 3 or 2.9).
|
|
72
|
+
* @category Systems and emulation
|
|
69
73
|
*/
|
|
70
74
|
export const welteT100 = describeTrackerBar({
|
|
71
75
|
id: 'welte-t100',
|