Module:MOS gamut: Difference between revisions
m Simplified names, so it's note['Nk'] and note['nc'] instead of note.index and note.chroma |
Reformatted table output |
||
| Line 345: | Line 345: | ||
local result = '{| class="wikitable"\n' | local result = '{| class="wikitable"\n' | ||
-- | -- Create the first row; this needs an edo for the header, followed by the | ||
local et_for_mos = et.new( | -- steps | ||
local result = result .. | local steps_in_et = input_mos.nL * step_ratio[1] + input_mos.ns + step_ratio[2] | ||
local et_for_mos = et.new(steps_in_et, input_mos.equave) | |||
local result = result .. "! Steps of " .. et.as_string(et_for_mos) .. "\n" | |||
local step_ratio_gcd = rat.gcd(step_ratio[1], step_ratio[2]) -- GCD of the sizes of L and s, in case L:s isn't simplified | |||
for i = 1, #gamut do | |||
result = result .. "!" .. (i - 1) * step_ratio_gcd .. "\n" | |||
end | |||
-- The second row contains the note names | |||
local result = result .. "|-\n" | local result = result .. "|-\n" | ||
local result = result .. "! Note names on " .. string.sub(note_symbols, 1, 1) | |||
for i = 1, #gamut do | for i = 1, #gamut do | ||
-- Get the note name | -- Get the note name | ||