Skip to main content

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 music21 and partitura backends.
  • 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=True
  • inject_missing_meter_signature=True (defaults to 4/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=True
  • verovio_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

camat-0.1.2.tar.gz (90.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

camat-0.1.2-py3-none-any.whl (94.1 kB view details)

Uploaded Python 3

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

Hashes for camat-0.1.2.tar.gz
Algorithm Hash digest
SHA256 71f13d38829280b59c520685d46dfed120bfa733bd85fafadc4c6a0eb7da91d3
MD5 527619ff73838ad4b87b6074330665ca
BLAKE2b-256 25185aef3ead9e1d097f9a90f232ede5456f524ad19414a64e3899baf8aa78d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for camat-0.1.2.tar.gz:

Publisher: release.yml on egorpol/camat_v2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for camat-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6ceede555f780e2acfc726b822b1b10916b71f91c591f04285ea6e0268d49c
MD5 036dc73320a5b878e390ed102b9c239a
BLAKE2b-256 2d66e3c590a6282c123db9f764248ae4e362ee8ec3533da715935b792378c3ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for camat-0.1.2-py3-none-any.whl:

Publisher: release.yml on egorpol/camat_v2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page