Skip to main content

A command-line tool for formatting and transposing chord charts

Project description

Chorder

A command-line tool for creating, formatting, and transposing chord charts. This tool helps musicians format their chord charts with proper chord alignment above lyrics and provides useful features like transposition and file handling.

Features

  • Format chord charts with chords properly aligned above lyrics
  • Transpose entire songs to different keys
  • Support for complex chord notations (e.g., Am7, G/B, F#dim)
  • Handle both sharp (#) and flat (b) notations
  • Convert between sharp and flat notations
  • Read from files or interactive input
  • Save formatted output to files

Installation

Install from PyPI using pip:

pip install galshaya-chorder

Or install the development version directly from GitHub:

git clone https://github.com/galshaya/chorder.git
cd chorder
pip install -e .

Usage

After installation, you can use the chorder command directly from your terminal:

Basic Command Format

chorder [-i INPUT_FILE] [-o OUTPUT_FILE] [-t SEMITONES] [-f]

Command Line Options

  • -i, --input: Input file path (optional)
  • -o, --output: Output file path (optional)
  • -t, --transpose: Number of semitones to transpose (optional, can be negative)
  • -f, --use-flats: Use flat notation instead of sharps (optional)

Interactive Mode

Simply run chorder without any arguments to enter interactive mode:

chorder

Type your chord chart with chords enclosed in pipe symbols (|), press Enter after each line, and Ctrl+D (Unix) or Ctrl+Z (Windows) when done.

Input Format

Write your chord chart with chords enclosed in pipe symbols (|) where they should appear above the lyrics:

|D|I don't want to |A|close my eyes|Em|
I don't want to fall asleep
'Cause I'd |G|miss you baby

Examples

  1. Process a File:
chorder -i song.txt
  1. Save Output to File:
chorder -i song.txt -o formatted_song.txt
  1. Transpose Up by 2 Semitones:
chorder -i song.txt -t 2
  1. Transpose Down by 3 Semitones and Save:
chorder -i song.txt -t -3 -o transposed_song.txt
  1. Use Flat Notation:
chorder -i song.txt -f

Example Input and Output

Input:

|D|I don't want to |A|close my eyes|Em|

Output with default sharp notation:

D               A            Em
I don't want to close my eyes

Output with flat notation (1 semitone transposed) (-f):

Eb              Bb           Fm
I don't want to close my eyes

Tips

  1. Place chord markers (|C|) exactly where you want the chord to appear above the lyrics
  2. For complex chords, just write them normally: |Cmaj7|, |F#m7b5|
  3. When transposing, the tool automatically handles both sharp and flat notations
  4. Use the -f flag if you prefer flat notation (e.g., Bb instead of A#)
  5. Empty lines are preserved in the output for formatting
  6. You can pipe input/output to/from other commands using standard UNIX pipes
  7. Chords can be placed anywhere in the line, including at the very end (no need for trailing spaces)
  8. Multiple chords can be placed next to each other: |C|Hello |G|there|Am|

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please:

  1. Check the GitHub Issues page
  2. Open a new issue if your problem hasn't been reported
  3. Include example input and expected output when reporting issues

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

galshaya_chorder-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

galshaya_chorder-0.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file galshaya_chorder-0.1.1.tar.gz.

File metadata

  • Download URL: galshaya_chorder-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.10

File hashes

Hashes for galshaya_chorder-0.1.1.tar.gz
Algorithm Hash digest
SHA256 06a808c67d033f58b038297827794f1aa849a4c4c783be1aa4d819f3c8df020a
MD5 c6aa767ced1b9e51ed974fd6af78ca7e
BLAKE2b-256 5339574ca178727ef96a789558c1c7a6ae8344da65c9a167a51352f1181bb088

See more details on using hashes here.

File details

Details for the file galshaya_chorder-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for galshaya_chorder-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6285d6e6ddfb74504cecdf6d5978ef742a73e1687a98397685a7a031c17e4ff2
MD5 c843df6bac5a586311839d7ff766e05f
BLAKE2b-256 b7a85adf138495097d9cfcc986ad07289d0568bbb91f42ea6294888b36f081bd

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