No project description provided
Project description
chordstransposer
chordstransposer helps musicians by transposing the chords in song charts.
Basic usage example
If you know the original tone of the song you can choose a destination tone:
# Transpose a song from C to Eb:
chordstransposer.transpose('C Am Dm G Gsus4/A G/B\nGod save our gracious Queen', 'C', 'Eb')
# Result:
# 'Eb Cm Fm Bb Bbsus4/C Bb/D\nGod save our gracious Queen'
Alternatively you can specify a number of semitones to transpose by:
# Transpose the song 3 semitones below (a minor third):
chordstransposer.transpose_by('C Am Dm G Gsus4/A G/B\nGod save our gracious Queen', -3)
# Result:
# 'A F#m Bm E Esus4/F# E/G#\nGod save our gracious Queen'
Song file format
The song files are just plaintext, and contain a mix of lyrics lines and chord lines, as they can be found anywhere on the internet.
For instance, this is a valid song file:
LOST IN THE STARS
-------------
Before Lord God made the sea and the land,
G G° A-7sus D D+
He held all the stars in the palm of his hand
G6/B E7b9 A-7 A-7b5
These are the first bars of Kurt Weill's Lost in the Stars
Installation
Using pip:
pip install chordstransposer
About the harmony
transposer tries to follow as much as possible harmonic rules (eg. Cb instead of B when necessary). These are defined in the destination scale : for instance, if you want to transpose a song to Db, then the 3rd note of the minor scale is Fb and not E. You don't need your original file to follow these rules for this to work.
However, in traditional notation of the chords in popular music, we avoid writing double-flat (bb) and double-sharp (x) for the sake of readability. Here, when they should appear to be perfectly correct in terms of harmony, the double-flat and double-sharp are transposed to their most simple equivalent.
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 chordstransposer-0.1.1.tar.gz.
File metadata
- Download URL: chordstransposer-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c93ac8f82c3980f7ab20c94b3215a32e5627cbb6d835c5bac20b9292641499b1
|
|
| MD5 |
5be34d4c83a13f67f5c18859f139b407
|
|
| BLAKE2b-256 |
6d64273b92e1974b90395e3101430d108a8f9798c7207d2a40b3b41fb3d059b3
|
File details
Details for the file chordstransposer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: chordstransposer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4770be1403c4df681eeb7ca524599d69ceacb1414b4b211d80067314990445b
|
|
| MD5 |
952a7d20c627d41f77b9a45c3b510cf5
|
|
| BLAKE2b-256 |
0ed18d36b86095791e889626be26b3e2dd101cec4894af2479aff27c11b6a7a5
|