added mtof back into dsp.h since that somehow got removed.
#pragma once
#ifndef DSY_CORE_DSP
#define DSY_CORE_DSP
+#include <math.h>
// ## Generic Defines
// For now just PIs
@@ -87,6 +88,16 @@ inline float fastroot(float f, int n)
return f;
}
+// ### mtof
+// Midi to frequency helper
+// ~~~~
+inline float mtof(float m)
+{
+ return powf(2, (m - 69.0f) / 12.0f) * 440.0f;
+}
+
+// ~~~~
+
// ## Filters
// ### fonepole
