Module:Infobox interval: Difference between revisions
mNo edit summary |
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? | ||
if hz >= 20 and hz <= 20000 then | |||
table.insert(infobox_data, { | |||
frame:expandTemplate{ | |||
} | title = 'User:Plumtree/Interval Sound', | ||
args = { Frequency=tostring(hz), Timbre='violin' } | |||
} | |||
}) | |||
end | |||
end | end | ||