Module:ET: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
Fix values for 0edo
Line 64: Line 64:
function p.backslash_ratio(et, steps)
function p.backslash_ratio(et, steps)
if et.size == 0 then
if et.size == 0 then
return 1
return nil
end
end
return rat.as_float(et.equave) ^ (steps / et.size)
return rat.as_float(et.equave) ^ (steps / et.size)
Line 71: Line 71:
function p.backslash_display(et, steps)
function p.backslash_display(et, steps)
if et.size == 0 then
if et.size == 0 then
return 1
return nil
end
end
return steps .. p.backslash_modifier(et)
return steps .. p.backslash_modifier(et)
Line 86: Line 86:
function p.cents(et, steps)
function p.cents(et, steps)
if et.size == 0 then
if et.size == 0 then
return 0
return nil
end
end
steps = steps or 1
steps = steps or 1
Line 92: Line 92:
end
end


-- convert steps to Hekts
-- convert steps to hekts
function p.hekts(et, steps)
function p.hekts(et, steps)
if et.size == 0 then
if et.size == 0 then
return 0
return nil
end
end
steps = steps or 1
steps = steps or 1
Line 107: Line 107:
towards = towards or 0
towards = towards or 0
if et.size == 0 then
if et.size == 0 then
return 0
return nil
end
end
local exact = math.log(ratio) / math.log(rat.as_float(et.equave)) * et.size
local exact = math.log(ratio) / math.log(rat.as_float(et.equave)) * et.size
Line 150: Line 150:
local zeta_integral = seq.contains(seq.zeta_integral, et.size)
local zeta_integral = seq.contains(seq.zeta_integral, et.size)
local zeta_gap = seq.contains(seq.zeta_gap, et.size)
local zeta_gap = seq.contains(seq.zeta_gap, et.size)
local z = "The Riemann zeta function and tuning#Zeta EDO lists"
local z = "The Riemann zeta function and tuning #Zeta EDO lists"


local markers = {}
local markers = {}