mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 07:40:23 +02:00
New EQCurves management dialog.
This commit is contained in:
parent
ff7c013f16
commit
da5c299292
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Audacity: A Digital Audio Editor
|
Audacity: A Digital Audio Editor
|
||||||
|
|
||||||
EffectEqualization.h
|
Equalization.h
|
||||||
|
|
||||||
Mitch Golden
|
Mitch Golden
|
||||||
Vaughan Johnson (Preview)
|
Vaughan Johnson (Preview)
|
||||||
@ -20,6 +20,7 @@
|
|||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
#include <wx/listctrl.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/slider.h>
|
#include <wx/slider.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
@ -37,6 +38,7 @@
|
|||||||
#include "../Envelope.h"
|
#include "../Envelope.h"
|
||||||
#include "../WaveTrack.h"
|
#include "../WaveTrack.h"
|
||||||
#include "../xml/XMLTagHandler.h"
|
#include "../xml/XMLTagHandler.h"
|
||||||
|
#include "../widgets/Grid.h"
|
||||||
#include "../widgets/Ruler.h"
|
#include "../widgets/Ruler.h"
|
||||||
#include "../RealFFTf.h"
|
#include "../RealFFTf.h"
|
||||||
|
|
||||||
@ -135,17 +137,6 @@ private:
|
|||||||
bool mEditingBatchParams;
|
bool mEditingBatchParams;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum curveType {
|
|
||||||
amradio, acoustic,
|
|
||||||
nab, lp, aes, deccaffrrmicro, deccaffrr78, riaa,
|
|
||||||
inverseriaa, col78, deccaffrrlp, emi78, rcavictor1938, rcavictor1947,
|
|
||||||
nCurveTypes
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {nCurvePoints=28};
|
|
||||||
static const float curvex[];
|
|
||||||
static const float curvey[][nCurvePoints];
|
|
||||||
static const wxChar * curveNames[];
|
|
||||||
|
|
||||||
friend class EqualizationDialog;
|
friend class EqualizationDialog;
|
||||||
friend class EqualizationPanel;
|
friend class EqualizationPanel;
|
||||||
@ -246,13 +237,13 @@ public:
|
|||||||
bool drawGrid;
|
bool drawGrid;
|
||||||
RulerPanel *dBRuler;
|
RulerPanel *dBRuler;
|
||||||
RulerPanel *freqRuler;
|
RulerPanel *freqRuler;
|
||||||
|
friend class EditCurvesDialog;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void MakeEqualizationDialog();
|
void MakeEqualizationDialog();
|
||||||
void CreateChoice();
|
void CreateChoice();
|
||||||
void LoadDefaultCurves();
|
void LoadCurves(wxString fileName = wxT(""), bool append = false);
|
||||||
void LoadCurves();
|
void SaveCurves(wxString fileName = wxT(""));
|
||||||
void SaveCurves();
|
|
||||||
void Select(int sel);
|
void Select(int sel);
|
||||||
void setCurve(int currentCurve);
|
void setCurve(int currentCurve);
|
||||||
void setCurve(wxString curveName);
|
void setCurve(wxString curveName);
|
||||||
@ -261,7 +252,6 @@ private:
|
|||||||
void spline(double x[], double y[], int n, double y2[]);
|
void spline(double x[], double y[], int n, double y2[]);
|
||||||
double splint(double x[], double y[], int n, double y2[], double xr);
|
double splint(double x[], double y[], int n, double y2[], double xr);
|
||||||
void LayoutEQSliders();
|
void LayoutEQSliders();
|
||||||
bool SaveAs();
|
|
||||||
void RevertCustom();
|
void RevertCustom();
|
||||||
void Finish(bool ok);
|
void Finish(bool ok);
|
||||||
|
|
||||||
@ -280,7 +270,7 @@ private:
|
|||||||
ID_DBMAX,
|
ID_DBMAX,
|
||||||
ID_DBMIN,
|
ID_DBMIN,
|
||||||
ID_CURVE,
|
ID_CURVE,
|
||||||
ID_SAVEAS,
|
ID_MANAGE,
|
||||||
ID_DELETE,
|
ID_DELETE,
|
||||||
ID_CLEAR,
|
ID_CLEAR,
|
||||||
ID_INVERT,
|
ID_INVERT,
|
||||||
@ -310,8 +300,7 @@ private:
|
|||||||
void EnvLinToLog(void);
|
void EnvLinToLog(void);
|
||||||
void ErrMin(void);
|
void ErrMin(void);
|
||||||
void OnCurve( wxCommandEvent &event );
|
void OnCurve( wxCommandEvent &event );
|
||||||
void OnSaveAs( wxCommandEvent &event );
|
void OnManage( wxCommandEvent &event );
|
||||||
void OnDelete( wxCommandEvent &event );
|
|
||||||
void OnClear( wxCommandEvent &event );
|
void OnClear( wxCommandEvent &event );
|
||||||
void OnInvert( wxCommandEvent &event );
|
void OnInvert( wxCommandEvent &event );
|
||||||
void OnPreview(wxCommandEvent &event);
|
void OnPreview(wxCommandEvent &event);
|
||||||
@ -338,7 +327,7 @@ private:
|
|||||||
wxBoxSizer *mCurveSizer;
|
wxBoxSizer *mCurveSizer;
|
||||||
wxChoice *mCurve;
|
wxChoice *mCurve;
|
||||||
wxButton *mDelete;
|
wxButton *mDelete;
|
||||||
wxButton *mSaveAs;
|
wxButton *mManage;
|
||||||
wxStaticText *mMText;
|
wxStaticText *mMText;
|
||||||
wxStaticText *octText;
|
wxStaticText *octText;
|
||||||
wxSlider *MSlider;
|
wxSlider *MSlider;
|
||||||
@ -357,7 +346,6 @@ private:
|
|||||||
wxBoxSizer *szr5;
|
wxBoxSizer *szr5;
|
||||||
wxSize size;
|
wxSize size;
|
||||||
wxCheckBox *mGridOnOff;
|
wxCheckBox *mGridOnOff;
|
||||||
|
|
||||||
EQCurveArray mCurves;
|
EQCurveArray mCurves;
|
||||||
EQCurve mCustomBackup;
|
EQCurve mCustomBackup;
|
||||||
|
|
||||||
@ -368,6 +356,37 @@ private:
|
|||||||
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
#if wxUSE_ACCESSIBILITY
|
||||||
|
|
||||||
|
// EditCurvesDialog. Note that the 'modified' curve used to be called 'custom' but is now called 'unnamed'
|
||||||
|
// Some things that deal with 'unnamed' curves still use, for example, 'mCustomBackup' as variable names.
|
||||||
|
class EditCurvesDialog:public wxDialog
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EditCurvesDialog(EqualizationDialog * parent, int position);
|
||||||
|
~EditCurvesDialog();
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxListCtrl *mList; // List of curves.
|
||||||
|
EQCurveArray mEditCurves; // Copy of curves to muck about with
|
||||||
|
EqualizationDialog *mParent; // the parent EQ Dialog
|
||||||
|
int mPosition; // position of current curve in list
|
||||||
|
void Populate();
|
||||||
|
void PopulateOrExchange(ShuttleGui &S);
|
||||||
|
void PopulateList(int position);
|
||||||
|
void OnUp(wxCommandEvent &event);
|
||||||
|
void OnDown(wxCommandEvent &event);
|
||||||
|
long GetPreviousItem(long item);
|
||||||
|
void OnRename( wxCommandEvent &event );
|
||||||
|
void OnRenameActivated( wxListEvent &event );
|
||||||
|
void OnDelete( wxCommandEvent &event );
|
||||||
|
void OnKey( wxListEvent &event );
|
||||||
|
void OnImport( wxCommandEvent &event );
|
||||||
|
void OnExport( wxCommandEvent &event );
|
||||||
|
void OnLibrary( wxCommandEvent &event );
|
||||||
|
void OnDefaults( wxCommandEvent &event );
|
||||||
|
void OnOK(wxCommandEvent &event);
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
class SliderAx: public wxWindowAccessible
|
class SliderAx: public wxWindowAccessible
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user