linked-rolls 0.6.0 → 0.8.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 +5 -3
- package/lib/Agent.d.ts +19 -2
- package/lib/Agent.js +10 -1
- package/lib/Edition.d.ts +8 -1
- package/lib/migrate.js +5 -1
- package/lib/schema.json +65 -6
- package/lib/spec/context.json +1 -0
- package/lib/systems/welteT100/system.d.ts +20 -5
- package/lib/systems/welteT100/system.js +20 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,9 +47,11 @@ 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
|
-
|
|
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
|
|
53
55
|
come as two readings, `pedalPresets.damping`, under which every lift the
|
|
54
56
|
rolls punch damps, and `pedalPresets.brushing`, under which the quick runs
|
|
55
57
|
of latch changes brush the strings without damping. What the emulator does
|
package/lib/Agent.d.ts
CHANGED
|
@@ -16,11 +16,17 @@ export interface Named {
|
|
|
16
16
|
*/
|
|
17
17
|
sameAs: string[];
|
|
18
18
|
}
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const editorialRoles: readonly ["editor", "transcription", "collation", "encoding", "commentary", "proofreading"];
|
|
20
|
+
/**
|
|
21
|
+
* The part an editor took in the editorial work.
|
|
22
|
+
*/
|
|
23
|
+
export type EditorialRole = typeof editorialRoles[number];
|
|
24
|
+
declare const nonEditorialRoles: readonly ["pianist", "publisher"];
|
|
20
25
|
/**
|
|
21
26
|
* The role an agent plays in the context of the edition.
|
|
22
27
|
*/
|
|
23
|
-
export type AgentRole = typeof
|
|
28
|
+
export type AgentRole = EditorialRole | typeof nonEditorialRoles[number];
|
|
29
|
+
export declare const agentRoles: readonly AgentRole[];
|
|
24
30
|
/**
|
|
25
31
|
* A person or a group: a pianist, an editor, a publisher,
|
|
26
32
|
* a manufacturer, a library.
|
|
@@ -37,6 +43,16 @@ export interface Agent extends Named, Partial<WithId> {
|
|
|
37
43
|
* An agent that is a person.
|
|
38
44
|
*/
|
|
39
45
|
export type Person = Agent;
|
|
46
|
+
/**
|
|
47
|
+
* A person who took part in preparing the edition.
|
|
48
|
+
*/
|
|
49
|
+
export interface Editor extends Person {
|
|
50
|
+
/**
|
|
51
|
+
* The part this person took in the editorial work.
|
|
52
|
+
* @see crm:P2 has type
|
|
53
|
+
*/
|
|
54
|
+
role: EditorialRole;
|
|
55
|
+
}
|
|
40
56
|
export type WithActor = {
|
|
41
57
|
/**
|
|
42
58
|
* The person who carried out this activity.
|
|
@@ -57,3 +73,4 @@ export interface Place extends Named {
|
|
|
57
73
|
*/
|
|
58
74
|
export interface Concept extends Named, Partial<WithId> {
|
|
59
75
|
}
|
|
76
|
+
export {};
|
package/lib/Agent.js
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const editorialRoles = [
|
|
2
|
+
'editor',
|
|
3
|
+
'transcription',
|
|
4
|
+
'collation',
|
|
5
|
+
'encoding',
|
|
6
|
+
'commentary',
|
|
7
|
+
'proofreading'
|
|
8
|
+
];
|
|
9
|
+
const nonEditorialRoles = ['pianist', 'publisher'];
|
|
10
|
+
export const agentRoles = [...nonEditorialRoles, ...editorialRoles];
|
package/lib/Edition.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { RollCopy } from "./RollCopy";
|
|
|
2
2
|
import { Version } from "./Version";
|
|
3
3
|
import { CollationTolerance } from "./Collation";
|
|
4
4
|
import { DateAssignment, ObjectAssumption } from "./Assumption";
|
|
5
|
-
import { Concept, Person, Place } from "./Agent";
|
|
5
|
+
import { Concept, Editor, Person, Place } from "./Agent";
|
|
6
6
|
import { RollTempo } from "./ReproducingSystem";
|
|
7
7
|
/**
|
|
8
8
|
* This type describes the creation of an edition,
|
|
@@ -10,6 +10,13 @@ import { RollTempo } from "./ReproducingSystem";
|
|
|
10
10
|
* @see lrmoo:F28 Expression Creation
|
|
11
11
|
*/
|
|
12
12
|
export interface EditionCreation {
|
|
13
|
+
/**
|
|
14
|
+
* The persons who prepared the edition, each with the part
|
|
15
|
+
* they took in the editorial work. An edition written before
|
|
16
|
+
* this field existed carries none.
|
|
17
|
+
* @see crm:P14 carried out by
|
|
18
|
+
*/
|
|
19
|
+
editors?: Editor[];
|
|
13
20
|
/**
|
|
14
21
|
* The person or institution responsible for publishing the edition.
|
|
15
22
|
* @see crm:P14 carried out by
|
package/lib/migrate.js
CHANGED
|
@@ -75,4 +75,8 @@ const withRollSystem = (edition) => {
|
|
|
75
75
|
const system = { '@id': id, ...concept, ...(stated && { name: stated }) };
|
|
76
76
|
return { ...edition, roll: { ...edition.roll, system } };
|
|
77
77
|
};
|
|
78
|
-
|
|
78
|
+
/** An edition written before the editors were carried names none. */
|
|
79
|
+
const withEditors = (edition) => !edition.creation || edition.creation.editors
|
|
80
|
+
? edition
|
|
81
|
+
: { ...edition, creation: { ...edition.creation, editors: [] } };
|
|
82
|
+
export const migrate = (edition) => walk(withRollSystem(withEditors(edition)));
|
package/lib/schema.json
CHANGED
|
@@ -39,13 +39,20 @@
|
|
|
39
39
|
"type": "object"
|
|
40
40
|
},
|
|
41
41
|
"AgentRole": {
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
"anyOf": [
|
|
43
|
+
{
|
|
44
|
+
"$ref": "#/definitions/EditorialRole"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"const": "pianist",
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"const": "publisher",
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
47
54
|
],
|
|
48
|
-
"
|
|
55
|
+
"description": "The role an agent plays in the context of the edition."
|
|
49
56
|
},
|
|
50
57
|
"AnyArgumentation": {
|
|
51
58
|
"anyOf": [
|
|
@@ -406,6 +413,13 @@
|
|
|
406
413
|
"$ref": "#/definitions/CollationTolerance",
|
|
407
414
|
"description": "The tolerance parameters used when collating (aligning) the different roll copies for this edition. Not exported to RDF."
|
|
408
415
|
},
|
|
416
|
+
"editors": {
|
|
417
|
+
"description": "The persons who prepared the edition, each with the part they took in the editorial work. An edition written before this field existed carries none. [ontology: crm:P14 carried out by]",
|
|
418
|
+
"items": {
|
|
419
|
+
"$ref": "#/definitions/Editor"
|
|
420
|
+
},
|
|
421
|
+
"type": "array"
|
|
422
|
+
},
|
|
409
423
|
"publicationDate": {
|
|
410
424
|
"description": "The date on which the edition was published. [ontology: dcterms:date]",
|
|
411
425
|
"format": "date",
|
|
@@ -422,6 +436,51 @@
|
|
|
422
436
|
],
|
|
423
437
|
"type": "object"
|
|
424
438
|
},
|
|
439
|
+
"Editor": {
|
|
440
|
+
"description": "A person who took part in preparing the edition.",
|
|
441
|
+
"properties": {
|
|
442
|
+
"name": {
|
|
443
|
+
"description": "The name, e.g. \"Grünfeld, Alfred\", \"Wien\", \"M. Welte & Söhne\". [ontology: rdfs:label]",
|
|
444
|
+
"type": "string"
|
|
445
|
+
},
|
|
446
|
+
"role": {
|
|
447
|
+
"$ref": "#/definitions/EditorialRole",
|
|
448
|
+
"description": "The part this person took in the editorial work. [ontology: crm:P2 has type]"
|
|
449
|
+
},
|
|
450
|
+
"sameAs": {
|
|
451
|
+
"description": "Authority records for the same thing: GND, Wikidata, geonames or similar. [ontology: owl:sameAs]",
|
|
452
|
+
"examples": [
|
|
453
|
+
"https://d-nb.info/gnd/116888652"
|
|
454
|
+
],
|
|
455
|
+
"items": {
|
|
456
|
+
"type": "string"
|
|
457
|
+
},
|
|
458
|
+
"type": "array"
|
|
459
|
+
},
|
|
460
|
+
"@id": {
|
|
461
|
+
"description": "A unique identifier for this object.",
|
|
462
|
+
"type": "string"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"required": [
|
|
466
|
+
"name",
|
|
467
|
+
"role",
|
|
468
|
+
"sameAs"
|
|
469
|
+
],
|
|
470
|
+
"type": "object"
|
|
471
|
+
},
|
|
472
|
+
"EditorialRole": {
|
|
473
|
+
"description": "The part an editor took in the editorial work.",
|
|
474
|
+
"enum": [
|
|
475
|
+
"editor",
|
|
476
|
+
"transcription",
|
|
477
|
+
"collation",
|
|
478
|
+
"encoding",
|
|
479
|
+
"commentary",
|
|
480
|
+
"proofreading"
|
|
481
|
+
],
|
|
482
|
+
"type": "string"
|
|
483
|
+
},
|
|
425
484
|
"Expression": {
|
|
426
485
|
"description": "An expression symbol, representing a perforation on the roll that governs dynamics, pedaling, or mechanical functions of the reproducing piano. Each expression has a scope (bass or treble) and a specific expression type. [ontology: reo:Expression]",
|
|
427
486
|
"properties": {
|
package/lib/spec/context.json
CHANGED
|
@@ -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,6 +12,21 @@ 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;
|
|
15
30
|
/**
|
|
16
31
|
* The two readings of the pedal mechanism the emulator offers, by name.
|
|
17
32
|
* Under `damping` the dampers reach the strings within the shortest lift
|
|
@@ -33,7 +48,7 @@ export type WelteT100Options = {
|
|
|
33
48
|
* rate of revolution, so the paper runs faster as the spool fills.
|
|
34
49
|
*/
|
|
35
50
|
spool: Spool;
|
|
36
|
-
/** 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. */
|
|
37
52
|
nuance: Record<Half, Parameters>;
|
|
38
53
|
/** Constants of the two pedal actions, one of `pedalPresets` or a set of one's own. */
|
|
39
54
|
pedals: Parameters;
|
|
@@ -63,8 +78,8 @@ export declare const secondsAt: (spool: Spool, mm: number) => number;
|
|
|
63
78
|
* The red Welte, as welte-t100-emulator models it: the take-up spool sets
|
|
64
79
|
* the time axis, the Nuancierbälge fill through their conduits and are
|
|
65
80
|
* arrested by the Mezzoforte pin, and the two pedals travel rather than
|
|
66
|
-
* switch. The constants are
|
|
67
|
-
* lines of
|
|
68
|
-
* 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.
|
|
69
84
|
*/
|
|
70
85
|
export declare const welteT100System: ReproducingSystem<WelteT100Options>;
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import { aperturePorts, DEFAULT_PUNCH_MM, geometryInMm, Grid, levelChanges, mezzoforteTravel, paperSeconds, pedalBrushing, pedalDefaults,
|
|
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));
|
|
3
18
|
/**
|
|
4
19
|
* The two readings of the pedal mechanism the emulator offers, by name.
|
|
5
20
|
* Under `damping` the dampers reach the strings within the shortest lift
|
|
@@ -12,16 +27,11 @@ export const pedalPresets = {
|
|
|
12
27
|
damping: pedalDefaults,
|
|
13
28
|
brushing: pedalBrushing
|
|
14
29
|
};
|
|
15
|
-
const sameParameters = (a, b) => Object.keys(a).length === Object.keys(b).length
|
|
16
|
-
&& Object.entries(a).every(([name, value]) => b[name] === value);
|
|
17
30
|
/** The preset a set of pedal constants is, if it is one. */
|
|
18
31
|
export const pedalPresetOf = (pedals) => Object.keys(pedalPresets).find(name => sameParameters(pedalPresets[name], pedals));
|
|
19
32
|
export const defaultWelteT100Options = {
|
|
20
33
|
spool: WELTE_SPOOL,
|
|
21
|
-
nuance:
|
|
22
|
-
bass: playbackParameters('bass'),
|
|
23
|
-
treble: playbackParameters('treble')
|
|
24
|
-
},
|
|
34
|
+
nuance: nuanceOf(instruments.consensus),
|
|
25
35
|
pedals: pedalPresets.damping,
|
|
26
36
|
velocity: { piano: 35, mezzoforte: 60, forte: 90 },
|
|
27
37
|
pedalMode: 'continuous',
|
|
@@ -188,9 +198,9 @@ const perform = (events, options, roll) => {
|
|
|
188
198
|
* The red Welte, as welte-t100-emulator models it: the take-up spool sets
|
|
189
199
|
* the time axis, the Nuancierbälge fill through their conduits and are
|
|
190
200
|
* arrested by the Mezzoforte pin, and the two pedals travel rather than
|
|
191
|
-
* switch. The constants are
|
|
192
|
-
* lines of
|
|
193
|
-
* 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.
|
|
194
204
|
*/
|
|
195
205
|
export const welteT100System = {
|
|
196
206
|
name: 'Welte-Mignon T100',
|
package/package.json
CHANGED