Audacity  3.0.3
ToneGen.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  ToneGen.cpp
6 
7  Steve Jolly
8  James Crook (Adapted for 'Chirps')
9 
10  This class implements a tone generator effect.
11 
12 *******************************************************************//*******************************************************************/
20 
21 
22 #include "ToneGen.h"
23 #include "LoadEffects.h"
24 
25 #include <math.h>
26 #include <float.h>
27 
28 #include <wx/choice.h>
29 #include <wx/intl.h>
30 #include <wx/valgen.h>
31 
32 #include "Project.h"
33 #include "ProjectRate.h"
34 #include "../Shuttle.h"
35 #include "../ShuttleGui.h"
36 #include "../widgets/valnum.h"
37 #include "../widgets/NumericTextCtrl.h"
38 
40 {
44 };
45 
47 {
48  // These are acceptable dual purpose internal/visible names
49  { XO("Linear") },
50  { XO("Logarithmic") }
51 };
52 
54 {
61 };
62 
64 {
65  { XO("Sine") },
66  { XO("Square") },
67  { XO("Sawtooth") },
68  { XO("Square, no alias") },
69  { XO("Triangle") }
70 };
71 
72 // Define keys, defaults, minimums, and maximums for the effect parameters
73 //
74 // Name Type Key Def Min Max Scale
75 Param( StartFreq, double, wxT("StartFreq"), 440.0, 1.0, DBL_MAX, 1 );
76 Param( EndFreq, double, wxT("EndFreq"), 1320.0, 1.0, DBL_MAX, 1 );
77 Param( StartAmp, double, wxT("StartAmp"), 0.8, 0.0, 1.0, 1 );
78 Param( EndAmp, double, wxT("EndAmp"), 0.1, 0.0, 1.0, 1 );
79 Param( Frequency, double, wxT("Frequency"), 440.0, 1.0, DBL_MAX, 1 );
80 Param( Amplitude, double, wxT("Amplitude"), 0.8, 0.0, 1.0, 1 );
81 Param( Waveform, int, wxT("Waveform"), 0, 0, nWaveforms - 1, 1 );
82 Param( Interp, int, wxT("Interpolation"), 0, 0, nInterpolations - 1, 1 );
83 
84 //
85 // EffectToneGen
86 //
87 
89 { XO("Chirp") };
90 
92 
94 { XO("Tone") };
95 
97 
98 BEGIN_EVENT_TABLE(EffectToneGen, wxEvtHandler)
99  EVT_TEXT(wxID_ANY, EffectToneGen::OnControlUpdate)
101 
103 {
104  wxASSERT(nWaveforms == WXSIZEOF(kWaveStrings));
105  wxASSERT(nInterpolations == WXSIZEOF(kInterStrings));
106 
107  mChirp = isChirp;
108 
109  mWaveform = DEF_Waveform;
110  mFrequency[0] = DEF_StartFreq;
111  mFrequency[1] = DEF_EndFreq;
112  mAmplitude[0] = DEF_StartAmp;
113  mAmplitude[1] = DEF_EndAmp;
114  mInterpolation = DEF_Interp;
115 
116  // Chirp varies over time so must use selected duration.
117  // TODO: When previewing, calculate only the first 'preview length'.
118  if (isChirp)
119  SetLinearEffectFlag(false);
120  else
121  SetLinearEffectFlag(true);
122 }
123 
125 {
126 }
127 
128 // ComponentInterface implementation
129 
131 {
132  return mChirp
135 }
136 
138 {
139  return mChirp
140  ? XO("Generates an ascending or descending tone of one of four types")
141  : XO("Generates a constant frequency tone of one of four types");
142 }
143 
145 {
146  return mChirp
147  ? L"Chirp"
148  : L"Tone";
149 }
150 
151 // EffectDefinitionInterface implementation
152 
154 {
155  return EffectTypeGenerate;
156 }
157 
158 // EffectClientInterface implementation
159 
161 {
162  return 1;
163 }
164 
165 bool EffectToneGen::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames WXUNUSED(chanMap))
166 {
167  mPositionInCycles = 0.0;
168  mSample = 0;
169 
170  return true;
171 }
172 
173 size_t EffectToneGen::ProcessBlock(float **WXUNUSED(inBlock), float **outBlock, size_t blockLen)
174 {
175  float *buffer = outBlock[0];
176  double throwaway = 0; //passed to modf but never used
177  double f = 0.0;
178  double a, b;
179  int k;
180 
181  double frequencyQuantum;
182  double BlendedFrequency;
183  double BlendedAmplitude;
184  double BlendedLogFrequency = 0.0;
185 
186  // calculate delta, and reposition from where we left
187  auto doubleSampleCount = mSampleCnt.as_double();
188  auto doubleSample = mSample.as_double();
189  double amplitudeQuantum =
190  (mAmplitude[1] - mAmplitude[0]) / doubleSampleCount;
191  BlendedAmplitude = mAmplitude[0] +
192  amplitudeQuantum * doubleSample;
193 
194  // precalculations:
195  double pre2PI = 2.0 * M_PI;
196  double pre4divPI = 4.0 / M_PI;
197 
198  // initial setup should calculate deltas
200  {
201  // this for log interpolation
202  mLogFrequency[0] = log10(mFrequency[0]);
203  mLogFrequency[1] = log10(mFrequency[1]);
204  // calculate delta, and reposition from where we left
205  frequencyQuantum = (mLogFrequency[1] - mLogFrequency[0]) / doubleSampleCount;
206  BlendedLogFrequency = mLogFrequency[0] + frequencyQuantum * doubleSample;
207  BlendedFrequency = pow(10.0, BlendedLogFrequency);
208  }
209  else
210  {
211  // this for regular case, linear interpolation
212  frequencyQuantum = (mFrequency[1] - mFrequency[0]) / doubleSampleCount;
213  BlendedFrequency = mFrequency[0] + frequencyQuantum * doubleSample;
214  }
215 
216  // synth loop
217  for (decltype(blockLen) i = 0; i < blockLen; i++)
218  {
219  switch (mWaveform)
220  {
221  case kSine:
222  f = sin(pre2PI * mPositionInCycles / mSampleRate);
223  break;
224  case kSquare:
225  f = (modf(mPositionInCycles / mSampleRate, &throwaway) < 0.5) ? 1.0 : -1.0;
226  break;
227  case kSawtooth:
228  f = (2.0 * modf(mPositionInCycles / mSampleRate + 0.5, &throwaway)) - 1.0;
229  break;
230  case kTriangle:
231  f = modf(mPositionInCycles / mSampleRate, &throwaway);
232  if(f < 0.25) {
233  f *= 4.0;
234  } else if(f > 0.75) {
235  f = (f - 1.0) * 4.0;
236  } else { /* f >= 0.25 || f <= 0.75 */
237  f = (0.5 - f) * 4.0;
238  }
239  break;
240  case kSquareNoAlias: // Good down to 110Hz @ 44100Hz sampling.
241  //do fundamental (k=1) outside loop
242  b = (1.0 + cos((pre2PI * BlendedFrequency) / mSampleRate)) / pre4divPI; //scaling
243  f = pre4divPI * sin(pre2PI * mPositionInCycles / mSampleRate);
244  for (k = 3; (k < 200) && (k * BlendedFrequency < mSampleRate / 2.0); k += 2)
245  {
246  //Hann Window in freq domain
247  a = 1.0 + cos((pre2PI * k * BlendedFrequency) / mSampleRate);
248  //calc harmonic, apply window, scale to amplitude of fundamental
249  f += a * sin(pre2PI * mPositionInCycles / mSampleRate * k) / (b * k);
250  }
251  }
252  // insert value in buffer
253  buffer[i] = (float) (BlendedAmplitude * f);
254  // update freq,amplitude
255  mPositionInCycles += BlendedFrequency;
256  BlendedAmplitude += amplitudeQuantum;
258  {
259  BlendedLogFrequency += frequencyQuantum;
260  BlendedFrequency = pow(10.0, BlendedLogFrequency);
261  }
262  else
263  {
264  BlendedFrequency += frequencyQuantum;
265  }
266  }
267 
268  // update external placeholder
269  mSample += blockLen;
270 
271  return blockLen;
272 }
273 
275  if( mChirp ){
276  S.SHUTTLE_PARAM( mFrequency[0], StartFreq );
277  S.SHUTTLE_PARAM( mFrequency[1], EndFreq );
278  S.SHUTTLE_PARAM( mAmplitude[0], StartAmp );
279  S.SHUTTLE_PARAM( mAmplitude[1], EndAmp );
280  } else {
281  S.SHUTTLE_PARAM( mFrequency[0], Frequency );
282  S.SHUTTLE_PARAM( mAmplitude[0], Amplitude );
283  // Slightly hacky way to set freq and ampl
284  // since we do this whatever query to params was made.
285  mFrequency[1] = mFrequency[0];
286  mAmplitude[1] = mAmplitude[0];
287  }
288  S.SHUTTLE_ENUM_PARAM( mWaveform, Waveform, kWaveStrings, nWaveforms );
289  S.SHUTTLE_ENUM_PARAM( mInterpolation, Interp, kInterStrings, nInterpolations );
290 
291 
292 // double freqMax = (FindProject() ? FindProject()->GetRate() : 44100.0) / 2.0;
293 // mFrequency[1] = TrapDouble(mFrequency[1], MIN_EndFreq, freqMax);
294 
295 
296  return true;
297 }
298 
300 {
301  if (mChirp)
302  {
303  parms.Write(KEY_StartFreq, mFrequency[0]);
304  parms.Write(KEY_EndFreq, mFrequency[1]);
305  parms.Write(KEY_StartAmp, mAmplitude[0]);
306  parms.Write(KEY_EndAmp, mAmplitude[1]);
307  }
308  else
309  {
310  parms.Write(KEY_Frequency, mFrequency[0]);
311  parms.Write(KEY_Amplitude, mAmplitude[0]);
312  }
313 
314  parms.Write(KEY_Waveform, kWaveStrings[mWaveform].Internal());
315  parms.Write(KEY_Interp, kInterStrings[mInterpolation].Internal());
316 
317  return true;
318 }
319 
321 {
324  if (mChirp)
325  {
326  ReadAndVerifyDouble(StartFreq);
327  ReadAndVerifyDouble(EndFreq);
328  ReadAndVerifyDouble(StartAmp);
329  ReadAndVerifyDouble(EndAmp);
330  mFrequency[0] = StartFreq;
331  mFrequency[1] = EndFreq;
332  mAmplitude[0] = StartAmp;
333  mAmplitude[1] = EndAmp;
334  }
335  else
336  {
337  ReadAndVerifyDouble(Frequency);
338  ReadAndVerifyDouble(Amplitude);
339  mFrequency[0] = Frequency;
340  mFrequency[1] = Frequency;
341  mAmplitude[0] = Amplitude;
342  mAmplitude[1] = Amplitude;
343  }
344 
346  mInterpolation = Interp;
347 
348  double freqMax =
349  (FindProject()
351  : 44100.0)
352  / 2.0;
353  mFrequency[1] = TrapDouble(mFrequency[1], MIN_EndFreq, freqMax);
354 
355  return true;
356 }
357 
358 // Effect implementation
359 
361 {
362  wxTextCtrl *t;
363 
364  S.StartMultiColumn(2, wxCENTER);
365  {
366  S.Validator<wxGenericValidator>(&mWaveform)
367  .AddChoice(XXO("&Waveform:"),
369 
370  if (mChirp)
371  {
372  S.AddFixedText( {} );
373  S.StartHorizontalLay(wxEXPAND);
374  {
375  S.StartHorizontalLay(wxLEFT, 50);
376  {
377  S.AddTitle(XO("Start"));
378  }
379  S.EndHorizontalLay();
380 
381  S.StartHorizontalLay(wxLEFT, 50);
382  {
383  S.AddTitle(XO("End"));
384  }
385  S.EndHorizontalLay();
386  }
387  S.EndHorizontalLay();
388 
389  S.AddPrompt(XXO("&Frequency (Hz):"));
390  S.StartHorizontalLay(wxEXPAND);
391  {
392  S.StartHorizontalLay(wxLEFT, 50);
393  {
394  t = S.Name(XO("Frequency Hertz Start"))
395  .Validator<FloatingPointValidator<double>>(
396  6, &mFrequency[0],
397  NumValidatorStyle::NO_TRAILING_ZEROES,
398  MIN_StartFreq,
399  mProjectRate / 2.0
400  )
401  .AddTextBox( {}, wxT(""), 12);
402  }
403  S.EndHorizontalLay();
404 
405  S.StartHorizontalLay(wxLEFT, 50);
406  {
407  t = S.Name(XO("Frequency Hertz End"))
408  .Validator<FloatingPointValidator<double>>(
409  6, &mFrequency[1],
410  NumValidatorStyle::NO_TRAILING_ZEROES,
411  MIN_EndFreq,
412  mProjectRate / 2.0
413  )
414  .AddTextBox( {}, wxT(""), 12);
415  }
416  S.EndHorizontalLay();
417  }
418  S.EndHorizontalLay();
419 
420  S.AddPrompt(XXO("&Amplitude (0-1):"));
421  S.StartHorizontalLay(wxEXPAND);
422  {
423  S.StartHorizontalLay(wxLEFT, 50);
424  {
425  t = S.Name(XO("Amplitude Start"))
426  .Validator<FloatingPointValidator<double>>(
427  6, &mAmplitude[0], NumValidatorStyle::NO_TRAILING_ZEROES,
428  MIN_StartAmp, MAX_StartAmp
429  )
430  .AddTextBox( {}, wxT(""), 12);
431  }
432  S.EndHorizontalLay();
433 
434  S.StartHorizontalLay(wxLEFT, 50);
435  {
436  t = S.Name(XO("Amplitude End"))
437  .Validator<FloatingPointValidator<double>>(
438  6, &mAmplitude[1], NumValidatorStyle::NO_TRAILING_ZEROES,
439  MIN_EndAmp, MAX_EndAmp
440  )
441  .AddTextBox( {}, wxT(""), 12);
442  }
443  S.EndHorizontalLay();
444  }
445  S.EndHorizontalLay();
446 
447  S.Validator<wxGenericValidator>(&mInterpolation)
448  .AddChoice(XXO("I&nterpolation:"),
450  }
451  else
452  {
453  t = S.Validator<FloatingPointValidator<double>>(
454  6, &mFrequency[0], NumValidatorStyle::NO_TRAILING_ZEROES,
455  MIN_Frequency,
456  mProjectRate / 2.0
457  )
458  .AddTextBox(XXO("&Frequency (Hz):"), wxT(""), 12);
459 
460  t = S.Validator<FloatingPointValidator<double>>(
461  6, &mAmplitude[0], NumValidatorStyle::NO_TRAILING_ZEROES,
462  MIN_Amplitude, MAX_Amplitude
463  )
464  .AddTextBox(XXO("&Amplitude (0-1):"), wxT(""), 12);
465  }
466 
467  S.AddPrompt(XXO("&Duration:"));
469  NumericTextCtrl(S.GetParent(), wxID_ANY,
472  GetDuration(),
473  mProjectRate,
475  .AutoPos(true));
476  S.Name(XO("Duration"))
477  .Position(wxALIGN_LEFT | wxALL)
479  }
480  S.EndMultiColumn();
481 
482  return;
483 }
484 
486 {
487  if (!mUIParent->TransferDataToWindow())
488  {
489  return false;
490  }
491 
493 
494  return true;
495 }
496 
498 {
499  if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
500  {
501  return false;
502  }
503 
504  if (!mChirp)
505  {
506  mFrequency[1] = mFrequency[0];
507  mAmplitude[1] = mAmplitude[0];
508  }
509 
511 
512  return true;
513 }
514 
515 // EffectToneGen implementation
516 
517 void EffectToneGen::OnControlUpdate(wxCommandEvent & WXUNUSED(evt))
518 {
519  if (!EnableApply(mUIParent->TransferDataFromWindow()))
520  {
521  return;
522  }
523 }
Effect::mSampleCnt
sampleCount mSampleCnt
Definition: Effect.h:482
EffectToneGen::mSample
sampleCount mSample
Definition: ToneGen.h:62
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
CommandParameters
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
Definition: EffectAutomationParameters.h:67
Effect::FindProject
const AudacityProject * FindProject() const
Definition: Effect.cpp:2272
Effect::GetDuration
double GetDuration() override
Definition: Effect.cpp:816
Effect::EnableApply
virtual bool EnableApply(bool enable=true)
Definition: Effect.cpp:1926
EffectToneGen::OnControlUpdate
void OnControlUpdate(wxCommandEvent &evt)
Definition: ToneGen.cpp:517
NumericTextCtrl::Options::AutoPos
Options & AutoPos(bool enable)
Definition: NumericTextCtrl.h:190
kSquareNoAlias
@ kSquareNoAlias
Definition: ToneGen.cpp:58
EffectToneGen::GetDescription
TranslatableString GetDescription() override
Definition: ToneGen.cpp:137
ShuttleGuiBase::AddTitle
void AddTitle(const TranslatableString &Prompt, int wrapWidth=0)
Centred text string.
Definition: ShuttleGui.cpp:281
EffectToneGen::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: ToneGen.cpp:165
Project.h
ProjectRate::Get
static ProjectRate & Get(AudacityProject &project)
Definition: ProjectRate.cpp:42
EffectToneGen::GetType
EffectType GetType() override
Definition: ToneGen.cpp:153
EffectTypeGenerate
@ EffectTypeGenerate
Definition: EffectInterface.h:58
EffectTone::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: ToneGen.h:90
EffectToneGen::mChirp
bool mChirp
Definition: ToneGen.h:58
Validator
A Validator is an object which checks whether a wxVariant satisfies a certain criterion....
Definition: Validators.h:53
XO
#define XO(s)
Definition: Internat.h:31
EffectToneGen::SetAutomationParameters
bool SetAutomationParameters(CommandParameters &parms) override
Definition: ToneGen.cpp:320
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:62
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
EffectToneGen::mToneDurationT
NumericTextCtrl * mToneDurationT
Definition: ToneGen.h:73
anonymous_namespace{ToneGen.cpp}::reg
BuiltinEffectsModule::Registration< EffectChirp > reg
Definition: ToneGen.cpp:91
NumericTextCtrl
Definition: NumericTextCtrl.h:172
NumericTextCtrl::SetValue
void SetValue(double newValue)
Definition: NumericTextCtrl.cpp:1474
anonymous_namespace{ToneGen.cpp}::reg2
BuiltinEffectsModule::Registration< EffectTone > reg2
Definition: ToneGen.cpp:96
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
NumericTextCtrl::Options
Definition: NumericTextCtrl.h:178
EffectToneGen::~EffectToneGen
virtual ~EffectToneGen()
Definition: ToneGen.cpp:124
EffectToneGen::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: ToneGen.cpp:274
kSquare
@ kSquare
Definition: ToneGen.cpp:56
Effect::mProjectRate
double mProjectRate
Definition: Effect.h:458
ReadAndVerifyEnum
#define ReadAndVerifyEnum(name, list, listSize)
Definition: Effect.h:621
kInterStrings
static const EnumValueSymbol kInterStrings[nInterpolations]
Definition: ToneGen.cpp:46
EffectToneGen::mWaveform
int mWaveform
Definition: ToneGen.h:67
XXO
#define XXO(s)
Definition: Internat.h:44
EffectToneGen::mLogFrequency
double mLogFrequency[2]
Definition: ToneGen.h:71
END_EVENT_TABLE
END_EVENT_TABLE()
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1177
sampleCount::as_double
double as_double() const
Definition: SampleCount.h:45
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1167
EffectChirp::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: ToneGen.h:81
kLinear
@ kLinear
Definition: ToneGen.cpp:41
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ShuttleGuiBase::AddFixedText
void AddFixedText(const TranslatableString &Str, bool bCenter=false, int wrapWidth=0)
Definition: ShuttleGui.cpp:440
NumericConverter::TIME
@ TIME
Definition: NumericTextCtrl.h:52
EffectToneGen::mFrequency
double mFrequency[2]
Definition: ToneGen.h:69
ShuttleGuiBase::GetParent
wxWindow * GetParent()
Definition: ShuttleGui.h:496
ShuttleGui::Validator
ShuttleGui & Validator(const Factory &f)
Definition: ShuttleGui.h:678
ShuttleGuiBase::AddWindow
wxWindow * AddWindow(wxWindow *pWindow, int PositionFlags=wxALIGN_CENTRE)
Definition: ShuttleGui.cpp:299
ProjectRate::GetRate
double GetRate() const
Definition: ProjectRate.cpp:68
EffectToneGen::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: ToneGen.cpp:360
nWaveforms
@ nWaveforms
Definition: ToneGen.cpp:60
Param
Param(StartFreq, double, wxT("StartFreq"), 440.0, 1.0, DBL_MAX, 1)
ChannelNames
enum ChannelName * ChannelNames
Msgids
TranslatableStrings Msgids(const EnumValueSymbol strings[], size_t nStrings)
Convenience function often useful when adding choice controls.
Definition: ShuttleGui.cpp:2522
ReadAndVerifyDouble
#define ReadAndVerifyDouble(name)
Definition: Effect.h:633
EffectToneGen::TransferDataToWindow
bool TransferDataToWindow() override
Definition: ToneGen.cpp:485
EffectToneGen::mInterpolation
int mInterpolation
Definition: ToneGen.h:68
LoadEffects.h
Effect::SetDuration
void SetDuration(double duration) override
Definition: Effect.cpp:838
EffectToneGen::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: ToneGen.cpp:130
ShuttleGui::Name
ShuttleGui & Name(const TranslatableString &name)
Definition: ShuttleGui.h:663
Effect::mSampleRate
double mSampleRate
Definition: Effect.h:460
EffectToneGen
An Effect that can generate a sine, square or sawtooth wave. An extended mode of EffectToneGen suppor...
Definition: ToneGen.h:22
BuiltinEffectsModule::Registration
Definition: LoadEffects.h:40
ShuttleGui::Position
ShuttleGui & Position(int flags)
Definition: ShuttleGui.h:712
EffectToneGen::mPositionInCycles
double mPositionInCycles
Definition: ToneGen.h:63
Effect::mUIParent
wxWindow * mUIParent
Definition: Effect.h:478
TaggedIdentifier< ManualPageIDTag >
sampleCount
Positions or offsets within audio files need a wide type.
Definition: SampleCount.h:18
kWaveforms
kWaveforms
Definition: ToneGen.cpp:54
kTriangle
@ kTriangle
Definition: ToneGen.cpp:59
ProjectRate.h
an object holding per-project preferred sample rate
ExceptionType::Internal
@ Internal
Indicates internal failure from Audacity.
EffectToneGen::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: ToneGen.cpp:160
EffectToneGen::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: ToneGen.cpp:173
M_PI
#define M_PI
Definition: Distortion.cpp:29
EffectToneGen::TransferDataFromWindow
bool TransferDataFromWindow() override
Definition: ToneGen.cpp:497
EffectToneGen::GetAutomationParameters
bool GetAutomationParameters(CommandParameters &parms) override
Definition: ToneGen.cpp:299
kInterpolations
kInterpolations
Definition: Equalization.cpp:150
TrapDouble
double TrapDouble(double x, double min, double max)
Definition: Effect.h:564
Effect::GetDurationFormat
NumericFormatSymbol GetDurationFormat() override
Definition: Effect.cpp:826
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:238
EffectType
EffectType
Definition: EffectInterface.h:55
safenew
#define safenew
Definition: MemoryX.h:10
EffectToneGen::mAmplitude
double mAmplitude[2]
Definition: ToneGen.h:70
kSine
@ kSine
Definition: ToneGen.cpp:55
NumericConverter::GetValue
double GetValue()
Definition: NumericTextCtrl.cpp:1174
EffectToneGen::ManualPage
ManualPageID ManualPage() override
Definition: ToneGen.cpp:144
nInterpolations
@ nInterpolations
Definition: ToneGen.cpp:43
ToneGen.h
kSawtooth
@ kSawtooth
Definition: ToneGen.cpp:57
kLogarithmic
@ kLogarithmic
Definition: ToneGen.cpp:42
WaveTrackViewConstants::Waveform
@ Waveform
Definition: WaveTrackViewConstants.h:24
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
kWaveStrings
static const EnumValueSymbol kWaveStrings[nWaveforms]
Definition: ToneGen.cpp:63