Module:MOS gamut: Difference between revisions

Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
No edit summary
Line 259: Line 259:
end
end
-- The natural note symbols are those that correspond to diamond-mos
-- Default note symbols are that from diamond mos
-- (JKLMN...) unless the mos is 5L 2s, then it's CDEFGAB
-- If it's diamond-mos, gamut is limited to 17 note names
local note_symbols_main = "JKLMNOPQRSTUVWXYZ"
local note_symbols_main = "JKLMNOPQRSTUVWXYZ"
local note_symbols = frame.args['Note Symbols'] or string.sub(note_symbols_main, 1, mossteps_per_equave)
local note_symbols = frame.args['Note Symbols']
if scale_sig == "5L 2s" then
if string.len(note_symbols) == 0 then
-- If this was blank, default to diamond-mos accidentals
-- Limited to 17 note names
note_symbols = string.sub(note_symbols_main, 1, mossteps_per_equave)
elseif scale_sig == "5L 2s" then
-- If it's 5L 2s, then default to standard notation
note_symbols = "CDEFGAB"
note_symbols = "CDEFGAB"
end
end
Line 270: Line 273:
-- The default accidentals are the amp and at (& and @)
-- The default accidentals are the amp and at (& and @)
-- 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)
local chroma_plus_symbol = frame.args['Sharp Symbol'] or "&"
local chroma_plus_symbol = frame.args['Sharp Symbol']
local chroma_minus_symbol = frame.args['Flat Symbol'] or "@"
local chroma_minus_symbol = frame.args['Flat Symbol']
if string.len(chroma_plus_symbol) == 0 then
chroma_plus_symbol = "&"
end
if string.len(chroma_minus_symbol) == 0 then
chroma_minus_symbol = "@"
end
if scale_sig == "5L 2s" then
if scale_sig == "5L 2s" then
chroma_plus_symbol = "#"
chroma_plus_symbol = "#"