SignalUtils.MusicalNotePitch Method

Overload List

#SignatureDescription
1void MusicalNotePitch(TVec Freq, TVec pitchError, TVecInt freqOctave, TVec aMusicalScale, TVecInt aMusicalNotePitch)Returns musical note pitch, the octave and pitch error in Hz.
2TMusicalNotePitch MusicalNotePitch(Double Freq, ref Double pitchError, ref Int32 freqOctave, TVec aMusicalScale)Returns musical note pitch, the octave and pitch error in Hz.

Overload 1: void MusicalNotePitch(TVec Freq, TVec pitchError, TVecInt freqOctave, TVec aMusicalScale, TVecInt aMusicalNotePitch)

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

#NameDescription
1FreqThe array of frequencies in Hz to convert to musical note pitch.
2pitchErrorThe difference between the nearest musical note pitch and Freq in Hz. To obtain error in % compute: pitchError[i]/Freq[i]*100%
3freqOctaveContains the octave numbers on output.
4aMusicalScaleThe 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).
5aMusicalNotePitchContains musical note pitch on the output. The values in MusicalNotePitch need to by typcasted to an enumerated type: MusicalNotePitchToStr(TMusicalNotePitch(MusicalNotePitch[i]))

Result: stored in self (calling object)

Overload 2: TMusicalNotePitch MusicalNotePitch(Double Freq, ref Double pitchError, ref Int32 freqOctave, TVec aMusicalScale)

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

#NameDescription
1FreqThe frequency in Hz to convert to musical note pitch.
2pitchErrorThe difference between the nearest musical note pitch and Freq in Hz.
3freqOctaveReturns the octave number on output.
4aMusicalScaleThe musical scale as returned by the MusicalScaleInit method.

Returns: TMusicalNotePitch

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