Module:JI ratios in ED: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added missing p-limit cells
Ganaram inukshuk (talk | contribs)
Added back feature where unison/equave rows only show ratios for unison and equave
Line 62: Line 62:
result = result .. string.format('| %.3f\n', step_in_cents)
result = result .. string.format('| %.3f\n', step_in_cents)
-- Filter ratios by whether they're within the current step
-- If this is the first or last step, only use the unison or equave
local filtered_ratios = jiraf.filter_ratios_by_range(candidate_ratios, step_in_cents - tolerance, step_in_cents + tolerance)
-- respectively; otherwise, filter ratios by whether they're within the
-- current step
local filtered_ratios = {}
if step == 0 then
filtered_ratios = { rat.new(1) }
elseif step == steps then
filtered_ratios = { equave }
else
filtered_ratios = jiraf.filter_ratios_by_range(candidate_ratios, step_in_cents - tolerance, step_in_cents + tolerance)
end
-- Add ratios according to harmonic class
-- Add ratios according to harmonic class