linked-rolls 0.5.1 → 0.7.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 +11 -6
- package/lib/Feature.d.ts +3 -1
- package/lib/schema.json +2 -2
- package/lib/systems/welteT100/system.d.ts +36 -6
- package/lib/systems/welteT100/system.js +35 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,12 +47,17 @@ The first system is the red Welte, `linked-rolls/welte-t100`, built on
|
|
|
47
47
|
[welte-t100-emulator](https://github.com/pfefferniels/welte-t100): the
|
|
48
48
|
take-up spool sets the time axis, the Nuancierbälge fill through their
|
|
49
49
|
conduits and are arrested by the Mezzoforte pin, and the two pedals travel
|
|
50
|
-
rather than switch. The constants
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
rather than switch. The nuancing constants come as `instruments`: the
|
|
51
|
+
consensus fitted across the hand-drawn nuance lines of six rolls, which
|
|
52
|
+
is the default, and the setting that drew each of those rolls, named by
|
|
53
|
+
its Welte number, all with the terms that describe the drawing apparatus
|
|
54
|
+
switched off. The pedals leave no drawn line, so their constants
|
|
55
|
+
come as two readings, `pedalPresets.damping`, under which every lift the
|
|
56
|
+
rolls punch damps, and `pedalPresets.brushing`, under which the quick runs
|
|
57
|
+
of latch changes brush the strings without damping. What the emulator does
|
|
58
|
+
not determine is how bellows travel maps onto MIDI velocity;
|
|
59
|
+
`WelteT100Options.velocity` anchors that map at the open rail, the
|
|
60
|
+
Mezzoforte pin and the closed rail, and its defaults are midi2exp's.
|
|
56
61
|
|
|
57
62
|
```ts
|
|
58
63
|
import { Emulation } from 'linked-rolls'
|
package/lib/Feature.d.ts
CHANGED
|
@@ -116,6 +116,8 @@ export declare const writingMethods: readonly ["Print", "Handwriting", "Stamp"];
|
|
|
116
116
|
* printed, handwritten, or stamped.
|
|
117
117
|
*/
|
|
118
118
|
export type WritingMethod = typeof writingMethods[number];
|
|
119
|
+
/** The text a writing carries. It names no carriers of its own, the writing being its carrier. */
|
|
120
|
+
export type Transcription = Omit<Text, 'carriers'>;
|
|
119
121
|
/**
|
|
120
122
|
* A piece of writing found on the roll, such as a label,
|
|
121
123
|
* catalogue number, or annotation. Writings have a method
|
|
@@ -135,7 +137,7 @@ export interface Writing extends Trace<'Writing'> {
|
|
|
135
137
|
* can be annotated with a belief about its correctness.
|
|
136
138
|
* @see crm:P128 carries
|
|
137
139
|
*/
|
|
138
|
-
transcription: ObjectAssumption<
|
|
140
|
+
transcription: ObjectAssumption<Transcription>;
|
|
139
141
|
}
|
|
140
142
|
/**
|
|
141
143
|
* A visible mark on the roll, such as a pencil mark,
|
package/lib/schema.json
CHANGED
|
@@ -1189,7 +1189,7 @@
|
|
|
1189
1189
|
],
|
|
1190
1190
|
"type": "object"
|
|
1191
1191
|
},
|
|
1192
|
-
"ObjectAssumption<
|
|
1192
|
+
"ObjectAssumption<Transcription>": {
|
|
1193
1193
|
"description": "An object assumption wraps a complex object with an optional annotation. Used for structured values (e.g. persons, conditions) whose properties may be uncertain.",
|
|
1194
1194
|
"properties": {
|
|
1195
1195
|
"@annotation": {
|
|
@@ -1760,7 +1760,7 @@
|
|
|
1760
1760
|
"description": "The method by which this writing was produced (e.g. through print, handwriting, or stamping). [ontology: crm:P2 has type]"
|
|
1761
1761
|
},
|
|
1762
1762
|
"transcription": {
|
|
1763
|
-
"$ref": "#/definitions/ObjectAssumption%
|
|
1763
|
+
"$ref": "#/definitions/ObjectAssumption%3CTranscription%3E",
|
|
1764
1764
|
"description": "A transcription of the text content of the writing. This is an object assumption so that the transcription can be annotated with a belief about its correctness. [ontology: crm:P128 carries]"
|
|
1765
1765
|
},
|
|
1766
1766
|
"vertical": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Half, Parameters, PedalMode, Spool } from "welte-t100-emulator";
|
|
1
|
+
import { Half, Instrument, Parameters, PedalMode, RollNumber, Spool } from "welte-t100-emulator";
|
|
2
2
|
import { ReproducingSystem } from "../../ReproducingSystem";
|
|
3
3
|
/**
|
|
4
4
|
* MIDI velocity at the open rail of the Nuancierbalg, at the Mezzoforte pin,
|
|
@@ -12,15 +12,45 @@ export type VelocityMap = {
|
|
|
12
12
|
mezzoforte: number;
|
|
13
13
|
forte: number;
|
|
14
14
|
};
|
|
15
|
+
export type { Instrument } from "welte-t100-emulator";
|
|
16
|
+
export type InstrumentName = 'consensus' | RollNumber;
|
|
17
|
+
/**
|
|
18
|
+
* The instruments the emulator was fitted as: the consensus over the six
|
|
19
|
+
* rolls with drawn nuance lines, and the setting that drew each of them,
|
|
20
|
+
* named by the roll's Welte number. The provenance beside each says what
|
|
21
|
+
* it was fitted to and how well.
|
|
22
|
+
*/
|
|
23
|
+
export declare const instruments: Readonly<Record<InstrumentName, Instrument>>;
|
|
24
|
+
/** The instruments by name, the consensus first. */
|
|
25
|
+
export declare const instrumentNames: readonly InstrumentName[];
|
|
26
|
+
/** The nuancing constants of an instrument, one set for each half of the keyboard. */
|
|
27
|
+
export declare const nuanceOf: (instrument: Instrument) => Record<Half, Parameters>;
|
|
28
|
+
/** The instrument a pair of nuancing constants belongs to, if it is one. */
|
|
29
|
+
export declare const instrumentNameOf: (nuance: Record<Half, Parameters>) => InstrumentName | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The two readings of the pedal mechanism the emulator offers, by name.
|
|
32
|
+
* Under `damping` the dampers reach the strings within the shortest lift
|
|
33
|
+
* the rolls punch, so every lift damps. Under `brushing` their fall is
|
|
34
|
+
* slowed until the quick runs of latch changes in the SUPRA corpus dip
|
|
35
|
+
* without damping, at the price that lifts shorter than about 265 ms brush
|
|
36
|
+
* as well.
|
|
37
|
+
*/
|
|
38
|
+
export declare const pedalPresets: {
|
|
39
|
+
damping: Readonly<Record<string, number>>;
|
|
40
|
+
brushing: Readonly<Record<string, number>>;
|
|
41
|
+
};
|
|
42
|
+
export type PedalPreset = keyof typeof pedalPresets;
|
|
43
|
+
/** The preset a set of pedal constants is, if it is one. */
|
|
44
|
+
export declare const pedalPresetOf: (pedals: Parameters) => PedalPreset | undefined;
|
|
15
45
|
export type WelteT100Options = {
|
|
16
46
|
/**
|
|
17
47
|
* The take-up spool, which sets the time axis: it is held at a constant
|
|
18
48
|
* rate of revolution, so the paper runs faster as the spool fills.
|
|
19
49
|
*/
|
|
20
50
|
spool: Spool;
|
|
21
|
-
/** Constants of the nuancing mechanism, one set for each half of the keyboard. */
|
|
51
|
+
/** Constants of the nuancing mechanism, one set for each half of the keyboard: `nuanceOf` an instrument, or a set of one's own. */
|
|
22
52
|
nuance: Record<Half, Parameters>;
|
|
23
|
-
/** Constants of the two pedal actions. */
|
|
53
|
+
/** Constants of the two pedal actions, one of `pedalPresets` or a set of one's own. */
|
|
24
54
|
pedals: Parameters;
|
|
25
55
|
velocity: VelocityMap;
|
|
26
56
|
/**
|
|
@@ -48,8 +78,8 @@ export declare const secondsAt: (spool: Spool, mm: number) => number;
|
|
|
48
78
|
* The red Welte, as welte-t100-emulator models it: the take-up spool sets
|
|
49
79
|
* the time axis, the Nuancierbälge fill through their conduits and are
|
|
50
80
|
* arrested by the Mezzoforte pin, and the two pedals travel rather than
|
|
51
|
-
* switch. The constants are
|
|
52
|
-
* lines of
|
|
53
|
-
* switched off.
|
|
81
|
+
* switch. The constants are the consensus fitted across the hand-drawn
|
|
82
|
+
* nuance lines of six rolls, with the terms that describe the drawing
|
|
83
|
+
* apparatus switched off; `instruments` offers each roll's own setting.
|
|
54
84
|
*/
|
|
55
85
|
export declare const welteT100System: ReproducingSystem<WelteT100Options>;
|
|
@@ -1,12 +1,38 @@
|
|
|
1
|
-
import { aperturePorts, DEFAULT_PUNCH_MM, geometryInMm, Grid, levelChanges, mezzoforteTravel, paperSeconds,
|
|
1
|
+
import { aperturePorts, CONSENSUS, DEFAULT_PUNCH_MM, geometryInMm, Grid, levelChanges, mezzoforteTravel, paperSeconds, pedalBrushing, pedalDefaults, pneumaticModel, PRESETS, ROWS_PER_MM, runPedals, TRACKER_BORE_MM, travelBetweenRails, WELTE_SPOOL, } from "welte-t100-emulator";
|
|
2
2
|
import { welteT100 } from "./bar";
|
|
3
|
+
/**
|
|
4
|
+
* The instruments the emulator was fitted as: the consensus over the six
|
|
5
|
+
* rolls with drawn nuance lines, and the setting that drew each of them,
|
|
6
|
+
* named by the roll's Welte number. The provenance beside each says what
|
|
7
|
+
* it was fitted to and how well.
|
|
8
|
+
*/
|
|
9
|
+
export const instruments = { consensus: CONSENSUS, ...PRESETS };
|
|
10
|
+
/** The instruments by name, the consensus first. */
|
|
11
|
+
export const instrumentNames = ['consensus', ...Object.keys(PRESETS)];
|
|
12
|
+
const sameParameters = (a, b) => Object.keys(a).length === Object.keys(b).length
|
|
13
|
+
&& Object.entries(a).every(([name, value]) => b[name] === value);
|
|
14
|
+
/** The nuancing constants of an instrument, one set for each half of the keyboard. */
|
|
15
|
+
export const nuanceOf = (instrument) => ({ bass: instrument.bass, treble: instrument.treble });
|
|
16
|
+
/** The instrument a pair of nuancing constants belongs to, if it is one. */
|
|
17
|
+
export const instrumentNameOf = (nuance) => instrumentNames.find(name => sameParameters(instruments[name].bass, nuance.bass) && sameParameters(instruments[name].treble, nuance.treble));
|
|
18
|
+
/**
|
|
19
|
+
* The two readings of the pedal mechanism the emulator offers, by name.
|
|
20
|
+
* Under `damping` the dampers reach the strings within the shortest lift
|
|
21
|
+
* the rolls punch, so every lift damps. Under `brushing` their fall is
|
|
22
|
+
* slowed until the quick runs of latch changes in the SUPRA corpus dip
|
|
23
|
+
* without damping, at the price that lifts shorter than about 265 ms brush
|
|
24
|
+
* as well.
|
|
25
|
+
*/
|
|
26
|
+
export const pedalPresets = {
|
|
27
|
+
damping: pedalDefaults,
|
|
28
|
+
brushing: pedalBrushing
|
|
29
|
+
};
|
|
30
|
+
/** The preset a set of pedal constants is, if it is one. */
|
|
31
|
+
export const pedalPresetOf = (pedals) => Object.keys(pedalPresets).find(name => sameParameters(pedalPresets[name], pedals));
|
|
3
32
|
export const defaultWelteT100Options = {
|
|
4
33
|
spool: WELTE_SPOOL,
|
|
5
|
-
nuance:
|
|
6
|
-
|
|
7
|
-
treble: playbackParameters('treble')
|
|
8
|
-
},
|
|
9
|
-
pedals: pedalDefaults,
|
|
34
|
+
nuance: nuanceOf(instruments.consensus),
|
|
35
|
+
pedals: pedalPresets.damping,
|
|
10
36
|
velocity: { piano: 35, mezzoforte: 60, forte: 90 },
|
|
11
37
|
pedalMode: 'continuous',
|
|
12
38
|
trackerBore: TRACKER_BORE_MM,
|
|
@@ -172,9 +198,9 @@ const perform = (events, options, roll) => {
|
|
|
172
198
|
* The red Welte, as welte-t100-emulator models it: the take-up spool sets
|
|
173
199
|
* the time axis, the Nuancierbälge fill through their conduits and are
|
|
174
200
|
* arrested by the Mezzoforte pin, and the two pedals travel rather than
|
|
175
|
-
* switch. The constants are
|
|
176
|
-
* lines of
|
|
177
|
-
* switched off.
|
|
201
|
+
* switch. The constants are the consensus fitted across the hand-drawn
|
|
202
|
+
* nuance lines of six rolls, with the terms that describe the drawing
|
|
203
|
+
* apparatus switched off; `instruments` offers each roll's own setting.
|
|
178
204
|
*/
|
|
179
205
|
export const welteT100System = {
|
|
180
206
|
name: 'Welte-Mignon T100',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linked-rolls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"welte-t100-emulator": "file:../welte-t100"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"welte-t100-emulator": "^0.
|
|
44
|
+
"welte-t100-emulator": "^0.4.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"welte-t100-emulator": {
|