Module:MOS tuning spectrum: Difference between revisions

Ganaram inukshuk (talk | contribs)
mNo edit summary
Ganaram inukshuk (talk | contribs)
Drop use of ET template, as ET-to-string functions are now in Module:MOS
Line 1: Line 1:
local mos = require("Module:MOS")
local mos = require("Module:MOS")
local rat = require("Module:Rational")
local rat = require("Module:Rational")
local ET = require("Module:ET")
local mediants = require("Module:Mediants")
local mediants = require("Module:Mediants")
local tip = require("Module:Template input parse")
local tip = require("Module:Template input parse")
Line 90: Line 89:
for i = 1, #step_ratios do
for i = 1, #step_ratios do
local step_ratio = step_ratios[i]
local step_ratio = step_ratios[i]
local et = mos.mos_to_et(input_mos, step_ratio)
local mos_to_et = mos.mos_to_et(input_mos, strep_ratio)
-- Calculate the bright gen and cent value
-- Calculate the bright gen and cent value
local bright_generator_steps = mos.bright_gen_to_et_steps(input_mos, step_ratio)
local bright_generator_steps = mos.bright_gen_to_et_steps(input_mos, step_ratio)
local bright_generator_cents = mos.bright_gen_to_cents(input_mos, step_ratio)
local bright_generator_cents = mos.bright_gen_to_cents(input_mos, step_ratio)
local bright_generator_string = mos.bright_gen_to_et_steps_as_string(input_mos, step_ratio, "")
-- Calculate dark generator step count and cent value
-- Calculate dark generator step count and cent value
Line 108: Line 108:
result = result .. "| "
result = result .. "| "
if i == current_depth then
if i == current_depth then
result = result .. string.format("[[%s|%d\\%s]]", ET.as_string(et), bright_generator_steps, et.size)
result = result .. string.format("[[%s|%s]]", bright_generator_string, mos_to_et)
end
end
result = result .. "\n"
result = result .. "\n"