aboutsummaryrefslogtreecommitdiffhomepage
path: root/midi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'midi.lua')
-rw-r--r--midi.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/midi.lua b/midi.lua
index ac6283d..4025fe5 100644
--- a/midi.lua
+++ b/midi.lua
@@ -127,7 +127,7 @@ do
local mtof_cache = table.new(128, 0)
for note = 0, 127 do
-- MIDI NOTE 69 corresponds to 440 Hz
- mtof_cache[note] = 440*math.pow(2, (note - 69)/12)
+ mtof_cache[note] = 440 * 2^((note - 69)/12)
end
-- Convert from MIDI note to frequency