2
0
Fork 0
OPL/py/atten_levels.py

14 lines
185 B
Python
Raw Normal View History

2013-09-12 15:52:35 +00:00
lvls = [.75, 1.5, 3, 6, 12, 24]
def get_db(i):
db = 0.0
for d in lvls:
if i & 0x1:
db += d
i >>= 1
return db
for i in range(2**6):
db = get_db(i)
print '"%.2f dB",' % db,