tonus 0.1.8 → 0.6.1
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 +138 -108
- package/CHANGELOG.md +664 -1
- package/LICENSE +133 -29
- package/README.md +107 -80
- 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/data/zodiac.d.ts +47 -0
- package/dist/engines/harmonia/data/zodiac.js +163 -0
- 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 +1335 -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 +40 -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 +396 -0
- package/docs/api/index.md +265 -0
- package/docs/api/score.md +906 -0
- package/docs/api/tuning.md +619 -0
- package/package.json +13 -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
package/LICENSE
CHANGED
|
@@ -1,29 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
to
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
and
|
|
28
|
-
(
|
|
29
|
-
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
## Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study, private
|
|
60
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
61
|
+
observance, without any anticipated commercial application,
|
|
62
|
+
is use for a permitted purpose.
|
|
63
|
+
|
|
64
|
+
## Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a permitted purpose
|
|
70
|
+
regardless of the source of funding or obligations resulting
|
|
71
|
+
from the funding.
|
|
72
|
+
|
|
73
|
+
## Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
## No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer any of
|
|
81
|
+
your licenses to anyone else, or prevent the licensor from
|
|
82
|
+
granting licenses to anyone else. These terms do not imply
|
|
83
|
+
any other licenses.
|
|
84
|
+
|
|
85
|
+
## Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes or
|
|
88
|
+
contributes to infringement of any patent, your patent license
|
|
89
|
+
for the software granted under these terms ends immediately. If
|
|
90
|
+
your company makes such a claim, your patent license ends
|
|
91
|
+
immediately for work on behalf of your company.
|
|
92
|
+
|
|
93
|
+
## Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the software
|
|
97
|
+
not covered by your licenses, your licenses can nonetheless
|
|
98
|
+
continue if you come into full compliance with these terms,
|
|
99
|
+
and take practical steps to correct past violations, within
|
|
100
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
101
|
+
end immediately.
|
|
102
|
+
|
|
103
|
+
## No Liability
|
|
104
|
+
|
|
105
|
+
***As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be liable
|
|
107
|
+
to you for any damages arising out of these terms or the use
|
|
108
|
+
or nature of the software, under any kind of legal claim.***
|
|
109
|
+
|
|
110
|
+
## Definitions
|
|
111
|
+
|
|
112
|
+
The **licensor** is the individual or entity offering these
|
|
113
|
+
terms, and the **software** is the software the licensor makes
|
|
114
|
+
available under these terms.
|
|
115
|
+
|
|
116
|
+
**You** refers to the individual or entity agreeing to these
|
|
117
|
+
terms.
|
|
118
|
+
|
|
119
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
120
|
+
or other kind of organization that you work for, plus all
|
|
121
|
+
organizations that have control over, are under the control of,
|
|
122
|
+
or are under common control with that organization. **Control**
|
|
123
|
+
means ownership of substantially all the assets of an entity,
|
|
124
|
+
or the power to direct its management and policies by vote,
|
|
125
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
126
|
+
|
|
127
|
+
**Your licenses** are all the licenses granted to you for the
|
|
128
|
+
software under these terms.
|
|
129
|
+
|
|
130
|
+
**Use** means anything you do with the software requiring one
|
|
131
|
+
of your licenses.
|
|
132
|
+
|
|
133
|
+
Required Notice: Copyright (c) 2026 Jeffrey Pierce (jeffreypierce.net)
|
package/README.md
CHANGED
|
@@ -1,111 +1,138 @@
|
|
|
1
1
|
# tonus
|
|
2
2
|
|
|
3
|
-
**tonus** is a medieval music and
|
|
3
|
+
**tonus** is a JavaScript library for medieval music theory and chant
|
|
4
|
+
analysis. It carries the Gregorian repertoire and the concepts it was built on.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- planetary positions voiced as tuned pitch across the classical theorists' "harmony of the spheres"
|
|
6
|
+
It tunes to scales medieval singers would have used, tells you which chants
|
|
7
|
+
belong to which day and returns analysis and notation, and calculates the
|
|
8
|
+
_music of the spheres_ proposed by Pythagoras, Boethius, and more as real
|
|
9
|
+
intervals.
|
|
10
10
|
|
|
11
|
-
**
|
|
12
|
-
query returns the same answer, computed locally from data that ships with
|
|
13
|
-
the package, with no network calls.
|
|
11
|
+
**[Interactive demo →](https://jeffreypierce.github.io/tonus/)**
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
Everything is computed locally and deterministically: the same question always
|
|
14
|
+
returns the same answer, from data that ships inside the package, with no network
|
|
15
|
+
calls and no runtime dependencies.
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
18
|
npm install tonus
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
ESM only. Node ≥ 20; works in the browser through a bundler. No runtime
|
|
22
|
-
dependencies. Roughly 5,500 chants and the full 642-entry calendar ship in
|
|
23
|
-
the package — 6.5 MB unpacked, 1.5 MB packed.
|
|
24
|
-
|
|
25
|
-
## Documentation
|
|
26
|
-
|
|
27
|
-
One page per engine, in dependency order. Each page states its rules, then its theory and historical context, then its sources.
|
|
28
|
-
|
|
29
|
-
- **[Index](docs/index.md)** — Table of contents and conventions.
|
|
30
|
-
- **[Tuning](docs/tuning.md)** — `temperamentum`. The medieval pitch system:
|
|
31
|
-
temperaments, Guidonian gamut and hand,
|
|
32
|
-
hexachordal solmization and mutations, eight modes, and psalm
|
|
33
|
-
tones. Depends on nothing else in the library.
|
|
34
|
-
- **[Calendar](docs/calendar.md)** — `festum`, `pascha`. The Tridentine
|
|
35
|
-
liturgical calendar resolved against dual-computus Easter: feasts with
|
|
36
|
-
their authentic ranks, grades, and seasons, and the movable anchors of
|
|
37
|
-
any year.
|
|
38
|
-
- **[Chant](docs/chant.md)** — `cantus`, `proprium`, `ordinarium`,
|
|
39
|
-
`officium`, `psalmus`. The Solesmes books in GABC: Mass propers, the
|
|
40
|
-
Kyriale, the Office hours, the psalter.
|
|
41
|
-
- **[Score](docs/score.md)** — `notatio`. GABC into tuned notes: phrases,
|
|
42
|
-
syllables, Solesmes arsis/thesis rhythm, prosody, the analytic imprint.
|
|
43
|
-
- **[Heavens](docs/heavens.md)** — `caelum`, `harmonia`. An ephemeris
|
|
44
|
-
computed from JPL orbital elements, voiced through the planetary
|
|
45
|
-
doctrines of Boethius, Nicomachus, Pliny, and Ptolemy.
|
|
46
|
-
|
|
47
|
-
These pages are the middle of a three-level ladder: the API docs here link down
|
|
48
|
-
into the code, where the full theory, provenance, and editorial reasoning live in
|
|
49
|
-
comments beside what they explain. Read as deep as you care to. Sources for
|
|
50
|
-
concepts, scholarship, and data are listed in
|
|
51
|
-
[BIBLIOGRAPHY.md](BIBLIOGRAPHY.md); where sources disagree or run out, **tonus**
|
|
52
|
-
makes an editorial call, recorded in the code and glossed in the page's Theory &
|
|
53
|
-
Context section.
|
|
54
|
-
|
|
55
|
-
## The tuning engine
|
|
56
|
-
|
|
57
|
-
The tuning engine is self-contained; every other engine resolves its pitches
|
|
58
|
-
through it.
|
|
59
|
-
|
|
60
21
|
```js
|
|
61
22
|
import tonus from "tonus";
|
|
62
23
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
t.nota("D4");
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
t.gradus("D4");
|
|
69
|
-
// Delasolre: RE of the natural hexachord, role "finalis",
|
|
70
|
-
// middle finger, base joint, on the Guidonian hand
|
|
71
|
-
|
|
72
|
-
t.intervallum("D4", "A4");
|
|
73
|
-
// Quinta (alias Diapente), perfect — final to tenor
|
|
74
|
-
|
|
75
|
-
t.tonus();
|
|
76
|
-
// psalm tone 1, differentia 1g:
|
|
77
|
-
// intonatio F3–A3–C4, mediatio C4–A3–G3–A3, terminatio C4–A3–G3–A3–G3
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## The liturgical stack
|
|
81
|
-
|
|
82
|
-
The remaining engines compose:
|
|
24
|
+
// Build a tuning: Pythagorean, set to mode 1.
|
|
25
|
+
const t = tonus.temperamentum({ mode: 1 });
|
|
26
|
+
t.nota("D4"); // 293.33 Hz, the final of mode 1, through pure fifths
|
|
27
|
+
t.gradus("D4"); // "Delasolre": RE of the natural hexachord, the finalis
|
|
83
28
|
|
|
84
|
-
|
|
29
|
+
// Ask the calendar for a day, then pull the chant that belongs to it.
|
|
85
30
|
const [feast] = tonus.festum({ date: new Date("2026-12-25") });
|
|
86
|
-
//
|
|
87
|
-
// grade: "duplex-i", tempus: "Tempus Nativitatis"
|
|
88
|
-
|
|
31
|
+
// → "In Nativitate Domini", a Duplex I classis feast of Christmastide
|
|
89
32
|
const [introit] = tonus.proprium({ feast, office: "in" });
|
|
90
|
-
// "Puer natus est", mode 7,
|
|
33
|
+
// → "Puer natus est", mode 7, from the Liber Usualis
|
|
91
34
|
|
|
35
|
+
// Turn the chant into tuned, rhythmicized notes, then draw it.
|
|
92
36
|
const score = tonus.notatio(introit, { temperamentum: t });
|
|
93
|
-
|
|
37
|
+
const { svg, geometry } = tonus.inscriptio(score, { width: 680 });
|
|
94
38
|
|
|
39
|
+
// And voice the Christmas sky as pitch, after Boethius.
|
|
95
40
|
const harmony = tonus.harmonia(tonus.caelum({ date: feast.date }));
|
|
96
|
-
// each visible planet voiced as pitch and Greek vowel, after Boethius
|
|
97
41
|
```
|
|
98
42
|
|
|
99
|
-
|
|
43
|
+
The objects each call returns (`feast`, `t`) pass straight back into the next as
|
|
44
|
+
filters.
|
|
45
|
+
|
|
46
|
+
## The API
|
|
47
|
+
|
|
48
|
+
Fourteen methods, each named for what it returns.
|
|
49
|
+
|
|
50
|
+
| Method | Returns |
|
|
51
|
+
| ----------------------------- | ----------------------------------------------------------------- |
|
|
52
|
+
| `festum({ date })` | the feasts of a day, with rank, grade, and season |
|
|
53
|
+
| `pascha(year)` | Easter and the movable feasts reckoned from it |
|
|
54
|
+
| `cantus({ … })` | chants by id, incipit, mode, office, or source |
|
|
55
|
+
| `proprium({ feast, office })` | the Mass propers for a feast |
|
|
56
|
+
| `ordinarium({ … })` | the Kyriale — the Mass ordinary settings |
|
|
57
|
+
| `officium({ feast, hora })` | an Office hour, psalms and antiphons in order |
|
|
58
|
+
| `psalmus({ psalm })` | a psalm, pointed for its tone |
|
|
59
|
+
| `corpus()` | what ships: counts by book, genus, and mode |
|
|
60
|
+
| `census({ id })` | one chant measured against the corpus |
|
|
61
|
+
| `temperamentum({ … })` | a tuning — `nota`, `gradus`, `modus`, `intervallum` |
|
|
62
|
+
| `notatio(chant)` | GABC parsed to phrases, syllables, and tuned notes |
|
|
63
|
+
| `inscriptio(score)` | `{ svg, geometry }` — the score drawn, and where each note landed |
|
|
64
|
+
| `caelum({ date })` | the classical planets at a moment |
|
|
65
|
+
| `harmonia(caelum)` | those positions voiced as pitch |
|
|
66
|
+
|
|
67
|
+
**Tuning** covers Pythagorean and meantone temperaments, just intonation and
|
|
68
|
+
custom scales, the Guidonian gamut and hand, hexachords and their mutations,
|
|
69
|
+
and intervals named as the treatises name them. Each of the eight modes carries
|
|
70
|
+
its final, dominant, ambitus, and ethos, with its psalm tones.
|
|
71
|
+
|
|
72
|
+
**The calendar** is Tridentine, resolved against Easter by
|
|
73
|
+
the Julian or the Gregorian computus.
|
|
74
|
+
|
|
75
|
+
**The repertoire** is 2,187 chants across ten books — nine Solesmes editions and
|
|
76
|
+
the _Nocturnale Romanum_ night office — in
|
|
77
|
+
[GABC](https://gregorio-project.github.io/) notation: Mass propers, the Kyriale,
|
|
78
|
+
the Office hours, the psalter, and the Matins nocturns.
|
|
79
|
+
|
|
80
|
+
**Scores** are shaped by the Solesmes arsis/thesis rhythm, fingerprinted for
|
|
81
|
+
melodic character, and drawn to a square-note or modern staff.
|
|
82
|
+
|
|
83
|
+
## Concepts
|
|
84
|
+
|
|
85
|
+
Boethius treated music as a branch of number theory, and divided it into the
|
|
86
|
+
audible and the inaudible: instruments and voices, body and soul, the turning
|
|
87
|
+
cosmos. Chant
|
|
88
|
+
was composed inside that frame: pitch was ratio, the modes a received order,
|
|
89
|
+
the heavens harmonic proportion. tonus takes those claims literally enough to
|
|
90
|
+
compute them, which is why tuning is ratio arithmetic, why the calendar is a
|
|
91
|
+
retrieval index, and why there is an ephemeris in a chant library at all.
|
|
92
|
+
|
|
93
|
+
Where the sources run out or contradict one another, tonus makes an editorial
|
|
94
|
+
call and records it in the code.
|
|
95
|
+
|
|
96
|
+
## Documentation
|
|
97
|
+
|
|
98
|
+
The **[documentation index](docs/api/index.md)** is the technical center: the full
|
|
99
|
+
API, the conventions, the error contract, and the code standards. From there,
|
|
100
|
+
one page per engine, in dependency order:
|
|
101
|
+
[tuning](docs/api/tuning.md), [calendar](docs/api/calendar.md), [chant](docs/api/chant.md),
|
|
102
|
+
[score](docs/api/score.md), [heavens](docs/api/heavens.md), and
|
|
103
|
+
[census](docs/api/census.md).
|
|
104
|
+
|
|
105
|
+
## Install and run
|
|
106
|
+
|
|
107
|
+
ESM only. Node ≥ 20; works in the browser through a bundler. No runtime
|
|
108
|
+
dependencies. The chants and the 650-entry calendar ship in the package.
|
|
100
109
|
|
|
101
110
|
```sh
|
|
102
111
|
npm test # builds and runs the suite (node --test)
|
|
103
112
|
```
|
|
104
113
|
|
|
105
|
-
The data files in `src/data/` are generated by a separate extraction
|
|
106
|
-
|
|
114
|
+
The data files in `src/data/` are generated by a separate extraction pipeline
|
|
115
|
+
(tonus-corpus). Edits happen there, not here.
|
|
116
|
+
|
|
117
|
+
## Sources
|
|
118
|
+
|
|
119
|
+
The chant and calendar data are the Solesmes editions, by way of
|
|
120
|
+
[GregoBase](https://gregobase.selapa.net/),
|
|
121
|
+
[Divinum Officium](https://divinumofficium.com/), and the community _Nocturnale
|
|
122
|
+
Romanum_. The notation is engraved in Daniel Spreadbury's
|
|
123
|
+
[Bravura](https://github.com/steinbergmedia/bravura), the reference font for the
|
|
124
|
+
SMuFL standard. Behind the rest stand Mocquereau and Suñol on rhythm, Rockstro
|
|
125
|
+
and Apel on the modes, Boethius and Ptolemy on tuning, and Godwin on the
|
|
126
|
+
Pythagorean planets.
|
|
127
|
+
|
|
128
|
+
Every figure is cited in the code beside what it explains, and
|
|
129
|
+
[BIBLIOGRAPHY.md](BIBLIOGRAPHY.md) is the complete list.
|
|
107
130
|
|
|
108
131
|
## License
|
|
109
132
|
|
|
110
|
-
[
|
|
133
|
+
[PolyForm Noncommercial 1.0.0](LICENSE): free to use, study, modify, and
|
|
134
|
+
share for any noncommercial purpose — personal projects, research,
|
|
135
|
+
education, art, religious observance. Commercial use requires permission
|
|
136
|
+
from the author. Versions through 0.1.x were published under MIT and
|
|
137
|
+
remain so. Chant and liturgical data derive from GregoBase and Divinum
|
|
111
138
|
Officium; see [BIBLIOGRAPHY.md](BIBLIOGRAPHY.md) for full attribution.
|