33#include <unordered_map>
57 return XO(
"Audacity");
62 return AUDACITY_VERSION_STRING;
81 return {
wxT(
"Audacity"),
XO(
"Built-in") };
145 name,
wxT(
"Parameters"), parms))
160 name,
wxT(
"Parameters"), parms);
204 return wxT(
"SavedState");
268 S.SetForValidating( &eap );
279 result = {
nullptr };
280 S.SetForWriting( &eap );
289 XO(
"%s: Could not load settings below. Default settings will be used.\n\n%s")
293 result = {
nullptr };
407 [&] (
const Track *pTrack) {
408 return allSyncLockSelected
410 : track_cast<const WaveTrack*>( pTrack ) && pTrack->GetSelected();
413 for (
auto aTrack : trackRange)
416 mIMap.push_back(aTrack);
423 mIMap.push_back(NULL);
424 mOMap.push_back(t.get());
436 return previewLength;
Toolkit-neutral facade for basic user interface services.
const TranslatableString name
#define BUILTIN_EFFECT_PREFIX
RegistryPath UserPresetsGroup(const RegistryPath &name)
Compute part of a registry path, given a name which may be empty.
const RegistryPath & FactoryDefaultsGroup()
Component of a configuration key path, for default state of MakeSettings()
const RegistryPath & CurrentSettingsGroup()
Component of a configuration key path, for last-used destructive settings.
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
std::vector< RegistryPath > RegistryPaths
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
EffectReverbSettings preset
static Settings & settings()
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
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.
Generates EffectParameterMethods overrides from variadic template arguments.
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
bool GetParameters(wxString &parms)
TranslatableString GetName() const
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
const wxString & Internal() const
std::shared_ptr< TrackList > mOutputTracks
WaveTrackFactory * mFactory
std::vector< Track * > mOMap
BasicUI::ProgressDialog * mProgress
bool DoEffect(EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess) override
std::vector< Track * > mIMap
const AudacityProject * FindProject() const
RealtimeSince
In which versions of Audacity was an effect realtime capable?
Base class for many of the effects in Audacity.
bool SaveSettings(const EffectSettings &settings, CommandParameters &parms) const override
Store settings as keys and values.
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
const EffectSettingsManager & GetDefinition() const override
bool TrackGroupProgress(int whichGroup, double frac, const TranslatableString &={}) const
bool SaveUserPreset(const RegistryPath &name, const EffectSettings &settings) const override
Save settings in the configuration file as a user-named preset.
void SetBatchProcessing() override
OptionalMessage LoadFactoryDefaults(EffectSettings &settings) const override
bool VisitSettings(SettingsVisitor &visitor, EffectSettings &settings) override
bool SaveSettingsAsString(const EffectSettings &settings, wxString &parms) const override
void CopyInputTracks(bool allSyncLockSelected=false)
OptionalMessage LoadSettingsFromString(const wxString &parms, EffectSettings &settings) const override
bool SupportsAutomation() const override
Whether the effect has any automatable controls.
bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const override
Restore settings from keys and values.
virtual const EffectParameterMethods & Parameters() const
TranslatableString GetDescription() const override
virtual NumericFormatSymbol GetSelectionFormat()
double CalcPreviewInputLength(const EffectSettings &settings, double previewLength) const override
Default implementation returns previewLength
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
bool TotalProgress(double frac, const TranslatableString &={}) const
Track * AddToOutputTracks(const std::shared_ptr< Track > &t)
bool TrackProgress(int whichTrack, double frac, const TranslatableString &={}) const
bool HasOptions() const override
wxString GetVersion() const override
bool CheckWhetherSkipEffect(const EffectSettings &settings) const override
Default implementation returns false.
PluginPath GetPath() const override
EffectType GetType() const override
Type determines how it behaves.
wxString GetSavedStateGroup()
bool IsBatchProcessing() const override
bool Delegate(Effect &delegate, EffectSettings &settings)
Re-invoke DoEffect on another Effect object that implements the work.
VendorSymbol GetVendor() const override
OptionalMessage LoadUserPreset(const RegistryPath &name, EffectSettings &settings) const override
bool CanExportPresets() const override
Whether the effect supports export of presets to files, and importing too.
ComponentInterfaceSymbol GetSymbol() const override
EffectFamilySymbol GetFamily() const override
Report identifier and user-visible name of the effect protocol.
void UnsetBatchProcessing() override
bool IsDefault() const override
Whether the effect sorts "above the line" in the menus.
unsigned TestUIFlags(unsigned mask)
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
void GetBounds(const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
bool IsInteractive() const override
Whether the effect needs a dialog for entry of settings.
Interface for manipulations of an Effect's settings.
virtual bool Set(Effect &effect, const CommandParameters &parms, EffectSettings &settings) const =0
virtual void Get(const Effect &effect, const EffectSettings &settings, CommandParameters &parms) const =0
virtual void Visit(Effect &effect, SettingsVisitor &visitor, EffectSettings &settings) const =0
static const wxString kUserPresetIdent
static const wxString kFactoryPresetIdent
static const wxString kCurrentSettingsIdent
static const wxString kFactoryDefaultsIdent
EffectSettingsManager is an EffectDefinitionInterface that adds a factory function for EffectSettings...
virtual EffectSettings MakeSettings() const
bool setTimes(double t0, double t1)
static NumericFormatSymbol HoursMinsSecondsFormat()
sampleCount TimeToLongSamples(double t0) const
Convert correctly between an (absolute) time in seconds and a number of samples.
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
SettingsVisitor that gets parameter values into a string.
SettingsVisitor that sets parameters to a value (from a string)
static bool IsSelectedOrSyncLockSelected(const Track *pTrack)
Abstract base class for an object holding data associated with points on a time axis.
static std::shared_ptr< TrackList > Create(AudacityProject *pOwner)
auto Any() -> TrackIterRange< TrackType >
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
double GetStartTime() const override
Get the time at which the first clip in the track starts.
double GetEndTime() const override
Get the time at which the last clip in the track ends, plus recorded stuff.
Positions or offsets within audio files need a wide type.
MessageBoxResult ShowMessageBox(const TranslatableString &message, MessageBoxOptions options={})
Show a modal message box with either Ok or Yes and No, and optionally Cancel.
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
bool SetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, const Value &value)
bool GetConfig(const EffectDefinitionInterface &ident, ConfigurationType type, const RegistryPath &group, const RegistryPath &key, Value &var, const Value &defval)
MessageBoxOptions && Caption(TranslatableString caption_) &&
Externalized state of a plug-in.