Audacity  2.2.0
Equalization.cpp File Reference

Implements EffectEqualiztaion, EqualizationDialog, EqualizationPanel, EQCurve and EQPoint. More...

#include "../Audacity.h"
#include "Equalization.h"
#include <math.h>
#include <vector>
#include <wx/bitmap.h>
#include <wx/button.h>
#include <wx/msgdlg.h>
#include <wx/brush.h>
#include <wx/dcmemory.h>
#include <wx/event.h>
#include <wx/image.h>
#include <wx/intl.h>
#include <wx/choice.h>
#include <wx/radiobut.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/textdlg.h>
#include <wx/ffile.h>
#include <wx/filefn.h>
#include <wx/stdpaths.h>
#include <wx/settings.h>
#include <wx/checkbox.h>
#include <wx/tooltip.h>
#include <wx/utils.h>
#include "../Experimental.h"
#include "../AColor.h"
#include "../ShuttleGui.h"
#include "../PlatformCompatibility.h"
#include "../FileNames.h"
#include "../Envelope.h"
#include "../widgets/LinkingHtmlWindow.h"
#include "../widgets/ErrorDialog.h"
#include "../FFT.h"
#include "../Prefs.h"
#include "../Project.h"
#include "../WaveTrack.h"
#include "../widgets/Ruler.h"
#include "../xml/XMLFileReader.h"
#include "../Theme.h"
#include "../AllThemeResources.h"
#include "../float_cast.h"
#include "FileDialog.h"
#include <wx/arrimpl.cpp>
#include "../TrackPanelDrawingContext.h"

Macros

#define EQCURVES_VERSION   1
 
#define EQCURVES_REVISION   0
 
#define UPDATE_ALL   0
 

Enumerations

enum  {
  ID_Length = 10000, ID_dBMax, ID_dBMin, ID_Clear,
  ID_Invert, ID_Mode, ID_Draw, ID_Graphic,
  ID_Interp, ID_Linear, ID_Grid, ID_Curve,
  ID_Manage, ID_Delete, ID_Slider
}
 
enum  kInterpolations {
  kBspline, kCosine, kCubic, kNumInterpolations,
  kLinear, kLogarithmic, kNumInterpolations
}
 

Functions

 Param (FilterLength, int, wxT("FilterLength"), 4001, 21, 8191, 0)
 
 Param (CurveName, wxChar *, wxT("CurveName"), wxT("unnamed"), wxT(""), wxT(""), wxT(""))
 
 Param (InterpLin, bool, wxT("InterpolateLin"), false, false, true, false)
 
 Param (InterpMeth, int, wxT("InterpolationMethod"), 0, 0, 0, 0)
 
 Param (DrawMode, bool, wxT(""), true, false, true, false)
 
 Param (DrawGrid, bool, wxT(""), true, false, true, false)
 
 Param (dBMin, float, wxT(""),-30.0,-120.0,-10.0, 0)
 
 Param (dBMax, float, wxT(""), 30.0, 0.0, 60.0, 0)
 
 WX_DEFINE_OBJARRAY (EQPointArray)
 
 WX_DEFINE_OBJARRAY (EQCurveArray)
 
 EVT_COMMAND_RANGE (ID_Slider, ID_Slider+NUMBER_OF_BANDS-1, wxEVT_COMMAND_SLIDER_UPDATED, EffectEqualization::OnSlider) EffectEqualization
 
More...
 
 EVT_LIST_ITEM_SELECTED (CurvesListID, EditCurvesDialog::OnListSelectionChange) EVT_LIST_ITEM_DESELECTED(CurvesListID
 Constructor. More...
 

Variables

static const wxString kInterpStrings [kNumInterpolations]
 
static const double kThirdOct []
 

Detailed Description

Implements EffectEqualiztaion, EqualizationDialog, EqualizationPanel, EQCurve and EQPoint.

Macro Definition Documentation

#define EQCURVES_REVISION   0
#define EQCURVES_VERSION   1
#define UPDATE_ALL   0

Enumeration Type Documentation

anonymous enum
Enumerator
ID_Length 
ID_dBMax 
ID_dBMin 
ID_Clear 
ID_Invert 
ID_Mode 
ID_Draw 
ID_Graphic 
ID_Interp 
ID_Linear 
ID_Grid 
ID_Curve 
ID_Manage 
ID_Delete 
ID_Slider 
Enumerator
kBspline 
kCosine 
kCubic 
kNumInterpolations 
kLinear 
kLogarithmic 
kNumInterpolations 

Function Documentation

EVT_COMMAND_RANGE ( ID_Slider  ,
ID_Slider+NUMBER_OF_BANDS 1,
wxEVT_COMMAND_SLIDER_UPDATED  ,
EffectEqualization::OnSlider   
)


EVT_LIST_ITEM_SELECTED ( CurvesListID  ,
EditCurvesDialog::OnListSelectionChange   
)

Constructor.

Param ( FilterLength  ,
int  ,
wxT("FilterLength")  ,
4001  ,
21  ,
8191  ,
 
)
Param ( CurveName  ,
wxChar *  ,
wxT("CurveName")  ,
wxT("unnamed")  ,
wxT("")  ,
wxT("")  ,
wxT("")   
)
Param ( InterpLin  ,
bool  ,
wxT("InterpolateLin")  ,
false  ,
false  ,
true  ,
false   
)
Param ( InterpMeth  ,
int  ,
wxT("InterpolationMethod")  ,
,
,
,
 
)
Param ( DrawMode  ,
bool  ,
wxT("")  ,
true  ,
false  ,
true  ,
false   
)
Param ( DrawGrid  ,
bool  ,
wxT("")  ,
true  ,
false  ,
true  ,
false   
)
Param ( dBMin  ,
float  ,
wxT("")  ,
-30.  0,
-120.  0,
-10.  0,
 
)
Param ( dBMax  ,
float  ,
wxT("")  ,
30.  0,
0.  0,
60.  0,
 
)
WX_DEFINE_OBJARRAY ( EQPointArray  )
WX_DEFINE_OBJARRAY ( EQCurveArray  )

Variable Documentation

const wxString kInterpStrings[kNumInterpolations]
static
Initial value:
=
{
XO("B-spline"),
XO("Cosine"),
}
#define XO(s)
Definition: Audacity.h:225

Referenced by EffectEqualization::GetAutomationParameters(), and EffectEqualization::SetAutomationParameters().

const double kThirdOct[]
static
Initial value:
=
{
20., 25., 31., 40., 50., 63., 80., 100., 125., 160., 200.,
250., 315., 400., 500., 630., 800., 1000., 1250., 1600., 2000.,
2500., 3150., 4000., 5000., 6300., 8000., 10000., 12500., 16000., 20000.,
}

Referenced by EffectEqualization::Flatten(), EffectEqualization::Init(), EffectEqualization::LayoutEQSliders(), EffectEqualization::OnInvert(), EffectEqualization::OnSlider(), EffectEqualization::PopulateOrExchange(), and EffectEqualization::UpdateGraphic().