31 return (69.0 + (12.0 * (log(freq / 440.0) / log(2.0))));
36 return (440.0 * pow(2.0, (dMIDInote - 69.0) / 12.0));
42 double dRound = (dMIDInote < 0.0) ? -0.5 : 0.5;
43 int nPitchIndex = ((int)(dMIDInote + dRound) % 12);
54 double dRound = (dMIDInote < 0.0) ? -0.5 : 0.5;
55 return ((
int)((dMIDInote + dRound) / 12.0) - 1);
119 XO(
"C\u266f/D\u266d"),
123 XO(
"D\u266f/E\u266d"),
129 XO(
"F\u266f/G\u266d"),
133 XO(
"G\u266f/A\u266d"),
137 XO(
"A\u266f/B\u266d"),
147 default: wxASSERT(
false);
break;
162 return ((
double)nPitchIndex + (((
double)nPitchOctave + 1.0) * 12.0));
165double 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.