17#ifndef __AUDACITY_EFFECT_TRUNC_SILENCE__
18#define __AUDACITY_EFFECT_TRUNC_SILENCE__
22#include <wx/weakref.h>
67 double* inputLength = NULL,
68 double* minInputLength = NULL)
const;
93 const Track *firstTrack,
const Track *lastTrack);
95 (
const RegionList &silences,
unsigned iGroup,
unsigned nGroups,
Track *firstTrack,
Track *lastTrack,
117 DECLARE_EVENT_TABLE()
129 L
"Threshold", -20.0, -80.0, -20.0, 1 };
133 L
"Minimum", 0.5, 0.001, 10000.0, 1 };
135 L
"Truncate", 0.5, 0.0, 10000.0, 1 };
137 L
"Compress", 50.0, 0.0, 99.9, 1 };
139 L
"Independent",
false,
false,
true, 1 };
static Settings & settings()
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Performs effect computation.
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
Truncate Silence automatically reduces the length of passages where the volume is below a set thresho...
bool TransferDataToWindow(const EffectSettings &settings) override
static EffectTruncSilence * FetchParameters(EffectTruncSilence &e, EffectSettings &)
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
bool Process(EffectInstance &instance, EffectSettings &settings) override
bool FindSilences(RegionList &silences, const TrackList *list, const Track *firstTrack, const Track *lastTrack)
static constexpr EnumParameter ActIndex
static constexpr EffectParameter Independent
wxWeakRef< wxWindow > mUIParent
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
wxTextCtrl * mThresholdText
double mInitialAllowedSilence
bool NeedsDither() const override
double CalcPreviewInputLength(const EffectSettings &settings, double previewLength) const override
bool Analyze(RegionList &silenceList, RegionList &trackSilences, const WaveTrack *wt, sampleCount *silentFrame, sampleCount *index, int whichTrack, double *inputLength=NULL, double *minInputLength=NULL) const
void OnControlChange(wxCommandEvent &evt)
static constexpr EffectParameter Minimum
virtual ~EffectTruncSilence()
wxCheckBox * mIndependent
bool TransferDataFromWindow(EffectSettings &settings) override
double mSilenceCompressPercent
static constexpr EffectParameter Truncate
EffectType GetType() const override
Type determines how it behaves.
static const EnumValueSymbol kActionStrings[nActions]
double mTruncLongestAllowedSilence
static constexpr EffectParameter Threshold
bool ProcessIndependently()
wxTextCtrl * mTruncLongestAllowedSilenceT
static const ComponentInterfaceSymbol Symbol
const EffectParameterMethods & Parameters() const override
TranslatableString GetDescription() const override
ComponentInterfaceSymbol GetSymbol() const override
bool DoRemoval(const RegionList &silences, unsigned iGroup, unsigned nGroups, Track *firstTrack, Track *lastTrack, double &totalCutLen)
bool LoadSettings(const CommandParameters &parms, EffectSettings &settings) const override
Restore settings from keys and values.
wxTextCtrl * mInitialAllowedSilenceT
wxTextCtrl * mSilenceCompressPercentT
static constexpr EffectParameter Compress
void Intersect(RegionList &dest, const RegionList &src)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Abstract base class for an object holding data associated with points on a time axis.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
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.