tonus 0.1.8 → 0.5.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/BIBLIOGRAPHY.md +132 -108
- package/CHANGELOG.md +598 -1
- package/LICENSE +133 -29
- package/README.md +106 -83
- package/dist/data/am.js +2666 -11196
- package/dist/data/ams.d.ts +5 -0
- package/dist/data/ams.js +122 -0
- package/dist/data/attestation.d.ts +19 -0
- package/dist/data/attestation.js +15716 -0
- package/dist/data/attestation.json +15711 -0
- package/dist/data/cadentiae.d.ts +43 -0
- package/dist/data/cadentiae.js +174 -0
- package/dist/data/cal.js +48 -0
- package/dist/data/census.d.ts +12 -0
- package/dist/data/census.js +36 -0
- package/dist/data/commune-office.d.ts +4 -0
- package/dist/data/commune-office.js +2371 -0
- package/dist/data/commune-office.json +2365 -0
- package/dist/data/commune.js +181 -11
- package/dist/data/corpus-overlap.d.ts +17 -0
- package/dist/data/corpus-overlap.js +299 -5
- package/dist/data/cot.d.ts +5 -0
- package/dist/data/cot.js +172 -0
- package/dist/data/cse.d.ts +5 -0
- package/dist/data/cse.js +122 -0
- package/dist/data/gabc-glyphs.d.ts +45 -0
- package/dist/data/gabc-glyphs.js +122 -0
- package/dist/data/gr.js +754 -6394
- package/dist/data/kyriale.js +116 -116
- package/dist/data/la.js +799 -13419
- package/dist/data/lh.js +113 -3473
- package/dist/data/lu.js +931 -17631
- package/dist/data/nocturnale-romanum.js +1659 -10411
- package/dist/data/office-ferial.d.ts +4 -0
- package/dist/data/office-ferial.js +396 -0
- package/dist/data/office-ferial.json +391 -0
- package/dist/data/office-monastic.d.ts +17 -1
- package/dist/data/office-monastic.js +1403 -466
- package/dist/data/office-psalms-monastic.d.ts +13 -1
- package/dist/data/office-psalms-monastic.js +9 -0
- package/dist/data/propers.js +1 -1
- package/dist/data/psalms.js +22919 -5
- package/dist/data/psm.d.ts +5 -0
- package/dist/data/psm.js +122 -0
- package/dist/data/seasonal-respbreve.d.ts +5 -0
- package/dist/data/seasonal-respbreve.js +41 -0
- package/dist/data/seasonal-respbreve.json +35 -0
- package/dist/data/smufl-glyphs.d.ts +17 -0
- package/dist/data/smufl-glyphs.js +1546 -0
- package/dist/data/smufl-glyphs.json +1530 -0
- package/dist/engines/cal/calendar.d.ts +3 -2
- package/dist/engines/cal/calendar.js +105 -29
- package/dist/engines/cal/data/eras.d.ts +35 -0
- package/dist/engines/cal/data/eras.js +128 -0
- package/dist/engines/cal/date.js +44 -0
- package/dist/engines/cal/types.d.ts +15 -3
- package/dist/engines/cal/types.js +5 -5
- package/dist/engines/census/census.d.ts +7 -0
- package/dist/engines/census/census.js +179 -0
- package/dist/engines/census/types.d.ts +55 -0
- package/dist/engines/census/types.js +8 -0
- package/dist/engines/chant/attest.d.ts +39 -0
- package/dist/engines/chant/attest.js +90 -0
- package/dist/engines/chant/chant.d.ts +16 -4
- package/dist/engines/chant/chant.js +220 -30
- package/dist/engines/chant/data/compline.js +2 -1
- package/dist/engines/chant/data/masses.d.ts +56 -4
- package/dist/engines/chant/data/masses.js +305 -80
- package/dist/engines/chant/data/prime.js +1 -1
- package/dist/engines/chant/hour.js +279 -58
- package/dist/engines/chant/ordinary.d.ts +2 -0
- package/dist/engines/chant/ordinary.js +336 -56
- package/dist/engines/chant/propers.js +55 -5
- package/dist/engines/chant/psalm.d.ts +4 -4
- package/dist/engines/chant/psalm.js +25 -11
- package/dist/engines/chant/syllabify.d.ts +1 -0
- package/dist/engines/chant/syllabify.js +90 -17
- package/dist/engines/chant/types.d.ts +115 -12
- package/dist/engines/chant/types.js +38 -3
- package/dist/engines/harmonia/api.js +4 -0
- package/dist/engines/harmonia/data/doctrines.js +3 -1
- package/dist/engines/harmonia/tabula.d.ts +3 -0
- package/dist/engines/harmonia/tabula.js +1 -0
- package/dist/engines/harmonia/voice.d.ts +4 -0
- package/dist/engines/harmonia/voice.js +8 -4
- package/dist/engines/imprint.js +14 -1
- package/dist/engines/planet/orbital.js +4 -4
- package/dist/engines/planet/planet.d.ts +10 -0
- package/dist/engines/planet/planet.js +30 -3
- package/dist/engines/planet/position.js +13 -10
- package/dist/engines/planet/types.d.ts +1 -0
- package/dist/engines/score/api.d.ts +2 -13
- package/dist/engines/score/api.js +21 -8
- package/dist/engines/score/articulation.js +2 -2
- package/dist/engines/score/cadence.d.ts +76 -0
- package/dist/engines/score/cadence.js +96 -0
- package/dist/engines/score/emitters/accidentals.d.ts +21 -0
- package/dist/engines/score/emitters/accidentals.js +88 -0
- package/dist/engines/score/emitters/atramentum.d.ts +107 -0
- package/dist/engines/score/emitters/atramentum.js +239 -0
- package/dist/engines/score/emitters/breaking.d.ts +62 -0
- package/dist/engines/score/emitters/breaking.js +80 -0
- package/dist/engines/score/emitters/moderna.d.ts +38 -0
- package/dist/engines/score/emitters/moderna.js +612 -0
- package/dist/engines/score/emitters/svg.d.ts +143 -0
- package/dist/engines/score/emitters/svg.js +1328 -0
- package/dist/engines/score/emitters/tracks.d.ts +104 -0
- package/dist/engines/score/emitters/tracks.js +728 -0
- package/dist/engines/score/infer.d.ts +3 -3
- package/dist/engines/score/infer.js +2 -2
- package/dist/engines/score/inscriptio.d.ts +69 -0
- package/dist/engines/score/inscriptio.js +138 -0
- package/dist/engines/score/ir.d.ts +2 -2
- package/dist/engines/score/ir.js +59 -12
- package/dist/engines/score/lyric.d.ts +23 -0
- package/dist/engines/score/lyric.js +234 -0
- package/dist/engines/score/meta.d.ts +2 -2
- package/dist/engines/score/modulation.d.ts +12 -0
- package/dist/engines/score/modulation.js +49 -0
- package/dist/engines/score/neume.js +35 -4
- package/dist/engines/score/parse.js +150 -9
- package/dist/engines/score/phrasing.js +4 -3
- package/dist/engines/score/prosody.d.ts +38 -0
- package/dist/engines/score/prosody.js +70 -6
- package/dist/engines/score/tabula.d.ts +37 -5
- package/dist/engines/score/tabula.js +18 -0
- package/dist/engines/score/types.d.ts +88 -1
- package/dist/engines/temper/api.d.ts +4 -1
- package/dist/engines/temper/api.js +28 -5
- package/dist/engines/temper/data/guido.js +6 -2
- package/dist/engines/temper/data/modes.d.ts +6 -0
- package/dist/engines/temper/data/modes.js +42 -0
- package/dist/engines/temper/data/tones.d.ts +1 -1
- package/dist/engines/temper/data/tones.js +20 -11
- package/dist/engines/temper/interval.js +4 -3
- package/dist/engines/temper/modality.d.ts +11 -2
- package/dist/engines/temper/modality.js +74 -2
- package/dist/engines/temper/modes.d.ts +1 -1
- package/dist/engines/temper/pitch.d.ts +1 -1
- package/dist/engines/temper/pitch.js +12 -2
- package/dist/engines/temper/scale.d.ts +53 -0
- package/dist/engines/temper/scale.js +107 -8
- package/dist/index.d.ts +26 -8
- package/dist/index.js +37 -4
- package/docs/api/calendar.md +279 -0
- package/docs/api/census.md +288 -0
- package/docs/api/chant.md +657 -0
- package/docs/api/heavens.md +346 -0
- package/docs/api/index.md +263 -0
- package/docs/api/score.md +873 -0
- package/docs/api/tuning.md +619 -0
- package/package.json +11 -5
- package/dist/data/office-matins-roman.d.ts +0 -19
- package/dist/data/office-matins-roman.js +0 -4383
- package/dist/data/office-psalms-roman.d.ts +0 -15
- package/dist/data/office-psalms-roman.js +0 -28
- package/dist/data/office-roman.d.ts +0 -19
- package/dist/data/office-roman.js +0 -13792
- package/dist/engines/chant/matutinum.d.ts +0 -33
- package/dist/engines/chant/matutinum.js +0 -81
- package/dist/engines/score/emitters/midi.d.ts +0 -65
- package/dist/engines/score/emitters/midi.js +0 -162
- package/dist/engines/score/emitters/musicxml.d.ts +0 -18
- package/dist/engines/score/emitters/musicxml.js +0 -166
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { ChantTabulaRow } from "../tabula.js";
|
|
2
|
+
import type { Cadence } from "../cadence.js";
|
|
3
|
+
import type { Modulation } from "../modulation.js";
|
|
4
|
+
export type TrackName = "prosodia" | "chironomia" | "tonarium";
|
|
5
|
+
/** Analysis fields inscriptio hands the emitters when tracks are requested —
|
|
6
|
+
* the score-level data the flat tabula does not carry. */
|
|
7
|
+
export interface TrackData {
|
|
8
|
+
/**
|
|
9
|
+
* Normally `score.cadences`, whose `finality` the score builder has already
|
|
10
|
+
* joined from the catalogue. Cadences taken straight from `detectCadences`
|
|
11
|
+
* carry `finality: null` everywhere, and the terminal node quietly falls
|
|
12
|
+
* back to the modal target — a close on the finalis reads as closing, and
|
|
13
|
+
* everything else as suspending. Correct behaviour, but coarser than the
|
|
14
|
+
* measured answer, so pass the built score's cadences unless you mean it.
|
|
15
|
+
*/
|
|
16
|
+
cadences: Cadence[];
|
|
17
|
+
modulations: Modulation[];
|
|
18
|
+
/** Mode digit parsed from the chant's label; absent = no mode line. */
|
|
19
|
+
mode?: number;
|
|
20
|
+
}
|
|
21
|
+
/** One placed note as the emitters record it — the tracks' working unit.
|
|
22
|
+
* The same anchors the geometry contract exports, with the row attached. */
|
|
23
|
+
export interface TrackNote {
|
|
24
|
+
row: ChantTabulaRow;
|
|
25
|
+
/** The note's anchor — where the emitter placed it. */
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
system: number;
|
|
29
|
+
systemY: number;
|
|
30
|
+
/** The figure's measured ink edges. A track that SPANS notes — the cadence
|
|
31
|
+
* bracket, an arc over a neume — must reach the ink, not the anchors: a
|
|
32
|
+
* span drawn anchor-to-anchor is narrower than the notes it names and sits
|
|
33
|
+
* left of their centre, because an anchor is where a glyph starts rather
|
|
34
|
+
* than where it sits. The emitters have measured these all along and the
|
|
35
|
+
* mapping into TrackNote used to drop them. */
|
|
36
|
+
inkLeft: number;
|
|
37
|
+
inkRight: number;
|
|
38
|
+
}
|
|
39
|
+
/** One track's room within the band a system reserves below its lyric line. */
|
|
40
|
+
export interface TrackBand {
|
|
41
|
+
/** This band's top, offset from the start of the track region. */
|
|
42
|
+
top: number;
|
|
43
|
+
/** The room this band takes. */
|
|
44
|
+
height: number;
|
|
45
|
+
}
|
|
46
|
+
/** THE STACK. Every track rides either species and all may ride one score
|
|
47
|
+
* together, so the band room is the sum of what each asks for. The order is
|
|
48
|
+
* fixed here, not by the caller's array: the prosodia rides FIRST, directly
|
|
49
|
+
* under the lyric line — it reads the text itself, so it stays closest to
|
|
50
|
+
* it; the chironomia next, its wave an extension of the lyric line's
|
|
51
|
+
* rhythm; the tonarium below, a panel whose label row is its bottom edge
|
|
52
|
+
* and wants nothing under it. Requesting ["tonarium", "chironomia"]
|
|
53
|
+
* therefore draws exactly what ["chironomia", "tonarium"] draws. */
|
|
54
|
+
export declare function trackBands(tracks: readonly TrackName[] | undefined, k: number): {
|
|
55
|
+
prosodia: TrackBand | null;
|
|
56
|
+
chironomia: TrackBand | null;
|
|
57
|
+
tonarium: TrackBand | null;
|
|
58
|
+
extra: number;
|
|
59
|
+
};
|
|
60
|
+
export interface ProsodiaConfig {
|
|
61
|
+
/** Scale factor: staffInterval / (40/6) — 1 at the default staffHeight. */
|
|
62
|
+
k: number;
|
|
63
|
+
/** Band top within a system (system-local): the lyric baseline plus the
|
|
64
|
+
* band's offset in the stack. */
|
|
65
|
+
laneTop: number;
|
|
66
|
+
/** Right edge available to the band, per system (page x). */
|
|
67
|
+
rightFor: (system: number) => number;
|
|
68
|
+
/** The liturgical red for the accent dots (the 2026-08-11 amendment). */
|
|
69
|
+
rubricaColor: string;
|
|
70
|
+
}
|
|
71
|
+
/** Band room the prosodia reserves below each system's lyric line. The 8
|
|
72
|
+
* beyond the band's own ink is AIR: without it the chironomia's crest
|
|
73
|
+
* letters sat visibly tighter to this band than the tonarium sits to the
|
|
74
|
+
* wave's troughs, and the stack read as unevenly spaced. */
|
|
75
|
+
export declare function prosodiaExtra(k: number): number;
|
|
76
|
+
/** The prosodia track, every system. */
|
|
77
|
+
export declare function buildProsodia(notes: TrackNote[], cfg: ProsodiaConfig): string;
|
|
78
|
+
export interface ChironomiaConfig {
|
|
79
|
+
/** Scale factor: staffInterval / (40/6) — 1 at the default staffHeight. */
|
|
80
|
+
k: number;
|
|
81
|
+
/** y of the wave's midline within a system (system-local). */
|
|
82
|
+
waveMidY: number;
|
|
83
|
+
}
|
|
84
|
+
/** Band room the chironomia reserves below each system's lyric line. */
|
|
85
|
+
export declare function chironomiaExtra(k: number): number;
|
|
86
|
+
/** The chironomy track: wave + letters, every system. */
|
|
87
|
+
export declare function buildChironomia(notes: TrackNote[], cfg: ChironomiaConfig): string;
|
|
88
|
+
export interface TonariumConfig {
|
|
89
|
+
/** Scale factor: staffInterval / (40/6) — 1 at the default staffHeight. */
|
|
90
|
+
k: number;
|
|
91
|
+
/** Lane top within a system (system-local). */
|
|
92
|
+
laneTop: number;
|
|
93
|
+
/** Right edge available to the lane, per system (page x). */
|
|
94
|
+
rightFor: (system: number) => number;
|
|
95
|
+
/** Serif family for the mode numerals (the lyric/annotation face). */
|
|
96
|
+
serifFamily: string;
|
|
97
|
+
/** The liturgical red for the mode line. */
|
|
98
|
+
rubricaColor: string;
|
|
99
|
+
}
|
|
100
|
+
/** Band room the tonarium reserves below each system's lyric line. */
|
|
101
|
+
export declare function tonariumExtra(k: number): number;
|
|
102
|
+
/** The tonarium track, every system. */
|
|
103
|
+
export declare function buildTonarium(notes: TrackNote[], data: TrackData, cfg: TonariumConfig): string;
|
|
104
|
+
//# sourceMappingURL=tracks.d.ts.map
|