#!/usr/bin/env python # Calculate frequency intervals for Bach tuning for Aeolus. # Aeolus's temperament specifications start on C (element 9 is A). # Based on the chart on: # http://www-personal.umich.edu/~bpl/larips/index.html comma = ((3.0/2)**12) / (2.0**7) rc = comma**(1.0/12) # Rotated left one position to start on C. adj = [-2, -2, -2, -2, 0, 0, 0, -1, -1, -1, 1, -2, -2] out = [0] * 12 f = 1.0 for i in range(12): print "fifth", i, "=", f out[(7 * i) % 12] = f f = f * (3.0/2) * (rc**adj[i]) print "octave =", f for i in range(12): while out[i] > 2.0: out[i] /= 2 print "{" print " " + ",\n ".join(map(str, out)) print "};"