Skip to content
roomi fields

Composing with structure

ICM Meta-grammar

A prototype meta-grammar of Indian classical music, drawn from the treatises, in which every rule quotes the passage it rests on.

experimental licence CC0-1.0

Website

ICM is the prototype of a concept: drawing from the treatises a meta-grammar of Indian classical music, in which nothing is asserted without its quotation. The first trial is on one treatise, Mātaṅga’s Bṛhaddeśī (c. 750, edited by Prem Lata Sharma, IGNCA 1992), from which it draws concepts, rules and an executable grammar. Its main limitation: only one source is processed end to end; the other two are extracted but not yet displayed, and human review of the OCR stands at 276 cases out of 974.

The site reads without installing anything; there is nothing to listen to, this is work on texts. The code is private.

From the treatise’s pages to the grammar, without losing the evidence

The site follows a path in five steps. The OCR pages, Sanskrit text and English translation facing each other; the affirmations, every statement in the text with its verbatim quotation; the concepts, which group the mentions of one notion; the generative rules, what the text asserts about a concept; finally the formal grammar: types, constants, operations and constraints.

At every step, an element carries the identifier of the rule or affirmation it comes from. A plausible value that nothing quotes is not invented: it goes into an UNRESOLVED list, which holds 84 entries.

Getting started

Open “Critical editions”, then the Bṛhaddeśī: 274 folios in two volumes (105 and 169), the Devanāgarī text facing Sharma’s English translation, with linked concepts.

Then open “Generative rules”: the list opens on the most attested rule, which defines the nyāsa, the note on which a piece settles or ends:

DEFINE nyasa(gita) = svara WHERE gita IS placed_or_ended ON svara

It carries the identifier R_006_nyasa_definition and twenty affirmations from the text. Observed on the site on 28 September 2026.

What it does

  • Make the text readable: 274 OCR pages, in two languages, with their apparatus in the margin.
  • Record what the text says: 3,187 sourced affirmations, grouped into 1,763 concepts.
  • Draw rules from it: 1,087 generative rules, classed as definitions, classifications, derivations, relations and validation constraints, among others.
  • Formalise them: 11 modules, one per domain (roles of svaras and jātis, ornamentation, the corpus of bhāṣā and grāma-rāga…), totalling 107 types, 86 operations and 58 constraints. A violated constraint raises an error that quotes its rule.
  • Show the workshop: the steps of the pipeline (about thirty), the OCR review queue, the page-by-page audit with scan and text side by side, and a query API (/api/docs).

Common issues

The list of rules stops at 500. There are 1,087: the category filter and the search reach the rest.

The other two sources show “Coming soon”. Joep Bor’s The Raga Guide (1999, 74 rāgas) and Wim van der Meer’s The Rāga Yaman (2000) are extracted, but their edition is not yet rendered.

The OCR keeps errors. Doubtful cases are flagged by two filters, one linguistic, the other a model that reads the page image, then settled by hand: 276 out of 974 as of 28 September 2026, that is 28.3%. The page-by-page audit shows them.

Where it stands

Prototype: the pipeline has been tested on one treatise only, the Bṛhaddeśī. The private repository was updated on 15 September 2026. No published version. The content published on the site is under the CC0 licence.

What works: the full pipeline on the Bṛhaddeśī, visible online. What does not work yet: rendering the editions of Bor and van der Meer, and finishing the OCR review. According to its README, the OCR text of the Saṅgītaratnākara feeds this same project.

Site · Editions · Rules · Method

Thanks to Prem Lata Sharma, whose edition and translation of the Bṛhaddeśī (IGNCA, 1992) are the pilot source, and to Joep Bor and Wim van der Meer, whose books are the next two.

How it was made. Claude Code (Claude Opus 5.5), from the repository, its README and its release notes. Method