Module:JI ratios: Difference between revisions
No edit summary |
add todo to write filter-by-cent-range function |
||
| Line 6: | Line 6: | ||
local getArgs = require("Module:Arguments").getArgs | local getArgs = require("Module:Arguments").getArgs | ||
p = {} | p = {} | ||
-- TODO: write filter function for cent range | |||
-- 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 38: | Line 40: | ||
-- - Removing ratios whose complement would exceed a max Tenney height or int limit | -- - Removing ratios whose complement would exceed a max Tenney height or int limit | ||
function p.filter_ratios(ratios, equave, int_limit, tenney_height, complements_only) | function p.filter_ratios(ratios, equave, int_limit, tenney_height, complements_only) | ||
local filtered_ratios = {} | local filtered_ratios = {} | ||
| Line 67: | Line 67: | ||
return filtered_ratios | return filtered_ratios | ||
end | |||
-- Filters ratios from a table of ratios, returning an array of ratios within | |||
-- the cent range and preserving the original table. Meant for searching for | |||
-- multiple ranges. TODO: write | |||
function p.filter_ratios_within_cent_range(ratios, min_cents, max_cents) | |||
end | end | ||