linked-rolls 0.2.0 → 0.3.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/lib/systems/welteT100.js +4 -13
- package/package.json +3 -3
package/lib/systems/welteT100.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aperturePorts, DEFAULT_PUNCH_MM, geometryInMm, Grid, levelChanges, mezzoforteTravel,
|
|
1
|
+
import { aperturePorts, DEFAULT_PUNCH_MM, geometryInMm, Grid, levelChanges, mezzoforteTravel, paperSeconds, pedalDefaults, playbackParameters, pneumaticModel, ROWS_PER_MM, runPedals, TRACKER_BORE_MM, travelBetweenRails, WELTE_SPOOL, } from "welte-t100-emulator";
|
|
2
2
|
import { welteT100 } from "../TrackerBar";
|
|
3
3
|
export const defaultWelteT100Options = {
|
|
4
4
|
spool: WELTE_SPOOL,
|
|
@@ -87,19 +87,10 @@ const gridOver = (events, spool) => {
|
|
|
87
87
|
const seconds = Float64Array.from({ length }, (_, row) => secondsAt(spool, row / ROWS_PER_MM));
|
|
88
88
|
return new Grid(0, seconds);
|
|
89
89
|
};
|
|
90
|
-
const nuanceCurves = (grid, ports, samples,
|
|
91
|
-
const onsetRows = (half) => events
|
|
92
|
-
.filter(isNote)
|
|
93
|
-
.filter(note => halfOf(note, options.division) === half)
|
|
94
|
-
.map(note => rowOf(note.horizontal.from));
|
|
95
|
-
const density = {
|
|
96
|
-
bass: noteDensity(grid, onsetRows('bass')),
|
|
97
|
-
treble: noteDensity(grid, onsetRows('treble')),
|
|
98
|
-
};
|
|
99
|
-
const totalNoteDensity = Float64Array.from(density.bass, (value, index) => value + density.treble[index]);
|
|
90
|
+
const nuanceCurves = (grid, ports, samples, options) => {
|
|
100
91
|
const curveOf = (half) => {
|
|
101
92
|
const params = options.nuance[half];
|
|
102
|
-
const output = pneumaticModel.run({ grid, half, ports
|
|
93
|
+
const output = pneumaticModel.run({ grid, half, ports }, params);
|
|
103
94
|
const travel = travelBetweenRails(output, params);
|
|
104
95
|
const hook = clamp(mezzoforteTravel(params), 0.01, 0.99);
|
|
105
96
|
return {
|
|
@@ -165,7 +156,7 @@ const perform = (events, options, roll) => {
|
|
|
165
156
|
place: Float64Array.from(grid.seconds, (_, row) => row / ROWS_PER_MM),
|
|
166
157
|
seconds: grid.seconds
|
|
167
158
|
};
|
|
168
|
-
const nuance = nuanceCurves(grid, ports, samples,
|
|
159
|
+
const nuance = nuanceCurves(grid, ports, samples, options);
|
|
169
160
|
const pedals = pedalCurves(grid, ports, samples, options);
|
|
170
161
|
const readingsOf = (control) => readings.filter(reading => reading.punch.control === control);
|
|
171
162
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linked-rolls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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": {
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"typescript": "^5.6.0-dev.20240809",
|
|
39
39
|
"vite": "^5.4.20",
|
|
40
40
|
"vitest": "^1.2.0",
|
|
41
|
-
"welte-t100-emulator": "file:../
|
|
41
|
+
"welte-t100-emulator": "file:../welte-t100"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"welte-t100-emulator": "
|
|
44
|
+
"welte-t100-emulator": "^0.3.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependenciesMeta": {
|
|
47
47
|
"welte-t100-emulator": {
|