Module:JI ratios: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added complement-only search (does not work for int-limit-only search): ratios are only added based on whether its equave complement is also added
Ganaram inukshuk (talk | contribs)
m comments; todo
Line 7: Line 7:


-- TODO:
-- TODO:
-- Add option to filter out ratios whose complement would exceed the int limit
-- Address complements-only option for int-limit search; this may require a
-- Group complements option and tenney height into fine-search params
-- different search algorithm


-- Template for handling multiple entry of JI ratios into a template, and for
-- Template for handling multiple entry of JI ratios into a template, and for
Line 46: Line 46:
end
end


-- Given a ratio, determine whether to include it based on:
-- - Whether it's between 1/1 and the equave
-- - Whether it's within an int limit (required)
-- - Whether it's below a tenney height (default height is infinity)
-- - Whether its complement meets the above criteria (default is
--  to include it regardless of whether its complement does)
function p.ratio_within_search(ratio, equave, fine_search_args)
function p.ratio_within_search(ratio, equave, fine_search_args)
local complement = rat.mul(rat.new(ratio[2], ratio[1]), equave)
local complement = rat.mul(rat.new(ratio[2], ratio[1]), equave)