Spell musical pitches
Project description
A library for spelling and unspelling musical pitches.
"Spelling" a pitch is going from an integer to a letter (and, optionally, an accidental and octave number). "Unspelling" a pitch is doing the reverse.
Provides the following three classes, instances of each of which are callable:
Speller
Unspeller
Groupspeller
Requirements
numpy
Example usage
>>> import mspell
>>> speller = mspell.Speller()
>>> speller(6)
'F#'
>>> speller([3,6,10])
['Eb', 'F#', 'Bb']
>>> groupspeller = mspell.GroupSpeller()
>>> groupspeller([3,6,10])
['Eb', 'Gb', 'Bb']
>>> unspeller = mspell.Unspeller(tet=31)
>>> unspeller([['Eb', 'Gb', 'Bb'], ['Eb', 'F#', 'Bb']])
[[8, 16, 26], [8, 15, 26]]
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
mspell-0.0.2.tar.gz
(8.3 kB
view details)
Built Distribution
mspell-0.0.2-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file mspell-0.0.2.tar.gz
.
File metadata
- Download URL: mspell-0.0.2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47316be00b422394bb28f7f7c65daa141ace9a6191d0cc8ae2f07a83ad2a963 |
|
MD5 | 30e7c087dabf8bd00a78d59f682feccc |
|
BLAKE2b-256 | 4b8c8b1d5edde9b86f343411d036a775f27ec89225dbed4a27c955728d53d199 |
File details
Details for the file mspell-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: mspell-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 800fb00138091427cb10336c32c0e07b903eba07df6e4377b43bb18c07d2336a |
|
MD5 | ab2ee93dfa6a99b947bc341eb07428b7 |
|
BLAKE2b-256 | c9d95f260dc5ceafbf81e648e3980fe923ffa4a64824c9b5622ca3f5453a6134 |