Applecorn/ensq_freq_table

20 lines
438 B
Plaintext
Raw Normal View History

2022-10-07 19:51:53 +00:00
#!/usr/bin/python3
#
# Make a table of Ensoniq frequency values (high and low bytes)
# Corresponding to the frequency values used in BBC Micro
# SOUND statements.
#
base=123.47 / 16.0 * 1.573 * 440.0 / 739.99
2022-10-07 19:51:53 +00:00
2022-11-21 21:42:55 +00:00
print("\nEFREQHIGH");
2022-10-07 19:51:53 +00:00
for i in range(0,256):
v = 2**(i/48)*base
print(" DB >{:.0f}".format(v * 10))
2022-11-21 21:42:55 +00:00
print("\nEFREQLOW");
2022-10-07 19:51:53 +00:00
for i in range(0,256):
v = 2**(i/48)*base
print(" DB <{:.0f}".format(v * 10))