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

An Effect to bring the loudness level up to a chosen level. More...

#include <Loudness.h>

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

Public Types

enum  kNormalizeTargets { kLoudness , kRMS , nAlgos }
 
- Public Types inherited from StatefulEffectBase
using MessagePackage = EffectInstance::MessagePackage
 
- Public Types inherited from EffectPlugin
using EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess >
 
using InstancePointer = std::shared_ptr< EffectInstanceEx >
 
using InstanceFinder = std::function< std::optional< InstancePointer >(EffectSettings &settings) >
 
- Public Types inherited from EffectDefinitionInterface
enum class  RealtimeSince : unsigned { Never , After_3_1 , Always }
 In which versions of Audacity was an effect realtime capable? More...
 
- Public Types inherited from EffectUIServices
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 

Public Member Functions

 EffectLoudness ()
 
virtual ~EffectLoudness ()
 
ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
ManualPageID ManualPage () const override
 Name of a page in the Audacity alpha manual, default is empty. More...
 
EffectType GetType () const override
 Type determines how it behaves. More...
 
bool Process (EffectInstance &instance, EffectSettings &settings) override
 
std::unique_ptr< EffectEditorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
 Add controls to effect panel; always succeeds. More...
 
bool TransferDataToWindow (const EffectSettings &settings) override
 
bool TransferDataFromWindow (EffectSettings &settings) override
 
- Public Member Functions inherited from StatefulEffect
 ~StatefulEffect () override
 
std::shared_ptr< EffectInstanceMakeInstance () const override
 Make an object maintaining short-term state of an Effect. More...
 
- Public Member Functions inherited from StatefulEffectBase
virtual bool Init ()
 
virtual bool Process (EffectInstance &instance, EffectSettings &settings)=0
 
virtual bool RealtimeInitialize (EffectSettings &settings, double sampleRate)
 
virtual bool RealtimeAddProcessor (EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate)
 
virtual bool RealtimeSuspend ()
 
virtual bool RealtimeResume ()
 
virtual bool RealtimeProcessStart (MessagePackage &package)
 settings are possibly changed, since last call, by an asynchronous dialog More...
 
virtual size_t RealtimeProcess (size_t group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples)
 
virtual bool RealtimeProcessEnd (EffectSettings &settings) noexcept
 settings can be updated to let a dialog change appearance at idle More...
 
virtual bool RealtimeFinalize (EffectSettings &settings) noexcept
 
virtual size_t SetBlockSize (size_t maxBlockSize)
 
virtual size_t GetBlockSize () const
 
virtual unsigned GetAudioInCount () const
 How many input buffers to allocate at once. More...
 
virtual unsigned GetAudioOutCount () const
 How many output buffers to allocate at once. More...
 
virtual sampleCount GetLatency () const
 
virtual bool NeedsDither () const
 
virtual bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr)
 
virtual bool ProcessFinalize () noexcept
 
- Public Member Functions inherited from Effect
 Effect ()
 
virtual ~Effect ()
 
PluginPath GetPath () const override
 
bool VisitSettings (SettingsVisitor &visitor, EffectSettings &settings) override
 
bool VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const override
 
ComponentInterfaceSymbol GetSymbol () const override
 
VendorSymbol GetVendor () const override
 
wxString GetVersion () const override
 
TranslatableString GetDescription () const override
 
EffectType GetType () const override
 Type determines how it behaves. More...
 
EffectFamilySymbol GetFamily () const override
 Report identifier and user-visible name of the effect protocol. More...
 
bool IsInteractive () const override
 Whether the effect needs a dialog for entry of settings. More...
 
bool IsDefault () const override
 Whether the effect sorts "above the line" in the menus. More...
 
RealtimeSince RealtimeSupport () const override
 Since which version of Audacity has the effect supported realtime? More...
 
bool SupportsAutomation () const override
 Whether the effect has any automatable controls. More...
 
bool SaveSettings (const EffectSettings &settings, CommandParameters &parms) const override
 Store settings as keys and values. More...
 
bool LoadSettings (const CommandParameters &parms, EffectSettings &settings) const override
 Restore settings from keys and values. More...
 
OptionalMessage LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const override
 
bool SaveUserPreset (const RegistryPath &name, const EffectSettings &settings) const override
 Save settings in the configuration file as a user-named preset. More...
 
RegistryPaths GetFactoryPresets () const override
 Report names of factory presets. More...
 
OptionalMessage LoadFactoryPreset (int id, EffectSettings &settings) const override
 
OptionalMessage LoadFactoryDefaults (EffectSettings &settings) const override
 
virtual const EffectParameterMethodsParameters () const
 
bool CanExportPresets () const override
 Whether the effect supports export of presets to files, and importing too. More...
 
bool HasOptions () const override
 
const EffectSettingsManagerGetDefinition () const override
 
virtual NumericFormatSymbol GetSelectionFormat ()
 
bool SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const override
 
OptionalMessage LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const override
 
bool IsBatchProcessing () const override
 
void SetBatchProcessing () override
 
void UnsetBatchProcessing () override
 
unsigned TestUIFlags (unsigned mask)
 
bool Delegate (Effect &delegate, EffectSettings &settings)
 Re-invoke DoEffect on another Effect object that implements the work. More...
 
- Public Member Functions inherited from EffectBase
 EffectBase ()
 
 ~EffectBase () override
 
void SetTracks (TrackList *pTracks)
 
bool DoEffect (EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess) override
 
- Public Member Functions inherited from EffectPlugin
EffectPluginoperator= (EffectPlugin &)=delete
 
virtual ~EffectPlugin ()
 
virtual bool HasOptions () const =0
 
virtual bool CanExportPresets () const =0
 Whether the effect supports export of presets to files, and importing too. More...
 
virtual const EffectSettingsManagerGetDefinition () const =0
 
virtual void Preview (EffectSettingsAccess &access, std::function< void()> updateUI, bool dryOnly)=0
 Calculate temporary tracks of limited length with effect applied and play. More...
 
virtual bool SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const =0
 
virtual OptionalMessage LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const =0
 
virtual bool IsBatchProcessing () const =0
 
virtual void SetBatchProcessing ()=0
 
virtual void UnsetBatchProcessing ()=0
 
virtual bool DoEffect (EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess=nullptr)=0
 
- Public Member Functions inherited from EffectInstanceFactory
virtual ~EffectInstanceFactory ()
 
virtual std::shared_ptr< EffectInstanceMakeInstance () const =0
 Make an object maintaining short-term state of an Effect. More...
 
- Public Member Functions inherited from EffectSettingsManager
virtual ~EffectSettingsManager ()
 
virtual bool VisitSettings (SettingsVisitor &visitor, EffectSettings &settings)
 
virtual bool VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const
 
virtual EffectSettings MakeSettings () const
 
virtual bool CopySettingsContents (const EffectSettings &src, EffectSettings &dst) const
 Update one settings object from another. More...
 
virtual std::unique_ptr< EffectOutputsMakeOutputs () const
 Produce an object to hold values to send to effect output meters. More...
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
virtual EffectType GetType () const =0
 Type determines how it behaves. More...
 
virtual EffectType GetClassification () const
 Determines which menu it appears in; default same as GetType(). More...
 
virtual EffectFamilySymbol GetFamily () const =0
 Report identifier and user-visible name of the effect protocol. More...
 
virtual bool IsInteractive () const =0
 Whether the effect needs a dialog for entry of settings. More...
 
virtual bool IsDefault () const =0
 Whether the effect sorts "above the line" in the menus. More...
 
virtual RealtimeSince RealtimeSupport () const =0
 Since which version of Audacity has the effect supported realtime? More...
 
bool SupportsRealtime () const
 
virtual bool SupportsAutomation () const =0
 Whether the effect has any automatable controls. More...
 
virtual bool EnablesDebug () const
 Whether the effect dialog should have a Debug button; default, always false. More...
 
virtual ManualPageID ManualPage () const
 Name of a page in the Audacity alpha manual, default is empty. More...
 
virtual FilePath HelpPage () const
 Fully qualified local help file name, default is empty. More...
 
virtual bool IsHiddenFromMenus () const
 Default is false. More...
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 
- Public Member Functions inherited from StatefulEffectUIServices
 ~StatefulEffectUIServices () override
 
std::unique_ptr< EffectEditorPopulateUI (const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
 Allows PopulateOrExchange to return null. More...
 
virtual std::unique_ptr< EffectEditorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
 Add controls to effect panel; always succeeds. More...
 
virtual bool TransferDataToWindow (const EffectSettings &settings)
 
virtual bool TransferDataFromWindow (EffectSettings &settings)
 
- Public Member Functions inherited from BasicEffectUIServices
int ShowClientInterface (const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal) const override
 
void ExportPresets (const EffectPlugin &plugin, const EffectSettings &settings) const override
 
OptionalMessage ImportPresets (const EffectPlugin &plugin, EffectSettings &settings) const override
 
void ShowOptions (const EffectPlugin &plugin) const override
 
bool ValidateUI (const EffectPlugin &context, EffectSettings &) const override
 
bool CloseUI () const override
 
- Public Member Functions inherited from EffectUIServices
virtual ~EffectUIServices ()
 
virtual int ShowHostInterface (EffectPlugin &plugin, wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)
 
virtual int ShowClientInterface (const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal=false) const =0
 
virtual std::unique_ptr< EffectEditorPopulateUI (const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const =0
 Adds controls to a panel that is given as the parent window of S More...
 
virtual void ExportPresets (const EffectPlugin &plugin, const EffectSettings &settings) const =0
 
virtual OptionalMessage ImportPresets (const EffectPlugin &plugin, EffectSettings &settings) const =0
 
virtual void ShowOptions (const EffectPlugin &plugin) const =0
 
virtual bool ValidateUI (const EffectPlugin &context, EffectSettings &settings) const =0
 
virtual bool CloseUI () const =0
 

Static Public Member Functions

static EffectLoudnessFetchParameters (EffectLoudness &e, EffectSettings &)
 
- Static Public Member Functions inherited from Effect
static EffectFetchParameters (Effect &e, EffectSettings &)
 
static void IncEffectCounter ()
 
- Static Public Member Functions inherited from EffectDefinitionInterface
static Identifier GetSquashedName (const Identifier &ident)
 A utility that strips spaces and CamelCases a name. More...
 
- Static Public Member Functions inherited from EffectUIServices
static int DoMessageBox (const EffectPlugin &plugin, const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Loudness Normalization") }
 
- Static Public Attributes inherited from EffectPlugin
static const wxString kUserPresetIdent = wxT("User Preset:")
 
static const wxString kFactoryPresetIdent = wxT("Factory Preset:")
 
static const wxString kCurrentSettingsIdent = wxT("<Current Settings>")
 
static const wxString kFactoryDefaultsIdent = wxT("<Factory Defaults>")
 

Private Member Functions

void AllocBuffers ()
 
void FreeBuffers ()
 
bool GetTrackRMS (WaveTrack *track, float &rms)
 
bool ProcessOne (TrackIterRange< WaveTrack > range, bool analyse)
 
void LoadBufferBlock (TrackIterRange< WaveTrack > range, sampleCount pos, size_t len)
 
bool AnalyseBufferBlock ()
 
bool ProcessBufferBlock ()
 
void StoreBufferBlock (TrackIterRange< WaveTrack > range, sampleCount pos, size_t len)
 
bool UpdateProgress ()
 
void OnChoice (wxCommandEvent &evt)
 
void OnUpdateUI (wxCommandEvent &evt)
 
void UpdateUI ()
 
const EffectParameterMethodsParameters () const override
 

Private Attributes

wxWeakRef< wxWindow > mUIParent {}
 
bool mStereoInd
 
double mLUFSLevel
 
double mRMSLevel
 
bool mDualMono
 
int mNormalizeTo
 
double mCurT0
 
double mCurT1
 
double mProgressVal
 
int mSteps
 
TranslatableString mProgressMsg
 
double mTrackLen
 
double mCurRate
 
float mMult
 
float mRatio
 
float mRMS [2]
 
std::unique_ptr< EBUR128mLoudnessProcessor
 
wxSimplebook * mBook
 
wxChoice * mChoice
 
wxStaticText * mWarning
 
wxCheckBox * mStereoIndCheckBox
 
wxCheckBox * mDualMonoCheckBox
 
Floats mTrackBuffer [2]
 
size_t mTrackBufferLen
 
size_t mTrackBufferCapacity
 
bool mProcStereo
 

Static Private Attributes

static constexpr EffectParameter StereoInd
 
static constexpr EffectParameter LUFSLevel
 
static constexpr EffectParameter RMSLevel
 
static constexpr EffectParameter DualMono
 
static constexpr EffectParameter NormalizeTo
 

Additional Inherited Members

- Public Attributes inherited from EffectBase
TrackListmTracks {}
 
- Protected Member Functions inherited from Effect
bool CheckWhetherSkipEffect (const EffectSettings &settings) const override
 Default implementation returns false. More...
 
double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const override
 Default implementation returns previewLength More...
 
bool TotalProgress (double frac, const TranslatableString &={}) const
 
bool TrackProgress (int whichTrack, double frac, const TranslatableString &={}) const
 
bool TrackGroupProgress (int whichGroup, double frac, const TranslatableString &={}) const
 
int GetNumWaveTracks () const
 
int GetNumWaveGroups () const
 
void GetBounds (const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
 
void CopyInputTracks (bool allSyncLockSelected=false)
 
TrackAddToOutputTracks (const std::shared_ptr< Track > &t)
 
- Protected Member Functions inherited from EffectBase
virtual std::any BeginPreview (const EffectSettings &settings)
 Called when Preview() starts, to allow temporary effect state changes. More...
 
void Preview (EffectSettingsAccess &access, std::function< void()> updateUI, bool dryOnly) final
 Calculate temporary tracks of limited length with effect applied and play. More...
 
virtual bool CheckWhetherSkipEffect (const EffectSettings &settings) const =0
 After Init(), tell whether Process() should be skipped. More...
 
virtual double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const =0
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing () const
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 
- Protected Attributes inherited from EffectBase
BasicUI::ProgressDialogmProgress {}
 
double mProjectRate {}
 
WaveTrackFactorymFactory {}
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0 {}
 
double mT1 {}
 
wxArrayString mPresetNames
 
unsigned mUIFlags { 0 }
 
- Static Protected Attributes inherited from EffectBase
static int nEffectsDone = 0
 

Detailed Description

An Effect to bring the loudness level up to a chosen level.

Definition at line 30 of file Loudness.h.

Member Enumeration Documentation

◆ kNormalizeTargets

Enumerator
kLoudness 
kRMS 
nAlgos 

Definition at line 33 of file Loudness.h.

34 {
36 kRMS,
37 nAlgos
38 };

Constructor & Destructor Documentation

◆ EffectLoudness()

EffectLoudness::EffectLoudness ( )

Definition at line 58 of file Loudness.cpp.

59{
60 Parameters().Reset(*this);
62}
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: EffectBase.cpp:214
const EffectParameterMethods & Parameters() const override
Definition: Loudness.cpp:39
virtual void Reset(Effect &effect) const =0

References Parameters(), EffectParameterMethods::Reset(), and EffectBase::SetLinearEffectFlag().

Referenced by Parameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~EffectLoudness()

EffectLoudness::~EffectLoudness ( )
virtual

Definition at line 64 of file Loudness.cpp.

65{
66}

Member Function Documentation

◆ AllocBuffers()

void EffectLoudness::AllocBuffers ( )
private

Get required buffer size for the largest whole track and allocate buffers. This reduces the amount of allocations required.

Definition at line 338 of file Loudness.cpp.

339{
341 bool stereoTrackFound = false;
342 double maxSampleRate = 0;
343 mProcStereo = false;
344
345 for(auto track : mOutputTracks->Selected<WaveTrack>() + &Track::Any)
346 {
347 mTrackBufferCapacity = std::max(mTrackBufferCapacity, track->GetMaxBlockSize());
348 maxSampleRate = std::max(maxSampleRate, track->GetRate());
349
350 // There is a stereo track
351 if(track->IsLeader())
352 stereoTrackFound = true;
353 }
354
355 // Initiate a processing buffer. This buffer will (most likely)
356 // be shorter than the length of the track being processed.
358
359 if(!mStereoInd && stereoTrackFound)
361}
void reinit(Integral count, bool initialize=false)
Definition: MemoryX.h:57
std::shared_ptr< TrackList > mOutputTracks
Definition: EffectBase.h:111
size_t mTrackBufferCapacity
Definition: Loudness.h:115
bool mStereoInd
Definition: Loudness.h:88
bool mProcStereo
Definition: Loudness.h:116
Floats mTrackBuffer[2]
Definition: Loudness.h:113
bool Any() const
Definition: Track.cpp:400
A Track that contains audio waveform data.
Definition: WaveTrack.h:51

References Track::Any(), EffectBase::mOutputTracks, mProcStereo, mStereoInd, mTrackBuffer, mTrackBufferCapacity, and ArrayOf< X >::reinit().

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AnalyseBufferBlock()

bool EffectLoudness::AnalyseBufferBlock ( )
private

Calculates sample sum (for DC) and EBU R128 weighted square sum (for loudness).

Definition at line 451 of file Loudness.cpp.

452{
453 for(size_t i = 0; i < mTrackBufferLen; i++)
454 {
455 mLoudnessProcessor->ProcessSampleFromChannel(mTrackBuffer[0][i], 0);
456 if(mProcStereo)
457 mLoudnessProcessor->ProcessSampleFromChannel(mTrackBuffer[1][i], 1);
458 mLoudnessProcessor->NextSample();
459 }
460
461 if(!UpdateProgress())
462 return false;
463 return true;
464}
bool UpdateProgress()
Definition: Loudness.cpp:492
std::unique_ptr< EBUR128 > mLoudnessProcessor
Definition: Loudness.h:105
size_t mTrackBufferLen
Definition: Loudness.h:114

References mLoudnessProcessor, mProcStereo, mTrackBuffer, mTrackBufferLen, and UpdateProgress().

Referenced by ProcessOne().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FetchParameters()

static EffectLoudness * EffectLoudness::FetchParameters ( EffectLoudness e,
EffectSettings  
)
inlinestatic

Definition at line 41 of file Loudness.h.

41{ return &e; }

◆ FreeBuffers()

void EffectLoudness::FreeBuffers ( )
private

Definition at line 363 of file Loudness.cpp.

364{
365 mTrackBuffer[0].reset();
366 mTrackBuffer[1].reset();
367}

References mTrackBuffer.

Referenced by Process().

Here is the caller graph for this function:

◆ GetDescription()

TranslatableString EffectLoudness::GetDescription ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 75 of file Loudness.cpp.

76{
77 return XO("Sets the loudness of one or more tracks");
78}
XO("Cut/Copy/Paste")

References XO().

Here is the call graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol EffectLoudness::GetSymbol ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 70 of file Loudness.cpp.

71{
72 return Symbol;
73}
static const ComponentInterfaceSymbol Symbol
Definition: Loudness.h:42

References Symbol.

◆ GetTrackRMS()

bool EffectLoudness::GetTrackRMS ( WaveTrack track,
float &  rms 
)
private

Definition at line 369 of file Loudness.cpp.

370{
371 // set mRMS. No progress bar here as it's fast.
372 float _rms = track->GetRMS(mCurT0, mCurT1); // may throw
373 rms = _rms;
374 return true;
375}
double mCurT1
Definition: Loudness.h:95
double mCurT0
Definition: Loudness.h:94
float GetRMS(double t0, double t1, bool mayThrow=true) const
Definition: WaveTrack.cpp:1886

References WaveTrack::GetRMS(), mCurT0, and mCurT1.

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetType()

EffectType EffectLoudness::GetType ( ) const
overridevirtual

Type determines how it behaves.

Implements EffectDefinitionInterface.

Definition at line 87 of file Loudness.cpp.

88{
89 return EffectTypeProcess;
90}
@ EffectTypeProcess

References EffectTypeProcess.

◆ LoadBufferBlock()

void EffectLoudness::LoadBufferBlock ( TrackIterRange< WaveTrack range,
sampleCount  pos,
size_t  len 
)
private

Definition at line 436 of file Loudness.cpp.

438{
439 // Get the samples from the track and put them in the buffer
440 int idx = 0;
441 for(auto channel : range)
442 {
443 channel->GetFloats(mTrackBuffer[idx].get(), pos, len );
444 ++idx;
445 }
446 mTrackBufferLen = len;
447}

References mTrackBuffer, and mTrackBufferLen.

Referenced by ProcessOne().

Here is the caller graph for this function:

◆ ManualPage()

ManualPageID EffectLoudness::ManualPage ( ) const
overridevirtual

Name of a page in the Audacity alpha manual, default is empty.

Reimplemented from EffectDefinitionInterface.

Definition at line 80 of file Loudness.cpp.

81{
82 return L"Loudness_Normalization";
83}

◆ OnChoice()

void EffectLoudness::OnChoice ( wxCommandEvent &  evt)
private

Definition at line 499 of file Loudness.cpp.

500{
501 mChoice->GetValidator()->TransferFromWindow();
502 mBook->SetSelection( mNormalizeTo );
503 UpdateUI();
505}
wxCheckBox * mDualMonoCheckBox
Definition: Loudness.h:111
wxSimplebook * mBook
Definition: Loudness.h:107
wxChoice * mChoice
Definition: Loudness.h:108
void UpdateUI()
Definition: Loudness.cpp:512
int mNormalizeTo
Definition: Loudness.h:92

References kLoudness, mBook, mChoice, mDualMonoCheckBox, mNormalizeTo, and UpdateUI().

Referenced by TransferDataToWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnUpdateUI()

void EffectLoudness::OnUpdateUI ( wxCommandEvent &  evt)
private

Definition at line 507 of file Loudness.cpp.

508{
509 UpdateUI();
510}

References UpdateUI().

Here is the call graph for this function:

◆ Parameters()

const EffectParameterMethods & EffectLoudness::Parameters ( ) const
overrideprivatevirtual

Reimplemented from Effect.

Definition at line 39 of file Loudness.cpp.

40{
43 > parameters;
44 return parameters;
45}
Generates EffectParameterMethods overrides from variadic template arguments.
static constexpr EffectParameter StereoInd
Definition: Loudness.h:121
static constexpr EffectParameter LUFSLevel
Definition: Loudness.h:123
static constexpr EffectParameter RMSLevel
Definition: Loudness.h:125
static constexpr EffectParameter DualMono
Definition: Loudness.h:127
static constexpr EffectParameter NormalizeTo
Definition: Loudness.h:129

References DualMono, EffectLoudness(), LUFSLevel, NormalizeTo, RMSLevel, and StereoInd.

Referenced by EffectLoudness().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PopulateOrExchange()

std::unique_ptr< EffectEditor > EffectLoudness::PopulateOrExchange ( ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access,
const EffectOutputs pOutputs 
)
overridevirtual

Add controls to effect panel; always succeeds.

Returns
if not null, then return it from PopulateUI instead of a DefaultEffectEditor; default implementation returns null

Reimplemented from StatefulEffectUIServices.

Definition at line 212 of file Loudness.cpp.

215{
216 mUIParent = S.GetParent();
217 S.StartVerticalLay(0);
218 {
219 S.StartMultiColumn(2, wxALIGN_CENTER);
220 {
221 S.StartVerticalLay(false);
222 {
223 S.StartHorizontalLay(wxALIGN_LEFT, false);
224 {
225 S.AddVariableText(XO("&Normalize"), false,
226 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
227
228 mChoice = S
229 .Validator<wxGenericValidator>( &mNormalizeTo )
230 .AddChoice( {},
232 mNormalizeTo );
233 S
234 .AddVariableText(XO("t&o"), false,
235 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
236
237 // Use a notebook so we can have two controls but show only one
238 // They target different variables with their validators
239 mBook =
240 S
241 .StartSimplebook();
242 {
243 S.StartNotebookPage({});
244 {
245 S.StartHorizontalLay(wxALIGN_LEFT, false);
246 {
247 S
248 /* i18n-hint: LUFS is a particular method for measuring loudnesss */
249 .Name( XO("Loudness LUFS") )
250 .Validator<FloatingPointValidator<double>>(
251 2, &mLUFSLevel,
252 NumValidatorStyle::ONE_TRAILING_ZERO,
254 .AddTextBox( {}, L"", 10);
255
256 /* i18n-hint: LUFS is a particular method for measuring loudnesss */
257 S
258 .AddVariableText(XO("LUFS"), false,
259 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
260 }
261 S.EndHorizontalLay();
262 }
263 S.EndNotebookPage();
264
265 S.StartNotebookPage({});
266 {
267 S.StartHorizontalLay(wxALIGN_LEFT, false);
268 {
269 S
270 .Name( XO("RMS dB") )
271 .Validator<FloatingPointValidator<double>>(
272 2, &mRMSLevel,
273 NumValidatorStyle::ONE_TRAILING_ZERO,
275 .AddTextBox( {}, L"", 10);
276
277 S
278 .AddVariableText(XO("dB"), false,
279 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
280 }
281 S.EndHorizontalLay();
282 }
283 S.EndNotebookPage();
284 }
285 S.EndSimplebook();
286
287 mWarning =
288 S
289 .AddVariableText( {}, false,
290 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
291 }
292 S.EndHorizontalLay();
293
295 .Validator<wxGenericValidator>( &mStereoInd )
296 .AddCheckBox(XXO("Normalize &stereo channels independently"),
297 mStereoInd );
298
300 .Validator<wxGenericValidator>( &mDualMono )
301 .AddCheckBox(XXO("&Treat mono as dual-mono (recommended)"),
302 mDualMono );
303 }
304 S.EndVerticalLay();
305 }
306 S.EndMultiColumn();
307 }
308 S.EndVerticalLay();
309 return nullptr;
310}
XXO("&Cut/Copy/Paste Toolbar")
static const EnumValueSymbol kNormalizeTargetStrings[EffectLoudness::nAlgos]
Definition: Loudness.cpp:33
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
#define S(N)
Definition: ToChars.cpp:64
wxCheckBox * mStereoIndCheckBox
Definition: Loudness.h:110
wxWeakRef< wxWindow > mUIParent
Definition: Loudness.h:86
wxStaticText * mWarning
Definition: Loudness.h:109
double mRMSLevel
Definition: Loudness.h:90
bool mDualMono
Definition: Loudness.h:91
double mLUFSLevel
Definition: Loudness.h:89
A Validator is an object which checks whether a wxVariant satisfies a certain criterion....
Definition: Validators.h:53
const Type min
Minimum value.
const Type max
Maximum value.

References kNormalizeTargetStrings, LUFSLevel, EffectParameter< Structure, Member, Type, Value >::max, mBook, mChoice, mDualMono, mDualMonoCheckBox, EffectParameter< Structure, Member, Type, Value >::min, mLUFSLevel, mNormalizeTo, mRMSLevel, Msgids(), mStereoInd, mStereoIndCheckBox, mUIParent, mWarning, nAlgos, RMSLevel, S, XO(), and XXO().

Here is the call graph for this function:

◆ Process()

bool EffectLoudness::Process ( EffectInstance instance,
EffectSettings settings 
)
overridevirtual

Implements StatefulEffectBase.

Definition at line 94 of file Loudness.cpp.

95{
97 // LU use 10*log10(...) instead of 20*log10(...)
98 // so multiply level by 2 and use standard DB_TO_LINEAR macro.
99 mRatio = DB_TO_LINEAR(std::clamp<double>(mLUFSLevel*2, LUFSLevel.min, LUFSLevel.max));
100 else // RMS
101 mRatio = DB_TO_LINEAR(std::clamp<double>(mRMSLevel, RMSLevel.min, RMSLevel.max));
102
103 // Iterate over each track
104 this->CopyInputTracks(); // Set up mOutputTracks.
105 bool bGoodResult = true;
106 auto topMsg = XO("Normalizing Loudness...\n");
107
108 AllocBuffers();
109 mProgressVal = 0;
110
111 for(auto track : mOutputTracks->Selected<WaveTrack>()
113 {
114 // Get start and end times from track
115 // PRL: No accounting for multiple channels ?
116 double trackStart = track->GetStartTime();
117 double trackEnd = track->GetEndTime();
118
119 // Set the current bounds to whichever left marker is
120 // greater and whichever right marker is less:
121 mCurT0 = mT0 < trackStart? trackStart: mT0;
122 mCurT1 = mT1 > trackEnd? trackEnd: mT1;
123
124 // Get the track rate
125 mCurRate = track->GetRate();
126
127 wxString msg;
128 auto trackName = track->GetName();
129 mSteps = 2;
130
132 topMsg + XO("Analyzing: %s").Format( trackName );
133
134 auto range = mStereoInd
136 : TrackList::Channels(track);
137
138 mProcStereo = range.size() > 1;
139
141 {
142 mLoudnessProcessor.reset(safenew EBUR128(mCurRate, range.size()));
143 mLoudnessProcessor->Initialize();
144 if(!ProcessOne(range, true))
145 {
146 // Processing failed -> abort
147 bGoodResult = false;
148 break;
149 }
150 }
151 else // RMS
152 {
153 size_t idx = 0;
154 for(auto channel : range)
155 {
156 if(!GetTrackRMS(channel, mRMS[idx]))
157 {
158 bGoodResult = false;
159 return false;
160 }
161 ++idx;
162 }
163 mSteps = 1;
164 }
165
166 // Calculate normalization values the analysis results
167 float extent;
169 extent = mLoudnessProcessor->IntegrativeLoudness();
170 else // RMS
171 {
172 extent = mRMS[0];
173 if(mProcStereo)
174 // RMS: use average RMS, average must be calculated in quadratic domain.
175 extent = sqrt((mRMS[0] * mRMS[0] + mRMS[1] * mRMS[1]) / 2.0);
176 }
177
178 if(extent == 0.0)
179 {
180 mLoudnessProcessor.reset();
181 FreeBuffers();
182 return false;
183 }
184 mMult = mRatio / extent;
185
187 {
188 // Target half the LUFS value if mono (or independent processed stereo)
189 // shall be treated as dual mono.
190 if(range.size() == 1 && (mDualMono || track->GetChannel() != Track::MonoChannel))
191 mMult /= 2.0;
192
193 // LUFS are related to square values so the multiplier must be the root.
194 mMult = sqrt(mMult);
195 }
196
197 mProgressMsg = topMsg + XO("Processing: %s").Format( trackName );
198 if(!ProcessOne(range, false))
199 {
200 // Processing failed -> abort
201 bGoodResult = false;
202 break;
203 }
204 }
205
206 this->ReplaceProcessedTracks(bGoodResult);
207 mLoudnessProcessor.reset();
208 FreeBuffers();
209 return bGoodResult;
210}
#define safenew
Definition: MemoryX.h:10
#define DB_TO_LINEAR(x)
Definition: MemoryX.h:560
Implements EBU-R128 loudness measurement.
Definition: EBUR128.h:22
double mT1
Definition: EffectBase.h:113
double mT0
Definition: EffectBase.h:112
void ReplaceProcessedTracks(const bool bGoodResult)
Definition: EffectBase.cpp:232
void CopyInputTracks(bool allSyncLockSelected=false)
Definition: Effect.cpp:396
double mCurRate
Definition: Loudness.h:100
float mRMS[2]
Definition: Loudness.h:104
bool GetTrackRMS(WaveTrack *track, float &rms)
Definition: Loudness.cpp:369
float mRatio
Definition: Loudness.h:103
void FreeBuffers()
Definition: Loudness.cpp:363
void AllocBuffers()
Definition: Loudness.cpp:338
double mProgressVal
Definition: Loudness.h:96
TranslatableString mProgressMsg
Definition: Loudness.h:98
bool ProcessOne(TrackIterRange< WaveTrack > range, bool analyse)
Definition: Loudness.cpp:383
@ MonoChannel
Definition: Track.h:285
bool IsLeader() const
Definition: Track.cpp:406
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:1339
static auto SingletonRange(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1508

References AllocBuffers(), Track::Any(), TrackList::Channels(), Effect::CopyInputTracks(), DB_TO_LINEAR, FreeBuffers(), GetTrackRMS(), Track::IsLeader(), kLoudness, LUFSLevel, EffectParameter< Structure, Member, Type, Value >::max, mCurRate, mCurT0, mCurT1, mDualMono, EffectParameter< Structure, Member, Type, Value >::min, mLoudnessProcessor, mLUFSLevel, mMult, mNormalizeTo, Track::MonoChannel, EffectBase::mOutputTracks, mProcStereo, mProgressMsg, mProgressVal, mRatio, mRMS, mRMSLevel, mSteps, mStereoInd, EffectBase::mT0, EffectBase::mT1, ProcessOne(), EffectBase::ReplaceProcessedTracks(), RMSLevel, safenew, TrackList::SingletonRange(), and XO().

Here is the call graph for this function:

◆ ProcessBufferBlock()

bool EffectLoudness::ProcessBufferBlock ( )
private

Definition at line 466 of file Loudness.cpp.

467{
468 for(size_t i = 0; i < mTrackBufferLen; i++)
469 {
470 mTrackBuffer[0][i] = mTrackBuffer[0][i] * mMult;
471 if(mProcStereo)
472 mTrackBuffer[1][i] = mTrackBuffer[1][i] * mMult;
473 }
474
475 if(!UpdateProgress())
476 return false;
477 return true;
478}

References mMult, mProcStereo, mTrackBuffer, mTrackBufferLen, and UpdateProgress().

Referenced by ProcessOne().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessOne()

bool EffectLoudness::ProcessOne ( TrackIterRange< WaveTrack range,
bool  analyse 
)
private

ProcessOne() takes a track, transforms it to bunch of buffer-blocks, and executes ProcessData, on it... uses mMult to normalize a track. mMult must be set before this is called In analyse mode, it executes the selected analyse operation on it... mMult does not have to be set before this is called

Definition at line 383 of file Loudness.cpp.

384{
385 WaveTrack* track = *range.begin();
386
387 // Transform the marker timepoints to samples
388 auto start = track->TimeToLongSamples(mCurT0);
389 auto end = track->TimeToLongSamples(mCurT1);
390
391 // Get the length of the buffer (as double). len is
392 // used simply to calculate a progress meter, so it is easier
393 // to make it a double now than it is to do it later
394 mTrackLen = (end - start).as_double();
395
396 // Abort if the right marker is not to the right of the left marker
397 if(mCurT1 <= mCurT0)
398 return false;
399
400 // Go through the track one buffer at a time. s counts which
401 // sample the current buffer starts at.
402 auto s = start;
403 while(s < end)
404 {
405 // Get a block of samples (smaller than the size of the buffer)
406 // Adjust the block size if it is the final block in the track
407 auto blockLen = limitSampleBufferSize(
408 track->GetBestBlockSize(s),
410
411 const size_t remainingLen = (end - s).as_size_t();
412 blockLen = blockLen > remainingLen ? remainingLen : blockLen;
413 LoadBufferBlock(range, s, blockLen);
414
415 // Process the buffer.
416 if(analyse)
417 {
418 if(!AnalyseBufferBlock())
419 return false;
420 }
421 else
422 {
423 if(!ProcessBufferBlock())
424 return false;
425 StoreBufferBlock(range, s, blockLen);
426 }
427
428 // Increment s one blockfull of samples
429 s += blockLen;
430 }
431
432 // Return true because the effect processing succeeded ... unless cancelled
433 return true;
434}
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: SampleCount.cpp:22
double mTrackLen
Definition: Loudness.h:99
bool ProcessBufferBlock()
Definition: Loudness.cpp:466
bool AnalyseBufferBlock()
Definition: Loudness.cpp:451
void StoreBufferBlock(TrackIterRange< WaveTrack > range, sampleCount pos, size_t len)
Definition: Loudness.cpp:480
void LoadBufferBlock(TrackIterRange< WaveTrack > range, sampleCount pos, size_t len)
Definition: Loudness.cpp:436
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: SampleTrack.cpp:43
size_t GetBestBlockSize(sampleCount t) const override
This returns a nonnegative number of samples meant to size a memory buffer.
Definition: WaveTrack.cpp:1593
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
Iterator begin() const
Definition: MemoryX.h:290

References AnalyseBufferBlock(), IteratorRange< Iterator >::begin(), PackedArray::end(), WaveTrack::GetBestBlockSize(), limitSampleBufferSize(), LoadBufferBlock(), mCurT0, mCurT1, mTrackBufferCapacity, mTrackLen, ProcessBufferBlock(), StoreBufferBlock(), and SampleTrack::TimeToLongSamples().

Referenced by Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StoreBufferBlock()

void EffectLoudness::StoreBufferBlock ( TrackIterRange< WaveTrack range,
sampleCount  pos,
size_t  len 
)
private

Definition at line 480 of file Loudness.cpp.

482{
483 int idx = 0;
484 for(auto channel : range)
485 {
486 // Copy the newly-changed samples back onto the track.
487 channel->Set((samplePtr) mTrackBuffer[idx].get(), floatSample, pos, len);
488 ++idx;
489 }
490}
char * samplePtr
Definition: SampleFormat.h:55

References floatSample, and mTrackBuffer.

Referenced by ProcessOne().

Here is the caller graph for this function:

◆ TransferDataFromWindow()

bool EffectLoudness::TransferDataFromWindow ( EffectSettings settings)
overridevirtual

Update the given settings from controls; default does nothing, returns true

Reimplemented from StatefulEffectUIServices.

Definition at line 325 of file Loudness.cpp.

326{
327 if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
328 {
329 return false;
330 }
331 return true;
332}

References mUIParent.

◆ TransferDataToWindow()

bool EffectLoudness::TransferDataToWindow ( const EffectSettings settings)
overridevirtual

Update controls for the settings; default does nothing, returns true

Reimplemented from StatefulEffectUIServices.

Definition at line 312 of file Loudness.cpp.

313{
314 if (!mUIParent->TransferDataToWindow())
315 {
316 return false;
317 }
318
319 // adjust controls which depend on mchoice
320 wxCommandEvent dummy;
321 OnChoice(dummy);
322 return true;
323}
void OnChoice(wxCommandEvent &evt)
Definition: Loudness.cpp:499

References mUIParent, and OnChoice().

Here is the call graph for this function:

◆ UpdateProgress()

bool EffectLoudness::UpdateProgress ( )
private

Definition at line 492 of file Loudness.cpp.

493{
494 mProgressVal += (double(1+mProcStereo) * double(mTrackBufferLen)
495 / (double(GetNumWaveTracks()) * double(mSteps) * mTrackLen));
497}
bool TotalProgress(double frac, const TranslatableString &={}) const
Definition: Effect.cpp:338
int GetNumWaveTracks() const
Definition: Effect.h:140

References Effect::GetNumWaveTracks(), mProcStereo, mProgressMsg, mProgressVal, mSteps, mTrackBufferLen, mTrackLen, and Effect::TotalProgress().

Referenced by AnalyseBufferBlock(), and ProcessBufferBlock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateUI()

void EffectLoudness::UpdateUI ( )
private

Definition at line 512 of file Loudness.cpp.

513{
514 if (!mUIParent->TransferDataFromWindow())
515 {
516 mWarning->SetLabel(_("(Maximum 0dB)"));
517 // TODO: recalculate layout here
519 return;
520 }
521 mWarning->SetLabel(wxT(""));
523}
wxT("CloseDown"))
#define _(s)
Definition: Internat.h:73
static bool EnableApply(wxWindow *parent, bool enable=true)
Enable or disable the Apply button of the dialog that contains parent.

References _, EffectEditor::EnableApply(), mUIParent, mWarning, and wxT().

Referenced by OnChoice(), and OnUpdateUI().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ DualMono

constexpr EffectParameter EffectLoudness::DualMono
staticconstexprprivate
Initial value:
L"DualMono", true, false, true, 1 }

Definition at line 127 of file Loudness.h.

Referenced by Parameters().

◆ LUFSLevel

constexpr EffectParameter EffectLoudness::LUFSLevel
staticconstexprprivate
Initial value:
L"LUFSLevel", -23.0, -145.0, 0.0, 1 }

Definition at line 123 of file Loudness.h.

Referenced by Parameters(), PopulateOrExchange(), and Process().

◆ mBook

wxSimplebook* EffectLoudness::mBook
private

Definition at line 107 of file Loudness.h.

Referenced by OnChoice(), and PopulateOrExchange().

◆ mChoice

wxChoice* EffectLoudness::mChoice
private

Definition at line 108 of file Loudness.h.

Referenced by OnChoice(), and PopulateOrExchange().

◆ mCurRate

double EffectLoudness::mCurRate
private

Definition at line 100 of file Loudness.h.

Referenced by Process().

◆ mCurT0

double EffectLoudness::mCurT0
private

Definition at line 94 of file Loudness.h.

Referenced by GetTrackRMS(), Process(), and ProcessOne().

◆ mCurT1

double EffectLoudness::mCurT1
private

Definition at line 95 of file Loudness.h.

Referenced by GetTrackRMS(), Process(), and ProcessOne().

◆ mDualMono

bool EffectLoudness::mDualMono
private

Definition at line 91 of file Loudness.h.

Referenced by PopulateOrExchange(), and Process().

◆ mDualMonoCheckBox

wxCheckBox* EffectLoudness::mDualMonoCheckBox
private

Definition at line 111 of file Loudness.h.

Referenced by OnChoice(), and PopulateOrExchange().

◆ mLoudnessProcessor

std::unique_ptr<EBUR128> EffectLoudness::mLoudnessProcessor
private

Definition at line 105 of file Loudness.h.

Referenced by AnalyseBufferBlock(), and Process().

◆ mLUFSLevel

double EffectLoudness::mLUFSLevel
private

Definition at line 89 of file Loudness.h.

Referenced by PopulateOrExchange(), and Process().

◆ mMult

float EffectLoudness::mMult
private

Definition at line 102 of file Loudness.h.

Referenced by Process(), and ProcessBufferBlock().

◆ mNormalizeTo

int EffectLoudness::mNormalizeTo
private

Definition at line 92 of file Loudness.h.

Referenced by OnChoice(), PopulateOrExchange(), and Process().

◆ mProcStereo

bool EffectLoudness::mProcStereo
private

◆ mProgressMsg

TranslatableString EffectLoudness::mProgressMsg
private

Definition at line 98 of file Loudness.h.

Referenced by Process(), and UpdateProgress().

◆ mProgressVal

double EffectLoudness::mProgressVal
private

Definition at line 96 of file Loudness.h.

Referenced by Process(), and UpdateProgress().

◆ mRatio

float EffectLoudness::mRatio
private

Definition at line 103 of file Loudness.h.

Referenced by Process().

◆ mRMS

float EffectLoudness::mRMS[2]
private

Definition at line 104 of file Loudness.h.

Referenced by Process().

◆ mRMSLevel

double EffectLoudness::mRMSLevel
private

Definition at line 90 of file Loudness.h.

Referenced by PopulateOrExchange(), and Process().

◆ mSteps

int EffectLoudness::mSteps
private

Definition at line 97 of file Loudness.h.

Referenced by Process(), and UpdateProgress().

◆ mStereoInd

bool EffectLoudness::mStereoInd
private

Definition at line 88 of file Loudness.h.

Referenced by AllocBuffers(), PopulateOrExchange(), and Process().

◆ mStereoIndCheckBox

wxCheckBox* EffectLoudness::mStereoIndCheckBox
private

Definition at line 110 of file Loudness.h.

Referenced by PopulateOrExchange().

◆ mTrackBuffer

Floats EffectLoudness::mTrackBuffer[2]
private

◆ mTrackBufferCapacity

size_t EffectLoudness::mTrackBufferCapacity
private

Definition at line 115 of file Loudness.h.

Referenced by AllocBuffers(), and ProcessOne().

◆ mTrackBufferLen

size_t EffectLoudness::mTrackBufferLen
private

◆ mTrackLen

double EffectLoudness::mTrackLen
private

Definition at line 99 of file Loudness.h.

Referenced by ProcessOne(), and UpdateProgress().

◆ mUIParent

wxWeakRef<wxWindow> EffectLoudness::mUIParent {}
private

◆ mWarning

wxStaticText* EffectLoudness::mWarning
private

Definition at line 109 of file Loudness.h.

Referenced by PopulateOrExchange(), and UpdateUI().

◆ NormalizeTo

constexpr EffectParameter EffectLoudness::NormalizeTo
staticconstexprprivate
Initial value:
L"NormalizeTo", (int)kLoudness , 0 , nAlgos-1, 1 }

Definition at line 129 of file Loudness.h.

Referenced by Parameters().

◆ RMSLevel

constexpr EffectParameter EffectLoudness::RMSLevel
staticconstexprprivate
Initial value:
L"RMSLevel", -20.0, -145.0, 0.0, 1 }

Definition at line 125 of file Loudness.h.

Referenced by Parameters(), PopulateOrExchange(), and Process().

◆ StereoInd

constexpr EffectParameter EffectLoudness::StereoInd
staticconstexprprivate
Initial value:
L"StereoIndependent", false, false, true, 1 }

Definition at line 121 of file Loudness.h.

Referenced by Parameters().

◆ Symbol

const ComponentInterfaceSymbol EffectLoudness::Symbol { XO("Loudness Normalization") }
static

Definition at line 42 of file Loudness.h.

Referenced by GetSymbol().


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