CAMAT: tools for symbolic music parsing, analysis, and rendering.
Project description
CAMAT
CAMAT is a Python toolkit for symbolic music parsing, analysis, pattern search, and score rendering.
Optimized for Python => 3.11
Installation
pip install camat
What Is Included
- Parsing helpers for
music21andpartiturabackends. - Pattern search and similarity utilities.
- Piano-roll and overlay visualization helpers.
- Verovio-based rendering utilities.
Quick Start
from camat import get_parse_files, run_pattern_search
parse_files = get_parse_files("music21") # or "partitura"
results, dfs_by_name, last_df = parse_files(["path/to/score.mxl"])
# Example: run pattern search on a matrix and kernel
# out = run_pattern_search(matrix_source, kernel_source)
Documentation
This repo includes a Read the Docs-ready Sphinx project in docs/ and
config in .readthedocs.yaml.
Local build:
pip install -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html
Mensural MEI Helper
If your MEI files use mensural duration labels (for example semibrevis), you can normalize them for partitura compatibility:
python scripts/normalize_mensural_mei.py path/to/input.mei -o path/to/output.mei
You can override injected default meter if needed:
python scripts/normalize_mensural_mei.py path/to/input.mei -o path/to/output.mei --meter-count 2 --meter-unit 2
parse_files_partitura applies this preprocessing automatically by default:
normalize_mensural_durations=Trueinject_missing_meter_signature=True(defaults to4/4, configurable)prefer_verovio_for_mensural=True(detects mensural MEI markers and runs Verovio first)try_verovio_mei_conversion=True(retries unsupported MEI structures through Verovio, still using partitura)verovio_mensural_to_cmn=Trueverovio_duration_equivalence=None(set if you want explicit mensural-to-CMN scaling)verovio_mensural_score_up=False
If you want a strict partitura-only workflow (no music21 fallback), set:
allow_music21_fallback=False
Repository Layout
camat/: package source used for PyPI distribution.CAMAT_revamped/: legacy development notebooks and experiments.CHANGELOG.md: release notes.- test_corpus - various test data
License
MIT (see LICENSE).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file camat-0.1.2.tar.gz.
File metadata
- Download URL: camat-0.1.2.tar.gz
- Upload date:
- Size: 90.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71f13d38829280b59c520685d46dfed120bfa733bd85fafadc4c6a0eb7da91d3
|
|
| MD5 |
527619ff73838ad4b87b6074330665ca
|
|
| BLAKE2b-256 |
25185aef3ead9e1d097f9a90f232ede5456f524ad19414a64e3899baf8aa78d2
|
Provenance
The following attestation bundles were made for camat-0.1.2.tar.gz:
Publisher:
release.yml on egorpol/camat_v2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
camat-0.1.2.tar.gz -
Subject digest:
71f13d38829280b59c520685d46dfed120bfa733bd85fafadc4c6a0eb7da91d3 - Sigstore transparency entry: 972890522
- Sigstore integration time:
-
Permalink:
egorpol/camat_v2@41b522640f48970d41fb631101cd79a7712f3a6e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/egorpol
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@41b522640f48970d41fb631101cd79a7712f3a6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file camat-0.1.2-py3-none-any.whl.
File metadata
- Download URL: camat-0.1.2-py3-none-any.whl
- Upload date:
- Size: 94.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea6ceede555f780e2acfc726b822b1b10916b71f91c591f04285ea6e0268d49c
|
|
| MD5 |
036dc73320a5b878e390ed102b9c239a
|
|
| BLAKE2b-256 |
2d66e3c590a6282c123db9f764248ae4e362ee8ec3533da715935b792378c3ea
|
Provenance
The following attestation bundles were made for camat-0.1.2-py3-none-any.whl:
Publisher:
release.yml on egorpol/camat_v2
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
camat-0.1.2-py3-none-any.whl -
Subject digest:
ea6ceede555f780e2acfc726b822b1b10916b71f91c591f04285ea6e0268d49c - Sigstore transparency entry: 972890532
- Sigstore integration time:
-
Permalink:
egorpol/camat_v2@41b522640f48970d41fb631101cd79a7712f3a6e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/egorpol
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@41b522640f48970d41fb631101cd79a7712f3a6e -
Trigger Event:
push
-
Statement type: