Metadata-Version: 2.4
Name: hamonpy
Version: 0.5.0
Summary: HAMON (Harmony Model and Notation) — a universal, lossless harmony-label interlingua (Python reference implementation)
Author: Patricia Garcia-Iasci, David Rizo
License: Apache-2.0
Project-URL: Repository, https://github.com/OMR-PRAIG-UA-ES/hamon
Project-URL: Homepage, https://omr-praig-ua-es.github.io/hamon/
Project-URL: Documentation, https://omr-praig-ua-es.github.io/hamon/use.html
Project-URL: Loss viewer, https://omr-praig-ua-es.github.io/hamon/icccm26.html
Keywords: harmony,music,music-theory,musicology,chord,roman-numerals,figured-bass,nashville,interlingua,MEI,MusicXML,Humdrum,DCML,OMR
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: antlr4-python3-runtime==4.13.2
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Provides-Extra: demo
Requires-Dist: streamlit>=1.30; extra == "demo"
Provides-Extra: music21
Requires-Dist: music21>=9; extra == "music21"
Provides-Extra: partitura
Requires-Dist: partitura>=1.3; extra == "partitura"
Provides-Extra: ms3
Requires-Dist: ms3>=2.0; extra == "ms3"
Provides-Extra: flexohr
Requires-Dist: flexohr>=1; extra == "flexohr"
Provides-Extra: bps
Requires-Dist: pandas>=1.5; extra == "bps"
Requires-Dist: openpyxl>=3; extra == "bps"
Provides-Extra: notebooks
Requires-Dist: jupytext>=1.16; extra == "notebooks"
Requires-Dist: nbconvert>=7; extra == "notebooks"
Requires-Dist: ipykernel>=6; extra == "notebooks"
Dynamic: license-file

# hamonpy

We implement the **HAMON** standard — **Ha**rmony **Mo**del and **N**otation — in Python.

We design this module to work well in a conda environment.

## We install

```bash
pip install hamonpy
```

This package lives in the `hamonpy/` subdirectory of the
[repository](https://github.com/OMR-PRAIG-UA-ES/hamon) (the repository root is not a
Python package). To run it from a checkout, with the test dependencies, install it
editable from the repository root:

```bash
conda create -n hamonpy python=3.11
conda activate hamonpy
python -m pip install -e "./hamonpy[dev]"
```

Questions and bug reports go to the
[issue tracker](https://github.com/OMR-PRAIG-UA-ES/hamon/issues).

## We run unit tests

```bash
pytest -q
```

## We parse

We ship an **ANTLR4-based parser** generated from the normative grammars (`antlr/hamonLexer.g4` + `antlr/hamonParser.g4`, kept in sync with `grammar/hamon.ebnf`). It parses the full HAMON surface — chord symbols, Roman numerals, Nashville, figured bass, functional labels, positions, alternatives, and rendering dictionaries — into the typed AST in `hamonpy/ast.py`. Labels that can't be parsed with confidence are preserved losslessly as `unparsedHarmony`.
