Module:Infobox ET: Difference between revisions
No edit summary |
No edit summary |
||
| Line 239: | Line 239: | ||
if et.size <= 70 and et.size > 4 then | if et.size <= 70 and et.size > 4 then | ||
local delta_harmonic_entropy_min = 1000 | local delta_harmonic_entropy_min = 1000 | ||
for i=1, math.floor(et.size)-2 do | for i=1, math.floor(et.size)-2 do | ||
for j=1, i-1 do | for j=1, i-1 do | ||
local delta = (rat.log(step_size * i / 1200) - rat.log(step_size * j / 1200)) / (rat.log(step_size * j / 1200) - 1) | local delta = (rat.log(step_size * i / 1200) - rat.log(step_size * j / 1200)) / (rat.log(step_size * j / 1200) - 1) | ||
he = interval_extension.harmonic_entropy_with_lookup_table(rat.cents(delta)) | local he = interval_extension.harmonic_entropy_with_lookup_table(rat.cents(delta)) | ||
if he <= delta_harmonic_entropy_min then delta_harmonic_entropy_min = he end | if he <= delta_harmonic_entropy_min then delta_harmonic_entropy_min = he end | ||
end | end | ||
end | end | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
"[[Delta]]-Harmonic entropy", | "[[Delta]]-Harmonic entropy", | ||