errors of a top-octave generator IC, see https://hackaday.com/2018/05/24/ask-hackaday-diy-top-octave-generator/
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