32#include "../widgets/valnum.h"
33#include "../widgets/NumericTextCtrl.h"
60 XO(
"Generates an ascending or descending tone of one of four types") :
61 XO(
"Generates a constant frequency tone of one of four types");
66 return mChirp ? L
"Chirp" : L
"Tone";
78 S.StartMultiColumn(2, wxCENTER);
81 .AddChoice(
XXO(
"&Waveform:"),
87 S.StartHorizontalLay(wxEXPAND);
89 S.StartHorizontalLay(wxLEFT, 50);
91 S.AddTitle(
XO(
"Start"));
95 S.StartHorizontalLay(wxLEFT, 50);
97 S.AddTitle(
XO(
"End"));
101 S.EndHorizontalLay();
103 S.AddPrompt(
XXO(
"&Frequency (Hz):"));
104 S.StartHorizontalLay(wxEXPAND);
106 S.StartHorizontalLay(wxLEFT, 50);
108 t =
S.Name(
XO(
"Frequency Hertz Start"))
109 .
Validator<FloatingPointValidator<double>>(
111 NumValidatorStyle::NO_TRAILING_ZEROES,
114 .AddTextBox( {}, L
"", 12);
116 S.EndHorizontalLay();
118 S.StartHorizontalLay(wxLEFT, 50);
120 t =
S.Name(
XO(
"Frequency Hertz End"))
121 .
Validator<FloatingPointValidator<double>>(
123 NumValidatorStyle::NO_TRAILING_ZEROES,
126 .AddTextBox( {}, L
"", 12);
128 S.EndHorizontalLay();
130 S.EndHorizontalLay();
132 S.AddPrompt(
XXO(
"&Amplitude (0-1):"));
133 S.StartHorizontalLay(wxEXPAND);
135 S.StartHorizontalLay(wxLEFT, 50);
137 t =
S.Name(
XO(
"Amplitude Start"))
138 .
Validator<FloatingPointValidator<double>>(
139 6, &
mAmplitude0, NumValidatorStyle::NO_TRAILING_ZEROES,
141 .AddTextBox( {}, L
"", 12);
143 S.EndHorizontalLay();
145 S.StartHorizontalLay(wxLEFT, 50);
147 t =
S.Name(
XO(
"Amplitude End"))
148 .
Validator<FloatingPointValidator<double>>(
149 6, &
mAmplitude1, NumValidatorStyle::NO_TRAILING_ZEROES,
151 .AddTextBox( {}, L
"", 12);
153 S.EndHorizontalLay();
155 S.EndHorizontalLay();
158 .AddChoice(
XXO(
"I&nterpolation:"),
163 t =
S.Validator<FloatingPointValidator<double>>(
164 6, &
mFrequency0, NumValidatorStyle::NO_TRAILING_ZEROES,
167 .AddTextBox(
XXO(
"&Frequency (Hz):"), L
"", 12);
169 t =
S.Validator<FloatingPointValidator<double>>(
170 6, &
mAmplitude0, NumValidatorStyle::NO_TRAILING_ZEROES,
172 .AddTextBox(
XXO(
"&Amplitude (0-1):"), L
"", 12);
175 S.AddPrompt(
XXO(
"&Duration:"));
179 S.GetParent(), wxID_ANY,
181 extra.GetDurationFormat(),
185 S.Name(
XO(
"Duration"))
186 .Position(wxALIGN_LEFT | wxALL)
XXO("&Cut/Copy/Paste Toolbar")
const NumericConverterType & NumericConverterType_TIME()
an object holding per-project preferred sample rate
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
static Settings & settings()
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static const ComponentInterfaceSymbol Symbol
static bool EnableApply(wxWindow *parent, bool enable=true)
Enable or disable the Apply button of the dialog that contains parent.
Performs effect computation.
Hold values to send to effect output meters.
virtual const EffectSettings & Get()=0
An Effect that can generate a sine, square or sawtooth wave. An extended mode of EffectToneGen suppor...
TranslatableString GetDescription() const override
std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
void OnControlUpdate(wxCommandEvent &evt)
wxWeakRef< wxWindow > mUIParent
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
NumericTextCtrl * mToneDurationT
bool TransferDataToWindow(const EffectSettings &settings) override
bool TransferDataFromWindow(EffectSettings &settings) override
static const ComponentInterfaceSymbol Symbol
static FormatterContext SampleRateContext(double sampleRate)
void SetValue(double newValue)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
static const EnumValueSymbol kInterStrings[nInterpolations]
static constexpr EffectParameter StartAmp
static constexpr EffectParameter StartFreq
static constexpr EffectParameter Frequency
static constexpr EffectParameter EndAmp
static constexpr EffectParameter Amplitude
static const EnumValueSymbol kWaveStrings[nWaveforms]
static constexpr EffectParameter EndFreq
Holds a msgid for the translation catalog; may also bind format arguments.
A Validator is an object which checks whether a wxVariant satisfies a certain criterion....
BuiltinEffectsModule::Registration< EffectTone > reg2
BuiltinEffectsModule::Registration< EffectChirp > reg
const Type min
Minimum value.
const Type max
Maximum value.
Externalized state of a plug-in.
EffectSettingsExtra extra
Options & AutoPos(bool enable)