Skip to main content

Geometric representations of tones and chords

Project description

Semitone

A Python package to represent tones, scales, and chords geometrically.

Published at pypi.org/project/semitone.

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("A")

# 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.HarmonicSeries("A", max_multiplier=13)
fig = st.SpiralPlot.draw((scale, scale_harm))
fig.show()

Music and Geometry?

Each tone is represented as a point on a logarithmic spiral, with its radius scaling with wavelength (higher tones closer to the center), and its angle scaling with its progress around the full octave (semitone raises in pitch are 30 deg clockwise rotations).

For example, three octaves of the chromatic scale in C:

Contributing

For contributing guidelines, see CONTRIBUTING.md.

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

semitone-0.1.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semitone-0.1.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file semitone-0.1.0.tar.gz.

File metadata

  • Download URL: semitone-0.1.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/6.8.0-101-generic

File hashes

Hashes for semitone-0.1.0.tar.gz
Algorithm Hash digest
SHA256 471087020b8312ca9b1dd85514af6bea10646fe00a27d5c476245310680f6f14
MD5 73735b7e37a40ab7f84b6fe71d74355f
BLAKE2b-256 69b5000e20ff033175362cccd2a35f8081eef1f33c62de93a48f3a0a52802a8f

See more details on using hashes here.

File details

Details for the file semitone-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: semitone-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.6 Linux/6.8.0-101-generic

File hashes

Hashes for semitone-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c904cb5149563af8dc1ab04fafd6134c8f53f08f64a2a346eca11d34bdf808e9
MD5 e0e31da4f26a207b40cd4bf7c2e3dea0
BLAKE2b-256 8d74c61fe3e6be79926b347b9677414261785bdf44d65a62aa111cef63838b81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page