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
mspell-0.0.4.tar.gz
(10.4 kB
view hashes)
Built Distribution
mspell-0.0.4-py3-none-any.whl
(12.4 kB
view hashes)