![]() |
Audacity 3.2.0
|
#include <VampEffect.h>
Public Member Functions | |
VampEffect (std::unique_ptr< Vamp::Plugin > &&plugin, const PluginPath &path, int output, bool hasParameters) | |
virtual | ~VampEffect () |
PluginPath | GetPath () 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... | |
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... | |
unsigned | GetAudioInCount () const override |
How many input buffers to allocate at once. More... | |
bool | Init () override |
Call once to set up state for whole list of tracks to be processed. More... | |
bool | Process (EffectInstance &instance, EffectSettings &settings) override |
Actually do the effect here. More... | |
std::unique_ptr< EffectUIValidator > | PopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) override |
Add controls to effect panel; always succeeds. More... | |
bool | TransferDataToWindow (const EffectSettings &settings) override |
Update controls for the settings. More... | |
![]() | |
std::shared_ptr< EffectInstance > | MakeInstance () const override |
Make an object maintaining short-term state of an Effect. More... | |
![]() | |
virtual bool | Init () |
Call once to set up state for whole list of tracks to be processed. More... | |
virtual bool | Process (EffectInstance &instance, EffectSettings &settings)=0 |
Actually do the effect here. More... | |
virtual bool | RealtimeInitialize (EffectSettings &settings, double sampleRate) |
virtual bool | RealtimeAddProcessor (EffectSettings &settings, unsigned numChannels, float sampleRate) |
virtual bool | RealtimeSuspend () |
virtual bool | RealtimeResume () |
virtual bool | RealtimeProcessStart (EffectSettings &settings) |
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 |
![]() | |
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... | |
bool | LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const override |
Change settings to a user-named preset. More... | |
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... | |
bool | LoadFactoryPreset (int id, EffectSettings &settings) const override |
Change settings to the preset whose name is GetFactoryPresets()[id] More... | |
bool | LoadFactoryDefaults (EffectSettings &settings) const override |
Change settings back to "factory default". More... | |
unsigned | GetAudioInCount () const override |
How many input buffers to allocate at once. More... | |
unsigned | GetAudioOutCount () const override |
How many output buffers to allocate at once. More... | |
virtual const EffectParameterMethods & | Parameters () const |
int | ShowClientInterface (wxWindow &parent, wxDialog &dialog, bool forceModal=false) override |
std::unique_ptr< EffectUIValidator > | PopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) 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 |
void | ImportPresets (EffectSettings &settings) override |
bool | HasOptions () override |
void | ShowOptions () override |
const EffectSettingsManager & | GetDefinition () 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 |
bool | 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 () |
![]() | |
EffectBase () | |
~EffectBase () override | |
![]() | |
virtual | ~EffectUIClientInterface () |
virtual int | ShowClientInterface (wxWindow &parent, wxDialog &dialog, bool forceModal=false)=0 |
virtual bool | IsGraphicalUI ()=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 More... | |
virtual bool | CanExportPresets ()=0 |
virtual void | ExportPresets (const EffectSettings &settings) const =0 |
virtual void | ImportPresets (EffectSettings &settings)=0 |
virtual bool | HasOptions ()=0 |
virtual void | ShowOptions ()=0 |
![]() | |
EffectPlugin & | operator= (EffectPlugin &)=delete |
virtual | ~EffectPlugin () |
virtual const EffectSettingsManager & | GetDefinition () 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 void | Preview (EffectSettingsAccess &access, bool dryOnly)=0 |
virtual bool | SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const =0 |
virtual bool | 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... | |
![]() | |
virtual | ~EffectInstanceFactory () |
virtual std::shared_ptr< EffectInstance > | MakeInstance () const =0 |
Make an object maintaining short-term state of an Effect. More... | |
virtual unsigned | GetAudioInCount () const =0 |
How many input buffers to allocate at once. More... | |
virtual unsigned | GetAudioOutCount () const =0 |
How many output buffers to allocate at once. More... | |
virtual int | GetMidiInCount () const |
Function that has not yet found a use. More... | |
virtual int | GetMidiOutCount () const |
Function that has not yet found a use. More... | |
![]() | |
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 | ~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... | |
![]() | |
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 |
Private Member Functions | |
void | AddFeatures (LabelTrack *track, Vamp::Plugin::FeatureSet &features) |
void | UpdateFromPlugin () |
void | OnCheckBox (wxCommandEvent &evt) |
void | OnChoice (wxCommandEvent &evt) |
void | OnSlider (wxCommandEvent &evt) |
void | OnTextCtrl (wxCommandEvent &evt) |
Private Attributes | |
std::unique_ptr< Vamp::Plugin > | mPlugin |
PluginPath | mPath |
int | mOutput |
bool | mHasParameters |
Vamp::HostExt::PluginLoader::PluginKey | mKey |
wxString | mName |
double | mRate |
bool | mInSlider |
bool | mInText |
Vamp::Plugin::ParameterList | mParameters |
Floats | mValues |
ArrayOf< wxSlider * > | mSliders |
ArrayOf< wxTextCtrl * > | mFields |
ArrayOf< wxStaticText * > | mLabels |
ArrayOf< wxCheckBox * > | mToggles |
ArrayOf< wxChoice * > | mChoices |
wxChoice * | mProgram |
Additional Inherited Members | |
![]() | |
enum | : long { DefaultMessageBoxStyle = wxOK | wxCENTRE } |
![]() | |
using | EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess > |
![]() | |
enum class | RealtimeSince : unsigned { Never , Since_3_2 , Always } |
In which versions of Audacity was an effect realtime capable? More... | |
![]() | |
static Effect * | FetchParameters (Effect &e, EffectSettings &) |
static void | IncEffectCounter () |
![]() | |
static Identifier | GetSquashedName (const Identifier &ident) |
A utility that strips spaces and CamelCases a name. More... | |
![]() | |
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>") |
![]() | |
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< EffectUIValidator > | PopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) |
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< AddedAnalysisTrack > | AddAnalysisTrack (const wxString &name=wxString()) |
ModifiedAnalysisTrack | ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString()) |
Track * | AddToOutputTracks (const std::shared_ptr< Track > &t) |
![]() | |
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 TrackList * | inputTracks () const |
const AudacityProject * | FindProject () const |
virtual bool | ValidateUI (EffectSettings &settings)=0 |
virtual bool | CloseUI ()=0 |
![]() | |
wxWeakRef< wxDialog > | mHostUIDialog |
This smart pointer tracks the lifetime of the dialog. More... | |
wxWindow * | mUIParent {} |
![]() | |
BasicUI::ProgressDialog * | mProgress {} |
double | mProjectRate {} |
WaveTrackFactory * | mFactory {} |
std::shared_ptr< TrackList > | mOutputTracks |
double | mT0 {} |
double | mT1 {} |
wxArrayString | mPresetNames |
unsigned | mUIFlags { 0 } |
![]() | |
friend | EffectUIValidator |
friend | DefaultEffectUIValidator |
![]() | |
static int | nEffectsDone = 0 |
Definition at line 37 of file VampEffect.h.
VampEffect::VampEffect | ( | std::unique_ptr< Vamp::Plugin > && | plugin, |
const PluginPath & | path, | ||
int | output, | ||
bool | hasParameters | ||
) |
Definition at line 68 of file VampEffect.cpp.
|
virtual |
Definition at line 82 of file VampEffect.cpp.
|
private |
Definition at line 699 of file VampEffect.cpp.
References LabelTrack::AddLabel(), PackedArray::begin(), label, LAT1CTOWX, and mOutput.
Referenced by Process().
|
overridevirtual |
How many input buffers to allocate at once.
If the effect ALWAYS processes channels independently, this can return 1
Reimplemented from Effect.
Definition at line 140 of file VampEffect.cpp.
References mPlugin.
|
overridevirtual |
Reimplemented from Effect.
Definition at line 110 of file VampEffect.cpp.
References mPlugin, and Verbatim().
|
overridevirtual |
Report identifier and user-visible name of the effect protocol.
Reimplemented from Effect.
Definition at line 125 of file VampEffect.cpp.
References VAMPEFFECTS_FAMILY.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Type determines how it behaves.
Reimplemented from Effect.
Definition at line 120 of file VampEffect.cpp.
References EffectTypeAnalyze.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Call once to set up state for whole list of tracks to be processed.
Reimplemented from StatefulEffectBase.
Definition at line 298 of file VampEffect.cpp.
References TrackList::Channels(), anonymous_namespace{TimeTrack.cpp}::GetRate(), EffectBase::inputTracks(), Effect::MessageBox(), mKey, mPlugin, EffectBase::mProjectRate, mRate, and XO.
Referenced by Process().
|
overridevirtual |
Whether the effect sorts "above the line" in the menus.
Reimplemented from Effect.
Definition at line 135 of file VampEffect.cpp.
|
overridevirtual |
Whether the effect needs a dialog for entry of settings.
Reimplemented from Effect.
Definition at line 130 of file VampEffect.cpp.
References mHasParameters.
|
overridevirtual |
Restore settings from keys and values.
Reimplemented from Effect.
Definition at line 192 of file VampEffect.cpp.
References key, mParameters, mPlugin, and CommandParameters::ReadEnum().
|
private |
Definition at line 772 of file VampEffect.cpp.
References ID_Toggles, mParameters, mPlugin, and mToggles.
|
private |
Definition at line 779 of file VampEffect.cpp.
References ID_Choices, ID_Program, mParameters, mPlugin, and UpdateFromPlugin().
|
private |
Definition at line 795 of file VampEffect.cpp.
References ID_Sliders, mFields, mParameters, mPlugin, and mValues.
|
private |
Definition at line 822 of file VampEffect.cpp.
References ID_Texts, mFields, mParameters, mPlugin, mSliders, and mValues.
|
overridevirtual |
Add controls to effect panel; always succeeds.
Reimplemented from Effect.
Definition at line 529 of file VampEffect.cpp.
References ID_Choices, ID_Program, ID_Sliders, ID_Texts, ID_Toggles, mChoices, mFields, mLabels, mParameters, mPlugin, mProgram, mSliders, mToggles, mValues, name, ArrayOf< X >::reinit(), S, str, Internat::ToDisplayString(), Verbatim(), XO, and XXO.
|
overridevirtual |
Actually do the effect here.
!! todo: retain parameters previously set
Implements StatefulEffectBase.
Definition at line 343 of file VampEffect.cpp.
References _, Effect::AddAnalysisTrack(), AddFeatures(), TrackList::Channels(), Effect::GetBounds(), SampleTrack::GetFloats(), Effect::GetNumWaveGroups(), GetSymbol(), Init(), EffectBase::inputTracks(), limitSampleBufferSize(), Effect::MessageBox(), mPlugin, mRate, ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::size(), Effect::TrackGroupProgress(), Effect::TrackProgress(), ComponentInterfaceSymbol::Translation(), and XO.
|
overridevirtual |
Store settings as keys and values.
The override may assume parms
is initially empty
Reimplemented from Effect.
Definition at line 145 of file VampEffect.cpp.
References key, mParameters, mPlugin, and CommandParameters::WriteEnum().
|
overridevirtual |
Update controls for the settings.
Reimplemented from Effect.
Definition at line 691 of file VampEffect.cpp.
References UpdateFromPlugin().
|
private |
Definition at line 729 of file VampEffect.cpp.
References mChoices, mFields, mParameters, mPlugin, mSliders, mToggles, and mValues.
Referenced by OnChoice(), and TransferDataToWindow().
|
private |
Definition at line 110 of file VampEffect.h.
Referenced by PopulateOrExchange(), and UpdateFromPlugin().
|
private |
Definition at line 107 of file VampEffect.h.
Referenced by OnSlider(), OnTextCtrl(), PopulateOrExchange(), and UpdateFromPlugin().
|
private |
Definition at line 93 of file VampEffect.h.
Referenced by IsInteractive().
|
private |
Definition at line 99 of file VampEffect.h.
|
private |
Definition at line 100 of file VampEffect.h.
|
private |
Definition at line 95 of file VampEffect.h.
Referenced by Init().
|
private |
Definition at line 108 of file VampEffect.h.
Referenced by PopulateOrExchange().
|
private |
Definition at line 96 of file VampEffect.h.
Referenced by GetSymbol().
|
private |
Definition at line 92 of file VampEffect.h.
Referenced by AddFeatures().
|
private |
Definition at line 102 of file VampEffect.h.
Referenced by LoadSettings(), OnCheckBox(), OnChoice(), OnSlider(), OnTextCtrl(), PopulateOrExchange(), SaveSettings(), and UpdateFromPlugin().
|
private |
Definition at line 91 of file VampEffect.h.
Referenced by GetPath().
|
private |
Definition at line 90 of file VampEffect.h.
Referenced by GetAudioInCount(), GetDescription(), GetVendor(), GetVersion(), Init(), LoadSettings(), OnCheckBox(), OnChoice(), OnSlider(), OnTextCtrl(), PopulateOrExchange(), Process(), SaveSettings(), and UpdateFromPlugin().
|
private |
Definition at line 111 of file VampEffect.h.
Referenced by PopulateOrExchange().
|
private |
Definition at line 97 of file VampEffect.h.
|
private |
Definition at line 106 of file VampEffect.h.
Referenced by OnTextCtrl(), PopulateOrExchange(), and UpdateFromPlugin().
|
private |
Definition at line 109 of file VampEffect.h.
Referenced by OnCheckBox(), PopulateOrExchange(), and UpdateFromPlugin().
|
private |
Definition at line 104 of file VampEffect.h.
Referenced by OnSlider(), OnTextCtrl(), PopulateOrExchange(), and UpdateFromPlugin().