Metadata-Version: 2.4
Name: music21_svs_formats
Version: 0.0.2
Summary: Support for singing voice synthesis file formats in music21 via libresvip
Author-email: Oxygen Dioxide <oxygen-dioxide@outlook.com>
Project-URL: Homepage, https://github.com/oxygen-dioxide/music21-svs-formats
Project-URL: Issues, https://github.com/oxygen-dioxide/music21-svs-formats/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: libresvip>=2.4.0
Requires-Dist: music21>=9.3.0
Requires-Dist: types_linq
Provides-Extra: hyphen
Requires-Dist: pyphen; extra == "hyphen"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pretty_midi; extra == "test"
Requires-Dist: numpy>=1.26.4; extra == "test"
Provides-Extra: all
Requires-Dist: pyphen; extra == "all"
Requires-Dist: pytest; extra == "all"
Requires-Dist: pretty_midi; extra == "all"
Requires-Dist: numpy>=1.26.4; extra == "all"
Dynamic: license-file

# music21_svs_formats
Import and export Singing Voice Synthesis (SVS) project formats in [music21](https://github.com/cuthbertLab/music21) via [Libresvip](https://github.com/SoulMelody/LibreSVIP).

Music21 is designed for classical music theory, primarily centered around staff notation. With this library, users can easily convert SVS project files into sheet music readable by human singers and performers, or import MusicXML files (containing lyrics) downloaded from musescore.com into SVS software.

## Installation

```bash
git clone https://github.com/oxygen-dioxide/music21-svs-formats
cd music21-svs-formats
pip install -e .[hyphen]
```

## Features
- **Bi-directional conversion** between SVS software data and Music21 objects:
  - Notes, time signatures, and tempo.
  - Conversion between SVS melisma symbols (`-`) and musical slurs in staff notation.
- **Automatic completion** of metadata required by Music21 that is often absent in SVS projects:
  - Automatic key detection.
  - Automatic splitting note to tied notes when needed.
  - Automatic hyphenation of multi-syllabic lyrics (e.g., `listening` `+` `+` -> `lis`, `-ten`, `-ing`).

## Example
Convert an SVS project file to staff notation (requires [MuseScore](https://musescore.org/) installed):

```python
import music21
import music21_svs_formats

music21_svs_formats.registAllFormats()

infile = "path_to_your_file.ustx"
project = music21.converter.parseFile(infile, forceSource=True, hyphenLang="en_US")
project.show()
```
