polifonia-project / pitchcontext

Library for melody analysis based on pitch context vectors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

component-id name description image type release-date release-number doi work-package pilot keywords licence contributors project related-components
pitchcontext
pitchcontext
Python module for melody analysis based on pitch context vectors.
SoftwareLibrary
2023-06-02
0.1.9
10.5281/zenodo.8020644
WP3
TUNES
melody
pitch analysis
MIT
polifonia-project
story
Mark#1_FolkMusic
Brendan#1_FindTraditionalMusic

DOI

pitchcontext

Python module for melody analysis based on pitch context vectors.

Prerequisites:

  • lilypond installed and in command line path.
  • convert (ImageMagick) installed and in command line path.
  • kernfiles and corresponding .json files with melodic features.

The .json files need to be formatted according to the standard of MTCFeatures.

Installation

The latest release of the pitchcontext module can be installed from pypi:

$ pip install pitchcontext

The development version can be installed by cloning the repository and by using the provided pyproject.toml and poetry. In root of the rep do:

$ poetry install

This creates a virtual environment with pitchcontext installed.

Examples

Requires a Python3 environment with both pitchcontext and streamlit installed. Four examples are provided:

  • apps/st_dissonance.py
  • apps/st_novelty.py
  • apps/st_unharmonicity.py
  • apps/st_impliedchords.py

To run:

$ streamlit run st_dissonance.py -- -krnpath <path_to_kern_files> -jsonpath <path_to_json_files>

The -- is needed to pass the following arguments to the python script.

About

Library for melody analysis based on pitch context vectors.

License:MIT License


Languages

Language:Python 100.0%