gen_pitch_table: avoid main resonance frequencies

master
Peter Cai 2 years ago
parent a7bc05506d
commit 3c43881716
  1. 5
      gen_pitch_table.py

@ -32,6 +32,9 @@ print("constexpr unsigned long midi_pitch_period[" + str(end_pitch - start_pitch
for i in range(start_pitch, end_pitch):
period = int(pitch_to_period_micros(i))
print(" " + str(period) + "ul,\t// " + pitch_to_name(i))
name = pitch_to_name(i)
if name == "D3" or name == "D#3" or name == "E3":
period = int(period / 2)
print(" " + str(period) + "ul,\t// " + name)
print("};")
Loading…
Cancel
Save