Module:JI ratios: Difference between revisions
m bugfix again |
m search-by-x-within-equave should suggest the first params are x, then equave |
||
| Line 101: | Line 101: | ||
-- Note that members in a subgroup need not be prime, as long as the terms are, | -- Note that members in a subgroup need not be prime, as long as the terms are, | ||
-- for the most part, relatively prime. | -- for the most part, relatively prime. | ||
function p.search_by_subgroup_within_equave(equave | function p.search_by_subgroup_within_equave(subgroup, equave, int_limit, tenney_height) | ||
local subgroup = subgroup or { 2, 3, 7 } | local subgroup = subgroup or { 2, 3, 7 } | ||
local int_limit = int_limit or 50 | local int_limit = int_limit or 50 | ||
| Line 188: | Line 188: | ||
-- Like subgroup search, prime limit search can also allow for very high int | -- Like subgroup search, prime limit search can also allow for very high int | ||
-- limits, as long as the prime is reasonably small. | -- limits, as long as the prime is reasonably small. | ||
function p.search_by_prime_limit_within_equave(equave | function p.search_by_prime_limit_within_equave(prime_limit, equave, int_limit, tenney_height) | ||
local prime_limit = prime_limit or 5 | local prime_limit = prime_limit or 5 | ||
local int_limit = int_limit or 1000 | local int_limit = int_limit or 1000 | ||
| Line 211: | Line 211: | ||
-- Perform subgroup search on the primes found, as subgroup-search code can | -- Perform subgroup search on the primes found, as subgroup-search code can | ||
-- be reused for prime-limit search. | -- be reused for prime-limit search. | ||
return p.search_by_subgroup_within_equave(equave | return p.search_by_subgroup_within_equave(primes, equave, int_limit, tenney_height) | ||
end | end | ||
| Line 227: | Line 227: | ||
local ratios = {} | local ratios = {} | ||
if params["Int Limit"] ~= nil then | if params["Int Limit"] ~= nil then | ||
ratios = p.search_by_int_limit_within_equave( | ratios = p.search_by_int_limit_within_equave(params["Int Limit"], equave, params["Tenney Height"]) | ||
end | end | ||
return ratios | return ratios | ||