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)

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.1.tar.gz (82.7 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.1-py3-none-any.whl (86.8 kB view details)

Uploaded Python 3

File details

Details for the file camat-0.1.1.tar.gz.

File metadata

  • Download URL: camat-0.1.1.tar.gz
  • Upload date:
  • Size: 82.7 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.1.tar.gz
Algorithm Hash digest
SHA256 aaf31a1b62846223f00b4704430410feac49082c167e4c78bac3f4579fa44d11
MD5 ad3fb82f3170f6cee1eb5654092eb2a4
BLAKE2b-256 3c2005e02d9128ec7fa20f3f4ec51de5b29e72783a5e3a48f459ad11e0c97356

See more details on using hashes here.

Provenance

The following attestation bundles were made for camat-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: camat-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 86.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba2a0326b9b3fca07bc3d0e932b3b6e6ba825aa7fea2c41528b0d60398e91f4c
MD5 0eb5c856a47e7927ec47d35e8319b43a
BLAKE2b-256 88d550399822c7a772bd2da6c436e24bee892f6e78f063261eb60cf306d87b46

See more details on using hashes here.

Provenance

The following attestation bundles were made for camat-0.1.1-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