Module:Infobox interval: Difference between revisions

Plumtree (talk | contribs)
mNo edit summary
Plumtree (talk | contribs)
m Omitting audio demonstration for frequencies outside of human hearing range
Line 232: Line 232:
elseif regular then
elseif regular then
local hz = 2 ^ (math.log(440)/math.log(2) + cents/1200)
local hz = 2 ^ (math.log(440)/math.log(2) + cents/1200)
table.insert(infobox_data, {
-- is it within hearing range?
frame:expandTemplate{
if hz >= 20 and hz <= 20000 then
title = 'User:Plumtree/Interval Sound',
table.insert(infobox_data, {
args = { Frequency=tostring(hz), Timbre='violin' }
frame:expandTemplate{
}
title = 'User:Plumtree/Interval Sound',
})
args = { Frequency=tostring(hz), Timbre='violin' }
}
})
end
end
end