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.1.tar.gz
(8.3 kB
view details)
Built Distribution
mspell-0.0.1-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file mspell-0.0.1.tar.gz
.
File metadata
- Download URL: mspell-0.0.1.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 | 64ca71487c19284d8fba3b61d69796d55541d8fe6e3b8db951167d167e5c70ad |
|
MD5 | 1a037b1da36ed840057ad7e7980dd2cd |
|
BLAKE2b-256 | d9a72761a1afc8ddc7d9d2f63eee99c5bbbc53ea01acdf40af7e71a074d19326 |
File details
Details for the file mspell-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mspell-0.0.1-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 | cb11278e0430ed8db4f79c3950fd22480aa60fd49da861318111f8f0ed68c116 |
|
MD5 | 60463a5232cae31bf12a0ba3731570f3 |
|
BLAKE2b-256 | d746bea90c55621e071e47c1204fb8cca3659375f5759f3d59c2e18bc1bb7914 |