Module:JI ratios in ED: Difference between revisions
m Bugfixing edo-vs-arbitrary-ed logic |
m Simplified entry of ED |
||
| Line 55: | Line 55: | ||
function p.parse_ed(unparsed) | function p.parse_ed(unparsed) | ||
local unparsed = unparsed or " | local unparsed = unparsed or "12edo" | ||
local ed = tonumber(unparsed) or unparsed:match('(%d+)ed') | local ed = tonumber(unparsed) or unparsed:match('(%d+)ed') | ||
| Line 63: | Line 63: | ||
function p.parse_equave(unparsed) | function p.parse_equave(unparsed) | ||
local unparsed = unparsed or " | local unparsed = unparsed or "7" | ||
local equave_unparsed = "" | local equave_unparsed = "" | ||
| Line 81: | Line 81: | ||
function p.ji_ratios_in_ed_frame(frame) | function p.ji_ratios_in_ed_frame(frame) | ||
local ed = | local ed = p.parse_ed(frame.args["ED"]) | ||
local equave = p.parse_equave(frame.args["ED"]) | |||
local primes = { 3, 5, 7, 11, 13 } | local primes = { 3, 5, 7, 11, 13 } | ||
if string.len(frame.args["Primes"]) > 0 then | if string.len(frame.args["Primes"]) > 0 then | ||