Module:MOS gamut: Difference between revisions
Updated to use parse_notation function from mos notation module |
Undo revision 118031 by Ganaram inukshuk (talk; parse function was put in the wrong place) Tag: Undo |
||
| Line 32: | Line 32: | ||
local generators_up = udp[1] | local generators_up = udp[1] | ||
local generators_down = udp[2] | local generators_down = udp[2] | ||
-- The natural note symbols are those that correspond to 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_default = string.sub(note_symbols_main, 1, mossteps_per_equave) | |||
if scale_sig == "5L 2s" then | |||
note_symbols_default = "CDEFGAB" | |||
end | |||
local note_symbols = note_symbols or note_symbols_default | |||
-- | -- The default accidentals are the amp and at (& and @) | ||
local | -- unless the mos is 5L 2s, then it's sharp and flat (# and b) | ||
local chroma_plus_default = "&" | |||
local chroma_minus_default = "@" | |||
if scale_sig == "5L 2s" then | if scale_sig == "5L 2s" then | ||
chroma_plus_default = "#" | |||
chroma_minus_default = "b" | |||
end | end | ||
local | local chroma_plus_symbol = chroma_plus_symbol or chroma_plus_default | ||
local | local chroma_minus_symbol = chroma_minus_symbol or chroma_minus_default | ||
-- How long is the inital genchain for notes without accidentals? | -- How long is the inital genchain for notes without accidentals? | ||