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.3.tar.gz
(9.0 kB
view details)
Built Distribution
mspell-0.0.3-py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file mspell-0.0.3.tar.gz
.
File metadata
- Download URL: mspell-0.0.3.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1f2f5e9aa5380d603a015633e7156407995c58ed5911a3c68b1a7814b63f271 |
|
MD5 | 8bc8bb63f1503aa7a6abf0881fb80c2c |
|
BLAKE2b-256 | 81033b141dad26daa47d56fb9926bc2b53999a83fccdbf6dfbbf7609efaf51a7 |
File details
Details for the file mspell-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: mspell-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c9b34b16adc8d0f206cc0f3e5de29a43b673949eb00dfa53443b1e33c499ee9 |
|
MD5 | 51bab56a8b0e78feb974e1b8dd142b5a |
|
BLAKE2b-256 | a6d4b9f79b31c68dc49898f05e993130eb9f347e2eda8c8c2df843feddc725a6 |