Dividing floats with true division as opposed to floor division.
Division in Python.
Date Created:Sunday March 11th, 2007 11:59 AM
Date Modified:Saturday August 02nd, 2008 04:01 PM
This calculates the frequencies using math from Pythagoras and equal temperament.
from __future__ import division
import sys
L = range(0,88)
dict={}
magic = 2**(1/12)
for x in L:
p=magic**x
dict[x+1]=27.5*p
for x in dict.values():
sys.stdout.write("%f\n" % (x) );
Downloads:
Download: music.py 203 B
Please login or Click Here to register for downloads
Division by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
