tonus 0.11.0 → 0.11.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/CHANGELOG.md +16 -0
- package/dist/data/kyriale.d.ts +12 -0
- package/dist/data/kyriale.js +240 -0
- package/dist/engines/chant/chant.js +13 -1
- package/dist/engines/chant/ordinary.js +15 -2
- package/docs/api/chant.md +12 -0
- package/package.json +1 -1
|
@@ -149,7 +149,19 @@ const CORPUS = [
|
|
|
149
149
|
// still resolve to exactly one chant — the census contract says so in as many
|
|
150
150
|
// words. So they stay addressable by `id`, by `office: "or"`, and by
|
|
151
151
|
// `ordinary`, and stay out of the shelf's book list and row count.
|
|
152
|
-
|
|
152
|
+
//
|
|
153
|
+
// Not shelved, but CITED: each entry carries the books that print it (gr, lu)
|
|
154
|
+
// and their pages, so its by-book map is registered here the same way a corpus
|
|
155
|
+
// record's is. That is what lets `cantus({ id, source: "lu" })` answer with the
|
|
156
|
+
// Liber Usualis's leaf number instead of nothing.
|
|
157
|
+
const KYRIALE_CHANTS = KYRIALE.map((entry) => {
|
|
158
|
+
const chant = entryToOrdinaryChant(entry);
|
|
159
|
+
const byBook = entry.pages;
|
|
160
|
+
if (byBook && !Array.isArray(byBook)) {
|
|
161
|
+
PAGES_BY_BOOK.set(chant.id, byBook);
|
|
162
|
+
}
|
|
163
|
+
return chant;
|
|
164
|
+
});
|
|
153
165
|
/** Everything nameable: the shelf, plus the ordinary that no shelf holds. */
|
|
154
166
|
const ADDRESSABLE = [...CORPUS, ...KYRIALE_CHANTS];
|
|
155
167
|
let _byId = null;
|
|
@@ -280,11 +280,21 @@ export function entryToOrdinaryChant(entry) {
|
|
|
280
280
|
const ordinary = ORDINARY_OFFICES.has(entry.office)
|
|
281
281
|
? entry.office
|
|
282
282
|
: "ke";
|
|
283
|
+
// The Kyriale's citation. `ky` is a category, not a volume, so it can never
|
|
284
|
+
// be cited — which is why these chants shipped with books: ["ky"] and no page
|
|
285
|
+
// at all, and nothing downstream could name where to find them. But they ARE
|
|
286
|
+
// printed: the extractor now carries the Graduale's and the Liber Usualis's
|
|
287
|
+
// listings on every entry. `books` is those volumes, owner first; `pages` is
|
|
288
|
+
// the OWNER's, exactly as chant.ts's withLabels() does for a shelf record —
|
|
289
|
+
// presentAs() swaps in the asked-for book's when a caller names one. An entry
|
|
290
|
+
// with no citation still falls back to its own printing, so it stays findable.
|
|
291
|
+
const books = (entry.books?.length ? entry.books : ["ky"]);
|
|
292
|
+
const pages = entry.pages?.[books[0]] ?? [];
|
|
283
293
|
return {
|
|
284
294
|
id: entry.id,
|
|
285
295
|
incipit: entry.incipit,
|
|
286
296
|
gabc: entry.gabc,
|
|
287
|
-
books
|
|
297
|
+
books,
|
|
288
298
|
office: "ky",
|
|
289
299
|
// The genus follows the office code, as everywhere else — OFFICIA.ky.
|
|
290
300
|
// It read "Ordinarium" while the office read "or", which was tonus's own
|
|
@@ -292,7 +302,10 @@ export function entryToOrdinaryChant(entry) {
|
|
|
292
302
|
genus: OFFICIA.ky,
|
|
293
303
|
mode: entry.mode ? String(entry.mode) : null,
|
|
294
304
|
modus: entry.mode ? (MODI[String(entry.mode)] ?? null) : null,
|
|
295
|
-
pages
|
|
305
|
+
pages,
|
|
306
|
+
// Still KY_SOURCE: the bibliographic note says a singer is holding the
|
|
307
|
+
// Kyriale, which is true, and is a different claim from which shelved
|
|
308
|
+
// volumes print it. `books` carries that.
|
|
296
309
|
source: KY_SOURCE,
|
|
297
310
|
ordinary,
|
|
298
311
|
ordinarium: ORDINARIA[ordinary] ?? entry.incipit,
|
package/docs/api/chant.md
CHANGED
|
@@ -311,6 +311,18 @@ The Kyriale is a **partition of the Graduale**, so it is not a `source` and not
|
|
|
311
311
|
a row in the shelf. It stays nameable by `id` and by the part of the Mass it
|
|
312
312
|
belongs to.
|
|
313
313
|
|
|
314
|
+
It is not a book, but it is **printed in** books, and it says which: every
|
|
315
|
+
ordinary chant carries `books: ["lu", "gr"]` and the Graduale's and the Liber
|
|
316
|
+
Usualis's pages, so it can be cited like anything else on the shelf.
|
|
317
|
+
|
|
318
|
+
```js
|
|
319
|
+
tonus.cantus({ id: "gregobase:31", source: "gr" })[0].pages; // [{ page: "28*", … }]
|
|
320
|
+
tonus.cantus({ id: "gregobase:31", source: "lu" })[0].pages; // [{ page: "37", … }]
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
`source` stays `ky` when no book is named — the note a singer holding the
|
|
324
|
+
Kyriale would want — and `ky` is still absent from the book registry.
|
|
325
|
+
|
|
314
326
|
A plain search does not sweep it in: `{ mode: 5 }` returns the shelf. Ask for a
|
|
315
327
|
Kyrie and you get Kyries.
|
|
316
328
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tonus",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Medieval music analysis: GABC plainchant exports, liturgical calendar, tuning systems, ephemeris, and the harmony of the spheres",
|
|
6
6
|
"author": "Jeffrey Pierce <jeffrey@jeffreypierce.net>",
|