1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2026-04-21 06:16:43 +00:00

python 2->3 for tools

This commit is contained in:
Steven Hugg
2018-11-22 14:11:56 -05:00
parent 6e50cbb20e
commit 149ee4a2eb
14 changed files with 90 additions and 96 deletions
+5 -5
View File
@@ -35,14 +35,14 @@ for a440 in range(4300,4500):
results.sort()
best_error, best_a440 = results[0]
best_a440 /= 10.0
print '//', args
print '//', best_a440, best_error, test_notes
print('//', args)
print('//', best_a440, best_error, test_notes)
print "const int note_table[%d] = {" % final_notes
print("const int note_table[%d] = {" % final_notes)
for note in range(0,final_notes):
notehz = best_a440 * math.pow(2.0, (note - 49) / 12.0);
period = int(round(basehz / notehz)) - bias
while period > maxval:
period /= 2
print '%d,' % period,
print "};"
print('%d,' % period, end='')
print("};")