Audacity 3.2.0
EqualizationFilter.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 EqualizationFilter.h
6
7 Mitch Golden
8 Vaughan Johnson (Preview)
9
10 Paul Licameli split from Equalization.h
11
12***********************************************************************/
13
14#ifndef __AUDACITY_EQUALIZATION_FILTER__
15#define __AUDACITY_EQUALIZATION_FILTER__
16
17#include "EqualizationParameters.h" // base class
18#include "Envelope.h" // member
19#include "RealFFTf.h" // member
21
25 // Low frequency of the FFT. 20Hz is the
26 // low range of human hearing
27 static constexpr int loFreqI = 20;
28
29 // Number of samples in an FFT window
30 // MJS - work out the optimum for this at run time?
31 // Have a dialog box for it?
32 static constexpr size_t windowSize = 16384u;
33
35
38 bool CalcFilter();
39
42 void Filter(size_t len, float *buffer) const;
43
44 const Envelope &ChooseEnvelope() const
45 { return mLin ? mLinEnvelope : mLogEnvelope; }
47 { return mLin ? mLinEnvelope : mLogEnvelope; }
48
49 // If sliders show, always use the log envelope
51 { return IsLinear() ? mLinEnvelope : mLogEnvelope; }
52
57 double mLoFreq{ loFreqI };
58 double mHiFreq{ mLoFreq };
60};
61#endif
HFFT GetFFT(size_t fftlen)
Definition: RealFFTf.cpp:104
std::unique_ptr< FFTParam, FFTDeleter > HFFT
Definition: RealFFTf.h:22
static const AttachedProjectObjects::RegisteredFactory manager
EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings...
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:72
static constexpr int loFreqI
const Envelope & ChooseEnvelope() const
Envelope & ChooseEnvelope()
static constexpr size_t windowSize
EqualizationFilter(const EffectSettingsManager &manager)
void Filter(size_t len, float *buffer) const
const Envelope & ChooseEnvelopeToPaint() const
Parameters of the Equalization effects that persist in configuration files.