Module:MOS intervals: Difference between revisions

ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 62: Line 62:
-- Otherwise, there are two rows to write, one for each size.
-- Otherwise, there are two rows to write, one for each size.
if is_period then
if is_period then
local cents = mos.interval_to_cents(current_bright_interval, input_mos, {1,1})
local cents = mos.interval_to_cents(current_bright_interval, input_mos, {1, 1})
result = result .. "|-\n"
result = result .. "|-\n"
.. string.format("| '''%s-%sstep'''", i - 1, mos_prefix)
.. string.format("| '''%s-%sstep''' ", i - 1, mos_prefix)
.. string.format("|| %s " , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case"))
.. string.format("|| %s " , tamnams.interval_quality(current_bright_interval, input_mos, "sentence-case"))
.. string.format("|| %s " , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev", "m"))
.. string.format("|| %s " , tamnams.interval_quality(current_bright_interval, input_mos, "abbrev", "m"))
Line 71: Line 71:
.. string.format("|| %.1f¢ ", cents)
.. string.format("|| %.1f¢ ", cents)
.. string.format("|| ~%.4f nats ", interval_extension.harmonic_entropy_with_lookup_table(cents))
.. string.format("|| ~%.4f nats ", interval_extension.harmonic_entropy_with_lookup_table(cents))
.. string.format("|| ~%.4f nats\n", interval_extension.harmonic_entropy_with_lookup_table(cents))
.. string.format("|| ~%.4f nats", interval_extension.harmonic_entropy_with_lookup_table(cents))
else
else
-- Calculate the best and average harmonic entropies
-- Calculate the best and average harmonic entropies
Line 117: Line 117:
.. string.format("|| %s " , bright_interval_range)
.. string.format("|| %s " , bright_interval_range)
.. string.format("|| ~%.4f nats " , he_bright_average)
.. string.format("|| ~%.4f nats " , he_bright_average)
.. string.format("|| ~%.4f nats\n" , he_bright_best)
.. string.format("|| ~%.4f nats" , he_bright_best)
result = result .. "\n"
end
end
end
end