Audacity 3.2.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Effect Class Reference

Base class for many of the effects in Audacity. More...

#include <Effect.h>

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

Classes

class  AddedAnalysisTrack
 
class  ModifiedAnalysisTrack
 

Public Types

enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Public Types inherited from EffectPlugin
using EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess >
 
- Public Types inherited from EffectDefinitionInterface
enum class  RealtimeSince : unsigned { Never , Since_3_2 , Always }
 In which versions of Audacity was an effect realtime capable? More...
 

Public Member Functions

 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
 
int ShowClientInterface (wxWindow &parent, wxDialog &dialog, EffectUIValidator *pValidator, bool forceModal) override
 
EffectUIClientInterfaceGetEffectUIClientInterface () override
 Returns the EffectUIClientInterface instance for this effect. More...
 
std::unique_ptr< EffectUIValidatorPopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
 Adds controls to a panel that is given as the parent window of S More...
 
bool IsGraphicalUI () override
 
bool ValidateUI (EffectSettings &) override
 
bool CloseUI () override
 
bool CanExportPresets () override
 
void ExportPresets (const EffectSettings &settings) const override
 
OptionalMessage ImportPresets (EffectSettings &settings) override
 
bool HasOptions () override
 
void ShowOptions () override
 
const EffectSettingsManagerGetDefinition () const override
 
virtual NumericFormatSymbol GetSelectionFormat ()
 
int ShowHostInterface (wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false) override
 Usually applies factory to self and given access. More...
 
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
 
bool TransferDataToWindow (const EffectSettings &settings) override
 Update controls for the settings. More...
 
bool TransferDataFromWindow (EffectSettings &settings) override
 Update the given settings from controls. More...
 
unsigned TestUIFlags (unsigned mask)
 
bool Delegate (Effect &delegate, EffectSettings &settings)
 Re-invoke DoEffect on another Effect object that implements the work. More...
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={}) const
 
bool EnableApply (bool enable=true)
 
wxWindow * GetUIParent ()
 
- Public Member Functions inherited from EffectBase
 EffectBase ()
 
 ~EffectBase () override
 
void SetTracks (TrackList *pTracks)
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
virtual int ShowClientInterface (wxWindow &parent, wxDialog &dialog, EffectUIValidator *pValidator, bool forceModal=false)=0
 
virtual bool IsGraphicalUI ()=0
 
virtual std::unique_ptr< EffectUIValidatorPopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)=0
 Adds controls to a panel that is given as the parent window of S More...
 
virtual bool CanExportPresets ()=0
 
virtual void ExportPresets (const EffectSettings &settings) const =0
 
virtual OptionalMessage ImportPresets (EffectSettings &settings)=0
 
virtual bool HasOptions ()=0
 
virtual void ShowOptions ()=0
 
virtual bool ValidateUI (EffectSettings &settings)=0
 
virtual bool CloseUI ()=0
 
- Public Member Functions inherited from EffectPlugin
EffectPluginoperator= (EffectPlugin &)=delete
 
virtual ~EffectPlugin ()
 
virtual const EffectSettingsManagerGetDefinition () const =0
 
virtual int ShowHostInterface (wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)=0
 Usually applies factory to self and given access. More...
 
virtual EffectUIClientInterfaceGetEffectUIClientInterface ()=0
 Returns the EffectUIClientInterface instance for this effect. More...
 
virtual void Preview (EffectSettingsAccess &access, bool dryOnly)=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, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={}, const EffectSettingsAccessPtr &pAccess=nullptr)=0
 Unfortunately complicated dual-use function. More...
 
virtual bool TransferDataToWindow (const EffectSettings &settings)=0
 Update controls for the settings. More...
 
virtual bool TransferDataFromWindow (EffectSettings &settings)=0
 Update the given settings from controls. More...
 
- 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
 

Static Public Member Functions

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...
 

Protected Member Functions

bool EnablePreview (bool enable=true)
 
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...
 
virtual std::unique_ptr< EffectUIValidatorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
 Add controls to effect panel; always succeeds. 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)
 
std::shared_ptr< AddedAnalysisTrackAddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
TrackAddToOutputTracks (const std::shared_ptr< Track > &t)
 
- Protected Member Functions inherited from EffectBase
void Preview (EffectSettingsAccess &access, bool dryOnly) override
 
bool DoEffect (EffectSettings &settings, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent, const EffectDialogFactory &dialogFactory, const EffectSettingsAccessPtr &pAccess) override
 Unfortunately complicated dual-use function. 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

wxWeakRef< wxDialog > mHostUIDialog
 This smart pointer tracks the lifetime of the dialog. More...
 
wxWindow * mUIParent {}
 
- Protected Attributes inherited from EffectBase
BasicUI::ProgressDialogmProgress {}
 
double mProjectRate {}
 
WaveTrackFactorymFactory {}
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0 {}
 
double mT1 {}
 
wxArrayString mPresetNames
 
unsigned mUIFlags { 0 }
 

Private Member Functions

wxString GetSavedStateGroup ()
 

Private Attributes

bool mIsBatch { false }
 

Additional Inherited Members

- 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>")
 
- Static Protected Attributes inherited from EffectBase
static int nEffectsDone = 0
 

Detailed Description

Base class for many of the effects in Audacity.

Definition at line 60 of file Effect.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : long
Enumerator
DefaultMessageBoxStyle 

Definition at line 176 of file Effect.h.

176: long { DefaultMessageBoxStyle = wxOK | wxCENTRE };
@ DefaultMessageBoxStyle
Definition: Effect.h:176

Constructor & Destructor Documentation

◆ Effect()

Effect::Effect ( )

Definition at line 58 of file Effect.cpp.

59{
60}

◆ ~Effect()

Effect::~Effect ( )
virtual

Definition at line 62 of file Effect.cpp.

63{
64 // Destroying what is usually the unique Effect object of its subclass,
65 // which lasts until the end of the session.
66 // Maybe there is a non-modal realtime dialog still open.
67 if (mHostUIDialog)
68 mHostUIDialog->Close();
69}
wxWeakRef< wxDialog > mHostUIDialog
This smart pointer tracks the lifetime of the dialog.
Definition: Effect.h:306

References mHostUIDialog.

Member Function Documentation

◆ AddAnalysisTrack()

auto Effect::AddAnalysisTrack ( const wxString &  name = wxString())
protected

Definition at line 796 of file Effect.cpp.

797{
798 return std::shared_ptr<AddedAnalysisTrack>
799 { safenew AddedAnalysisTrack{ this, name } };
800}
const TranslatableString name
Definition: Distortion.cpp:82
#define safenew
Definition: MemoryX.h:10

References name, and safenew.

Referenced by EffectFindClipping::Process(), and VampEffect::Process().

Here is the caller graph for this function:

◆ AddToOutputTracks()

Track * Effect::AddToOutputTracks ( const std::shared_ptr< Track > &  t)
protected

Definition at line 760 of file Effect.cpp.

761{
762 mIMap.push_back(NULL);
763 mOMap.push_back(t.get());
764 return mOutputTracks->Add(t);
765}
std::shared_ptr< TrackList > mOutputTracks
Definition: EffectBase.h:107
std::vector< Track * > mOMap
Definition: EffectBase.h:136
std::vector< Track * > mIMap
Definition: EffectBase.h:135

References EffectBase::mIMap, EffectBase::mOMap, and EffectBase::mOutputTracks.

Referenced by NyquistEffect::ProcessOne().

Here is the caller graph for this function:

◆ CalcPreviewInputLength()

double Effect::CalcPreviewInputLength ( const EffectSettings settings,
double  previewLength 
) const
overrideprotectedvirtual

Default implementation returns previewLength

Implements EffectBase.

Reimplemented in EffectPaulstretch, EffectTimeScale, and EffectTruncSilence.

Definition at line 857 of file Effect.cpp.

859{
860 return previewLength;
861}

Referenced by PerTrackEffect::ProcessPass().

Here is the caller graph for this function:

◆ CanExportPresets()

bool Effect::CanExportPresets ( )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 320 of file Effect.cpp.

321{
322 return true;
323}

◆ CheckWhetherSkipEffect()

bool Effect::CheckWhetherSkipEffect ( const EffectSettings settings) const
overrideprotectedvirtual

Default implementation returns false.

Implements EffectBase.

Reimplemented in EffectNoiseRemoval, and EffectNormalize.

Definition at line 852 of file Effect.cpp.

853{
854 return false;
855}

◆ CloseUI()

bool Effect::CloseUI ( )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in EffectEqualization, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 313 of file Effect.cpp.

314{
315 mUIParent = nullptr;
316 mUIDialog = nullptr;
317 return true;
318}
wxWeakRef< wxDialog > mUIDialog
This weak pointer may be the same as mUIParent, or null.
Definition: EffectBase.h:121
wxWindow * mUIParent
Definition: Effect.h:307

References EffectBase::mUIDialog, and mUIParent.

Referenced by EffectEqualization::CloseUI().

Here is the caller graph for this function:

◆ CopyInputTracks()

void Effect::CopyInputTracks ( bool  allSyncLockSelected = false)
protected

Definition at line 733 of file Effect.cpp.

734{
735 // Reset map
736 mIMap.clear();
737 mOMap.clear();
738
740 const_cast<AudacityProject*>( FindProject() ) // how to remove this const_cast?
741 );
742
743 auto trackRange = mTracks->Any() +
744 [&] (const Track *pTrack) {
745 return allSyncLockSelected
747 : track_cast<const WaveTrack*>( pTrack ) && pTrack->GetSelected();
748 };
749
750 t2bHash added;
751
752 for (auto aTrack : trackRange)
753 {
754 Track *o = mOutputTracks->Add(aTrack->Duplicate());
755 mIMap.push_back(aTrack);
756 mOMap.push_back(o);
757 }
758}
std::unordered_map< void *, bool > t2bHash
Definition: Effect.cpp:45
std::enable_if_t< std::is_pointer_v< T >, T > track_cast(Track *track)
Encapsulate the checked down-casting of track pointers.
Definition: Track.h:965
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89
TrackList * mTracks
Definition: EffectBase.h:127
const AudacityProject * FindProject() const
Definition: EffectBase.cpp:319
static bool IsSelectedOrSyncLockSelected(const Track *pTrack)
Definition: SyncLock.cpp:73
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:225
static std::shared_ptr< TrackList > Create(AudacityProject *pOwner)
Definition: Track.cpp:502
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1437
A Track that contains audio waveform data.
Definition: WaveTrack.h:57

References TrackList::Any(), TrackList::Create(), EffectBase::FindProject(), SyncLock::IsSelectedOrSyncLockSelected(), EffectBase::mIMap, EffectBase::mOMap, EffectBase::mOutputTracks, and EffectBase::mTracks.

Referenced by PerTrackEffect::Process(), EffectAutoDuck::Process(), EffectChangeSpeed::Process(), EffectClickRemoval::Process(), EffectEqualization::Process(), Generator::Process(), EffectLoudness::Process(), EffectNoiseReduction::Process(), EffectNoiseRemoval::Process(), EffectNormalize::Process(), NyquistEffect::Process(), EffectPaulstretch::Process(), EffectRepair::Process(), EffectRepeat::Process(), EffectReverse::Process(), EffectSBSMS::Process(), EffectSimpleMono::Process(), EffectStereoToMono::Process(), EffectTwoPassSimpleMono::Process(), EffectTruncSilence::ProcessAll(), and EffectTruncSilence::ProcessIndependently().

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

◆ Delegate()

bool Effect::Delegate ( Effect delegate,
EffectSettings settings 
)

Re-invoke DoEffect on another Effect object that implements the work.

Definition at line 586 of file Effect.cpp.

587{
589 region.setTimes( mT0, mT1 );
590
591 return delegate.DoEffect(settings, mProjectRate, mTracks, mFactory,
592 region, mUIFlags, nullptr, nullptr, nullptr);
593}
static Settings & settings()
Definition: TrackInfo.cpp:87
double mT1
Definition: EffectBase.h:109
bool DoEffect(EffectSettings &settings, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent, const EffectDialogFactory &dialogFactory, const EffectSettingsAccessPtr &pAccess) override
Unfortunately complicated dual-use function.
Definition: EffectBase.cpp:60
WaveTrackFactory * mFactory
Definition: EffectBase.h:103
double mProjectRate
Definition: EffectBase.h:101
double mT0
Definition: EffectBase.h:108
unsigned mUIFlags
Definition: EffectBase.h:115
bool setTimes(double t0, double t1)
Definition: ViewInfo.cpp:51

References EffectBase::DoEffect(), EffectBase::mFactory, EffectBase::mProjectRate, EffectBase::mT0, EffectBase::mT1, EffectBase::mTracks, EffectBase::mUIFlags, NotifyingSelectedRegion::setTimes(), and settings().

Referenced by NyquistEffect::Process().

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

◆ EnableApply()

bool Effect::EnableApply ( bool  enable = true)

Definition at line 612 of file Effect.cpp.

613{
614 // May be called during initialization, so try to find the dialog
615 wxWindow *dlg = mUIDialog;
616 if (!dlg && mUIParent)
617 {
618 dlg = wxGetTopLevelParent(mUIParent);
619 }
620
621 if (dlg)
622 {
623 wxWindow *apply = dlg->FindWindow(wxID_APPLY);
624
625 // Don't allow focus to get trapped
626 if (!enable)
627 {
628 wxWindow *focus = dlg->FindFocus();
629 if (focus == apply)
630 {
631 dlg->FindWindow(wxID_CLOSE)->SetFocus();
632 }
633 }
634
635 if (apply)
636 apply->Enable(enable);
637 }
638
639 EnablePreview(enable);
640
641 return enable;
642}
bool EnablePreview(bool enable=true)
Definition: Effect.cpp:644

References EnablePreview(), EffectBase::mUIDialog, and mUIParent.

Referenced by EffectAmplify::CheckClip(), EffectRepeat::DisplayNewTime(), EffectPhaser::Validator::EnableApplyFromTransferDataFromWindow(), EffectWahwah::Validator::EnableApplyFromTransferDataToWindow(), EffectPhaser::Validator::EnableApplyFromValidate(), EffectWahwah::Validator::EnableApplyFromValidate(), EffectAmplify::OnAmpText(), EffectBassTreble::OnBassSlider(), EffectBassTreble::OnBassText(), EffectTruncSilence::OnControlChange(), EffectToneGen::OnControlUpdate(), EffectScienFilter::OnCutoff(), EffectBassTreble::OnGainSlider(), EffectBassTreble::OnGainText(), EffectAmplify::OnPeakText(), EffectScienFilter::OnRipple(), EffectScienFilter::OnStopbandRipple(), EffectPaulstretch::OnText(), EffectTimeScale::OnText_PitchHalfStepsEnd(), EffectTimeScale::OnText_PitchHalfStepsStart(), EffectTimeScale::OnText_PitchPercentChangeEnd(), EffectTimeScale::OnText_PitchPercentChangeStart(), EffectTimeScale::OnText_RatePercentChangeEnd(), EffectTimeScale::OnText_RatePercentChangeStart(), EffectBassTreble::OnTrebleSlider(), EffectBassTreble::OnTrebleText(), EffectChangeSpeed::UpdateUI(), EffectLoudness::UpdateUI(), and EffectNormalize::UpdateUI().

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

◆ EnablePreview()

bool Effect::EnablePreview ( bool  enable = true)
protected

Definition at line 644 of file Effect.cpp.

645{
646 // May be called during initialization, so try to find the dialog
647 wxWindow *dlg = mUIDialog;
648 if (!dlg && mUIParent)
649 {
650 dlg = wxGetTopLevelParent(mUIParent);
651 }
652
653 if (dlg)
654 {
655 wxWindow *play = dlg->FindWindow(kPlayID);
656 if (play)
657 {
658 // Don't allow focus to get trapped
659 if (!enable)
660 {
661 wxWindow *focus = dlg->FindFocus();
662 if (focus == play)
663 {
664 dlg->FindWindow(wxID_CLOSE)->SetFocus();
665 }
666 }
667
668 play->Enable(enable);
669 }
670 }
671
672 return enable;
673}
static const int kPlayID
Definition: Effect.cpp:43

References kPlayID, EffectBase::mUIDialog, and mUIParent.

Referenced by EnableApply(), and NyquistEffect::TransferDataToWindow().

Here is the caller graph for this function:

◆ ExportPresets()

void Effect::ExportPresets ( const EffectSettings settings) const
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 334 of file Effect.cpp.

335{
336 wxString params;
338 auto commandId = GetSquashedName(GetSymbol().Internal());
339 params = commandId.GET() + ":" + params;
340
341 auto path = SelectFile(FileNames::Operation::Presets,
342 XO("Export Effect Parameters"),
343 wxEmptyString,
344 wxEmptyString,
345 wxEmptyString,
346 PresetTypes(),
347 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
348 nullptr);
349 if (path.empty()) {
350 return;
351 }
352
353 // Create/Open the file
354 wxFFile f(path, wxT("wb"));
355 if (!f.IsOpened())
356 {
358 XO("Could not open file: \"%s\"").Format( path ),
359 XO("Error Saving Effect Presets"),
360 wxICON_EXCLAMATION,
361 NULL);
362 return;
363 }
364
365 f.Write(params);
366 if (f.Error())
367 {
369 XO("Error writing to file: \"%s\"").Format( path ),
370 XO("Error Saving Effect Presets"),
371 wxICON_EXCLAMATION,
372 NULL);
373 }
374
375 f.Close();
376
377
378 //SetWindowTitle();
379
380}
wxT("CloseDown"))
@ Internal
Indicates internal failure from Audacity.
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
EffectDistortion::Params params
Definition: Distortion.cpp:83
static const FileNames::FileTypes & PresetTypes()
Definition: Effect.cpp:325
#define XO(s)
Definition: Internat.h:31
FilePath SelectFile(FileNames::Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
Definition: SelectFile.cpp:17
static Identifier GetSquashedName(const Identifier &ident)
A utility that strips spaces and CamelCases a name.
bool SaveSettingsAsString(const EffectSettings &settings, wxString &parms) const override
Definition: Effect.cpp:467
ComponentInterfaceSymbol GetSymbol() const override
Definition: Effect.cpp:78
Abstract base class used in importing a file.

References AudacityMessageBox(), EffectDefinitionInterface::GetSquashedName(), GetSymbol(), Internal, params, PresetTypes(), SaveSettingsAsString(), SelectFile(), settings(), wxT(), and XO.

Here is the call graph for this function:

◆ FetchParameters()

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

Definition at line 71 of file Effect.h.

72 { return &e; }

◆ GetBounds()

void Effect::GetBounds ( const WaveTrack track,
const WaveTrack pRight,
sampleCount start,
sampleCount len 
)
protected

Definition at line 703 of file Effect.cpp.

706{
707 auto t0 = std::max( mT0, track.GetStartTime() );
708 auto t1 = std::min( mT1, track.GetEndTime() );
709
710 if ( pRight ) {
711 t0 = std::min( t0, std::max( mT0, pRight->GetStartTime() ) );
712 t1 = std::max( t1, std::min( mT1, pRight->GetEndTime() ) );
713 }
714
715 if (t1 > t0) {
716 *start = track.TimeToLongSamples(t0);
717 auto end = track.TimeToLongSamples(t1);
718 *len = end - *start;
719 }
720 else {
721 *start = 0;
722 *len = 0;
723 }
724}
int min(int a, int b)
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Definition: SampleTrack.cpp:42
double GetStartTime() const override
Get the time at which the first clip in the track starts.
Definition: WaveTrack.cpp:2005
double GetEndTime() const override
Get the time at which the last clip in the track ends, plus recorded stuff.
Definition: WaveTrack.cpp:2025
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159

References PackedArray::end(), WaveTrack::GetEndTime(), WaveTrack::GetStartTime(), min(), EffectBase::mT0, EffectBase::mT1, and SampleTrack::TimeToLongSamples().

Referenced by VampEffect::Process(), and PerTrackEffect::ProcessPass().

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

◆ GetDefinition()

const EffectSettingsManager & Effect::GetDefinition ( ) const
overridevirtual

Implements EffectPlugin.

Definition at line 448 of file Effect.cpp.

449{
450 return *this;
451}

Referenced by LoadUserPreset(), EffectChangeSpeed::OnChoice_Vinyl(), EffectChangeSpeed::PopulateOrExchange(), SaveUserPreset(), EffectChangeSpeed::TransferDataFromWindow(), EffectChangeSpeed::Update_Vinyl(), and EffectEqualization::ValidateUI().

Here is the caller graph for this function:

◆ GetDescription()

TranslatableString Effect::GetDescription ( ) const
overridevirtual

◆ GetEffectUIClientInterface()

EffectUIClientInterface * Effect::GetEffectUIClientInterface ( )
overridevirtual

Returns the EffectUIClientInterface instance for this effect.

Usually returns self. May return nullptr. EffectPlugin is responsible for the lifetime of the returned instance.

Returns
EffectUIClientInterface object or nullptr, if the effect does not implement the interface.

Implements EffectPlugin.

Definition at line 871 of file Effect.cpp.

872{
873 return this;
874}

◆ GetFactoryPresets()

RegistryPaths Effect::GetFactoryPresets ( ) const
overridevirtual

Report names of factory presets.

Implements EffectSettingsManager.

Reimplemented in EffectEqualization, LadspaEffect, LV2Effect, EffectReverb, VSTEffect, and VST3Effect.

Definition at line 263 of file Effect.cpp.

264{
265 return {};
266}

Referenced by LoadSettingsFromString().

Here is the caller graph for this function:

◆ GetFamily()

EffectFamilySymbol Effect::GetFamily ( ) const
overridevirtual

Report identifier and user-visible name of the effect protocol.

Implements EffectDefinitionInterface.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

Definition at line 105 of file Effect.cpp.

106{
107 // Unusually, the internal and visible strings differ for the built-in
108 // effect family.
109 return { wxT("Audacity"), XO("Built-in") };
110}

References wxT(), and XO.

Here is the call graph for this function:

◆ GetNumWaveGroups()

int Effect::GetNumWaveGroups ( ) const
inlineprotected

Definition at line 225 of file Effect.h.

225{ return mNumGroups; }
int mNumGroups
Definition: EffectBase.h:139

References EffectBase::mNumGroups.

Referenced by NyquistEffect::Process(), and VampEffect::Process().

Here is the caller graph for this function:

◆ GetNumWaveTracks()

int Effect::GetNumWaveTracks ( ) const
inlineprotected

Definition at line 224 of file Effect.h.

224{ return mNumTracks; }
int mNumTracks
Definition: EffectBase.h:138

References EffectBase::mNumTracks.

Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), EffectAutoDuck::ApplyDuckFade(), EffectAutoDuck::Process(), EffectNormalize::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), EffectNoiseRemoval::ShowHostInterface(), and EffectLoudness::UpdateProgress().

Here is the caller graph for this function:

◆ GetPath()

PluginPath Effect::GetPath ( ) const
overridevirtual

Implements ComponentInterface.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

Definition at line 73 of file Effect.cpp.

74{
76}
#define BUILTIN_EFFECT_PREFIX
Definition: Effect.h:19
const wxString & Internal() const

References BUILTIN_EFFECT_PREFIX, GetSymbol(), and ComponentInterfaceSymbol::Internal().

Here is the call graph for this function:

◆ GetSavedStateGroup()

wxString Effect::GetSavedStateGroup ( )
private

Definition at line 460 of file Effect.cpp.

461{
462 return wxT("SavedState");
463}

References wxT().

Referenced by SetBatchProcessing(), and UnsetBatchProcessing().

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

◆ GetSelectionFormat()

NumericFormatSymbol Effect::GetSelectionFormat ( )
virtual

Definition at line 453 of file Effect.cpp.

454{
455 if( !IsBatchProcessing() && FindProject() )
458}
bool IsBatchProcessing() const override
Definition: Effect.cpp:559
static NumericFormatSymbol HoursMinsSecondsFormat()
static ProjectSettings & Get(AudacityProject &project)
const NumericFormatSymbol & GetSelectionFormat() const

References EffectBase::FindProject(), ProjectSettings::Get(), ProjectSettings::GetSelectionFormat(), NumericConverter::HoursMinsSecondsFormat(), and IsBatchProcessing().

Referenced by NyquistEffect::BuildEffectWindow(), and EffectRepeat::DisplayNewTime().

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

◆ GetSymbol()

ComponentInterfaceSymbol Effect::GetSymbol ( ) const
overridevirtual

Implements ComponentInterface.

Reimplemented in EffectEqualization, EffectFade, EffectFindClipping, EffectInvert, LadspaEffect, EffectLoudness, LV2Effect, EffectNoise, EffectNoiseReduction, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectPhaser, EffectRepair, EffectRepeat, EffectReverb, EffectReverse, EffectSBSMS, EffectScienFilter, EffectSilence, EffectStereoToMono, EffectTimeScale, EffectToneGen, EffectTruncSilence, VampEffect, VSTEffect, VST3Effect, and EffectWahwah.

Definition at line 78 of file Effect.cpp.

79{
80 return {};
81}

Referenced by ExportPresets(), GetPath(), and ImportPresets().

Here is the caller graph for this function:

◆ GetType()

EffectType Effect::GetType ( ) const
overridevirtual

Type determines how it behaves.

Implements EffectDefinitionInterface.

Reimplemented in EffectEqualization, EffectFade, EffectFindClipping, EffectInvert, LadspaEffect, EffectLoudness, LV2Effect, EffectNoise, EffectNoiseReduction, EffectNoiseRemoval, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectPhaser, EffectRepair, EffectRepeat, EffectReverb, EffectReverse, EffectScienFilter, EffectSilence, EffectStereoToMono, EffectTimeScale, EffectToneGen, EffectTruncSilence, VampEffect, VSTEffect, VST3Effect, and EffectWahwah.

Definition at line 100 of file Effect.cpp.

101{
102 return EffectTypeNone;
103}
@ EffectTypeNone

References EffectTypeNone.

Referenced by PerTrackEffect::ProcessPass().

Here is the caller graph for this function:

◆ GetUIParent()

wxWindow * Effect::GetUIParent ( )
inline

Definition at line 310 of file Effect.h.

310{ return mUIParent; }

Referenced by EffectPhaser::Validator::EnableApplyFromTransferDataFromWindow(), EffectWahwah::Validator::EnableApplyFromTransferDataToWindow(), EffectPhaser::Validator::EnableApplyFromValidate(), EffectWahwah::Validator::EnableApplyFromValidate(), EffectPhaser::Validator::UpdateUI(), and EffectPhaser::Validator::ValidateUI().

Here is the caller graph for this function:

◆ GetVendor()

VendorSymbol Effect::GetVendor ( ) const
overridevirtual

Implements ComponentInterface.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

Definition at line 83 of file Effect.cpp.

84{
85 return XO("Audacity");
86}

References XO.

◆ GetVersion()

wxString Effect::GetVersion ( ) const
overridevirtual

Implements ComponentInterface.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

Definition at line 88 of file Effect.cpp.

89{
90 return AUDACITY_VERSION_STRING;
91}

◆ HasOptions()

bool Effect::HasOptions ( )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 437 of file Effect.cpp.

438{
439 return false;
440}

◆ ImportPresets()

OptionalMessage Effect::ImportPresets ( EffectSettings settings)
overridevirtual
Returns
nullopt for failure

Implements EffectUIClientInterface.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 382 of file Effect.cpp.

383{
384 wxString params;
385
386 auto path = SelectFile(FileNames::Operation::Presets,
387 XO("Import Effect Parameters"),
388 wxEmptyString,
389 wxEmptyString,
390 wxEmptyString,
391 PresetTypes(),
392 wxFD_OPEN | wxRESIZE_BORDER,
393 nullptr);
394 if (path.empty()) {
395 return {};
396 }
397
398 wxFFile f(path);
399 if (!f.IsOpened())
400 return {};
401
402 OptionalMessage result{};
403
404 if (f.ReadAll(&params)) {
405 wxString ident = params.BeforeFirst(':');
406 params = params.AfterFirst(':');
407
408 auto commandId = GetSquashedName(GetSymbol().Internal());
409
410 if (ident != commandId) {
411 // effect identifiers are a sensible length!
412 // must also have some params.
413 if ((params.Length() < 2 ) || (ident.Length() < 2) || (ident.Length() > 30))
414 {
416 /* i18n-hint %s will be replaced by a file name */
417 XO("%s: is not a valid presets file.\n")
418 .Format(wxFileNameFromPath(path)));
419 }
420 else
421 {
423 /* i18n-hint %s will be replaced by a file name */
424 XO("%s: is for a different Effect, Generator or Analyzer.\n")
425 .Format(wxFileNameFromPath(path)));
426 }
427 return {};
428 }
430 }
431
432 //SetWindowTitle();
433
434 return result;
435}
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
static CommandHandlerObject & ident(AudacityProject &project)
OptionalMessage LoadSettingsFromString(const wxString &parms, EffectSettings &settings) const override
Definition: Effect.cpp:485
int MessageBox(const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={}) const
Definition: Effect.cpp:863

References EffectDefinitionInterface::GetSquashedName(), GetSymbol(), ident(), Internal, LoadSettingsFromString(), MessageBox(), params, PresetTypes(), SelectFile(), settings(), and XO.

Here is the call graph for this function:

◆ IncEffectCounter()

static void Effect::IncEffectCounter ( )
inlinestatic

Definition at line 181 of file Effect.h.

181{ nEffectsDone++;}
static int nEffectsDone
Definition: EffectBase.h:93

Referenced by SelectTracksCommand::Apply().

Here is the caller graph for this function:

◆ IsBatchProcessing()

bool Effect::IsBatchProcessing ( ) const
overridevirtual

Implements EffectPlugin.

Definition at line 559 of file Effect.cpp.

560{
561 return mIsBatch;
562}
bool mIsBatch
Definition: Effect.h:315

References mIsBatch.

Referenced by NyquistEffect::DoLoadSettings(), GetSelectionFormat(), EffectAmplify::Parameters(), EffectAmplify::PopulateOrExchange(), NyquistEffect::Process(), EffectNoiseReduction::ShowHostInterface(), and NyquistEffect::ShowHostInterface().

Here is the caller graph for this function:

◆ IsDefault()

bool Effect::IsDefault ( ) const
overridevirtual

Whether the effect sorts "above the line" in the menus.

Implements EffectDefinitionInterface.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

Definition at line 117 of file Effect.cpp.

118{
119 return true;
120}

◆ IsGraphicalUI()

bool Effect::IsGraphicalUI ( )
overridevirtual
Returns
false

Implements EffectUIClientInterface.

Reimplemented in VSTEffect.

Definition at line 303 of file Effect.cpp.

304{
305 return false;
306}

◆ IsInteractive()

bool Effect::IsInteractive ( ) const
overridevirtual

Whether the effect needs a dialog for entry of settings.

Implements EffectDefinitionInterface.

Reimplemented in EffectFade, EffectInvert, LadspaEffect, LV2Effect, NyquistEffect, EffectRepair, EffectReverse, EffectStereoToMono, VampEffect, VSTEffect, and VST3Effect.

Definition at line 112 of file Effect.cpp.

113{
114 return true;
115}

Referenced by ShowHostInterface().

Here is the caller graph for this function:

◆ LoadFactoryDefaults()

OptionalMessage Effect::LoadFactoryDefaults ( EffectSettings settings) const
overridevirtual

Change settings back to "factory default"

Returns
nullopt for failure

Implements EffectSettingsManager.

Reimplemented in EffectEqualization.

Definition at line 273 of file Effect.cpp.

274{
276}
const RegistryPath & FactoryDefaultsGroup()
Component of a configuration key path, for default state of MakeSettings()
OptionalMessage LoadUserPreset(const RegistryPath &name, EffectSettings &settings) const override
Definition: Effect.cpp:238

References FactoryDefaultsGroup(), LoadUserPreset(), and settings().

Referenced by EffectChangeSpeed::DoLoadFactoryDefaults(), and EffectEqualization::DoLoadFactoryDefaults().

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

◆ LoadFactoryPreset()

OptionalMessage Effect::LoadFactoryPreset ( int  id,
EffectSettings settings 
) const
overridevirtual

Change settings to the preset whose name is GetFactoryPresets()[id]

Returns
nullopt for failure

Implements EffectSettingsManager.

Reimplemented in EffectEqualization, LadspaEffect, LV2Effect, EffectReverb, VSTEffect, and VST3Effect.

Definition at line 268 of file Effect.cpp.

269{
270 return { nullptr };
271}

Referenced by LoadSettingsFromString().

Here is the caller graph for this function:

◆ LoadSettings()

bool Effect::LoadSettings ( const CommandParameters parms,
EffectSettings settings 
) const
overridevirtual

Restore settings from keys and values.

Returns
true on success

Implements EffectSettingsManager.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, EffectTruncSilence, VampEffect, VSTEffect, and VST3Effect.

Definition at line 230 of file Effect.cpp.

232{
233 // The first argument, and with it the const_cast, will disappear when
234 // all built-in effects are stateless.
235 return Parameters().Set( *const_cast<Effect*>(this), parms, settings );
236}
Base class for many of the effects in Audacity.
Definition: Effect.h:63
virtual const EffectParameterMethods & Parameters() const
Definition: Effect.cpp:141
virtual bool Set(Effect &effect, const CommandParameters &parms, EffectSettings &settings) const =0

References Parameters(), EffectParameterMethods::Set(), and settings().

Referenced by EffectTruncSilence::LoadSettings(), and LoadSettingsFromString().

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

◆ LoadSettingsFromString()

OptionalMessage Effect::LoadSettingsFromString ( const wxString &  parms,
EffectSettings settings 
) const
overridevirtual

Implements EffectPlugin.

Definition at line 485 of file Effect.cpp.

487{
488 // If the string starts with one of certain significant substrings,
489 // then the rest of the string is reinterpreted as part of a registry key,
490 // and a user or factory preset is then loaded.
491 // (Where did these prefixes come from? See EffectPresetsDialog; and
492 // ultimately the uses of it by EffectManager::GetPreset, which is used by
493 // the macro management dialog)
494 wxString preset = parms;
495 OptionalMessage result;
496 if (preset.StartsWith(kUserPresetIdent))
497 {
498 preset.Replace(kUserPresetIdent, wxEmptyString, false);
500 }
501 else if (preset.StartsWith(kFactoryPresetIdent))
502 {
503 preset.Replace(kFactoryPresetIdent, wxEmptyString, false);
504 auto presets = GetFactoryPresets();
505 result = LoadFactoryPreset(
506 make_iterator_range( presets ).index( preset ), settings );
507 }
508 else if (preset.StartsWith(kCurrentSettingsIdent))
509 {
510 preset.Replace(kCurrentSettingsIdent, wxEmptyString, false);
512 }
513 else if (preset.StartsWith(kFactoryDefaultsIdent))
514 {
515 preset.Replace(kFactoryDefaultsIdent, wxEmptyString, false);
517 }
518 else
519 {
520 // If the string did not start with any of the significant substrings,
521 // then use VisitSettings or LoadSettings to reinterpret it,
522 // or use LoadSettings.
523 // This interprets what was written by SaveSettings, above.
524 CommandParameters eap(parms);
526 S.SetForValidating( &eap );
527 // VisitSettings returns false if not defined for this effect.
528 // To do: fix const_cast in use of VisitSettings
529 if ( !const_cast<Effect*>(this)->VisitSettings(S, settings) ) {
530 // the old method...
531 if (LoadSettings(eap, settings))
532 return { nullptr };
533 }
534 else if( !S.bOK )
535 result = {};
536 else{
537 result = { nullptr };
538 S.SetForWriting( &eap );
539 const_cast<Effect*>(this)->VisitSettings(S, settings);
540 }
541 }
542
543 if (!result)
544 {
546 XO("%s: Could not load settings below. Default settings will be used.\n\n%s")
547 .Format( GetName(), preset ) );
548 // We are using default settings and we still wish to continue.
549 result = { nullptr };
550 //return false;
551 }
552 return result;
553}
RegistryPath UserPresetsGroup(const RegistryPath &name)
Compute part of a registry path, given a name which may be empty.
const RegistryPath & CurrentSettingsGroup()
Component of a configuration key path, for last-used destructive settings.
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
Definition: MemoryX.h:431
EffectReverbSettings preset
Definition: Reverb.cpp:46
#define S(N)
Definition: ToChars.cpp:64
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
TranslatableString GetName() const
bool VisitSettings(SettingsVisitor &visitor, EffectSettings &settings) override
Definition: Effect.cpp:210
bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const override
Restore settings from keys and values.
Definition: Effect.cpp:230
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
Definition: Effect.cpp:268
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
Definition: Effect.cpp:263
static const wxString kUserPresetIdent
Definition: EffectPlugin.h:58
static const wxString kFactoryPresetIdent
Definition: EffectPlugin.h:59
static const wxString kCurrentSettingsIdent
Definition: EffectPlugin.h:60
static const wxString kFactoryDefaultsIdent
Definition: EffectPlugin.h:61
SettingsVisitor that sets parameters to a value (from a string)

References CurrentSettingsGroup(), FactoryDefaultsGroup(), GetFactoryPresets(), ComponentInterface::GetName(), EffectPlugin::kCurrentSettingsIdent, EffectPlugin::kFactoryDefaultsIdent, EffectPlugin::kFactoryPresetIdent, EffectPlugin::kUserPresetIdent, LoadFactoryPreset(), LoadSettings(), LoadUserPreset(), make_iterator_range(), MessageBox(), preset, S, settings(), UserPresetsGroup(), VisitSettings(), and XO.

Referenced by ImportPresets(), and LoadUserPreset().

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

◆ LoadUserPreset()

OptionalMessage Effect::LoadUserPreset ( const RegistryPath name,
EffectSettings settings 
) const
overridevirtual

Change settings to a user-named preset

Returns
nullopt for failure

Implements EffectSettingsManager.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 238 of file Effect.cpp.

240{
241 // Find one string in the registry and then reinterpret it
242 // as complete settings
243 wxString parms;
245 name, wxT("Parameters"), parms))
246 return {};
247
248 return LoadSettingsFromString(parms, settings);
249}
const EffectSettingsManager & GetDefinition() const override
Definition: Effect.cpp:448
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)

References PluginSettings::GetConfig(), GetDefinition(), LoadSettingsFromString(), name, PluginSettings::Private, settings(), and wxT().

Referenced by LoadFactoryDefaults(), LoadSettingsFromString(), and UnsetBatchProcessing().

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

◆ MessageBox()

int Effect::MessageBox ( const TranslatableString message,
long  style = DefaultMessageBoxStyle,
const TranslatableString titleStr = {} 
) const

Definition at line 863 of file Effect.cpp.

865{
866 auto title = titleStr.empty()
867 ? GetName()
868 : XO("%s: %s").Format( GetName(), titleStr );
869 return AudacityMessageBox( message, title, style, mUIParent );
870}
static const auto title

References AudacityMessageBox(), TranslatableString::empty(), ComponentInterface::GetName(), mUIParent, title, and XO.

Referenced by ImportPresets(), EffectAutoDuck::Init(), EffectEqualization::Init(), NyquistEffect::Init(), EffectScienFilter::Init(), VampEffect::Init(), EffectEqualization::LoadCurves(), LoadSettingsFromString(), NyquistEffect::OnLoad(), NyquistEffect::OnSave(), NyquistEffect::OnTime(), NyquistEffect::ParseProgram(), EffectClickRemoval::Process(), Generator::Process(), EffectNoiseReduction::Process(), NyquistEffect::Process(), EffectRepair::Process(), VampEffect::Process(), EffectTruncSilence::ProcessIndependently(), EffectDtmf::Instance::ProcessInitialize(), EffectEcho::Instance::ProcessInitialize(), NyquistEffect::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectFindClipping::ProcessOne(), EffectPaulstretch::ProcessOne(), EffectEqualization::setCurve(), NyquistEffect::TransferDataFromEffectWindow(), and EffectEqualization::ValidateUI().

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

◆ ModifyAnalysisTrack()

auto Effect::ModifyAnalysisTrack ( const LabelTrack pOrigTrack,
const wxString &  name = wxString() 
)
protected

Definition at line 846 of file Effect.cpp.

848{
849 return{ this, pOrigTrack, name };
850}

References name.

Referenced by EffectFindClipping::Process().

Here is the caller graph for this function:

◆ Parameters()

const EffectParameterMethods & Effect::Parameters ( ) const
virtual

Reimplemented in EffectAmplify, EffectAutoDuck, EffectBassTreble, EffectChangeSpeed, EffectClickRemoval, EffectCompressor, EffectDistortion, EffectDtmf, EffectEcho, EffectEqualization, EffectFindClipping, EffectLoudness, EffectNoise, EffectNormalize, EffectPaulstretch, EffectPhaser, EffectRepeat, EffectReverb, EffectScienFilter, EffectTimeScale, EffectToneGen, EffectTruncSilence, and EffectWahwah.

Definition at line 141 of file Effect.cpp.

142{
143 static const CapturedParameters<Effect> empty;
144 return empty;
145}
Generates EffectParameterMethods overrides from variadic template arguments.

Referenced by LoadSettings(), SaveSettings(), EffectNoiseReduction::TrackProgress(), and VisitSettings().

Here is the caller graph for this function:

◆ PopulateOrExchange()

std::unique_ptr< EffectUIValidator > Effect::PopulateOrExchange ( ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access,
const EffectOutputs pOutputs 
)
protectedvirtual

Add controls to effect panel; always succeeds.

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

Reimplemented in EffectAmplify, EffectAutoDuck, EffectBassTreble, EffectChangeSpeed, EffectClickRemoval, EffectCompressor, EffectDistortion, EffectDtmf, EffectEcho, EffectEqualization, EffectFindClipping, LadspaEffect, EffectLoudness, EffectNoise, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectPhaser, EffectRepeat, EffectReverb, EffectScienFilter, EffectSilence, EffectTimeScale, EffectToneGen, EffectTruncSilence, VampEffect, and EffectWahwah.

Definition at line 595 of file Effect.cpp.

598{
599 return nullptr;
600}

Referenced by PopulateUI().

Here is the caller graph for this function:

◆ PopulateUI()

std::unique_ptr< EffectUIValidator > Effect::PopulateUI ( ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access,
const EffectOutputs pOutputs 
)
overridevirtual

Adds controls to a panel that is given as the parent window of S

Parameters
Sinterface for adding controls to a panel in a dialog
instanceguaranteed to have a lifetime containing that of the returned object
accessguaranteed to have a lifetime containing that of the returned object
pOutputsnull, or else points to outputs with lifetime containing that of the returned object
Returns
null for failure; else an object invoked to retrieve values of UI controls; it might also hold some state needed to implement event handlers of the controls; it will exist only while the dialog continues to exist

Implements EffectUIClientInterface.

Reimplemented in LV2Effect, VSTEffect, and VST3Effect.

Definition at line 280 of file Effect.cpp.

283{
284 auto parent = S.GetParent();
285 mUIParent = parent;
286
287// LoadUserPreset(CurrentSettingsGroup());
288
289 // Let the effect subclass provide its own validator if it wants
290 auto result = PopulateOrExchange(S, instance, access, pOutputs);
291
292 mUIParent->SetMinSize(mUIParent->GetSizer()->GetMinSize());
293
294 if (!result) {
295 // No custom validator object? Then use the default
296 result = std::make_unique<DefaultEffectUIValidator>(
297 *this, access, S.GetParent());
298 mUIParent->PushEventHandler(this);
299 }
300 return result;
301}
virtual std::unique_ptr< EffectUIValidator > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
Add controls to effect panel; always succeeds.
Definition: Effect.cpp:595

References mUIParent, PopulateOrExchange(), and S.

Here is the call graph for this function:

◆ RealtimeSupport()

auto Effect::RealtimeSupport ( ) const
overridevirtual

Since which version of Audacity has the effect supported realtime?

Implements EffectDefinitionInterface.

Reimplemented in LadspaEffect, LV2Effect, EffectPhaser, EffectReverb, VSTEffect, VST3Effect, and EffectWahwah.

Definition at line 122 of file Effect.cpp.

References EffectDefinitionInterface::Never.

◆ SaveSettings()

bool Effect::SaveSettings ( const EffectSettings settings,
CommandParameters parms 
) const
overridevirtual

Store settings as keys and values.

The override may assume parms is initially empty

Returns
true on success

Implements EffectSettingsManager.

Reimplemented in LadspaEffect, LV2Effect, NyquistEffect, VampEffect, VSTEffect, and VST3Effect.

Definition at line 223 of file Effect.cpp.

225{
226 Parameters().Get( *this, settings, parms );
227 return true;
228}
virtual void Get(const Effect &effect, const EffectSettings &settings, CommandParameters &parms) const =0

References EffectParameterMethods::Get(), Parameters(), and settings().

Referenced by SaveSettingsAsString().

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

◆ SaveSettingsAsString()

bool Effect::SaveSettingsAsString ( const EffectSettings settings,
wxString &  parms 
) const
overridevirtual

Implements EffectPlugin.

Definition at line 467 of file Effect.cpp.

469{
472 S.mpEap = &eap;
473 if( VisitSettings( S, settings ) ){
474 ;// got eap value using VisitSettings.
475 }
476 // Won't be needed in future
477 else if (!SaveSettings(settings, eap))
478 {
479 return false;
480 }
481
482 return eap.GetParameters(parms);
483}
bool GetParameters(wxString &parms)
bool SaveSettings(const EffectSettings &settings, CommandParameters &parms) const override
Store settings as keys and values.
Definition: Effect.cpp:223
SettingsVisitor that gets parameter values into a string.

References CommandParameters::GetParameters(), S, SaveSettings(), settings(), and VisitSettings().

Referenced by ExportPresets(), and SaveUserPreset().

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

◆ SaveUserPreset()

bool Effect::SaveUserPreset ( const RegistryPath name,
const EffectSettings settings 
) const
overridevirtual

Save settings in the configuration file as a user-named preset.

Implements EffectSettingsManager.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 251 of file Effect.cpp.

253{
254 // Save all settings as a single string value in the registry
255 wxString parms;
256 if (!SaveSettingsAsString(settings, parms))
257 return false;
258
260 name, wxT("Parameters"), parms);
261}
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)

References GetDefinition(), name, PluginSettings::Private, SaveSettingsAsString(), PluginSettings::SetConfig(), settings(), and wxT().

Referenced by SetBatchProcessing().

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

◆ SetBatchProcessing()

void Effect::SetBatchProcessing ( )
overridevirtual

Implements EffectPlugin.

Definition at line 564 of file Effect.cpp.

565{
566 mIsBatch = true;
567 // Save effect's internal state in a special registry path
568 // just for this purpose
569 // If effect is not stateful, this step doesn't really matter, and the
570 // settings object is a dummy
571 auto dummySettings = MakeSettings();
572 SaveUserPreset(GetSavedStateGroup(), dummySettings);
573}
bool SaveUserPreset(const RegistryPath &name, const EffectSettings &settings) const override
Save settings in the configuration file as a user-named preset.
Definition: Effect.cpp:251
wxString GetSavedStateGroup()
Definition: Effect.cpp:460
virtual EffectSettings MakeSettings() const

References GetSavedStateGroup(), EffectSettingsManager::MakeSettings(), mIsBatch, and SaveUserPreset().

Referenced by NyquistEffect::ShowHostInterface().

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

◆ ShowClientInterface()

int Effect::ShowClientInterface ( wxWindow &  parent,
wxDialog &  dialog,
EffectUIValidator pValidator,
bool  forceModal 
)
overridevirtual
Returns
0 if destructive effect processing should not proceed (and there may be a non-modal dialog still opened); otherwise, modal dialog return code

Implements EffectUIClientInterface.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 147 of file Effect.cpp.

149{
150 // Remember the dialog with a weak pointer, but don't control its lifetime
151 mUIDialog = &dialog;
152 mUIDialog->Layout();
153 mUIDialog->Fit();
154 mUIDialog->SetMinSize(mUIDialog->GetSize());
156 return 0;
157 if (SupportsRealtime() && !forceModal) {
158 mUIDialog->Show();
159 // Return false to bypass effect processing
160 return 0;
161 }
162 return mUIDialog->ShowModal();
163}
static result_type Call(Arguments &&...arguments)
Null check of the installed function is done for you.

References GlobalHook< VetoDialogHook, bool(wxDialog *) >::Call(), EffectBase::mUIDialog, and EffectDefinitionInterface::SupportsRealtime().

Here is the call graph for this function:

◆ ShowHostInterface()

int Effect::ShowHostInterface ( wxWindow &  parent,
const EffectDialogFactory factory,
std::shared_ptr< EffectInstance > &  pInstance,
EffectSettingsAccess access,
bool  forceModal = false 
)
overridevirtual

Usually applies factory to self and given access.

But there are a few unusual overrides for historical reasons

Parameters
pInstancemay be passed to factory, and is only guaranteed to have lifetime suitable for a modal dialog, unless the dialog stores a copy of pInstance
accessis only guaranteed to have lifetime suitable for a modal dialog, unless the dialog stores access.shared_from_this()
Returns
0 if destructive effect processing should not proceed (and there may be a non-modal dialog still opened); otherwise, modal dialog return code

Implements EffectPlugin.

Reimplemented in EffectNoiseReduction, EffectNoiseRemoval, and NyquistEffect.

Definition at line 165 of file Effect.cpp.

169{
170 if (!IsInteractive())
171 // Effect without UI just proceeds quietly to apply it destructively.
172 return wxID_APPLY;
173
174 if (mHostUIDialog)
175 {
176 // Realtime effect has shown its nonmodal dialog, now hides it, and does
177 // nothing else.
178 if ( mHostUIDialog->Close(true) )
179 mHostUIDialog = nullptr;
180 return 0;
181 }
182
183 // Create the dialog
184 // Host, not client, is responsible for invoking the factory and managing
185 // the lifetime of the dialog.
186 // The usual factory lets the client (which is this, when self-hosting)
187 // populate it. That factory function is called indirectly through a
188 // std::function to avoid source code dependency cycles.
189 EffectUIClientInterface *const client = this;
190 auto results = factory(parent, *this, *client, access);
191 mHostUIDialog = results.pDialog;
192 pInstance = results.pInstance;
193 if (!mHostUIDialog)
194 return 0;
195
196 // Let the client show the dialog and decide whether to keep it open
197 auto result = client->ShowClientInterface(parent, *mHostUIDialog,
198 results.pValidator, forceModal);
199 if (mHostUIDialog && !mHostUIDialog->IsShown())
200 // Client didn't show it, or showed it modally and closed it
201 // So destroy it.
202 // (I think mHostUIDialog only needs to be a local variable in this
203 // function -- that it is always null when the function begins -- but
204 // that may change. PRL)
205 mHostUIDialog->Destroy();
206
207 return result;
208}
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
Definition: Effect.cpp:112
EffectUIClientInterface is an abstract base class to populate a UI and validate UI values....
virtual int ShowClientInterface(wxWindow &parent, wxDialog &dialog, EffectUIValidator *pValidator, bool forceModal=false)=0
static RegisteredToolbarFactory factory

References cloud::factory, IsInteractive(), mHostUIDialog, and EffectUIClientInterface::ShowClientInterface().

Referenced by NyquistEffect::ShowHostInterface().

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

◆ ShowOptions()

void Effect::ShowOptions ( )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in LadspaEffect, LV2Effect, VSTEffect, and VST3Effect.

Definition at line 442 of file Effect.cpp.

443{
444}

◆ SupportsAutomation()

bool Effect::SupportsAutomation ( ) const
overridevirtual

Whether the effect has any automatable controls.

Implements EffectDefinitionInterface.

Reimplemented in LadspaEffect, LV2Effect, EffectNoiseRemoval, VSTEffect, and VST3Effect.

Definition at line 127 of file Effect.cpp.

128{
129 return true;
130}

◆ TestUIFlags()

unsigned Effect::TestUIFlags ( unsigned  mask)

Definition at line 555 of file Effect.cpp.

555 {
556 return mask & mUIFlags;
557}

References EffectBase::mUIFlags.

Referenced by NyquistEffect::ShowHostInterface().

Here is the caller graph for this function:

◆ TotalProgress()

bool Effect::TotalProgress ( double  frac,
const TranslatableString msg = {} 
) const
protected

Definition at line 675 of file Effect.cpp.

676{
677 auto updateResult = (mProgress ?
678 mProgress->Poll(frac * 1000, 1000, msg) :
680 return (updateResult != ProgressResult::Success);
681}
virtual ProgressResult Poll(unsigned long long numerator, unsigned long long denominator, const TranslatableString &message={})=0
Update the bar and poll for clicks. Call only on the main thread.
BasicUI::ProgressDialog * mProgress
Definition: EffectBase.h:100

References EffectBase::mProgress, BasicUI::ProgressDialog::Poll(), and BasicUI::Success.

Referenced by EffectNormalize::AnalyseTrackData(), EffectTruncSilence::Analyze(), EffectAutoDuck::ApplyDuckFade(), EffectTruncSilence::DoRemoval(), NyquistEffect::GetCallback(), EffectAutoDuck::Process(), EffectStereoToMono::ProcessOne(), EffectNormalize::ProcessOne(), EffectTwoPassSimpleMono::ProcessOne(), NyquistEffect::PutCallback(), and EffectLoudness::UpdateProgress().

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

◆ TrackGroupProgress()

bool Effect::TrackGroupProgress ( int  whichGroup,
double  frac,
const TranslatableString msg = {} 
) const
protected

Definition at line 693 of file Effect.cpp.

695{
696 auto updateResult = (mProgress ?
697 mProgress->Poll((whichGroup + frac) * 1000,
698 (double) mNumGroups * 1000, msg) :
700 return (updateResult != ProgressResult::Success);
701}

References EffectBase::mNumGroups, EffectBase::mProgress, BasicUI::ProgressDialog::Poll(), and BasicUI::Success.

Referenced by VampEffect::Process(), NyquistEffect::ProcessOne(), and PerTrackEffect::ProcessPass().

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

◆ TrackProgress()

bool Effect::TrackProgress ( int  whichTrack,
double  frac,
const TranslatableString msg = {} 
) const
protected

Definition at line 683 of file Effect.cpp.

685{
686 auto updateResult = (mProgress ?
687 mProgress->Poll((whichTrack + frac) * 1000,
688 (double) mNumTracks * 1000, msg) :
690 return (updateResult != ProgressResult::Success);
691}

References EffectBase::mNumTracks, EffectBase::mProgress, BasicUI::ProgressDialog::Poll(), and BasicUI::Success.

Referenced by BlockGenerator::GenerateTrack(), EffectRepeat::Process(), EffectSBSMS::Process(), VampEffect::Process(), NyquistEffect::ProcessOne(), EffectEqualization::ProcessOne(), EffectClickRemoval::ProcessOne(), EffectNoiseRemoval::ProcessOne(), EffectRepair::ProcessOne(), EffectFindClipping::ProcessOne(), EffectChangeSpeed::ProcessOne(), EffectSimpleMono::ProcessOne(), EffectPaulstretch::ProcessOne(), EffectReverse::ProcessOneClip(), and PerTrackEffect::ProcessPass().

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

◆ TransferDataFromWindow()

bool Effect::TransferDataFromWindow ( EffectSettings settings)
overridevirtual

Update the given settings from controls.

Implements EffectPlugin.

Reimplemented in EffectFindClipping, EffectLoudness, EffectNoise, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectRepeat, EffectScienFilter, EffectSilence, EffectTimeScale, EffectToneGen, EffectTruncSilence, and VampEffect.

Definition at line 607 of file Effect.cpp.

608{
609 return true;
610}

Referenced by EffectNoiseReduction::Dialog::OnGetProfile(), EffectNoiseReduction::Dialog::OnPreview(), and EffectNoiseReduction::Dialog::OnReduceNoise().

Here is the caller graph for this function:

◆ TransferDataToWindow()

bool Effect::TransferDataToWindow ( const EffectSettings settings)
overridevirtual

Update controls for the settings.

Implements EffectPlugin.

Reimplemented in EffectEqualization, EffectFindClipping, EffectLoudness, EffectNoise, EffectNormalize, NyquistEffect, EffectPaulstretch, EffectRepeat, EffectScienFilter, EffectSilence, EffectTimeScale, EffectToneGen, EffectTruncSilence, and VampEffect.

Definition at line 602 of file Effect.cpp.

603{
604 return true;
605}

◆ UnsetBatchProcessing()

void Effect::UnsetBatchProcessing ( )
overridevirtual

Implements EffectPlugin.

Definition at line 575 of file Effect.cpp.

576{
577 mIsBatch = false;
578 // Restore effect's internal state from registry
579 // If effect is not stateful, this call doesn't really matter, and the
580 // settings object is a dummy
581 auto dummySettings = MakeSettings();
582 // Ignore failure
583 (void ) LoadUserPreset(GetSavedStateGroup(), dummySettings);
584}

References GetSavedStateGroup(), LoadUserPreset(), EffectSettingsManager::MakeSettings(), and mIsBatch.

Here is the call graph for this function:

◆ ValidateUI()

bool Effect::ValidateUI ( EffectSettings )
overridevirtual

Implements EffectUIClientInterface.

Reimplemented in EffectEqualization.

Definition at line 308 of file Effect.cpp.

309{
310 return true;
311}

Referenced by LadspaEffect::Validator::OnCheckBox(), EffectPhaser::Validator::OnDepthSlider(), EffectWahwah::Validator::OnDepthSlider(), EffectPhaser::Validator::OnDepthText(), EffectWahwah::Validator::OnDepthText(), EffectPhaser::Validator::OnDryWetSlider(), EffectPhaser::Validator::OnDryWetText(), EffectPhaser::Validator::OnFeedbackSlider(), EffectPhaser::Validator::OnFeedbackText(), EffectWahwah::Validator::OnFreqOffSlider(), EffectWahwah::Validator::OnFreqOffText(), EffectPhaser::Validator::OnFreqSlider(), EffectWahwah::Validator::OnFreqSlider(), EffectPhaser::Validator::OnFreqText(), EffectWahwah::Validator::OnFreqText(), EffectPhaser::Validator::OnGainSlider(), EffectWahwah::Validator::OnGainSlider(), EffectPhaser::Validator::OnGainText(), EffectWahwah::Validator::OnGainText(), EffectPhaser::Validator::OnPhaseSlider(), EffectWahwah::Validator::OnPhaseSlider(), EffectPhaser::Validator::OnPhaseText(), EffectWahwah::Validator::OnPhaseText(), EffectWahwah::Validator::OnResonanceSlider(), EffectWahwah::Validator::OnResonanceText(), LadspaEffect::Validator::OnSlider(), EffectPhaser::Validator::OnStagesSlider(), EffectPhaser::Validator::OnStagesText(), LadspaEffect::Validator::OnTextCtrl(), and SpinSliderHandlers().

Here is the caller graph for this function:

◆ VisitSettings() [1/2]

bool Effect::VisitSettings ( ConstSettingsVisitor visitor,
const EffectSettings settings 
) const
overridevirtual

Visit settings (read-only), if defined. false means no defined settings. Default implementation returns false

Reimplemented from EffectSettingsManager.

Reimplemented in EffectEqualization, and NyquistEffect.

Definition at line 216 of file Effect.cpp.

218{
219 Parameters().Visit(*this, visitor, settings);
220 return true;
221}
virtual void Visit(Effect &effect, SettingsVisitor &visitor, EffectSettings &settings) const =0

◆ VisitSettings() [2/2]

bool Effect::VisitSettings ( SettingsVisitor visitor,
EffectSettings settings 
)
overridevirtual

Visit settings (and maybe change them), if defined. false means no defined settings. Default implementation returns false

Reimplemented from EffectSettingsManager.

Reimplemented in EffectEqualization, and NyquistEffect.

Definition at line 210 of file Effect.cpp.

211{
212 Parameters().Visit(*this, visitor, settings);
213 return true;
214}

References Parameters(), settings(), and EffectParameterMethods::Visit().

Referenced by LoadSettingsFromString(), SaveSettingsAsString(), and EffectEqualization::VisitSettings().

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

Member Data Documentation

◆ mHostUIDialog

wxWeakRef<wxDialog> Effect::mHostUIDialog
protected

This smart pointer tracks the lifetime of the dialog.

Definition at line 306 of file Effect.h.

Referenced by ShowHostInterface(), and ~Effect().

◆ mIsBatch

bool Effect::mIsBatch { false }
private

Definition at line 315 of file Effect.h.

Referenced by IsBatchProcessing(), SetBatchProcessing(), and UnsetBatchProcessing().

◆ mUIParent

wxWindow* Effect::mUIParent {}
protected

Definition at line 307 of file Effect.h.

Referenced by CloseUI(), EffectAutoDuck::DoTransferDataToWindow(), EnableApply(), EnablePreview(), MessageBox(), EffectBassTreble::OnBassSlider(), EffectBassTreble::OnBassText(), EffectTruncSilence::OnControlChange(), EffectToneGen::OnControlUpdate(), EffectScienFilter::OnCutoff(), NyquistEffect::OnFileButton(), EffectBassTreble::OnGainSlider(), EffectBassTreble::OnGainText(), NyquistEffect::OnLoad(), EffectEqualization::OnManage(), EditCurvesDialog::OnOK(), EffectScienFilter::OnRipple(), NyquistEffect::OnSave(), EffectEqualization::OnSize(), EffectScienFilter::OnSize(), NyquistEffect::OnSlider(), EffectScienFilter::OnStopbandRipple(), NyquistEffect::OnText(), EffectPaulstretch::OnText(), EffectTimeScale::OnText_PitchHalfStepsEnd(), EffectTimeScale::OnText_PitchHalfStepsStart(), EffectTimeScale::OnText_PitchPercentChangeEnd(), EffectTimeScale::OnText_PitchPercentChangeStart(), EffectTimeScale::OnText_RatePercentChangeEnd(), EffectTimeScale::OnText_RatePercentChangeStart(), NyquistEffect::OnTime(), EffectBassTreble::OnTrebleSlider(), EffectBassTreble::OnTrebleText(), EffectEqualization::PopulateOrExchange(), PopulateUI(), NyquistEffect::Process(), LadspaEffect::ShowOptions(), NyquistEffect::TransferDataFromEffectWindow(), EffectAmplify::TransferDataFromWindow(), EffectAutoDuck::TransferDataFromWindow(), EffectBassTreble::TransferDataFromWindow(), EffectChangeSpeed::TransferDataFromWindow(), EffectClickRemoval::TransferDataFromWindow(), EffectCompressor::TransferDataFromWindow(), EffectDistortion::TransferDataFromWindow(), EffectFindClipping::TransferDataFromWindow(), EffectLoudness::TransferDataFromWindow(), EffectNoise::TransferDataFromWindow(), EffectNormalize::TransferDataFromWindow(), NyquistEffect::TransferDataFromWindow(), EffectPaulstretch::TransferDataFromWindow(), EffectRepeat::TransferDataFromWindow(), EffectScienFilter::TransferDataFromWindow(), EffectTimeScale::TransferDataFromWindow(), EffectToneGen::TransferDataFromWindow(), EffectTruncSilence::TransferDataFromWindow(), VampEffect::TransferDataFromWindow(), NyquistEffect::TransferDataToEffectWindow(), EffectBassTreble::TransferDataToWindow(), EffectChangeSpeed::TransferDataToWindow(), EffectClickRemoval::TransferDataToWindow(), EffectDistortion::TransferDataToWindow(), EffectEqualization::TransferDataToWindow(), EffectFindClipping::TransferDataToWindow(), EffectLoudness::TransferDataToWindow(), EffectNoise::TransferDataToWindow(), EffectNormalize::TransferDataToWindow(), NyquistEffect::TransferDataToWindow(), EffectPaulstretch::TransferDataToWindow(), EffectScienFilter::TransferDataToWindow(), EffectTimeScale::TransferDataToWindow(), EffectToneGen::TransferDataToWindow(), EffectTruncSilence::TransferDataToWindow(), VampEffect::TransferDataToWindow(), EffectScienFilter::TransferGraphLimitsFromWindow(), EffectEqualization::UpdateDraw(), EffectEqualization::UpdateGraphic(), EffectLoudness::UpdateUI(), and EffectNormalize::UpdateUI().


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