Module:MOS degrees: Difference between revisions
No edit summary |
Undo revision 117321 by Ganaram inukshuk (talk) debugging Tag: Undo |
||
| Line 187: | Line 187: | ||
-- Step ratio | -- Step ratio | ||
local step_ratio = p.parse_step_ratio(frame.args['Step Ratio']) | local step_ratio = { 2, 1 } | ||
if string.len(frame.args['Step Ratio']) > 0 then | |||
step_ratio = p.parse_step_ratio(frame.args['Step Ratio']) | |||
end | |||
-- Get the number of mossteps per period and equave | -- Get the number of mossteps per period and equave | ||
| Line 206: | Line 209: | ||
udp = { 5, 1 } | udp = { 5, 1 } | ||
end | end | ||
udp = p.parse_udp(frame.args['UDP']) | if string.len(frame.args['UDP']) > 0 then | ||
udp = p.parse_udp(frame.args['UDP']) | |||
end | |||
-- Get note symbols | -- Get note symbols | ||
| Line 218: | Line 223: | ||
end | end | ||
-- If a value was entered, override the default value | -- If a value was entered, override the default value | ||
note_symbols = frame.args['Note Symbols'] | if string.len(frame.args['Note Symbols']) > 0 then | ||
note_symbols = frame.args['Note Symbols'] | |||
end | |||
-- Get accidental symbols | -- Get accidental symbols | ||
| Line 288: | Line 295: | ||
-- raising any other root by one period. Repeat for all other periods. | -- raising any other root by one period. Repeat for all other periods. | ||
-- For the last period, add the perfect root as the perfect equave. | -- For the last period, add the perfect root as the perfect equave. | ||
for i = 1, periods_per_equave do | for i = 1, periods_per_equave do | ||
-- Add degrees from ascending chain | -- Add degrees from ascending chain | ||
| Line 354: | Line 360: | ||
end | end | ||
end | end | ||
result = result .. "|}" | result = result .. "|}" | ||