import { RollCopy } from "../model/RollCopy.js"; import { TrackerBar } from "../systems/TrackerBar.js"; import { Millimeters, Seconds } from "../model/Quantity.js"; /** * Peter Phillips's "e-roll" file, the unprocessed output of his * pneumatic roll reader (thesis pp. 182–196): the roll runs over a * tracker bar and a switch on every position writes a MIDI note as its * perforation passes. Every position is there, expression included, all * at one velocity. His other product, the standard MIDI file, has the * expression decoded into velocities already and cannot be read as a * roll. * * Two things follow from a reader rather than a scanner. The events are * elapsed time, not paper, and the take-up spool accelerates the paper * as it fills, so `placeAt` has to put the time back onto the paper. * And a switch stays open longer than its perforation is long, so a * chain read here runs past the punched one: Phillips measures the * pneumatic on-time as exceeding the apparent length of a perforation * (p. 178), and names what it depends on as the length of the * perforation, the height of the tracker bar hole and the paper speed * (p. 180). * * Left in, that extension is not a difference between copies at all: * the end of a chain here is a pneumatic on-time where the end of a * scanned copy's chain is a punched slot, so a collation comparing the * two reads the one as a lengthening of the other. `extension` takes it * off at the end of every chain, and the copy records what was taken. * * How much to take off is measured rather than derived, since he gives * only the 0.5 mm by which the Welte bar's holes exceed the Licensee's * and not the absolute. Across welte225.org it comes to about 1.6 mm, * and the shape of it is simple: a constant, not growing with the * length of the perforation, with no shortest on-time the valve cannot * fall below, and with no run along the roll that one roll's span of * paper speed could show. The port that read it matters by about half a * millimetre either way, without any gradient across the bar, which is * measured but too coarse to model from one roll. */ /** * He numbers his files by two rules at once, which his free samples * show and which follow from what the file is for. A note carries the * MIDI number it sounds, so that the file plays on a MIDI instrument * without translation. An expression position, having no pitch to * carry, is numbered by its place on the bar plus a fixed offset: on a * red e-roll the sustain commands sit at 107 and 108 for positions 93 * and 94, and the soft pedal at 21 and 22 for positions 7 and 8, so the * offset is fourteen. * * The two rules collide on one number, the lowest note of the T-100 * sharing 24 with the tenth position. Notes win there, the note block * being the larger claim; none of his samples uses the number at all. * @category Sources */ export declare const CONTROL_OFFSET: Readonly>; /** * How `readFromPhillipsEroll` reads a file: the bar it numbers its * positions by, where its expression numbers sit, how time is put back * onto the paper, and what the reader added to the chains. * @category Sources */ export interface PhillipsErollOptions { /** * The bar the file numbers its positions by, which is the bar of * the roll he read. */ system?: TrackerBar; /** * How far above its position an expression number sits. Defaults to * what his samples show for that bar. */ controlOffset?: number; /** * Where on the paper the roll had run after so many seconds. The * default is the constant speed the system states, which ignores * the take-up spool; pass `paperAt` of welte-mignon-emulator to * account for it. */ placeAt?: (elapsed: Seconds) => Millimeters; /** * How much longer a valve is held on than the perforation that * opened it, taken off the end of every chain so that these lengths * can be compared with a scanned copy's. Nothing leaves the chains * as the reader reported them, which is what every copy read before * this option existed states. * * The copy records what was taken, and `revertShortening` puts it * back, so a figure revised later needs no second import. On * welte225.org the extension measures about 1.6 mm, with no * dependence on how long the perforation is. */ extension?: Millimeters; } /** * Reads one of his e-roll files as a copy of the roll, in millimetres * of paper, on the bar it was cut for and in that bar's numbering. A * position the bar does not read is left out, as the bar would leave it. * @category Sources */ export declare function readFromPhillipsEroll(buffer: ArrayBuffer, { system, controlOffset, placeAt, extension }?: PhillipsErollOptions): RollCopy; /** * The bars his files are known to be numbered by. * @category Sources */ export declare const phillipsSystems: readonly TrackerBar[];