Module:MOS tunings: Difference between revisions
No edit summary |
No edit summary |
||
| Line 82: | Line 82: | ||
if max_cents > 1200 then | if max_cents > 1200 then | ||
local new_ratios = {} | local new_ratios = {} | ||
local num_octaves_up = | local num_octaves_up = math.ceil(max_cents / 1200) | ||
for j = | for j = 2, num_octaves_up do | ||
for i = 2, #ratios do | for i = 2, #ratios do | ||
local num = ratios[i][1] * math.pow(2, j | local num = ratios[i][1] * math.pow(2, j) | ||
local den = ratios[i][2] | local den = ratios[i][2] | ||