Module:MOS degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
m The original blue from the already-existing degree tables was way better
Ganaram inukshuk (talk | contribs)
Added ability to change the length of the genchain
Line 262: Line 262:
note_symbols = frame.args['Note Symbols']
note_symbols = frame.args['Note Symbols']
end
end
-- Get genchain extend value
-- The default value for this is the number of large steps per period, so
-- this value is per genchain per period.
local genchain_extend_default = input_mos.nL / steps_per_equave
local genchain_extend = tonnumber(frame.args['Genchain Extend']) or genchain_extend_default
-- Get accidental symbols
-- Get accidental symbols
Line 296: Line 302:


-- Calculate the chain lengths
-- Calculate the chain lengths
-- Chain lengths should be such that every nominal is shown with +1 and -1
local asc_chain_length = udp[1] / periods_per_equave + 1 + genchain_extend
-- chroma (EG, C, C#, and Cb)
local des_chain_length = udp[2] / periods_per_equave + 1 + genchain_extend
local genchain_extend = 1 + (input_mos.nL + input_mos.ns) / periods_per_equave
local asc_chain_length = genchain_extend + udp[1] / periods_per_equave
local des_chain_length = genchain_extend + udp[2] / periods_per_equave


-- Get the degrees and note names
-- Get the degrees and note names