Implements fl::audio::Detector.
Definition at line 26 of file vocal.cpp.hpp.
26 {
28
29
30
31
32
39
40
42
44
45
48
49
50 span<const i16> pcm = context->getPCM();
51 const float dt =
computeAudioDt(pcm.size(), context->getSampleRate());
52
58
59
64
65
66 bool wantActive;
69 } else {
71 }
72
73
79 }
80 } else {
82 }
83
84
86}
void computePCMTimeDomainFeatures(span< const i16 > pcm) FL_NO_EXCEPT
ExponentialSmoother< float > mZcCVSmoother
ExponentialSmoother< float > mEnvelopeJitterSmoother
static constexpr int MIN_FRAMES_TO_TRANSITION
shared_ptr< const fft::Bins > mRetainedFormantFFT
ExponentialSmoother< float > mConfidenceSmoother
bool mPreviousVocalActive
SpectralVariance< float > mSpectralVarianceFilter
ExponentialSmoother< float > mAcfIrregularitySmoother
float mAutocorrelationIrregularity
float calculateRawConfidence(float formantRatio, float spectralFlatness, float harmonicDensity, float vocalPresenceRatio, float spectralFlux, float spectralVariance) FL_NO_EXCEPT
float calculateAutocorrelationIrregularity(span< const i16 > pcm) FL_NO_EXCEPT
void computeFormantRatio(const fft::Bins &formantFft) FL_NO_EXCEPT
shared_ptr< const fft::Bins > mRetainedBroadFFT
void computeBroadSpectralFeatures(const fft::Bins &broadFft) FL_NO_EXCEPT
float mVocalPresenceRatio
float calculateVocalPresenceRatio(const fft::Bins &broadFft) FL_NO_EXCEPT
float computeAudioDt(fl::size pcmSize, int sampleRate) FL_NO_EXCEPT
Compute the time delta (in seconds) for an audio buffer.
References Vocal(), calculateAutocorrelationIrregularity(), calculateRawConfidence(), calculateVocalPresenceRatio(), fl::audio::computeAudioDt(), computeBroadSpectralFeatures(), computeFormantRatio(), computePCMTimeDomainFeatures(), fl::FL_NO_EXCEPT, mAcfIrregularitySmoother, mAutocorrelationIrregularity, mBroadNumBins, mConfidenceSmoother, mEnvelopeJitter, mEnvelopeJitterSmoother, mFormantNumBins, mFormantRatio, mFramesInState, mHarmonicDensity, MIN_FRAMES_TO_TRANSITION, mOffThreshold, mOnThreshold, mPreviousVocalActive, mRetainedBroadFFT, mRetainedFormantFFT, mSampleRate, mSpectralFlatness, mSpectralFlux, mSpectralVariance, mSpectralVarianceFilter, mStateChanged, mVocalActive, mVocalPresenceRatio, mZcCVSmoother, mZeroCrossingCV, fl::audio::fft::Bins::raw(), fl::span< T, Extent >::size(), and update().
Referenced by ~Vocal(), update(), and update().