Audacity 3.2.0
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
CompressorEditor Class Referencefinal

#include <CompressorEditor.h>

Inheritance diagram for CompressorEditor:
[legend]
Collaboration diagram for CompressorEditor:
[legend]

Public Member Functions

 CompressorEditor (wxWindow *parent, CompressorInstance &instance, bool isRealtime, const EffectUIServices &services, EffectSettingsAccess &access, CompressorSettings settings)
 
- Public Member Functions inherited from DynamicRangeProcessorEditor
 DynamicRangeProcessorEditor (wxWindow *parent, CompressorInstance &instance, bool isRealtime, const EffectUIServices &services, EffectSettingsAccess &access)
 
void PopulateOrExchange (ShuttleGui &S)
 
- Public Member Functions inherited from EffectEditor
 EffectEditor (const EffectUIServices &services, EffectSettingsAccess &access)
 
virtual ~EffectEditor ()
 
virtual bool ValidateUI ()=0
 Get settings data from the panel; may make error dialogs and return false. More...
 
virtual bool UpdateUI ()
 Update appearance of the panel for changes in settings. More...
 
virtual bool IsGraphicalUI ()
 
virtual void Disconnect ()
 On the first call only, may disconnect from further event handling. More...
 
virtual void OnClose ()
 
- Public Member Functions inherited from Observer::Publisher< EffectSettingChanged >
 Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={})
 Constructor supporting type-erased custom allocation/deletion. More...
 
 Publisher (Publisher &&)=default
 
Publisheroperator= (Publisher &&)=default
 
Subscription Subscribe (Callback callback)
 Connect a callback to the Publisher; later-connected are called earlier. More...
 
Subscription Subscribe (Object &obj, Return(Object::*callback)(Args...))
 Overload of Subscribe takes an object and pointer-to-member-function. More...
 

Static Public Attributes

static constexpr CompressorParameter thresholdDb
 
static constexpr CompressorParameter makeupGainDb
 
static constexpr CompressorParameter kneeWidthDb
 
static constexpr CompressorParameter compressionRatio
 
static constexpr CompressorParameter lookaheadMs
 
static constexpr CompressorParameter attackMs
 
static constexpr CompressorParameter releaseMs
 
static constexpr CompressorParameter showInput
 
static constexpr CompressorParameter showOutput
 
static constexpr CompressorParameter showActual
 
static constexpr CompressorParameter showTarget
 
- Static Public Attributes inherited from EffectEditor
static constexpr int kPlayID = 20102
 
- Static Public Attributes inherited from Observer::Publisher< EffectSettingChanged >
static constexpr bool notifies_all
 

Private Member Functions

const CompressorSettingsGetCompressorSettings () const override
 

Private Attributes

CompressorSettings mSettings
 

Additional Inherited Members

- Public Types inherited from Observer::Publisher< EffectSettingChanged >
using message_type = EffectSettingChanged
 
using CallbackReturn = std::conditional_t< true, void, bool >
 
using Callback = std::function< CallbackReturn(const EffectSettingChanged &) >
 Type of functions that can be connected to the Publisher. More...
 
- Static Public Member Functions inherited from EffectEditor
static bool EnableApply (wxWindow *parent, bool enable=true)
 Enable or disable the Apply button of the dialog that contains parent. More...
 
static bool EnablePreview (wxWindow *parent, bool enable=true)
 
- Protected Member Functions inherited from DynamicRangeProcessorEditor
void Initialize (std::vector< ExtendedCompressorParameter > parameters)
 
- Protected Member Functions inherited from EffectEditor
template<typename EventTag , typename Class , typename Event >
void BindTo (wxEvtHandler &src, const EventTag &eventType, void(Class::*pmf)(Event &))
 
- Protected Member Functions inherited from Observer::Publisher< EffectSettingChanged >
CallbackReturn Publish (const EffectSettingChanged &message)
 Send a message to connected callbacks. More...
 
- Protected Attributes inherited from EffectEditor
const EffectUIServicesmUIServices
 
EffectSettingsAccessmAccess
 
bool mUIClosed { false }
 
- Static Protected Attributes inherited from DynamicRangeProcessorEditor
static constexpr auto dbStep = 0.1
 

Detailed Description

Definition at line 20 of file CompressorEditor.h.

Constructor & Destructor Documentation

◆ CompressorEditor()

CompressorEditor::CompressorEditor ( wxWindow *  parent,
CompressorInstance instance,
bool  isRealtime,
const EffectUIServices services,
EffectSettingsAccess access,
CompressorSettings  settings 
)

Definition at line 58 of file CompressorEditor.cpp.

62 : DynamicRangeProcessorEditor { parent, instance, isRealtime, services,
63 access }
64 , mSettings { std::move(settings) }
65{
67 std::make_shared<ParameterWrapper>(thresholdDb),
70 std::make_shared<ParameterWrapper>(makeupGainDb),
73 std::make_shared<ParameterWrapper>(kneeWidthDb),
76 std::make_shared<ParameterWrapper>(compressionRatio),
79 std::make_shared<ParameterWrapper>(lookaheadMs),
82 std::make_shared<ParameterWrapper>(attackMs),
85 std::make_shared<ParameterWrapper>(releaseMs),
87}
static const DynamicRangeProcessorParameterAttributes compressorMakupGainDbAttributes
static const DynamicRangeProcessorParameterAttributes compressionRatioAttributes
static const DynamicRangeProcessorParameterAttributes lookaheadMsAttributes
static const DynamicRangeProcessorParameterAttributes kneeWidthDbAttributes
static const DynamicRangeProcessorParameterAttributes attackMsAttributes
static const DynamicRangeProcessorParameterAttributes compressorThresholdDbAttributes
static const DynamicRangeProcessorParameterAttributes releaseMsAttributes
static Settings & settings()
Definition: TrackInfo.cpp:51
static constexpr CompressorParameter releaseMs
static constexpr CompressorParameter compressionRatio
static constexpr CompressorParameter thresholdDb
CompressorSettings mSettings
static constexpr CompressorParameter lookaheadMs
static constexpr CompressorParameter makeupGainDb
static constexpr CompressorParameter attackMs
static constexpr CompressorParameter kneeWidthDb
void Initialize(std::vector< ExtendedCompressorParameter > parameters)

References CompressorSettings::attackMs, attackMs, attackMsAttributes, CompressionCurve, CompressorSettings::compressionRatio, compressionRatio, compressionRatioAttributes, compressorMakupGainDbAttributes, compressorThresholdDbAttributes, DynamicRangeProcessorEditor::Initialize(), CompressorSettings::kneeWidthDb, kneeWidthDb, kneeWidthDbAttributes, CompressorSettings::lookaheadMs, lookaheadMs, lookaheadMsAttributes, CompressorSettings::makeupGainDb, makeupGainDb, mSettings, CompressorSettings::releaseMs, releaseMs, releaseMsAttributes, CompressorSettings::thresholdDb, thresholdDb, and TimeSmoothing.

Here is the call graph for this function:

Member Function Documentation

◆ GetCompressorSettings()

const CompressorSettings * CompressorEditor::GetCompressorSettings ( ) const
inlineoverrideprivatevirtual

Reimplemented from DynamicRangeProcessorEditor.

Definition at line 102 of file CompressorEditor.h.

103 {
104 return &mSettings;
105 }

References mSettings.

Member Data Documentation

◆ attackMs

constexpr CompressorParameter CompressorEditor::attackMs
staticconstexpr
Initial value:
{
L"attackMs",
0,
200,
1
}
constexpr double compressorAttackMsDefault

Definition at line 70 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().

◆ compressionRatio

constexpr CompressorParameter CompressorEditor::compressionRatio
staticconstexpr
Initial value:
{
L"compressionRatio",
1,
100,
1
}
constexpr double compressorCompressionRatioDefault

Definition at line 55 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().

◆ kneeWidthDb

constexpr CompressorParameter CompressorEditor::kneeWidthDb
staticconstexpr
Initial value:
{
L"kneeWidthDb",
0,
30 / dbStep,
1 / dbStep
}
constexpr double compressorKneeWidthDbDefault

Definition at line 46 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().

◆ lookaheadMs

constexpr CompressorParameter CompressorEditor::lookaheadMs
staticconstexpr
Initial value:
{
}
constexpr double compressorLookaheadMsDefault
constexpr double compressorMaxLookaheadMs

Definition at line 64 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().

◆ makeupGainDb

constexpr CompressorParameter CompressorEditor::makeupGainDb
staticconstexpr
Initial value:
{
L"makeupGainDb",
-30 / dbStep,
30 / dbStep,
1 / dbStep
}
constexpr double compressorMakeupGainDbDefault

Definition at line 37 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().

◆ mSettings

CompressorSettings CompressorEditor::mSettings
private

Definition at line 107 of file CompressorEditor.h.

Referenced by CompressorEditor(), and GetCompressorSettings().

◆ releaseMs

constexpr CompressorParameter CompressorEditor::releaseMs
staticconstexpr
Initial value:
{
L"releaseMs",
0,
1000,
1
}
constexpr double compressorReleaseMsDefault

Definition at line 79 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().

◆ showActual

constexpr CompressorParameter CompressorEditor::showActual
staticconstexpr
Initial value:
{
}
constexpr double showActualDefault

Definition at line 94 of file CompressorEditor.h.

Referenced by EffectCompressor::Parameters().

◆ showInput

constexpr CompressorParameter CompressorEditor::showInput
staticconstexpr
Initial value:
{
}
constexpr double showInputDefault

Definition at line 88 of file CompressorEditor.h.

Referenced by EffectCompressor::Parameters().

◆ showOutput

constexpr CompressorParameter CompressorEditor::showOutput
staticconstexpr
Initial value:
{
}
constexpr double showOutputDefault

Definition at line 91 of file CompressorEditor.h.

Referenced by EffectCompressor::Parameters().

◆ showTarget

constexpr CompressorParameter CompressorEditor::showTarget
staticconstexpr
Initial value:
{
}
constexpr double showTargetDefault

Definition at line 97 of file CompressorEditor.h.

Referenced by EffectCompressor::Parameters().

◆ thresholdDb

constexpr CompressorParameter CompressorEditor::thresholdDb
staticconstexpr
Initial value:
{
L"thresholdDb",
-60 / dbStep,
0,
1 / dbStep
}
constexpr double compressorThresholdDbDefault

Definition at line 28 of file CompressorEditor.h.

Referenced by CompressorEditor(), and EffectCompressor::Parameters().


The documentation for this class was generated from the following files: