Skip to main content

Python toolkit for working with chord progressions

Project description

jchord - toolkit for working with chord progressions

https://github.com/jonathangjertsen/jchord/actions/workflows/build.yml/badge.svg https://codecov.io/gh/jonathangjertsen/jchord/branch/master/graph/badge.svg

jchord provides tools for working with chord progressions.

jchord:

  • has object representations for notes, chords, and progressions (in the Western 12-tone system)

  • knows about naming conventions for chords, and can convert back and forth between objects and names

  • can be used as a converter between strings, text files, XLSX files, and MIDI files.

Here is an example that parses a chord progression written as a string, transposes it upwards by 2 semitones, converts it back to a string and then creates a midi file from it.

>>> from jchord import ChordProgression, MidiConversionSettings
>>> prog = ChordProgression.from_string("C -- Fm7 -- C -- G7 -- C -- E7 Am F Bm7b5 E7 Am9 F Bo C69 --")
>>> prog = prog.transpose(+2)
>>> print(prog.to_string())
D       --      Gm7     --
D       --      A7      --
D       --      F#7     Bm
G       C#m7b5  F#7     Bm9
G       C#o     D69     --
>>> prog.to_midi(MidiConversionSettings(filename="example.midi", tempo=100, beats_per_chord=2, instrument=4))

For more examples, see the documentation.

Documentation

Documentation lives here: jonathangjertsen.github.io/jchord/

Contributing

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

jchord-3.0.0.tar.gz (28.6 kB view hashes)

Uploaded Source

Built Distribution

jchord-3.0.0-py3-none-any.whl (25.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page