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#include <wx/event.h>
22
23class wxSlider;
24
25struct EqualizationBandSliders : public wxEvtHandler
26{
27public:
29 void Init();
31 void Flatten();
32 void GraphicEQ(Envelope &env);
33 void Invert();
34 void EnvLogToLin();
35 void EnvLinToLog();
36 void ErrMin();
37
38private:
39 double mWhens[NUM_PTS]{};
42
45
47
49
50 static void spline(double x[], double y[], size_t n, double y2[]);
51 static
52 double splint(double x[], double y[], size_t n, double y2[], double xr);
53
54 // Convenience function template for binding event handler functions
55 template<typename EventTag, typename Class, typename Event>
56 void BindTo(
57 wxEvtHandler &src, const EventTag& eventType, void (Class::*pmf)(Event &))
58 {
59 src.Bind(eventType, pmf, static_cast<Class *>(this));
60 }
61
62 void OnErase( wxEvent &event );
63 void OnSlider( wxCommandEvent & event );
64};
65#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.