Audacity 3.2.0
BassTreble.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4 Audacity(R) is copyright (c) 1999-2016 Audacity Team.
5 License: GPL v2 or later. See License.txt.
6
7 BassTreble.h (two shelf filters)
8 Steve Daulton
9
10**********************************************************************/
11
12#ifndef __AUDACITY_EFFECT_BASS_TREBLE__
13#define __AUDACITY_EFFECT_BASS_TREBLE__
14
16#include "ShuttleAutomation.h"
17
18class ShuttleGui;
19
21{
22public:
24 double treble;
25 double bass;
26 double gain;
32};
33
34
36{
37 static constexpr double bassDefault = 0.0;
38 static constexpr double trebleDefault = 0.0;
39 static constexpr double gainDefault = 0.0;
40 static constexpr bool linkDefault = false;
41
42 double mBass { bassDefault };
44 double mGain { gainDefault };
46};
47
48
50 EffectBassTrebleSettings, StatelessPerTrackEffect
51>
52{
53public:
54
56
58 virtual ~EffectBassTreble();
59
60 // ComponentInterface implementation
61
62 ComponentInterfaceSymbol GetSymbol() const override;
63 TranslatableString GetDescription() const override;
64 ManualPageID ManualPage() const override;
65
66 // EffectDefinitionInterface implementation
67
68 EffectType GetType() const override;
69 RealtimeSince RealtimeSupport() const override;
70
71
72 // Effect Implementation
73
74 std::unique_ptr<EffectEditor> MakeEditor(
75 ShuttleGui & S, EffectInstance &instance,
76 EffectSettingsAccess &access, const EffectOutputs *pOutputs)
77 const override;
78
79 bool CheckWhetherSkipEffect(const EffectSettings &settings) const override;
80
81 struct Editor;
82
83 struct Instance;
84
85 std::shared_ptr<EffectInstance> MakeInstance() const override;
86
87
88private:
89
90 const EffectParameterMethods& Parameters() const override;
91
93 L"Bass", EffectBassTrebleSettings::bassDefault, -30.0, 30.0, 1 };
94
96 L"Treble", EffectBassTrebleSettings::trebleDefault, -30.0, 30.0, 1 };
97
99 L"Gain", EffectBassTrebleSettings::gainDefault, -30.0, 30.0, 1 };
100
102 L"Link Sliders", EffectBassTrebleSettings::linkDefault, false, true, 1 };
103};
104
105#endif
EffectType
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:69
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
A high shelf and low shelf filter.
Definition: BassTreble.h:52
const EffectParameterMethods & Parameters() const override
Definition: BassTreble.cpp:33
static constexpr EffectParameter Treble
Definition: BassTreble.h:95
std::unique_ptr< EffectEditor > MakeEditor(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
Called only from PopulateUI, to add controls to effect panel.
Definition: BassTreble.cpp:268
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
Definition: BassTreble.cpp:155
static constexpr EffectParameter Gain
Definition: BassTreble.h:98
bool CheckWhetherSkipEffect(const EffectSettings &settings) const override
After Init(), tell whether Process() should be skipped.
Definition: BassTreble.cpp:258
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
Definition: BassTreble.cpp:194
static constexpr EffectParameter Bass
Definition: BassTreble.h:92
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
Definition: BassTreble.cpp:182
ComponentInterfaceSymbol GetSymbol() const override
Definition: BassTreble.cpp:172
virtual ~EffectBassTreble()
Definition: BassTreble.cpp:166
TranslatableString GetDescription() const override
Definition: BassTreble.cpp:177
static const ComponentInterfaceSymbol Symbol
Definition: BassTreble.h:55
EffectType GetType() const override
Type determines how it behaves.
Definition: BassTreble.cpp:189
static constexpr EffectParameter Link
Definition: BassTreble.h:101
RealtimeSince
In which versions of Audacity was an effect realtime capable?
Performs effect computation.
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
static constexpr double gainDefault
Definition: BassTreble.h:39
static constexpr bool linkDefault
Definition: BassTreble.h:40
static constexpr double trebleDefault
Definition: BassTreble.h:38
static constexpr double bassDefault
Definition: BassTreble.h:37
Externalized state of a plug-in.