Module:Interval table: Difference between revisions
mNo edit summary |
Trying to make the inclusion of ratios by edo size more granular. If this breaks anything I will immediately undo. |
||
| Line 129: | Line 129: | ||
for j = 1, #ratios_list do | for j = 1, #ratios_list do | ||
-- Go through all ratios. | -- Go through all ratios. | ||
-- If they are mapped to the current step in the ET's patent val and < 1/3 edostep error | -- If they are mapped to the current step in the ET's patent val | ||
-- and < 1/3 edostep error (for EDOs<40) or < 2/5 edostep error (for EDOs>=40) | |||
-- add to approximate ratios column. | -- add to approximate ratios column. | ||
local t = mapping(rat.new(ratios_list[j][1], ratios_list[j][2]), patent_val) | local t = mapping(rat.new(ratios_list[j][1], ratios_list[j][2]), patent_val) | ||
if | if | ||
t == i | t == i | ||
and et.size >=40 | |||
and math.abs(ET.cents(et, i) - utils._log(ratios_list[j][1] / ratios_list[j][2], 2) * 1200) | and math.abs(ET.cents(et, i) - utils._log(ratios_list[j][1] / ratios_list[j][2], 2) * 1200) | ||
< (1200 / (3 * et.size)) | < (1200 / (3 * et.size)) | ||
then | |||
wikitext = wikitext .. "[[" .. ratios_list[j][1] .. "/" .. ratios_list[j][2] .. "]], " | |||
if | |||
t == i | |||
and et.size <40 | |||
and math.abs(ET.cents(et, i) - utils._log(ratios_list[j][1] / ratios_list[j][2], 2) * 1200) | |||
< (1200 / (2.5 * et.size)) | |||
then | then | ||
wikitext = wikitext .. "[[" .. ratios_list[j][1] .. "/" .. ratios_list[j][2] .. "]], " | wikitext = wikitext .. "[[" .. ratios_list[j][1] .. "/" .. ratios_list[j][2] .. "]], " | ||
| Line 170: | Line 179: | ||
return p | return p | ||
end | |||