Skip to content

Instantly share code, notes, and snippets.

@FrankBuss FrankBuss/notes.py
Created May 25, 2018

Embed
What would you like to do?
import math
# highest note frequency
c = 4186.01
# distance factor between two notes
f = pow(2, 1.0/12.0)
# show frequncies
ds = [ 239, 253, 268, 284, 301, 319, 338, 358, 379, 402, 426, 451 ]
for d in ds:
x = 1.0e6 / d
print("calculated: %4.2f, with division: %4.2f, error: %2.2f %%" % (c, x, 100.0 - (x / c) * 100.0))
c = c / f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.