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
- Process a File:
chorder -i song.txt
- Save Output to File:
chorder -i song.txt -o formatted_song.txt
- Transpose Up by 2 Semitones:
chorder -i song.txt -t 2
- Transpose Down by 3 Semitones and Save:
chorder -i song.txt -t -3 -o transposed_song.txt
- 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
- Place chord markers (
|C|) exactly where you want the chord to appear above the lyrics - For complex chords, just write them normally:
|Cmaj7|,|F#m7b5| - When transposing, the tool automatically handles both sharp and flat notations
- Use the
-fflag if you prefer flat notation (e.g., Bb instead of A#) - Empty lines are preserved in the output for formatting
- You can pipe input/output to/from other commands using standard UNIX pipes
- Chords can be placed anywhere in the line, including at the very end (no need for trailing spaces)
- 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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - 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:
- Check the GitHub Issues page
- Open a new issue if your problem hasn't been reported
- Include example input and expected output when reporting issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06a808c67d033f58b038297827794f1aa849a4c4c783be1aa4d819f3c8df020a
|
|
| MD5 |
c6aa767ced1b9e51ed974fd6af78ca7e
|
|
| BLAKE2b-256 |
5339574ca178727ef96a789558c1c7a6ae8344da65c9a167a51352f1181bb088
|
File details
Details for the file galshaya_chorder-0.1.1-py3-none-any.whl.
File metadata
- Download URL: galshaya_chorder-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6285d6e6ddfb74504cecdf6d5978ef742a73e1687a98397685a7a031c17e4ff2
|
|
| MD5 |
c843df6bac5a586311839d7ff766e05f
|
|
| BLAKE2b-256 |
b7a85adf138495097d9cfcc986ad07289d0568bbb91f42ea6294888b36f081bd
|