Module:JI ratios in ED: Difference between revisions
mNo edit summary |
Edsteps for the unison and equave will only have the ratios 1/1 and equave p/q |
||
| Line 55: | Line 55: | ||
result = result .. string.format('| %.3f\n', edstep_in_cents) | result = result .. string.format('| %.3f\n', edstep_in_cents) | ||
-- Add ratios according to harmonic class | |||
for j = 1, #primes do | for j = 1, #primes do | ||
local current_prime = primes[j] | local current_prime = primes[j] | ||
local prime_filtered_ratios = {} | |||
-- | -- If the edstep is for the unison or equave, override the ratios | ||
-- | -- with the unison and equave respectively. | ||
if edstep == 0 then | |||
prime_filtered_ratios = { rat.new(1, 1) } | |||
prime_filtered_ratios = | elseif edstep == ed then | ||
prime_filtered_ratios = { rat.copy(equave) } | |||
else | else | ||
prime_filtered_ratios = jiraf.filter_ratios_by_harmonic_class(filtered_ratios, current_prime) | -- The first column filters by prime limit | ||
-- Successive columns are filered by harmonic class | |||
if j == 1 then | |||
prime_filtered_ratios = jiraf.filter_ratios_by_prime_limit(filtered_ratios, current_prime) | |||
else | |||
prime_filtered_ratios = jiraf.filter_ratios_by_harmonic_class(filtered_ratios, current_prime) | |||
end | |||
-- Filter ratios by complement-agnostic tenney height | |||
prime_filtered_ratios = jiraf.filter_ratios_by_complement_agnostic_tenney_height(prime_filtered_ratios, tenney_height, equave) | |||
end | end | ||