Skip to main content

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]]

Metadata

Release files for mspell 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mspell 0.0.4
File Size Uploaded
mspell-0.0.4.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mspell 0.0.4
File Interpreter ABI Platform
mspell-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / mspell-0.0.4.tar.gz

Download URL mspell-0.0.4.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2f5cb614f333991ec030d858ca70b04a4a80ff4bdd738da1d8bd0fe3ea4b6088
BLAKE2b-256 checksum
How to use checksums
c921cedec380c4887656368ccda589285edaf979e20a69c3ca1f25f74e36772b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / mspell-0.0.4-py3-none-any.whl

Download URL mspell-0.0.4-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
095fa13bd2d6adc8f1206a817008e7fa740e4c6966641bdd99b136be161fb170
BLAKE2b-256 checksum
How to use checksums
cfa31686509d892400d511c52dd93fb8a6e24f6dec6cc1cd81dd8ae14a925b32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page