Module:Ups and downs notation: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 73: | Line 73: | ||
last_major_note = i | last_major_note = i | ||
else | else | ||
local num_sharps = nil | |||
local num_ups = nil | |||
if et.size % 7 == 0 then | if et.size % 7 == 0 then | ||
num_sharps = 0 | |||
num_ups = (i - last_major_note) % chroma | |||
else | else | ||
num_sharps = math.floor((i - last_major_note) / chroma) | |||
um_ups = (i - last_major_note) % chroma | |||
end | end | ||
local name = note_names[last_major_note] | local name = note_names[last_major_note] | ||
| Line 103: | Line 105: | ||
last_major_note = i | last_major_note = i | ||
else | else | ||
local num_flats = nil | |||
local num_downs = nil | |||
if et.size % 7 == 0 then | if et.size % 7 == 0 then | ||
num_flats = 0 | |||
num_downs = (last_major_note - i) | |||
else | else | ||
num_flats = math.floor((last_major_note - i) / chroma) | |||
num_downs = (last_major_note - i) % chroma | |||
end | end | ||