Module:Interval table: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) This is my last attempt on solving the weird bug that spontaneously appeared, invoking the code for ups and downs template directly rather than through wikitext |
||
| Line 3: | Line 3: | ||
local iv = require('Module:Interval') | local iv = require('Module:Interval') | ||
local rat = require('Module:Rational') | local rat = require('Module:Rational') | ||
local ud = require('Module:Ups and downs note name') | |||
local ET = require('Module:ET') | local ET = require('Module:ET') | ||
local function ud_note(et, fifth, step) | |||
return table.concat(ud.get_note_names_table(et, fifth)[step], ", "):sub(0, -1) | |||
end | |||
function p.interval_table(frame) | function p.interval_table(frame) | ||
local tuning = frame.args['tuning'] | local tuning = frame.args['tuning'] | ||
| Line 32: | Line 38: | ||
if rat.eq(et.equave, 2) then | if rat.eq(et.equave, 2) then | ||
if dual_fifth then | if dual_fifth then | ||
wikitext = wikitext .. '| | wikitext = wikitext .. '|' .. ud_note(et, dual_flat_fifth, i) .. '\n' | ||
wikitext = wikitext .. '| | wikitext = wikitext .. '|' .. ud_note(et, dual_sharp_fifth, i) .. '\n' | ||
else | else | ||
wikitext = wikitext .. '| | wikitext = wikitext .. '|' .. ud_note(et, fifth, i) .. '\n' | ||
end | end | ||
end | end | ||