MCPcopy Create free account
hub / github.com/audacity/audacity / FreqToMIDInote

Function FreqToMIDInote

libraries/lib-math/PitchName.cpp:23–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#include <math.h>
22
23double FreqToMIDInote(const double freq)
24{
25 // Make the calculation relative to A440 (A4), note number 69.
26 return (69.0 + (12.0 * (log(freq / 440.0) / log(2.0))));
27}
28
29double MIDInoteToFreq(const double dMIDInote)
30{

Callers 4

DeduceFrequenciesMethod · 0.85
Calc_ToOctaveMethod · 0.85
PlotPaintMethod · 0.85
OnText_FromFrequencyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected