Skip to main content

Chord chart validation and transposition

Project description

chord-chart

This package provides chord chart validation and transposition functionality.

It is written in Rust and has an accompanying library in JavaScript. Used in vrslev/songbook — lyrics and chords webapp.

Example

>>> from chord_chart import ValidationError, transpose_chart, validate_chart

>>> # that's a valid chart: | *chord-with-bass-note* *chord-without-accidental* | *chord* | *(end of the bar, then new bar ->)*
>>> # | *chord-with-accidental-and-symbols* |
>>> validate_chart('| A/E E | E | \n| C#m|')
'| A/E E | E |\n| C#m |'

>>> validate_chart('A/E E\nC#m')  # and that's not a valid one: chords without stripes between lines of bars
Traceback (most recent call last):
...
_chord_chart.ValidationError: bar line should start with stripe: A/E E

>>> transpose_chart('| A/E| E |\n| C#m|', current_key='E', new_key='Db')
'| Gb/Db | Db |\n| Bbm |'

Installation

Just pip install chord-chart on Python 3.7 to 3.11.

Development

  • make install to clean up and setup dev-env.
  • make test to build and test the package.
  • make check-types to run pyright.

Also make sure to install pre-commit hooks (pre-commit install from the repository root).

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

chord_chart-0.3.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distributions

chord_chart-0.3.0-cp311-none-win_amd64.whl (103.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

chord_chart-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (511.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

chord_chart-0.3.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (413.2 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

chord_chart-0.3.0-cp310-none-win_amd64.whl (103.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

chord_chart-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (511.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

chord_chart-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (413.2 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

chord_chart-0.3.0-cp39-none-win_amd64.whl (103.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

chord_chart-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (511.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

chord_chart-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (413.2 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

chord_chart-0.3.0-cp38-none-win_amd64.whl (103.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

chord_chart-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (511.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

chord_chart-0.3.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (412.1 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

chord_chart-0.3.0-cp37-none-win_amd64.whl (103.7 kB view details)

Uploaded CPython 3.7 Windows x86-64

chord_chart-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (511.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

chord_chart-0.3.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (412.1 kB view details)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file chord_chart-0.3.0.tar.gz.

File metadata

  • Download URL: chord_chart-0.3.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.1

File hashes

Hashes for chord_chart-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cb7c9d623a96ec2089473e9101d42febff1fcaa69ec9eaec27c4fd4d1e68c723
MD5 b80eac10d6e1d5c66920a1043f187c24
BLAKE2b-256 deeb5380e35a0cd4529210a7c9b51cbba7c708c5087cff7422fee91f9565c04b

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 f440d8c2ee0be5e29e43ed5d58367ae113c7f64fd1c17ee56a75c27f8b4a622b
MD5 08ab8aac0578a8b7b27efa088868b2db
BLAKE2b-256 388009d136f5d56b2bf6a3005bf34d3a9fdfcc11fb9319766544848d5f7e174d

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4f72d8c050848405dfe9eb479889a74c682bef104cf9f31219daa4e4ebc924d
MD5 7e0bbcd5fee0fac3d05f03d7625e5500
BLAKE2b-256 5d9b49a59697fe6b3c4a2ba893decc5a063ab2d8552b3f29852b259053d88975

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 07ae68b38f0b1dbfe4a5a839ddca5cba5f872484b57a6512923ef6ecb8e81671
MD5 d22be3a254c834244908b52158ab96fc
BLAKE2b-256 fdbddb8a6a8d69a97cb1e4a8ae9a937035dd43f73596ab57958dc17b57a0baae

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 6f4e1556d31ebb8d27265b7c7901caa6baf9a58ed4add0f95e128f4b69fbc04b
MD5 7dccdbcea322136d2d08161cb241cb34
BLAKE2b-256 ec728abbb3d5062e9db7830374e477efc0d105c6bbe902abb0beb90e959b4c7e

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 928bc69bb2158d5bd3a6d709b23d10c765d67c91300f210cc26a83d5b0d9e643
MD5 3511a9b22d1234d004f380c36485e26a
BLAKE2b-256 da6bc31ad699326e547deb4af1615792a9443e8d1c7ac23e05b8fbc56f4a370e

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 bc8bbefa5c0fe791e68a36ae908a796e0eeda9c8e42a89acb1dc80bb3689954f
MD5 33a81b0ab6c907fb0fbdc987ea1d5e67
BLAKE2b-256 a62aff0bfe961bb680c8ce0f04b89f684f0cace9ecc203fc51a61073c83f6573

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 176c641531130da5bc0a23d9ef0e210a2521cfcaa88ea448c7420ac7f1166235
MD5 6b5413ee2364c7240da9e06641569f22
BLAKE2b-256 0d66aa3f20431da4d8a2206e32793154b4c5a14cd363fd1e444b3f1fd6449a70

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35fcf9871ca33460a582fc6ffdec7c784549f1d49336725a8062d26f087649be
MD5 f7b444ca90c57cba5d5d43a6043ee273
BLAKE2b-256 3ae420702e175a1fae97f2eb5828f913b273b2556763cfa0f8df03b4be3dd4e6

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ce35ec867808038e5d66199798141199915bb9b202a3fd2bbf1f92ab399da422
MD5 4727a15fc46ece55ffe1397ee964d949
BLAKE2b-256 793dff54b930c2a3b4964346b23f51d2b7631492ae889f149584c4b76381f8b6

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 1b97f075b88b2b604116488d8cfea73bba21b2bf2ef65af774b0be6a959d00db
MD5 5dbfdfc66fa3fb555d26b6cad66e8417
BLAKE2b-256 ac2ae3a4a1a72c6d3b166bd5faca98dd6c03fd711ad82be3f192942b577559c2

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be8971f60cc01f6e1b56547c647fa0c56119471f3f7ef78d9cc1bbb1866da733
MD5 4241a4dc91e382cb0f32e6f502a447fd
BLAKE2b-256 238c84f4d926b5ef9982f9bfc9dc055e1f142bb3c5ce50b3af79a303d27a6f08

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7e16f6ecddfea50f5440c64a579c7c0e211e927a8c88b4487348ce96814b2830
MD5 00cddfa39e297d8b6afb17479da1eab1
BLAKE2b-256 6f686f1b779b37e7b3b7b8432fbba6fa875f106fbd411faca8c44761c32bbebe

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 d8781feabad255d2ed339f494140bcd6e48006a98e15f01db8381bf14084cd26
MD5 60ecc0f430422c0c99a5be3d91797dc5
BLAKE2b-256 43491187a1ecaa99283d487784c577930c2c2470198dcd23cf354a3f3c81af83

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8940cc862c2a4364b2321378600185ce0d2074c37233eb6c90738080337b1322
MD5 9ffcb877ec01d6fb5878589618a79d6f
BLAKE2b-256 cbbaa8b8e337103a2baeb22b90f6530d6df5bd6c85f530d06062c6599c65d623

See more details on using hashes here.

File details

Details for the file chord_chart-0.3.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for chord_chart-0.3.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 82fe098a99f8fce5d9736374d75b0a4adec301252d3a55763c01254a41f1e15a
MD5 1d3b83fc9690275704475234170e6588
BLAKE2b-256 5a7bfb97e326a273007fbd15d8b92a7afbfb00193fcb9db20138579210726ab5

See more details on using hashes here.

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