Module:MOS tunings: Difference between revisions
Added search info |
m comments |
||
| Line 62: | Line 62: | ||
local ratios = {{1,1}, {2,1}} | local ratios = {{1,1}, {2,1}} | ||
-- Find ratios by finding the mediants between existing ratios, only adding | |||
-- those that do not exceed the integer limit. | |||
local new_ratios_added = true | local new_ratios_added = true | ||
while new_ratios_added do | while new_ratios_added do | ||
| Line 82: | Line 84: | ||
end | end | ||
-- If the max cents is greater than the octave, duplicate all existing | |||
-- ratios and raise them by the required number of octaves. | |||
if max_cents > 1200 then | if max_cents > 1200 then | ||
local new_ratios = {} | local new_ratios = {} | ||
| Line 105: | Line 109: | ||
end | end | ||
end | end | ||
-- Remove any ratios that exceed the max cents | |||
-- Convert to ratios that Module:Rational can work with | |||
return ratios | return ratios | ||