Module:Interval table: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 4: | Line 4: | ||
local rat = require('Module:Rational') | local rat = require('Module:Rational') | ||
local ET = require('Module:ET') | local ET = require('Module:ET') | ||
function p.interval_table(frame) | function p.interval_table(frame) | ||
local tuning = frame.args['tuning'] | local tuning = frame.args['tuning'] | ||
| Line 17: | Line 15: | ||
local dual_sharp_fifth = ET.approximate(et, 3/2, 1) | local dual_sharp_fifth = ET.approximate(et, 3/2, 1) | ||
wikitext = wikitext .. '!Steps' | wikitext = wikitext .. '!Steps\n' | ||
wikitext = wikitext .. '!Cents' | wikitext = wikitext .. '!Cents\n' | ||
if rat.eq(et.equave, 2) then | if rat.eq(et.equave, 2) then | ||
if dual_fifth then | if dual_fifth then | ||
wikitext = wikitext .. '![[Ups and downs notation]] (dual flat fifth ' .. dual_flat_fifth .. '\\' .. et.size .. ')' | wikitext = wikitext .. '![[Ups and downs notation]] (dual flat fifth ' .. dual_flat_fifth .. '\\' .. et.size .. ')\n' | ||
wikitext = wikitext .. '![[Ups and downs notation]] (dual sharp fifth ' .. dual_sharp_fifth .. '\\' .. et.size .. ')' | wikitext = wikitext .. '![[Ups and downs notation]] (dual sharp fifth ' .. dual_sharp_fifth .. '\\' .. et.size .. ')\n' | ||
else | else | ||
wikitext = wikitext .. '![[Ups and downs notation]]' | wikitext = wikitext .. '![[Ups and downs notation]]\n' | ||
end | end | ||
end | end | ||
| Line 34: | Line 32: | ||
if rat.eq(et.equave, 2) then | if rat.eq(et.equave, 2) then | ||
if dual_fifth then | if dual_fifth then | ||
wikitext = wikitext .. '|{{UDnote|tuning=' .. ET.as_string(et) .. '|step=' .. i .. '|fifth=' .. dual_flat_fifth .. '}} \n' | wikitext = wikitext .. '|{{UDnote|tuning=' .. ET.as_string(et) .. '|step=' .. i .. '|fifth=' .. dual_flat_fifth .. '}}\n' | ||
wikitext = wikitext .. '|{{UDnote|tuning=' .. ET.as_string(et) .. '|step=' .. i .. '|fifth=' .. dual_sharp_fifth .. '}} \n' | wikitext = wikitext .. '|{{UDnote|tuning=' .. ET.as_string(et) .. '|step=' .. i .. '|fifth=' .. dual_sharp_fifth .. '}}\n' | ||
else | else | ||
wikitext = wikitext .. '|{{UDnote|tuning=' .. ET.as_string(et) .. '|step=' .. i .. '}}\n' | wikitext = wikitext .. '|{{UDnote|tuning=' .. ET.as_string(et) .. '|step=' .. i .. '}}\n' | ||