From 85fc70ca7f4aa7237e0c2b5f02942cc50fa04fbf Mon Sep 17 00:00:00 2001 From: b2renger Date: Wed, 3 May 2017 22:22:39 +0200 Subject: [PATCH] Fix #170 freqToMidi --- src/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index 76447e63..be9d1da9 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -29,7 +29,7 @@ define(function (require) { */ p5.prototype.freqToMidi = function(f){ var mathlog2 = Math.log(f/440) / Math.log(2); - var m = Math.round(12*mathlog2)+57; + var m = Math.round(12*mathlog2)+69; return m; }; @@ -200,4 +200,4 @@ define(function (require) { return o; }; -}); \ No newline at end of file +});