Module:Ups and downs notation: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 33: | Line 33: | ||
-- } | -- } | ||
function p.get_note_names_table(et, fifth) | function p.get_note_names_table(et, fifth, sharp_lowers) | ||
local note_names = {} | local note_names = {} | ||
for i = 0,et.size do | for i = 0,et.size do | ||
| Line 43: | Line 43: | ||
local fourth = et.size - fifth | local fourth = et.size - fifth | ||
local chroma = (fifth * 7) % et.size | local chroma = (fifth * 7) % et.size | ||
if fifth/et.size < 4/7 and sharp_lowers == nil then | |||
chroma = (fourth * 7) % et.size | |||
end | |||
local major_note_idx = { | local major_note_idx = { | ||
0, | 0, | ||
| Line 54: | Line 57: | ||
et.size | et.size | ||
} | } | ||
-- Add major scale notes | -- Add major scale notes | ||
table.insert(note_names[major_note_idx[1]], "C") | table.insert(note_names[major_note_idx[1]], "C") | ||
| Line 105: | Line 108: | ||
end | end | ||
end | end | ||
return note_names | return note_names | ||