CAMAT
CAMAT (Computer-Assisted Music Analysis Toolbox) is an MEI-centred Python toolbox for editorial and analytical work with symbolic music. MEI is the durable score document; conversion, note tables, statistical analysis, pattern search, and rendering all connect back to that file.
The four workflows can be used independently. An existing MEI edition can go straight to parsing, while a MusicXML or Humdrum source first passes through conversion.
| Workflow | Starts with | Produces |
|---|---|---|
| Handle MEI | existing or draft MEI | rendered scores, facsimile links, combined pages, editorial checks |
| Convert to MEI | MusicXML, Humdrum, MuseScore, MIDI, and other symbolic formats | MEI suitable for inspection and parsing |
| Parse MEI | common-notation MEI | note tables (df_pitch), event tables (df_events), piano-roll views |
| Analyse | those tables or derived matrices | distributions, binary matrices, pattern matches, and score overlays |
Tables and matrices are working representations. They do not replace the
edition; xml:id values are the bridge back to the score. Common-notation
MEI is the supported path; mensural and timeline backends are experimental.
Guides, notebooks, and the API live in the documentation.
Install
Requires Python 3.11 or later.
python -m pip install camat
From a git checkout, install the package together with JupyterLab to run the showcase notebooks:
git clone https://github.com/egorpol/camat_v2.git
cd camat_v2
python -m pip install -e ".[notebooks]"
Quick start
This example uses a tiny score shipped with CAMAT. After installation it runs offline, without a corpus download or Jupyter.
from importlib.resources import as_file, files
from camat import parse_files_quiet
example = files("camat").joinpath("examples", "facsimile_viewer_demo.mei")
with as_file(example) as score:
results, _, _ = parse_files_quiet(
[str(score)],
backend="none",
display_preview_df_pitch=False,
display_preview_df_events=False,
show_progress=False,
)
notes = results[0]["df_pitch"]
print(f"Parsed {len(notes)} notes")
Expected output:
Parsed 8 notes
df_pitch holds note rows; df_events holds non-note events. Verovio is the
default parser for common-notation MEI. Convert other formats first, then
parse the resulting MEI.
Command-line tools such as camat-convert and camat-check-mei are installed
with the package.
What's in this repository
The PyPI wheel is the camat package: library code, a few packaged example
scores, and the MEI 5.1 Common Music Notation schema. This git checkout also
holds tutorials, documentation sources, tests, and working corpora that are
not shipped on PyPI.
camat_v2/
├── camat/ Installable package (conversion, parsers, analysis, rendering)
│ ├── examples/ Tiny MEI/SVG scores for offline demos
│ └── schemas/ MEI 5.1 CMN RELAX NG schema
├── notebooks/ Showcase tutorials, ordered in the documentation roadmap
├── docs/ MkDocs sources published on Read the Docs
├── tests/ Pytest suite and synthetic fixtures
├── scripts/ Release checks, docs hooks, and maintainer probes
├── test_corpus/ Local MEI fixtures and corpus URL manifests
├── CAMAT_old/ Development archive (not a supported API)
└── exports/ Retained generated artifacts
Documentation
| Page | What it covers |
|---|---|
| Documentation home | Workflow map and starting points |
| Getting started | Install, offline example, and Jupyter setup |
| What CAMAT is | How the four workflows fit together |
| Notebook roadmap | Executable examples in recommended order |
| API reference | Python modules and entry points |
| Known limitations | Supported notation and experimental features |
For bugs and suggestions, use GitHub Issues. See Contributing to work on the project.
Authors and origins
Egor Polyakov — research and development; Martin Pfleiderer — supervision. Pia Steuck — student assistant.
The acronym was chosen in 2021–2022 for a basic MusicXML parsing tool; see the earlier project and tutorials. The current MEI-centred toolbox is a new implementation with a broader scope.
Funding, citation, and license
Funded by the German Research Foundation (DFG), programme Library and Information Services — E-Research Technologies (LIS), grant PF 669/18-1.
If you use CAMAT in research, cite the software and state the version. CITATION.cff supplies the metadata; GitHub exposes it through Cite this repository.
CAMAT's code is MIT licensed. Bundled material has separate notices.
Metadata
Release files for camat 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| camat-0.2.2.tar.gz | 496.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| camat-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 996.7 kB
Release files / camat-0.2.2.tar.gz
| Download URL | camat-0.2.2.tar.gz |
|---|---|
| Size | 496.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2eabf6eaaecdb04fc72843f76c47ba9823f7acbf4b8fecf90f31c1fff9058d5
|
|
BLAKE2b-256 checksum How to use checksums |
62b95f6fc1d8cafb055896fbaaa33c26142274c11699e81d511a78f21724fc6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency logRelease files / camat-0.2.2-py3-none-any.whl
| Download URL | camat-0.2.2-py3-none-any.whl |
|---|---|
| Size | 499.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebdec65731cf0a2d2ba021f5a8f349023ff4f5ee47fef2e1fc30dfcf24a9c2dd
|
|
BLAKE2b-256 checksum How to use checksums |
504f78207c22d7df28e46113cbbe69f1c4eadb53f8dfccee34dbc442107742e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.
Transparency log