Geometric representations of tones and chords
Project description
Semitone
A Python package for learning and exploration: compute frequencies, scales, and chords in different tuning systems, and represent their relationships through geometry.
Semitone is built to help people build intuition for musical relationships through the physics of sound. It is not intended to be a full music-production toolkit.
Published at pypi.org/project/semitone.
Purpose
Use Semitone to explore and compare how tuning systems shape intervals, harmonies, and scales. The focus is understanding: seeing what is similar, what is different, and why.
Quick Start
For full demos, see the notebooks in demos/.
Install with pip:
pip install semitone
Analyze scales:
import semitone as st
scale = st.Major("C")
# Compute frequencies
print(scale)
print(scale.extend(octaves_below=0, octaves_above=2))
# Visualize as a logarithmic spiral
fig = st.SpiralPlot.draw((scale,))
fig.show()
# Visualize equal- vs just-tempered scales together
scale_harm = st.HarmonicOctave("C", max_multiplier=19)
fig = st.SpiralPlot.draw((scale, scale_harm))
fig.show()
Music and Geometry
Each tone may be represented as a point on a logarithmic spiral. Radius scales with wavelength: higher tones are closer to the center. Angle scales with the octave distance from key center: semitone increases in pitch correspond to 30 deg clockwise rotations.
For example, three octaves of the equal-tempered chromatic scale in C:
And a just-tempered scale using the first 23 harmonics compressed to a single octave in C (redundant tones of the same pitch class are eliminated):
And an overlay of the C major scale with the D minor scale:
Contributing
For contributing guidelines, see CONTRIBUTING.md.
Please keep contributions aligned with Semitone's core purpose: learning and
exploration through clear, physically grounded representations of music.
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 semitone-0.7.0.tar.gz.
File metadata
- Download URL: semitone-0.7.0.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.10.20 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f8e70ab42da78e8040abe84057dbe7b90241d140cfd43179b4d273ec4c7d3de
|
|
| MD5 |
9bfb48ef3a5a35969a1d7098161179c8
|
|
| BLAKE2b-256 |
515d739e96c55b2cd5c51db3538b93a58c08ceae9d643ce1a7059802106dec82
|
File details
Details for the file semitone-0.7.0-py3-none-any.whl.
File metadata
- Download URL: semitone-0.7.0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.10.20 Linux/6.14.0-1017-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3546b833e9bf4906c0bb5b439c2b349c993d47a265e2baed35ee7e089ae6c7e
|
|
| MD5 |
54b47ea16691967aaf131c60390b152c
|
|
| BLAKE2b-256 |
76aa8d885cb8a8477bd76a4c05f5703d7697b8809271fea549c7cf695370de24
|