Skip to main content

CLI tool to convert chords written in simple text to musicxml files that can be used with a music notation software

Project description

txt2musicxml

A simple tool to convert chords from text to musicxml. Musicxml files can be opened with most notation software (for example MuseScore, which is free and opensource).

Install

pipx install txt2musicxml

Usage

pipe a string of chords into the cli

echo 'Cmaj7 A7 | Dm9 G7b913 |' | txt2musicxml

or redirect input/output from/to a file

txt2musicxml < path/to/Thriller.crd > path/to/Thriller.musicxml

Syntax Example

Aguas de Marco - Elis Regina & Tom Jobim:

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

Developing Locally

Dependencies

In order to change the grammer and regenerate lexer/parser/etc:

For other development:

  • python (3.13)
    • I suggest using pyenv to manage multiple python versions on your machine
  • poetry - to manage virtual env
  • 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:

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.

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

txt2musicxml-0.1.2.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

txt2musicxml-0.1.2-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file txt2musicxml-0.1.2.tar.gz.

File metadata

  • Download URL: txt2musicxml-0.1.2.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for txt2musicxml-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aa9af8541c53585de530c648f140ee8be1888883fcd819fa0e62ff8ac5bebb05
MD5 cec57b18772a6212c4e56d13d12eb752
BLAKE2b-256 76da29b6a68e4dd7eff9b5c46f88bf2d90383a9e519362d463679e3ab3b07c9f

See more details on using hashes here.

File details

Details for the file txt2musicxml-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: txt2musicxml-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for txt2musicxml-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5ca1b2e313213870654289cc5b57bd9f364b3a581f06d49173486ff5d6a43a1d
MD5 473728051893ed6613e1e47e5514019a
BLAKE2b-256 eb0d1af48833d5cb1949c1a68f6bb3e3202218e70079f2d2a51aac037e723f5d

See more details on using hashes here.

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