Debian Codegraph @

src/python/Conversion/cps2pch.py

raw symbols SCIP
1 #import event sheet module
2 import qutesheet as q
3 from math import log10
4
5 # get all cells by row
6 cells = q.cells_selection_by_row()
7 new_data = []
8
9 for c in cells:
10 if type(c) != str and c > 0:
11 new_val = 117 + (12 *log10(c/440.0)/log10(2))
12 c = int(new_val/12) - 1 + ((new_val%12) / 100)
13 new_data.append(c)
14 else:
15 new_data.append(c)
16
17
18 # set output
19 q.set_cells_by_row(new_data)