Added tones generator
This commit is contained in:
parent
77441d8b7c
commit
e2be6823bd
27
scripts/tones.py
Executable file
27
scripts/tones.py
Executable file
@ -0,0 +1,27 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
'''
|
||||
def frequency_16(n):
|
||||
return 100 * 10 ** ((n + 22) * 0.0225)
|
||||
'''
|
||||
|
||||
def frequency_32(n):
|
||||
return 100 * 10 ** ((n + 22) * 0.0225)
|
||||
|
||||
def width_16(n):
|
||||
return 12.5 * 10 ** (n * 0.045)
|
||||
|
||||
def width_32(n):
|
||||
return 6.25 * 10 ** (n * 0.0225)
|
||||
|
||||
|
||||
SELCAL_16 = 'ABCDEFGHJKLMPQRS'
|
||||
SELCAL_EXTRA = 'TUVWXYZ123456789'
|
||||
SELCAL_32 = [item for pair in zip(SELCAL_16, SELCAL_EXTRA) for item in pair]
|
||||
|
||||
TONES = {SELCAL_32[n]:frequency_32(n) for n in range(32)}
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Print SELCAL 32 tones in csv format, ascending frequency order
|
||||
print('\n'.join([f"{k},{v}" for k,v in TONES.items()]))
|
||||
Loading…
Reference in New Issue
Block a user