Module:Ups and downs notation: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 65: | Line 65: | ||
table.insert(note_names[major_note_idx[8]], "C") | table.insert(note_names[major_note_idx[8]], "C") | ||
local last_major_note = 0 | |||
-- Add sharp/up notes | -- Add sharp/up notes | ||
for i = 0,et.size-1 do | for i = 0,et.size-1 do | ||
if table_contains(major_note_idx, i) then | if table_contains(major_note_idx, i) then | ||
last_major_note = i | last_major_note = i % 8 | ||
else | else | ||
local num_sharps = math.floor((i - last_major_note) / chroma) | local num_sharps = math.floor((i - last_major_note) / chroma) | ||