Module:MOS gamut: Difference between revisions
No edit summary |
No edit summary |
||
| Line 263: | Line 263: | ||
local note_symbols = frame.args['Note Symbols'] | local note_symbols = frame.args['Note Symbols'] | ||
if string.len(note_symbols) == 0 then | if string.len(note_symbols) == 0 then | ||
-- If this was blank, default to diamond-mos | -- If this was blank, default to diamond-mos | ||
-- Limited to 17 note names | -- Limited to 17 note names | ||
note_symbols = string.sub(note_symbols_main, 1, mossteps_per_equave) | note_symbols = string.sub(note_symbols_main, 1, mossteps_per_equave) | ||
| Line 293: | Line 293: | ||
local result = result .. "|-\n" | local result = result .. "|-\n" | ||
for i = 1, #gamut do | for i = 1, #gamut do | ||
-- Get the note name | |||
local note_name = gamut[i] | local note_name = gamut[i] | ||
-- If the note name has a slash, replace it with a newline | |||
note_name = note_name:gsub("/", "\n") | |||
-- If note name string is one character, it's a natural so the cell is white | -- If note name string is one character, it's a natural so the cell is white | ||
-- For anything else, the cell is black (actually gray) to mimic a piano | -- For anything else, the cell is black (actually gray) to mimic a piano | ||