txt2musicxml


Nametxt2musicxml JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/noamtamir/txt2musicxml
SummaryCLI tool to convert chords written in simple text to musicxml files that can be used with a music notation software
upload_time2024-11-24 17:04:50
maintainerNone
docs_urlNone
authornoamtamir
requires_python<4.0,>=3.9
licenseMIT
keywords musicxml music xml chords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # txt2musicxml
A simple tool to convert chords from text to musicxml. Musicxml files can be opened with most notation software (for example [MuseScore](https://musescore.org/), which is free and opensource).

## Install
use [pipx](https://github.com/pypa/pipx)
```shell
pipx install txt2musicxml
```

## Usage
pipe a string of chords into the cli
```shell
echo -n 'Cmaj7 A7 | Dm9 G7b913 |' | txt2musicxml
```
or redirect input/output from/to a file
```shell
txt2musicxml < path/to/Thriller.crd > path/to/Thriller.musicxml
```

## Syntax Example
Aguas de Marco - Elis Regina & Tom Jobim:
```crd
Bb/Ab | Bb/Ab |
Bb/Ab | Gm6 Cm7b5/Gb |
Bbmaj7/F E9b5 | Ebmaj9 Ab9 |
Bbmaj7 Bb7 | C7/E Ebm6 |
Bbmaj7/F Bb7 | C7/E Ebm6 |
```

- More info in [SYNTAX.md](./SYNTAX.md)
- More examples: [./examples/](./examples/)

## Export to PDF (with MuseScore)
[Install MuseScore 3](https://musescore.org/en/download) (not tested with version 4) and make sure to add `mscore` to your PATH.
```shell
TMPSUFFIX=.musicxml; mscore -o path/to/output.pdf =(txt2musicxml < path/to/input.crd)
```

## Developing Locally
### Dependencies
In order to change the grammer and regenerate lexer/parser/etc:
- [java](https://www.java.com/en/download/)
- [antlr](https://www.antlr.org/)

For other development:
- [python ^3.9](https://www.python.org/)
    - I suggest using [pyenv](https://github.com/pyenv/pyenv) to manage multiple python versions on your machine
- [poetry](https://python-poetry.org/) - to manage virtual env
- [Make](https://www.gnu.org/software/make/) - to help run useful commands

### Updating and Debuging
Grammer is defined in `txt2musicxml/grammer/Chords.g4`.
To generate antlr python classes (Lexer, Parser, Visitor, Listener) from the grammer file, run:
```bash
antlr4 -Dlanguage=Python3 txt2musicxml/grammer/Chords.g4 -visitor
```
Those classes are direct dependecies of the application, they must exist for the main program to run.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/noamtamir/txt2musicxml",
    "name": "txt2musicxml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "musicxml, music, xml, chords",
    "author": "noamtamir",
    "author_email": "noam.tamir@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/59/8959bc0bbcb4e6e017eefc7560fd3f772df24764797a3e7b2e6d45b5ea8a/txt2musicxml-0.1.4.tar.gz",
    "platform": null,
    "description": "# txt2musicxml\nA simple tool to convert chords from text to musicxml. Musicxml files can be opened with most notation software (for example [MuseScore](https://musescore.org/), which is free and opensource).\n\n## Install\nuse [pipx](https://github.com/pypa/pipx)\n```shell\npipx install txt2musicxml\n```\n\n## Usage\npipe a string of chords into the cli\n```shell\necho -n 'Cmaj7 A7 | Dm9 G7b913 |' | txt2musicxml\n```\nor redirect input/output from/to a file\n```shell\ntxt2musicxml < path/to/Thriller.crd > path/to/Thriller.musicxml\n```\n\n## Syntax Example\nAguas de Marco - Elis Regina & Tom Jobim:\n```crd\nBb/Ab | Bb/Ab |\nBb/Ab | Gm6 Cm7b5/Gb |\nBbmaj7/F E9b5 | Ebmaj9 Ab9 |\nBbmaj7 Bb7 | C7/E Ebm6 |\nBbmaj7/F Bb7 | C7/E Ebm6 |\n```\n\n- More info in [SYNTAX.md](./SYNTAX.md)\n- More examples: [./examples/](./examples/)\n\n## Export to PDF (with MuseScore)\n[Install MuseScore 3](https://musescore.org/en/download) (not tested with version 4) and make sure to add `mscore` to your PATH.\n```shell\nTMPSUFFIX=.musicxml; mscore -o path/to/output.pdf =(txt2musicxml < path/to/input.crd)\n```\n\n## Developing Locally\n### Dependencies\nIn order to change the grammer and regenerate lexer/parser/etc:\n- [java](https://www.java.com/en/download/)\n- [antlr](https://www.antlr.org/)\n\nFor other development:\n- [python ^3.9](https://www.python.org/)\n    - I suggest using [pyenv](https://github.com/pyenv/pyenv) to manage multiple python versions on your machine\n- [poetry](https://python-poetry.org/) - to manage virtual env\n- [Make](https://www.gnu.org/software/make/) - to help run useful commands\n\n### Updating and Debuging\nGrammer is defined in `txt2musicxml/grammer/Chords.g4`.\nTo generate antlr python classes (Lexer, Parser, Visitor, Listener) from the grammer file, run:\n```bash\nantlr4 -Dlanguage=Python3 txt2musicxml/grammer/Chords.g4 -visitor\n```\nThose classes are direct dependecies of the application, they must exist for the main program to run.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CLI tool to convert chords written in simple text to musicxml files that can be used with a music notation software",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/noamtamir/txt2musicxml",
        "Repository": "https://github.com/noamtamir/txt2musicxml"
    },
    "split_keywords": [
        "musicxml",
        " music",
        " xml",
        " chords"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1359e4ea561a36f2180693c9f2dfecbcd73b43d500537ed27f9f3b643fa7d60",
                "md5": "2d9a8116da77aee450edcede88774d93",
                "sha256": "7365111ae275db92547e47cb1d7063a1709c2ac8a688cb427ea62e7e93d6f311"
            },
            "downloads": -1,
            "filename": "txt2musicxml-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d9a8116da77aee450edcede88774d93",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 27071,
            "upload_time": "2024-11-24T17:04:48",
            "upload_time_iso_8601": "2024-11-24T17:04:48.486948Z",
            "url": "https://files.pythonhosted.org/packages/d1/35/9e4ea561a36f2180693c9f2dfecbcd73b43d500537ed27f9f3b643fa7d60/txt2musicxml-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb598959bc0bbcb4e6e017eefc7560fd3f772df24764797a3e7b2e6d45b5ea8a",
                "md5": "0513cb340521a6a06e9b11f562e942fe",
                "sha256": "48cf8d02b4de9ee55ca5baae25430866a60920619e12af2418310cc83a16b348"
            },
            "downloads": -1,
            "filename": "txt2musicxml-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "0513cb340521a6a06e9b11f562e942fe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 21193,
            "upload_time": "2024-11-24T17:04:50",
            "upload_time_iso_8601": "2024-11-24T17:04:50.195663Z",
            "url": "https://files.pythonhosted.org/packages/bb/59/8959bc0bbcb4e6e017eefc7560fd3f772df24764797a3e7b2e6d45b5ea8a/txt2musicxml-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-24 17:04:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "noamtamir",
    "github_project": "txt2musicxml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "txt2musicxml"
}
        
Elapsed time: 0.37678s