Audacity 3.2.0
EqualizationBandSliders.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 EqualizationBandSliders.h
6
7 Mitch Golden
8 Vaughan Johnson (Preview)
9
10 Paul Licameli split from Equalization.h
11
12***********************************************************************/
13#ifndef __AUDACITY_EQUALIZATION_BAND_SLIDERS__
14#define __AUDACITY_EQUALIZATION_BAND_SLIDERS__
15
16#define NUMBER_OF_BANDS 31
17#define NUM_PTS 180
18
20#include "EqualizationFilter.h"
21
22class wxSlider;
23
24struct EqualizationBandSliders : public wxEvtHandler
25{
26public:
28 void Init();
30 void Flatten();
31 void GraphicEQ(Envelope &env);
32 void Invert();
33 void EnvLogToLin();
34 void EnvLinToLog();
35 void ErrMin();
36
37private:
38 double mWhens[NUM_PTS]{};
41
44
46
48
49 static void spline(double x[], double y[], size_t n, double y2[]);
50 static
51 double splint(double x[], double y[], size_t n, double y2[], double xr);
52
53 // Convenience function template for binding event handler functions
54 template<typename EventTag, typename Class, typename Event>
55 void BindTo(
56 wxEvtHandler &src, const EventTag& eventType, void (Class::*pmf)(Event &))
57 {
58 src.Bind(eventType, pmf, static_cast<Class *>(this));
59 }
60
61 void OnErase( wxEvent &event );
62 void OnSlider( wxCommandEvent & event );
63};
64#endif
#define NUM_PTS
#define NUMBER_OF_BANDS
#define S(N)
Definition: ToChars.cpp:64
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:72
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
static void spline(double x[], double y[], size_t n, double y2[])
void BindTo(wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &))
static double splint(double x[], double y[], size_t n, double y2[], double xr)
double mWhenSliders[NUMBER_OF_BANDS+1]
int mSlidersOld[NUMBER_OF_BANDS]
EqualizationCurvesList & mCurvesList
void AddBandSliders(ShuttleGui &S)
EqualizationBandSliders(EqualizationCurvesList &curvesList)
double mEQVals[NUMBER_OF_BANDS+1]
wxSlider * mSliders[NUMBER_OF_BANDS]
void OnSlider(wxCommandEvent &event)
Maintains a list of preset curves for Equalization effects.