Audacity 3.2.0
Equalization.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Equalization.h
6
7 Mitch Golden
8 Vaughan Johnson (Preview)
9
10***********************************************************************/
11
12#ifndef __AUDACITY_EFFECT_EQUALIZATION__
13#define __AUDACITY_EFFECT_EQUALIZATION__
14
15#include <wx/setup.h> // for wxUSE_* macros
16
17#include "StatefulEffect.h"
18#include "EqualizationUI.h"
19
20class WaveChannel;
21
23{
24public:
25 static inline EqualizationParameters *
27 { return &e.mParameters; }
29
30 EffectEqualization(int Options = kEqLegacy);
31
32 virtual ~EffectEqualization();
33
34 // ComponentInterface implementation
35
36 ComponentInterfaceSymbol GetSymbol() const override;
37 TranslatableString GetDescription() const override;
38 ManualPageID ManualPage() const override;
40 override;
41 bool VisitSettings(
43 const override;
44
45 // EffectDefinitionInterface implementation
46
47 EffectType GetType() const override;
49 const override;
51
52 RegistryPaths GetFactoryPresets() const override;
54 const override;
55
56 bool ValidateUI(const EffectPlugin &plugin, EffectSettings &) const override;
57
58 // Effect implementation
59
60 bool Init() override;
61 bool Process(EffectInstance &instance, EffectSettings &settings) override;
62
63 std::unique_ptr<EffectEditor> PopulateOrExchange(
64 ShuttleGui & S, EffectInstance &instance,
65 EffectSettingsAccess &access, const EffectOutputs *pOutputs) override;
66 bool TransferDataToWindow(const EffectSettings &settings) override;
67
68private:
69 // EffectEqualization implementation
70
71 struct Task;
72 bool ProcessOne(Task &task, int count, const WaveChannel &t,
73 sampleCount start, sampleCount len);
74
75 wxWeakRef<wxWindow> mUIParent{};
78 const int mOptions;
80
81 const EffectParameterMethods& Parameters() const override;
82};
83
85{
86public:
88
90};
91
93{
94public:
96
98};
99
100#endif
EffectType
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
const int kEqLegacy
const int kEqOptionCurve
const int kEqOptionGraphic
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:69
TranslatableString GetName() const
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static const ComponentInterfaceSymbol Symbol
Definition: Equalization.h:87
static const ComponentInterfaceSymbol Symbol
Definition: Equalization.h:95
An Effect that modifies volume in different frequency bands.
Definition: Equalization.h:23
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
OptionalMessage DoLoadFactoryDefaults(EffectSettings &settings)
const EffectParameterMethods & Parameters() const override
virtual ~EffectEqualization()
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
EffectType GetType() const override
Type determines how it behaves.
bool TransferDataToWindow(const EffectSettings &settings) override
bool VisitSettings(SettingsVisitor &visitor, EffectSettings &settings) override
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
bool ValidateUI(const EffectPlugin &plugin, EffectSettings &) const override
TranslatableString GetDescription() const override
EqualizationUI mUI
Definition: Equalization.h:79
OptionalMessage LoadFactoryDefaults(EffectSettings &settings) const override
bool ProcessOne(Task &task, int count, const WaveChannel &t, sampleCount start, sampleCount len)
bool Process(EffectInstance &instance, EffectSettings &settings) override
wxWeakRef< wxWindow > mUIParent
Definition: Equalization.h:75
EffectEqualization(int Options=kEqLegacy)
EqualizationFilter mParameters
Definition: Equalization.h:76
EqualizationCurvesList mCurvesList
Definition: Equalization.h:77
static const ComponentInterfaceSymbol Symbol
Definition: Equalization.h:28
ComponentInterfaceSymbol GetSymbol() const override
static EqualizationParameters * FetchParameters(EffectEqualization &e, EffectSettings &)
Definition: Equalization.h:26
const int mOptions
Definition: Equalization.h:78
bool Init() override
Performs effect computation.
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
Factory of instances of an effect.
Definition: EffectPlugin.h:36
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:630
Holds a msgid for the translation catalog; may also bind format arguments.
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:19
Externalized state of a plug-in.
Maintains a list of preset curves for Equalization effects.
Parameters of the Equalization effects that persist in configuration files.