equituning.py
#!/usr/bin/env python
#
# Compute some constatnts related to well-tempered piano tuning
# Author: Yotam Medini [email protected] -- Created: 2006/January/15
#
import sys
half_tone_ratio = 2. ** (1./12.)
octave_plus_quint = 2. * half_tone_ratio ** 7
La = 440.
Do1 = La * half_tone_ratio ** 3
DoCentral = Do1 / 2.
sys.stdout.write("""
Interval Ratio
Half Tone ~= %f
Octave+Quint ~= %f
---------------------
Do ~= %5.1f
Do1 ~= %5.1f
""" % (half_tone_ratio, octave_plus_quint, DoCentral, Do1))
sys.exit(0)
Generated by GNU enscript 1.6.4.