Audacity 3.2.0
VSTEffectBase.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 VSTEffectBase.h
6
7 Dominic Mazzoni
8
9 Paul Licameli split from VSTEffect.h
10
11**********************************************************************/
12
13#ifndef __AUDACITY_VST_EFFECT_BASE__
14#define __AUDACITY_VST_EFFECT_BASE__
15
16#include "VSTWrapper.h"
17#include "PerTrackEffect.h"
18#include "PluginInterface.h"
19
20/* i18n-hint: Abbreviates Virtual Studio Technology, an audio software protocol
21 developed by Steinberg GmbH */
22#define VSTPLUGINTYPE XO("VST")
23
24#define audacityVSTID CCONST('a', 'u', 'D', 'y');
25
26class VST_API VSTEffectBase
27 : public VSTWrapper
28 , public PerTrackEffect
29{
30 public:
31 VSTEffectBase(const PluginPath & path);
32 ~VSTEffectBase() override;
33
34 // ComponentInterface implementation
35
36 PluginPath GetPath() const override;
37 ComponentInterfaceSymbol GetSymbol() const override;
38 VendorSymbol GetVendor() const override;
39 wxString GetVersion() const override;
40 TranslatableString GetDescription() const override;
41
42 // EffectDefinitionInterface implementation
43
44 EffectType GetType() const override;
45 EffectFamilySymbol GetFamily() const override;
46 bool IsInteractive() const override;
47 bool IsDefault() const override;
48 RealtimeSince RealtimeSupport() const override;
49 bool SupportsAutomation() const override;
50
51 bool SaveSettings(
52 const EffectSettings &settings, CommandParameters & parms) const override;
53 bool LoadSettings(
54 const CommandParameters & parms, EffectSettings &settings) const override;
55
57 const RegistryPath & name, EffectSettings &settings) const override;
58
59 bool SaveUserPreset(
60 const RegistryPath & name, const EffectSettings &settings) const override;
61
62 RegistryPaths GetFactoryPresets() const override;
64 const override;
65 bool DoLoadFactoryPreset(int id);
66
67 bool InitializePlugin();
68
69 std::shared_ptr<EffectInstance> MakeInstance() const override;
70 bool CanExportPresets() const override;
71
72 bool HasOptions() const override;
73
74 EffectSettings MakeSettings() const override;
75
76 // Plugin loading and unloading
77 std::vector<int> GetEffectIDs();
78
79private:
81};
82
83#endif
wxString PluginID
EffectType
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
wxString RegistryPath
Definition: Identifier.h:218
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Identifier.h:214
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
wxString name
Definition: TagsEditor.cpp:166
static Settings & settings()
Definition: TrackInfo.cpp:51
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
virtual EffectType GetType() const =0
Type determines how it behaves.
RealtimeSince
In which versions of Audacity was an effect realtime capable?
bool SaveSettings(const EffectSettings &settings, CommandParameters &parms) const override
Store settings as keys and values.
Definition: Effect.cpp:115
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
Definition: Effect.cpp:86
bool SaveUserPreset(const RegistryPath &name, const EffectSettings &settings) const override
Save settings in the configuration file as a user-named preset.
Definition: Effect.cpp:143
bool SupportsAutomation() const override
Whether the effect has any automatable controls.
Definition: Effect.cpp:91
bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const override
Restore settings from keys and values.
Definition: Effect.cpp:122
TranslatableString GetDescription() const override
Definition: Effect.cpp:64
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
Definition: Effect.cpp:160
bool HasOptions() const override
Definition: Effect.cpp:175
wxString GetVersion() const override
Definition: Effect.cpp:59
PluginPath GetPath() const override
Definition: Effect.cpp:44
VendorSymbol GetVendor() const override
Definition: Effect.cpp:54
OptionalMessage LoadUserPreset(const RegistryPath &name, EffectSettings &settings) const override
Definition: Effect.cpp:130
bool CanExportPresets() const override
Whether the effect supports export of presets to files, and importing too.
Definition: Effect.cpp:170
EffectFamilySymbol GetFamily() const override
Report identifier and user-visible name of the effect protocol.
Definition: Effect.cpp:69
bool IsDefault() const override
Whether the effect sorts "above the line" in the menus.
Definition: Effect.cpp:81
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
Definition: Effect.cpp:155
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
Definition: Effect.cpp:76
virtual std::shared_ptr< EffectInstance > MakeInstance() const =0
Make an object maintaining short-term state of an Effect.
virtual EffectSettings MakeSettings() const
Base class for many of the effects in Audacity.
Holds a msgid for the translation catalog; may also bind format arguments.
~VSTEffectBase() override
PluginID mID
Definition: VSTEffectBase.h:80
Externalized state of a plug-in.
ComponentInterfaceSymbol GetSymbol() const