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
If Pandas or Pytorch are installed, supports spelling Series or Tensors respectively.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mspell-0.0.4.tar.gz.
File metadata
- Download URL: mspell-0.0.4.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f5cb614f333991ec030d858ca70b04a4a80ff4bdd738da1d8bd0fe3ea4b6088
|
|
| MD5 |
dd5c1323b6a1a58069c862d824d2d69a
|
|
| BLAKE2b-256 |
c921cedec380c4887656368ccda589285edaf979e20a69c3ca1f25f74e36772b
|
File details
Details for the file mspell-0.0.4-py3-none-any.whl.
File metadata
- Download URL: mspell-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
095fa13bd2d6adc8f1206a817008e7fa740e4c6966641bdd99b136be161fb170
|
|
| MD5 |
a6a7fbdf197c2773d867a5b2e0d89bcd
|
|
| BLAKE2b-256 |
cfa31686509d892400d511c52dd93fb8a6e24f6dec6cc1cd81dd8ae14a925b32
|