| 1 | #import event sheet module |
| 2 | import qutesheet as q |
| 3 | from math import log10, modf |
| 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: |
| 11 | new_val = (int(c + 1)*12) + (modf(c%12)[0] * 100) |
| 12 | c = 440 * pow(2, (new_val - 117)/12) |
| 13 | new_data.append(c) |
| 14 | else: |
| 15 | new_data.append(c) |
| 16 | |
| 17 | # set output |
| 18 | q.set_cells_by_row(new_data) |