SignalUtils::MusicalNotePitch Function

Overload List

#SignatureDescription
1TMusicalNotePitch MusicalNotePitch(const double Freq, double &pitchError, int &freqOctave, TVec *aMusicalScale);Returns musical note pitch, the octave and pitch error in Hz.
2void MusicalNotePitch(TVec *Freq, TVec *pitchError, TVecInt *freqOctave, TVec *aMusicalScale, TVecInt *aMusicalNotePitch);Returns musical note pitch, the octave and pitch error in Hz.

Overload 1: TMusicalNotePitch MusicalNotePitch(const double Freq, double &pitchError, int &freqOctave, TVec *aMusicalScale);

Returns musical note pitch, the octave and pitch error in Hz.

#NameTypeDescription
1Freqconst doubleThe frequency in Hz to convert to musical note pitch.
2pitchErrordouble &The difference between the nearest musical note pitch and Freq in Hz.
3freqOctaveint &Returns the octave number on output.
4aMusicalScaleTVec *The musical scale as returned by the MusicalScaleInit method.
Remarks:

Returns musical note pitch as the result, the octave number and pitch error in Hz in the parameters.

See Also: SignalUtils::MusicalScaleInit, SignalUtils::MusicalNotePitchToStr
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler

Overload 2: void MusicalNotePitch(TVec *Freq, TVec *pitchError, TVecInt *freqOctave, TVec *aMusicalScale, TVecInt *aMusicalNotePitch);

Returns musical note pitch, the octave and pitch error in Hz.

#NameTypeDescription
1FreqTVec *The array of frequencies in Hz to convert to musical note pitch.
2pitchErrorTVec *The difference between the nearest musical note pitch and Freq in Hz. To obtain error in % compute: pitchError[i]/Freq[i]*100%
3freqOctaveTVecInt *Contains the octave numbers on output.
4aMusicalScaleTVec *The musical scale as returned by the MusicalScaleInit method. aMusicalScale.FloatPrecision will be used as the input parameter to indicate the desired precision (single or double).
5aMusicalNotePitchTVecInt *Contains musical note pitch on the output. The values in MusicalNotePitch need to by typcasted to an enumerated type: MusicalNotePitchToStr(TMusicalNotePitch(MusicalNotePitch[i]));
Declared in Dew::Signal::Units::SignalUtils · Dew.Signal/Units.SignalUtils.h · Cross-compiler