Audacity 3.2.0
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static 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
 
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 NumericFormatID 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, InstanceFinder finder={})
 Re-invoke DoEffect on another Effect object that implements the work. More...
 
- Public Member Functions inherited from EffectBase
 EffectBase ()
 
 ~EffectBase () override
 
bool IsLinearEffect () const
 
bool PreviewsFullSelection () const
 
void SetTracks (TrackList *pTracks)
 
virtual std::any BeginPreview (const EffectSettings &settings)
 Called when Preview() starts, to allow temporary effect state changes. More...
 
bool DoEffect (EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess) override
 
virtual double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const =0
 
void CountWaveTracks ()
 
- 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 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 (EffectBase &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 Public Member Functions inherited from EffectBase
static std::optional< InstancePointerFindInstance (EffectPlugin &plugin)
 
static InstanceFinder DefaultInstanceFinder (EffectPlugin &plugin)
 
- 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 (TrackList &outputs)
 
void FreeBuffers ()
 
bool ProcessOne (WaveChannel &track, size_t nChannels, double curT0, double curT1, float mult, EBUR128 *pLoudnessProcessor)
 
void LoadBufferBlock (WaveChannel &track, size_t nChannels, sampleCount pos, size_t len)
 
bool AnalyseBufferBlock (EBUR128 &loudnessProcessor)
 
bool ProcessBufferBlock (float mult)
 
bool StoreBufferBlock (WaveChannel &track, size_t nChannels, sampleCount pos, size_t len)
 
bool UpdateProgress ()
 
void OnChoice (wxCommandEvent &evt)
 
void OnUpdateUI (wxCommandEvent &evt)
 
void UpdateUI ()
 
const EffectParameterMethodsParameters () const override
 

Static Private Member Functions

static bool GetTrackRMS (WaveChannel &track, double curT0, double curT1, float &rms)
 

Private Attributes

wxWeakRef< wxWindow > mUIParent {}
 
bool mStereoInd
 
double mLUFSLevel
 
double mRMSLevel
 
bool mDualMono
 
int mNormalizeTo
 
double mProgressVal
 
int mSteps
 
TranslatableString mProgressMsg
 
double mTrackLen
 
double mCurRate
 
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
std::shared_ptr< TrackListmTracks {}
 
int mNumTracks {}
 
BasicUI::ProgressDialogmProgress {}
 
double mProjectRate {}
 
WaveTrackFactorymFactory {}
 
double mT0 {}
 
double mT1 {}
 
bool mIsPreview { false }
 
- 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, sampleCount *start, sampleCount *len)
 
- Protected Member Functions inherited from EffectBase
virtual bool CheckWhetherSkipEffect (const EffectSettings &settings) const =0
 After Init(), tell whether Process() should be skipped. More...
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing () const
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 
- Protected Attributes inherited from EffectBase
double mF0 {}
 
double mF1 {}
 
wxArrayString mPresetNames
 
unsigned mUIFlags { 0 }
 

Detailed Description

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

Definition at line 32 of file Loudness.h.

Member Enumeration Documentation

◆ kNormalizeTargets

Enumerator
kLoudness 
kRMS 
nAlgos 

Definition at line 35 of file Loudness.h.

36 {
38 kRMS,
39 nAlgos
40 };

Constructor & Destructor Documentation

◆ EffectLoudness()

EffectLoudness::EffectLoudness ( )

Definition at line 61 of file Loudness.cpp.

62{
63 Parameters().Reset(*this);
65}
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: EffectBase.cpp:210
const EffectParameterMethods & Parameters() const override
Definition: Loudness.cpp:42
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 67 of file Loudness.cpp.

68{
69}

Member Function Documentation

◆ AllocBuffers()

void EffectLoudness::AllocBuffers ( TrackList outputs)
private

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

Definition at line 355 of file Loudness.cpp.

356{
358 bool stereoTrackFound = false;
359 double maxSampleRate = 0;
360 mProcStereo = false;
361
362 for (auto track : outputs.Selected<WaveTrack>() + &Track::Any) {
363 mTrackBufferCapacity = std::max(mTrackBufferCapacity, track->GetMaxBlockSize());
364 maxSampleRate = std::max(maxSampleRate, track->GetRate());
365
366 // There is a stereo track
367 if(track->NChannels() == 2)
368 stereoTrackFound = true;
369 }
370
371 // Initiate a processing buffer. This buffer will (most likely)
372 // be shorter than the length of the track being processed.
374
375 if(!mStereoInd && stereoTrackFound)
377}
void reinit(Integral count, bool initialize=false)
Definition: MemoryX.h:58
size_t mTrackBufferCapacity
Definition: Loudness.h:112
bool mStereoInd
Definition: Loudness.h:92
bool mProcStereo
Definition: Loudness.h:113
Floats mTrackBuffer[2]
Definition: Loudness.h:110
bool Any() const
Definition: Track.cpp:255
auto Selected() -> TrackIterRange< TrackType >
Definition: Track.h:967
A Track that contains audio waveform data.
Definition: WaveTrack.h:203

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

Referenced by Process().

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

◆ AnalyseBufferBlock()

bool EffectLoudness::AnalyseBufferBlock ( EBUR128 loudnessProcessor)
private

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

Definition at line 472 of file Loudness.cpp.

473{
474 for(size_t i = 0; i < mTrackBufferLen; i++)
475 {
476 loudnessProcessor.ProcessSampleFromChannel(mTrackBuffer[0][i], 0);
477 if (mProcStereo)
478 loudnessProcessor.ProcessSampleFromChannel(mTrackBuffer[1][i], 1);
479 loudnessProcessor.NextSample();
480 }
481
482 if (!UpdateProgress())
483 return false;
484 return true;
485}
void ProcessSampleFromChannel(float x_in, size_t channel) const
Definition: EBUR128.cpp:83
void NextSample()
Definition: EBUR128.cpp:98
bool UpdateProgress()
Definition: Loudness.cpp:522
size_t mTrackBufferLen
Definition: Loudness.h:111

References mProcStereo, mTrackBuffer, mTrackBufferLen, EBUR128::NextSample(), EBUR128::ProcessSampleFromChannel(), 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 43 of file Loudness.h.

43{ return &e; }

◆ FreeBuffers()

void EffectLoudness::FreeBuffers ( )
private

Definition at line 379 of file Loudness.cpp.

380{
381 mTrackBuffer[0].reset();
382 mTrackBuffer[1].reset();
383}

References mTrackBuffer.

Referenced by Process().

Here is the caller graph for this function:

◆ GetDescription()

TranslatableString EffectLoudness::GetDescription ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 78 of file Loudness.cpp.

79{
80 return XO("Sets the loudness of one or more tracks");
81}
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 73 of file Loudness.cpp.

74{
75 return Symbol;
76}
static const ComponentInterfaceSymbol Symbol
Definition: Loudness.h:44

References Symbol.

◆ GetTrackRMS()

bool EffectLoudness::GetTrackRMS ( WaveChannel track,
double  curT0,
double  curT1,
float &  rms 
)
staticprivate

Definition at line 385 of file Loudness.cpp.

387{
388 // set mRMS. No progress bar here as it's fast.
389 float _rms = WaveChannelUtilities::GetRMS(track, curT0, curT1); // may throw
390 rms = _rms;
391 return true;
392}
WAVE_TRACK_API float GetRMS(const WaveChannel &channel, double t0, double t1, bool mayThrow=true)

References WaveChannelUtilities::GetRMS().

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 90 of file Loudness.cpp.

91{
92 return EffectTypeProcess;
93}
@ EffectTypeProcess

References EffectTypeProcess.

Referenced by Process().

Here is the caller graph for this function:

◆ LoadBufferBlock()

void EffectLoudness::LoadBufferBlock ( WaveChannel track,
size_t  nChannels,
sampleCount  pos,
size_t  len 
)
private

Definition at line 451 of file Loudness.cpp.

453{
454 size_t idx = 0;
455 const auto getOne = [&](WaveChannel &channel) {
456 // Get the samples from the track and put them in the buffer
457 channel.GetFloats(mTrackBuffer[idx].get(), pos, len);
458 };
459
460 if (nChannels == 1)
461 getOne(track);
462 else
463 for (const auto channel : track.GetTrack().Channels()) {
464 getOne(*channel);
465 ++idx;
466 }
467 mTrackBufferLen = len;
468}
WaveTrack & GetTrack()
Definition: WaveTrack.h:840
auto Channels()
Definition: WaveTrack.h:263

References WaveTrack::Channels(), WaveChannel::GetTrack(), mTrackBuffer, and mTrackBufferLen.

Referenced by ProcessOne().

Here is the call graph for this function:
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 83 of file Loudness.cpp.

84{
85 return L"Loudness_Normalization";
86}

◆ OnChoice()

void EffectLoudness::OnChoice ( wxCommandEvent &  evt)
private

Definition at line 529 of file Loudness.cpp.

530{
531 mChoice->GetValidator()->TransferFromWindow();
532 mBook->SetSelection( mNormalizeTo );
533 UpdateUI();
535}
wxCheckBox * mDualMonoCheckBox
Definition: Loudness.h:108
wxSimplebook * mBook
Definition: Loudness.h:104
wxChoice * mChoice
Definition: Loudness.h:105
void UpdateUI()
Definition: Loudness.cpp:542
int mNormalizeTo
Definition: Loudness.h:96

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 537 of file Loudness.cpp.

538{
539 UpdateUI();
540}

References UpdateUI().

Here is the call graph for this function:

◆ Parameters()

const EffectParameterMethods & EffectLoudness::Parameters ( ) const
overrideprivatevirtual

Reimplemented from Effect.

Definition at line 42 of file Loudness.cpp.

43{
46 > parameters;
47 return parameters;
48}
Generates EffectParameterMethods overrides from variadic template arguments.
static constexpr EffectParameter StereoInd
Definition: Loudness.h:118
static constexpr EffectParameter LUFSLevel
Definition: Loudness.h:120
static constexpr EffectParameter RMSLevel
Definition: Loudness.h:122
static constexpr EffectParameter DualMono
Definition: Loudness.h:124
static constexpr EffectParameter NormalizeTo
Definition: Loudness.h:126

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 229 of file Loudness.cpp.

232{
233 mUIParent = S.GetParent();
234 S.StartVerticalLay(0);
235 {
236 S.StartMultiColumn(2, wxALIGN_CENTER);
237 {
238 S.StartVerticalLay(false);
239 {
240 S.StartHorizontalLay(wxALIGN_LEFT, false);
241 {
242 S.AddVariableText(XO("&Normalize"), false,
243 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
244
245 mChoice = S
246 .Validator<wxGenericValidator>( &mNormalizeTo )
247 .AddChoice( {},
249 mNormalizeTo );
250 S
251 .AddVariableText(XO("t&o"), false,
252 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
253
254 // Use a notebook so we can have two controls but show only one
255 // They target different variables with their validators
256 mBook =
257 S
258 .StartSimplebook();
259 {
260 S.StartNotebookPage({});
261 {
262 S.StartHorizontalLay(wxALIGN_LEFT, false);
263 {
264 S
265 /* i18n-hint: LUFS is a particular method for measuring loudnesss */
266 .Name( XO("Loudness LUFS") )
267 .Validator<FloatingPointValidator<double>>(
268 2, &mLUFSLevel,
269 NumValidatorStyle::ONE_TRAILING_ZERO,
271 .AddTextBox( {}, L"", 10);
272
273 /* i18n-hint: LUFS is a particular method for measuring loudnesss */
274 S
275 .AddVariableText(XO("LUFS"), false,
276 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
277 }
278 S.EndHorizontalLay();
279 }
280 S.EndNotebookPage();
281
282 S.StartNotebookPage({});
283 {
284 S.StartHorizontalLay(wxALIGN_LEFT, false);
285 {
286 S
287 .Name( XO("RMS dB") )
288 .Validator<FloatingPointValidator<double>>(
289 2, &mRMSLevel,
290 NumValidatorStyle::ONE_TRAILING_ZERO,
292 .AddTextBox( {}, L"", 10);
293
294 S
295 .AddVariableText(XO("dB"), false,
296 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
297 }
298 S.EndHorizontalLay();
299 }
300 S.EndNotebookPage();
301 }
302 S.EndSimplebook();
303
304 mWarning =
305 S
306 .AddVariableText( {}, false,
307 wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
308 }
309 S.EndHorizontalLay();
310
312 .Validator<wxGenericValidator>( &mStereoInd )
313 .AddCheckBox(XXO("Normalize &stereo channels independently"),
314 mStereoInd );
315
317 .Validator<wxGenericValidator>( &mDualMono )
318 .AddCheckBox(XXO("&Treat mono as dual-mono (recommended)"),
319 mDualMono );
320 }
321 S.EndVerticalLay();
322 }
323 S.EndMultiColumn();
324 }
325 S.EndVerticalLay();
326 return nullptr;
327}
XXO("&Cut/Copy/Paste Toolbar")
static const EnumValueSymbol kNormalizeTargetStrings[EffectLoudness::nAlgos]
Definition: Loudness.cpp:36
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:107
wxWeakRef< wxWindow > mUIParent
Definition: Loudness.h:90
wxStaticText * mWarning
Definition: Loudness.h:106
double mRMSLevel
Definition: Loudness.h:94
bool mDualMono
Definition: Loudness.h:95
double mLUFSLevel
Definition: Loudness.h:93
A Validator is an object which checks whether a wxVariant satisfies a certain criterion....
Definition: Validators.h:54
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 97 of file Loudness.cpp.

98{
99 const float ratio = DB_TO_LINEAR(
101 ? // LU use 10*log10(...) instead of 20*log10(...)
102 // so multiply level by 2
103 std::clamp<double>(mLUFSLevel * 2, LUFSLevel.min, LUFSLevel.max)
104 : // RMS
105 std::clamp<double>(mRMSLevel, RMSLevel.min, RMSLevel.max)
106 );
107
108 // Iterate over each track
109 EffectOutputTracks outputs { *mTracks, GetType(), { { mT0, mT1 } } };
110 bool bGoodResult = true;
111 auto topMsg = XO("Normalizing Loudness...\n");
112
113 AllocBuffers(outputs.Get());
114 mProgressVal = 0;
115
116 for (auto pTrack : outputs.Get().Selected<WaveTrack>()) {
117 // Get start and end times from track
118 double trackStart = pTrack->GetStartTime();
119 double trackEnd = pTrack->GetEndTime();
120
121 // Set the current bounds to whichever left marker is
122 // greater and whichever right marker is less:
123 const double curT0 = std::max(trackStart, mT0);
124 const double curT1 = std::min(trackEnd, mT1);
125
126 // Get the track rate
127 mCurRate = pTrack->GetRate();
128
129 wxString msg;
130 auto trackName = pTrack->GetName();
131 // This affects only the progress indicator update during ProcessOne
132 mSteps = (mNormalizeTo == kLoudness) ? 2 : 1;
133
135 topMsg + XO("Analyzing: %s").Format(trackName);
136
137 const auto channels = pTrack->Channels();
138 auto nChannels = mStereoInd ? 1 : channels.size();
139 mProcStereo = nChannels > 1;
140
141 const auto processOne = [&](WaveChannel &track){
142 std::optional<EBUR128> loudnessProcessor;
143 float RMS[2];
144
145 if (mNormalizeTo == kLoudness) {
146 loudnessProcessor.emplace(mCurRate, nChannels);
147 if (!ProcessOne(track, nChannels,
148 curT0, curT1, 0, &*loudnessProcessor))
149 // Processing failed -> abort
150 return false;
151 }
152 else {
153 // RMS
154 if (mProcStereo) {
155 size_t idx = 0;
156 for (const auto pChannel : channels) {
157 if (!GetTrackRMS(*pChannel, curT0, curT1, RMS[idx]))
158 return false;
159 ++idx;
160 }
161 }
162 else {
163 if (!GetTrackRMS(track, curT0, curT1, RMS[0]))
164 return false;
165 }
166 }
167
168 // Calculate normalization values the analysis results
169 float extent;
170 if (mNormalizeTo == kLoudness)
171 extent = loudnessProcessor->IntegrativeLoudness();
172 else {
173 // RMS
174 extent = RMS[0];
175 if (mProcStereo)
176 // RMS: use average RMS, average must be calculated in quadratic
177 // domain.
178 extent = sqrt((RMS[0] * RMS[0] + RMS[1] * RMS[1]) / 2.0);
179 }
180
181 if (extent == 0.0) {
182 FreeBuffers();
183 return false;
184 }
185 float mult = ratio / extent;
186
187 if (mNormalizeTo == kLoudness) {
188 // Target half the LUFS value if mono (or independent processed
189 // stereo) shall be treated as dual mono.
190 if (nChannels == 1 &&
191 (mDualMono || !IsMono(track)))
192 mult /= 2.0;
193
194 // LUFS are related to square values so the multiplier must be the
195 // xroot.
196 mult = sqrt(mult);
197 }
198
199 mProgressMsg = topMsg + XO("Processing: %s").Format( trackName );
200 if (!ProcessOne(track, nChannels, curT0, curT1, mult, nullptr)) {
201 // Processing failed -> abort
202 return false;
203 }
204 return true;
205 };
206
207 if (mStereoInd) {
208 for (const auto pChannel : channels)
209 if (!(bGoodResult = processOne(*pChannel)))
210 goto done;
211 }
212 else {
213 // processOne captured nChannels which is 2 and is passed to
214 // LoadBufferBlock, StoreBufferBlock which find the track from the
215 // channel and iterate channels
216 if (!(bGoodResult = processOne(**pTrack->Channels().begin())))
217 break;
218 }
219 }
220done:
221
222 if (bGoodResult)
223 outputs.Commit();
224
225 FreeBuffers();
226 return bGoodResult;
227}
int min(int a, int b)
#define DB_TO_LINEAR(x)
Definition: MemoryX.h:337
double mT1
Definition: EffectBase.h:114
std::shared_ptr< TrackList > mTracks
Definition: EffectBase.h:107
double mT0
Definition: EffectBase.h:113
double mCurRate
Definition: Loudness.h:102
void AllocBuffers(TrackList &outputs)
Definition: Loudness.cpp:355
EffectType GetType() const override
Type determines how it behaves.
Definition: Loudness.cpp:90
void FreeBuffers()
Definition: Loudness.cpp:379
double mProgressVal
Definition: Loudness.h:98
bool ProcessOne(WaveChannel &track, size_t nChannels, double curT0, double curT1, float mult, EBUR128 *pLoudnessProcessor)
Definition: Loudness.cpp:400
TranslatableString mProgressMsg
Definition: Loudness.h:100
static bool GetTrackRMS(WaveChannel &track, double curT0, double curT1, float &rms)
Definition: Loudness.cpp:385
Use this object to copy the input tracks to tentative outputTracks.
bool IsMono(const Channel &channel)
Whether the channel is mono.
__finl float_x4 __vecc sqrt(const float_x4 &a)

References AllocBuffers(), DB_TO_LINEAR, FreeBuffers(), GetTrackRMS(), GetType(), AudioGraph::IsMono(), kLoudness, LUFSLevel, EffectParameter< Structure, Member, Type, Value >::max, mCurRate, mDualMono, EffectParameter< Structure, Member, Type, Value >::min, min(), mLUFSLevel, mNormalizeTo, mProcStereo, mProgressMsg, mProgressVal, mRMSLevel, mSteps, mStereoInd, EffectBase::mT0, EffectBase::mT1, EffectBase::mTracks, ProcessOne(), RMSLevel, staffpad::audio::simd::sqrt(), and XO().

Here is the call graph for this function:

◆ ProcessBufferBlock()

bool EffectLoudness::ProcessBufferBlock ( float  mult)
private

Definition at line 487 of file Loudness.cpp.

488{
489 for(size_t i = 0; i < mTrackBufferLen; i++)
490 {
491 mTrackBuffer[0][i] = mTrackBuffer[0][i] * mult;
492 if (mProcStereo)
493 mTrackBuffer[1][i] = mTrackBuffer[1][i] * mult;
494 }
495
496 if(!UpdateProgress())
497 return false;
498 return true;
499}

References 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 ( WaveChannel track,
size_t  nChannels,
double  curT0,
double  curT1,
float  mult,
EBUR128 pLoudnessProcessor 
)
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 400 of file Loudness.cpp.

403{
404 // Transform the marker timepoints to samples
405 auto start = track.TimeToLongSamples(curT0);
406 auto end = track.TimeToLongSamples(curT1);
407
408 // Get the length of the buffer (as double). len is
409 // used simply to calculate a progress meter, so it is easier
410 // to make it a double now than it is to do it later
411 mTrackLen = (end - start).as_double();
412
413 // Abort if the right marker is not to the right of the left marker
414 if (curT1 <= curT0)
415 return false;
416
417 // Go through the track one buffer at a time. s counts which
418 // sample the current buffer starts at.
419 auto s = start;
420 while (s < end) {
421 // Get a block of samples (smaller than the size of the buffer)
422 // Adjust the block size if it is the final block in the track
423 auto blockLen = limitSampleBufferSize(
424 track.GetBestBlockSize(s),
426
427 const size_t remainingLen = (end - s).as_size_t();
428 blockLen = blockLen > remainingLen ? remainingLen : blockLen;
429 LoadBufferBlock(track, nChannels, s, blockLen);
430
431 // Process the buffer.
432 if (pLoudnessProcessor) {
433 if (!AnalyseBufferBlock(*pLoudnessProcessor))
434 return false;
435 }
436 else {
437 if (!ProcessBufferBlock(mult))
438 return false;
439 if (!StoreBufferBlock(track, nChannels, s, blockLen))
440 return false;
441 }
442
443 // Increment s one blockfull of samples
444 s += blockLen;
445 }
446
447 // Return true because the effect processing succeeded ... unless cancelled
448 return true;
449}
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition: SampleCount.cpp:22
double mTrackLen
Definition: Loudness.h:101
bool AnalyseBufferBlock(EBUR128 &loudnessProcessor)
Definition: Loudness.cpp:472
bool ProcessBufferBlock(float mult)
Definition: Loudness.cpp:487
void LoadBufferBlock(WaveChannel &track, size_t nChannels, sampleCount pos, size_t len)
Definition: Loudness.cpp:451
bool StoreBufferBlock(WaveChannel &track, size_t nChannels, sampleCount pos, size_t len)
Definition: Loudness.cpp:501
size_t GetBestBlockSize(sampleCount t) const
A hint for sizing of well aligned fetches.
Definition: WaveTrack.h:850
sampleCount TimeToLongSamples(double t0) const
const char * end(const char *str) noexcept
Definition: StringUtils.h:106

References AnalyseBufferBlock(), details::end(), WaveChannel::GetBestBlockSize(), limitSampleBufferSize(), LoadBufferBlock(), mTrackBufferCapacity, mTrackLen, ProcessBufferBlock(), StoreBufferBlock(), and WideSampleSequence::TimeToLongSamples().

Referenced by Process().

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

◆ StoreBufferBlock()

bool EffectLoudness::StoreBufferBlock ( WaveChannel track,
size_t  nChannels,
sampleCount  pos,
size_t  len 
)
private

Definition at line 501 of file Loudness.cpp.

503{
504 size_t idx = 0;
505 const auto setOne = [&](WaveChannel &channel){
506 // Copy the newly-changed samples back onto the track.
507 return channel.SetFloats(mTrackBuffer[idx].get(), pos, len);
508 };
509
510 if (nChannels == 1)
511 return setOne(track);
512 else {
513 for (auto channel : track.GetTrack().Channels()) {
514 if (!setOne(*channel))
515 return false;
516 ++idx;
517 }
518 return true;
519 }
520}

References WaveTrack::Channels(), WaveChannel::GetTrack(), and mTrackBuffer.

Referenced by ProcessOne().

Here is the call graph for this function:
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 342 of file Loudness.cpp.

343{
344 if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
345 {
346 return false;
347 }
348 return true;
349}

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 329 of file Loudness.cpp.

330{
331 if (!mUIParent->TransferDataToWindow())
332 {
333 return false;
334 }
335
336 // adjust controls which depend on mchoice
337 wxCommandEvent dummy;
338 OnChoice(dummy);
339 return true;
340}
void OnChoice(wxCommandEvent &evt)
Definition: Loudness.cpp:529

References mUIParent, and OnChoice().

Here is the call graph for this function:

◆ UpdateProgress()

bool EffectLoudness::UpdateProgress ( )
private

Definition at line 522 of file Loudness.cpp.

523{
524 mProgressVal += (double(1 + mProcStereo) * double(mTrackBufferLen)
525 / (double(GetNumWaveTracks()) * double(mSteps) * mTrackLen));
527}
bool TotalProgress(double frac, const TranslatableString &={}) const
Definition: Effect.cpp:335
int GetNumWaveTracks() const
Definition: Effect.h:139

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 542 of file Loudness.cpp.

543{
544 if (!mUIParent->TransferDataFromWindow())
545 {
546 mWarning->SetLabel(_("(Maximum 0dB)"));
547 // TODO: recalculate layout here
549 return;
550 }
551 mWarning->SetLabel(wxT(""));
553}
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 124 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 120 of file Loudness.h.

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

◆ mBook

wxSimplebook* EffectLoudness::mBook
private

Definition at line 104 of file Loudness.h.

Referenced by OnChoice(), and PopulateOrExchange().

◆ mChoice

wxChoice* EffectLoudness::mChoice
private

Definition at line 105 of file Loudness.h.

Referenced by OnChoice(), and PopulateOrExchange().

◆ mCurRate

double EffectLoudness::mCurRate
private

Definition at line 102 of file Loudness.h.

Referenced by Process().

◆ mDualMono

bool EffectLoudness::mDualMono
private

Definition at line 95 of file Loudness.h.

Referenced by PopulateOrExchange(), and Process().

◆ mDualMonoCheckBox

wxCheckBox* EffectLoudness::mDualMonoCheckBox
private

Definition at line 108 of file Loudness.h.

Referenced by OnChoice(), and PopulateOrExchange().

◆ mLUFSLevel

double EffectLoudness::mLUFSLevel
private

Definition at line 93 of file Loudness.h.

Referenced by PopulateOrExchange(), and Process().

◆ mNormalizeTo

int EffectLoudness::mNormalizeTo
private

Definition at line 96 of file Loudness.h.

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

◆ mProcStereo

bool EffectLoudness::mProcStereo
private

◆ mProgressMsg

TranslatableString EffectLoudness::mProgressMsg
private

Definition at line 100 of file Loudness.h.

Referenced by Process(), and UpdateProgress().

◆ mProgressVal

double EffectLoudness::mProgressVal
private

Definition at line 98 of file Loudness.h.

Referenced by Process(), and UpdateProgress().

◆ mRMSLevel

double EffectLoudness::mRMSLevel
private

Definition at line 94 of file Loudness.h.

Referenced by PopulateOrExchange(), and Process().

◆ mSteps

int EffectLoudness::mSteps
private

Definition at line 99 of file Loudness.h.

Referenced by Process(), and UpdateProgress().

◆ mStereoInd

bool EffectLoudness::mStereoInd
private

Definition at line 92 of file Loudness.h.

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

◆ mStereoIndCheckBox

wxCheckBox* EffectLoudness::mStereoIndCheckBox
private

Definition at line 107 of file Loudness.h.

Referenced by PopulateOrExchange().

◆ mTrackBuffer

Floats EffectLoudness::mTrackBuffer[2]
private

◆ mTrackBufferCapacity

size_t EffectLoudness::mTrackBufferCapacity
private

Definition at line 112 of file Loudness.h.

Referenced by AllocBuffers(), and ProcessOne().

◆ mTrackBufferLen

size_t EffectLoudness::mTrackBufferLen
private

◆ mTrackLen

double EffectLoudness::mTrackLen
private

Definition at line 101 of file Loudness.h.

Referenced by ProcessOne(), and UpdateProgress().

◆ mUIParent

wxWeakRef<wxWindow> EffectLoudness::mUIParent {}
private

◆ mWarning

wxStaticText* EffectLoudness::mWarning
private

Definition at line 106 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 126 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 122 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 118 of file Loudness.h.

Referenced by Parameters().

◆ Symbol

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

Definition at line 44 of file Loudness.h.

Referenced by GetSymbol().


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