12#ifndef __AUDACITY_EFFECT__
13#define __AUDACITY_EFFECT__
20#define BUILTIN_EFFECT_PREFIX wxT("Built-in Effect: ")
92 wxWindow &parent, wxDialog &dialog,
bool forceModal =
false)
override;
120 bool forceModal =
false)
override;
133 unsigned TestUIFlags(
unsigned mask);
140 enum :
long { DefaultMessageBoxStyle = wxOK | wxCENTRE };
142 long style = DefaultMessageBoxStyle,
147 bool EnableApply(
bool enable =
true);
151 bool EnablePreview(
bool enable =
true);
165 virtual std::unique_ptr<EffectUIValidator> PopulateOrExchange(
184 bool TrackGroupProgress(
198 void CopyInputTracks(
bool allSyncLockSelected =
false);
228 std::shared_ptr<AddedAnalysisTrack> AddAnalysisTrack(
const wxString &
name = wxString());
256 std::shared_ptr<Track> mpOrigTrack{};
260 ModifiedAnalysisTrack ModifyAnalysisTrack
261 (
const LabelTrack *pOrigTrack,
const wxString &
name = wxString());
264 Track *AddToOutputTracks(
const std::shared_ptr<Track> &t);
270 wxWindow *mUIParent{};
276 wxString GetSavedStateGroup();
278 bool mIsBatch{
false };
283template<
typename Settings,
typename Base>
288 return EffectSettings::Make<Settings>();
293 return EffectSettings::Copy<Settings>(src, dst);
325 std::shared_ptr<EffectInstance>
MakeInstance()
const override;
332#define ID_EFFECT_PREVIEW ePreviewID
const TranslatableString name
std::function< wxDialog *(wxWindow &parent, EffectPlugin &, EffectUIClientInterface &, std::shared_ptr< EffectInstance > &, EffectSettingsAccess &) > EffectDialogFactory
Type of function that creates a dialog for an effect.
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
std::vector< RegistryPath > RegistryPaths
static Settings & settings()
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
virtual wxString GetVersion() const =0
virtual PluginPath GetPath() const =0
virtual VendorSymbol GetVendor() const =0
virtual ComponentInterfaceSymbol GetSymbol() const =0
virtual TranslatableString GetDescription() const =0
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
AddedAnalysisTrack(const AddedAnalysisTrack &) PROHIBITED
ModifiedAnalysisTrack(const ModifiedAnalysisTrack &) PROHIBITED
Base class for many of the effects in Audacity.
virtual bool CheckWhetherSkipEffect(const EffectSettings &settings) const =0
After Init(), tell whether Process() should be skipped.
virtual double CalcPreviewInputLength(const EffectSettings &settings, double previewLength) const =0
virtual EffectType GetType() const =0
Type determines how it behaves.
virtual bool IsDefault() const =0
Whether the effect sorts "above the line" in the menus.
virtual bool IsInteractive() const =0
Whether the effect needs a dialog for entry of settings.
virtual bool SupportsAutomation() const =0
Whether the effect has any automatable controls.
virtual RealtimeSince RealtimeSupport() const =0
Since which version of Audacity has the effect supported realtime?
virtual EffectFamilySymbol GetFamily() const =0
Report identifier and user-visible name of the effect protocol.
Base class for many of the effects in Audacity.
wxWeakRef< wxDialog > mHostUIDialog
This smart pointer tracks the lifetime of the dialog.
static void IncEffectCounter()
static Effect * FetchParameters(Effect &e, EffectSettings &)
int GetNumWaveTracks() const
int GetNumWaveGroups() const
virtual unsigned GetAudioOutCount() const =0
How many output buffers to allocate at once.
virtual unsigned GetAudioInCount() const =0
How many input buffers to allocate at once.
Performs effect computation.
Interface for manipulations of an Effect's settings.
virtual void SetBatchProcessing()=0
virtual bool TransferDataToWindow(const EffectSettings &settings)=0
Update controls for the settings.
virtual bool TransferDataFromWindow(EffectSettings &settings)=0
Update the given settings from controls.
virtual void UnsetBatchProcessing()=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.
virtual bool SaveSettingsAsString(const EffectSettings &settings, wxString &parms) const =0
virtual const EffectSettingsManager & GetDefinition() const =0
virtual bool IsBatchProcessing() const =0
virtual bool LoadSettingsFromString(const wxString &parms, EffectSettings &settings) const =0
EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings...
virtual bool VisitSettings(SettingsVisitor &visitor, EffectSettings &settings)
virtual bool LoadFactoryPreset(int id, EffectSettings &settings) const =0
Change settings to the preset whose name is GetFactoryPresets()[id]
virtual bool LoadFactoryDefaults(EffectSettings &settings) const =0
Change settings back to "factory default".
virtual RegistryPaths GetFactoryPresets() const =0
Report names of factory presets.
virtual bool SaveUserPreset(const RegistryPath &name, const EffectSettings &settings) const =0
Save settings in the configuration file as a user-named preset.
virtual bool LoadUserPreset(const RegistryPath &name, EffectSettings &settings) const =0
Change settings to a user-named preset.
virtual bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const =0
Restore settings from keys and values.
virtual bool SaveSettings(const EffectSettings &settings, CommandParameters &parms) const =0
Store settings as keys and values.
virtual void ImportPresets(EffectSettings &settings)=0
virtual void ShowOptions()=0
virtual bool ValidateUI(EffectSettings &settings)=0
virtual int ShowClientInterface(wxWindow &parent, wxDialog &dialog, bool forceModal=false)=0
virtual bool IsGraphicalUI()=0
virtual void ExportPresets(const EffectSettings &settings) const =0
virtual std::unique_ptr< EffectUIValidator > PopulateUI(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access)=0
Adds controls to a panel that is given as the parent window of S
virtual bool CanExportPresets()=0
virtual bool HasOptions()=0
static const Settings & GetSettings(const EffectSettings &settings)
Assume settings originated from MakeSettings() and copies thereof.
static Settings & GetSettings(EffectSettings &settings)
Assume settings originated from MakeSettings() and copies thereof.
static Settings * FetchParameters(Base &, EffectSettings &s)
EffectSettings MakeSettings() const override
bool CopySettingsContents(const EffectSettings &src, EffectSettings &dst) const override
A LabelTrack is a Track that holds labels (LabelStruct).
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Calls through to members of StatefulEffectBase.
Instance(StatefulEffectBase &effect)
virtual bool Process(EffectInstance &instance, EffectSettings &settings)=0
Actually do the effect here.
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
Abstract base class for an object holding data associated with points on a time axis.
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
Positions or offsets within audio files need a wide type.
Externalized state of a plug-in.