Module:MOS degrees: Difference between revisions
Added helper function into main function |
No edit summary |
||
| Line 218: | Line 218: | ||
-- unless the mos is 5L 2s, then it's sharp and flat # and b | -- unless the mos is 5L 2s, then it's sharp and flat # and b | ||
-- This order of operations allows for overriding standard notation for 5L 2s | -- This order of operations allows for overriding standard notation for 5L 2s | ||
local | local sharp_symbol = "&" | ||
local | local flat_symbol = "@" | ||
if scale_sig == "5L 2s" then | if scale_sig == "5L 2s" then | ||
sharp_symbol = "#" | |||
flat_symbol = "b" | |||
end | end | ||
-- If value(s) were entered, override the default values | -- If value(s) were entered, override the default values | ||
if string.len(frame.args['Sharp Symbol']) > 0 then | if string.len(frame.args['Sharp Symbol']) > 0 then | ||
sharp_symbol = frame.args['Sharp Symbol'] | |||
end | end | ||
if string.len(frame.args['Flat Symbol']) > 0 then | if string.len(frame.args['Flat Symbol']) > 0 then | ||
flat_symbol = frame.args['Flat Symbol'] | |||
end | end | ||
| Line 238: | Line 238: | ||
local udp = { 5, 1 } | local udp = { 5, 1 } | ||
local note_symbols = "CDEFGAB" | local note_symbols = "CDEFGAB" | ||
local | local sharp_symbol = "#" | ||
local | local flat_symbol = "b" | ||
local mossteps_per_equave = input_mos.nL + input_mos.ns | local mossteps_per_equave = input_mos.nL + input_mos.ns | ||
local periods_per_equave = rat.gcd(input_mos.nL, input_mos.ns) | local periods_per_equave = rat.gcd(input_mos.nL, input_mos.ns) | ||