Applecorn/freq_table
2022-10-31 21:13:13 -04:00

20 lines
419 B
Python
Executable File

#!/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
print("\nFREQHIGH");
for i in range(0,256):
v = 2**(i/48)*base
print(" DB >{:.0f}".format(v * 10))
print("\nFREQLOW");
for i in range(0,256):
v = 2**(i/48)*base
print(" DB <{:.0f}".format(v * 10))