26 return (69.0 + (12.0 * (log(freq / 440.0) / log(2.0))));
31 return (440.0 * pow(2.0, (dMIDInote - 69.0) / 12.0));
37 double dRound = (dMIDInote < 0.0) ? -0.5 : 0.5;
38 int nPitchIndex = ((int)(dMIDInote + dRound) % 12);
49 double dRound = (dMIDInote < 0.0) ? -0.5 : 0.5;
50 return ((
int)((dMIDInote + dRound) / 12.0) - 1);
114 XO(
"C\u266f/D\u266d"),
118 XO(
"D\u266f/E\u266d"),
124 XO(
"F\u266f/G\u266d"),
128 XO(
"G\u266f/A\u266d"),
132 XO(
"A\u266f/B\u266d"),
142 default: wxASSERT(
false);
break;
157 return ((
double)nPitchIndex + (((
double)nPitchOctave + 1.0) * 12.0));
160double PitchToFreq(
const unsigned int nPitchIndex,
const int nPitchOctave)
unsigned int PitchIndex(const double dMIDInote)
double MIDInoteToFreq(const double dMIDInote)
TranslatableString PitchName_Absolute(const double dMIDInote, const PitchNameChoice choice)
double PitchToFreq(const unsigned int nPitchIndex, const int nPitchOctave)
double PitchToMIDInote(const unsigned int nPitchIndex, const int nPitchOctave)
int PitchOctave(const double dMIDInote)
double FreqToMIDInote(const double freq)
TranslatableString PitchName(const double dMIDInote, const PitchNameChoice choice)
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Holds a msgid for the translation catalog; may also bind format arguments.
TranslatableString & Format(Args &&...args) &
Capture variadic format arguments (by copy) when there is no plural.