Module:ET: Difference between revisions

Undo revision 204820 by FloraC (talk). Wait is this thing not in math?
Tag: Undo
These all looked too dumb tbh
 
(2 intermediate revisions by the same user not shown)
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 nil
return 1
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 nil
return 1
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 nil
return 0
end
end
steps = steps or 1
steps = steps or 1
Line 95: Line 95:
function p.hekts(et, steps)
function p.hekts(et, steps)
if et.size == 0 then
if et.size == 0 then
return nil
return 0
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 nil
return 0
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 = {}