Module:JI ratios in ED: Difference between revisions
m Primes can be entered as a subgroup (delimited with periods) instead of a comma-delimited list |
Added footnotes to table |
||
| Line 90: | Line 90: | ||
result = result .. string.format('|}\n') | result = result .. string.format('|}\n') | ||
-- Add footnotes | |||
local subgroup_as_text = "" | |||
for i = 1, #primes do | |||
if i ~= #primes then | |||
subgroup_as_text = subgroup_as_text .. string.format("%d.", primes[i]) | |||
else | |||
subgroup_as_text = subgroup_as_text .. primes[i] | |||
end | |||
end | |||
result = result .. string.format("Based on treating %d%s as a %s subgroup temperament. Other approaches are possible.", ed, equave_as_text, subgroup_as_text) | |||
return result | return result | ||
end | end | ||
| Line 123: | Line 135: | ||
local equave = p.parse_equave(frame.args["ED"]) | local equave = p.parse_equave(frame.args["ED"]) | ||
local | local primes_as_text = "2.3.5.7.11.13" | ||
if string.len(frame.args["Primes"]) > 0 then | if string.len(frame.args["Primes"]) > 0 then | ||
primes_as_text = frame.args["Primes"] | |||
end | end | ||
local primes = tip.parse_numeric_entries(frame.args["Primes"], '.') or tip.parse_numeric_entries(frame.args["Primes"], ',') | |||
local tenney_height = tonumber(frame.args["Tenney Height"]) or 10 | local tenney_height = tonumber(frame.args["Tenney Height"]) or 10 | ||