Module:JI ratios in ED: Difference between revisions
Added et template (as it can parse ets) |
Added back unison (unison should always be part of the first column of the first row) |
||
| Line 82: | Line 82: | ||
result = result .. string.format('| %.3f\n', step_in_cents) | result = result .. string.format('| %.3f\n', step_in_cents) | ||
filtered_ratios = jiraf.filter_ratios_by_range(candidate_ratios, step_in_cents - tolerance, step_in_cents + tolerance) | |||
-- Add ratios according to harmonic class | -- Add ratios according to harmonic class | ||
| Line 98: | Line 89: | ||
local prime_filtered_ratios = {} | local prime_filtered_ratios = {} | ||
-- | -- Override filtered ratios denpending on whether the ratio is the | ||
prime_filtered_ratios = jiraf.filter_ratios_by_harmonic_class( | -- unison or equave | ||
if step == 0 and j == 1 then | |||
prime_filtered_ratios = { rat.new(1) } | |||
elseif step == steps then | |||
prime_filtered_ratios = jiraf.filter_ratios_by_harmonic_class({ equave }, current_prime) | |||
else | |||
-- Filter ratios by harmonic class, then by complement-agnostic | |||
-- Tenney height | |||
prime_filtered_ratios = jiraf.filter_ratios_by_harmonic_class(filtered_ratios, current_prime) | |||
prime_filtered_ratios = jiraf.filter_ratios_by_complement_agnostic_tenney_height(prime_filtered_ratios, tenney_height, equave) | |||
end | |||
-- Add ratios to cells | -- Add ratios to cells | ||