linked-rolls 0.6.0 → 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 +5 -3
- 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
|
|
@@ -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