Audacity  2.2.2
Phaser.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  Phaser.cpp
6 
7  Effect programming:
8  Nasca Octavian Paul (Paul Nasca)
9 
10  UI programming:
11  Dominic Mazzoni (with the help of wxDesigner)
12  Vaughan Johnson (Preview)
13 
14 *******************************************************************//*******************************************************************/
20 
21 
22 #include "../Audacity.h"
23 #include "Phaser.h"
24 
25 #include <math.h>
26 
27 #include <wx/intl.h>
28 
29 #include "../ShuttleGui.h"
30 #include "../widgets/valnum.h"
31 
32 #include "../Experimental.h"
33 
34 enum
35 {
36  ID_Stages = 10000,
43 };
44 
45 // Define keys, defaults, minimums, and maximums for the effect parameters
46 //
47 // Name Type Key Def Min Max Scale
48 Param( Stages, int, wxT("Stages"), 2, 2, NUM_STAGES, 1 );
49 Param( DryWet, int, wxT("DryWet"), 128, 0, 255, 1 );
50 Param( Freq, double, wxT("Freq"), 0.4, 0.001,4.0, 10.0 );
51 Param( Phase, double, wxT("Phase"), 0.0, 0.0, 360.0, 1 );
52 Param( Depth, int, wxT("Depth"), 100, 0, 255, 1 );
53 Param( Feedback, int, wxT("Feedback"), 0, -100, 100, 1 );
54 Param( OutGain, double, wxT("Gain"), -6.0, -30.0, 30.0, 1 );
55 
56 //
57 #define phaserlfoshape 4.0
58 
59 // How many samples are processed before recomputing the lfo value again
60 #define lfoskipsamples 20
61 
62 //
63 // EffectPhaser
64 //
65 
66 BEGIN_EVENT_TABLE(EffectPhaser, wxEvtHandler)
67  EVT_SLIDER(ID_Stages, EffectPhaser::OnStagesSlider)
68  EVT_SLIDER(ID_DryWet, EffectPhaser::OnDryWetSlider)
69  EVT_SLIDER(ID_Freq, EffectPhaser::OnFreqSlider)
70  EVT_SLIDER(ID_Phase, EffectPhaser::OnPhaseSlider)
71  EVT_SLIDER(ID_Depth, EffectPhaser::OnDepthSlider)
72  EVT_SLIDER(ID_Feedback, EffectPhaser::OnFeedbackSlider)
73  EVT_SLIDER(ID_OutGain, EffectPhaser::OnGainSlider)
74  EVT_TEXT(ID_Stages, EffectPhaser::OnStagesText)
75  EVT_TEXT(ID_DryWet, EffectPhaser::OnDryWetText)
76  EVT_TEXT(ID_Freq, EffectPhaser::OnFreqText)
77  EVT_TEXT(ID_Phase, EffectPhaser::OnPhaseText)
78  EVT_TEXT(ID_Depth, EffectPhaser::OnDepthText)
79  EVT_TEXT(ID_Feedback, EffectPhaser::OnFeedbackText)
80  EVT_TEXT(ID_OutGain, EffectPhaser::OnGainText)
82 
84 {
85  mStages = DEF_Stages;
86  mDryWet = DEF_DryWet;
87  mFreq = DEF_Freq;
88  mPhase = DEF_Phase;
89  mDepth = DEF_Depth;
90  mFeedback = DEF_Feedback;
91  mOutGain = DEF_OutGain;
92 
93  SetLinearEffectFlag(true);
94 }
95 
97 {
98 }
99 
100 // IdentInterface implementation
101 
103 {
104  return PHASER_PLUGIN_SYMBOL;
105 }
106 
108 {
109  return _("Combines phase-shifted signals with the original signal");
110 }
111 
113 {
114  return wxT("Phaser");
115 }
116 
117 // EffectDefinitionInterface implementation
118 
120 {
121  return EffectTypeProcess;
122 }
123 
125 {
126 #if defined(EXPERIMENTAL_REALTIME_AUDACITY_EFFECTS)
127  return true;
128 #else
129  return false;
130 #endif
131 }
132 
133 // EffectClientInterface implementation
134 
136 {
137  return 1;
138 }
139 
141 {
142  return 1;
143 }
144 
146 {
148  if (chanMap[0] == ChannelNameFrontRight)
149  {
150  mMaster.phase += M_PI;
151  }
152 
153  return true;
154 }
155 
156 size_t EffectPhaser::ProcessBlock(float **inBlock, float **outBlock, size_t blockLen)
157 {
158  return InstanceProcess(mMaster, inBlock, outBlock, blockLen);
159 }
160 
162 {
163  SetBlockSize(512);
164 
165  mSlaves.clear();
166 
167  return true;
168 }
169 
170 bool EffectPhaser::RealtimeAddProcessor(unsigned WXUNUSED(numChannels), float sampleRate)
171 {
172  EffectPhaserState slave;
173 
174  InstanceInit(slave, sampleRate);
175 
176  mSlaves.push_back(slave);
177 
178  return true;
179 }
180 
182 {
183  mSlaves.clear();
184 
185  return true;
186 }
187 
189  float **inbuf,
190  float **outbuf,
191  size_t numSamples)
192 {
193 
194  return InstanceProcess(mSlaves[group], inbuf, outbuf, numSamples);
195 }
197  S.SHUTTLE_PARAM( mStages, Stages );
198  S.SHUTTLE_PARAM( mDryWet, DryWet );
199  S.SHUTTLE_PARAM( mFreq, Freq );
200  S.SHUTTLE_PARAM( mPhase, Phase );
201  S.SHUTTLE_PARAM( mDepth, Depth );
202  S.SHUTTLE_PARAM( mFeedback, Feedback );
203  S.SHUTTLE_PARAM( mOutGain, OutGain );
204  return true;
205 }
206 
208 {
209  parms.Write(KEY_Stages, mStages);
210  parms.Write(KEY_DryWet, mDryWet);
211  parms.Write(KEY_Freq, mFreq);
212  parms.Write(KEY_Phase, mPhase);
213  parms.Write(KEY_Depth, mDepth);
214  parms.Write(KEY_Feedback, mFeedback);
215  parms.Write(KEY_OutGain, mOutGain);
216 
217  return true;
218 }
219 
221 {
222  ReadAndVerifyInt(Stages);
223  ReadAndVerifyInt(DryWet);
224  ReadAndVerifyDouble(Freq);
225  ReadAndVerifyDouble(Phase);
226  ReadAndVerifyInt(Depth);
227  ReadAndVerifyInt(Feedback);
228  ReadAndVerifyDouble(OutGain);
229 
230  if (Stages & 1) // must be even, but don't complain about it
231  {
232  Stages &= ~1;
233  }
234 
235  mFreq = Freq;
236  mFeedback = Feedback;
237  mStages = Stages;
238  mDryWet = DryWet;
239  mDepth = Depth;
240  mPhase = Phase;
241  mOutGain = OutGain;
242 
243  return true;
244 }
245 
246 // Effect implementation
247 
249 {
250  S.SetBorder(5);
251  S.AddSpace(0, 5);
252 
253  S.StartMultiColumn(3, wxEXPAND);
254  {
255  S.SetStretchyCol(2);
256 
257  IntegerValidator<int> vldStages(&mStages);
258  vldStages.SetRange(MIN_Stages, MAX_Stages);
259  mStagesT = S.Id(ID_Stages).AddTextBox(_("&Stages:"), wxT(""), 15);
260  mStagesT->SetValidator(vldStages);
261 
262  S.SetStyle(wxSL_HORIZONTAL);
263  mStagesS = S.Id(ID_Stages).AddSlider( {}, DEF_Stages * SCL_Stages, MAX_Stages * SCL_Stages, MIN_Stages * SCL_Stages);
264  mStagesS->SetName(_("Stages"));
265  mStagesS->SetLineSize(2);
266  mStagesS->SetMinSize(wxSize(100, -1));
267 
268  IntegerValidator<int> vldDryWet(&mDryWet);
269  vldDryWet.SetRange(MIN_DryWet, MAX_DryWet);
270  mDryWetT = S.Id(ID_DryWet).AddTextBox(_("&Dry/Wet:"), wxT(""), 15);
271  mDryWetT->SetValidator(vldDryWet);
272 
273  S.SetStyle(wxSL_HORIZONTAL);
274  mDryWetS = S.Id(ID_DryWet).AddSlider( {}, DEF_DryWet * SCL_DryWet, MAX_DryWet * SCL_DryWet, MIN_DryWet * SCL_DryWet);
275  mDryWetS->SetName(_("Dry Wet"));
276  mDryWetS->SetMinSize(wxSize(100, -1));
277 
278  FloatingPointValidator<double> vldFreq(5, &mFreq, NumValidatorStyle::ONE_TRAILING_ZERO);
279  vldFreq.SetRange(MIN_Freq, MAX_Freq);
280  mFreqT = S.Id(ID_Freq).AddTextBox(_("LFO Freq&uency (Hz):"), wxT(""), 15);
281  mFreqT->SetValidator(vldFreq);
282 
283  S.SetStyle(wxSL_HORIZONTAL);
284  mFreqS = S.Id(ID_Freq).AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, 0.0);
285  mFreqS ->SetName(_("LFO frequency in hertz"));
286  mFreqS ->SetMinSize(wxSize(100, -1));
287 
288  FloatingPointValidator<double> vldPhase(1, &mPhase);
289  vldPhase.SetRange(MIN_Phase, MAX_Phase);
290  mPhaseT = S.Id(ID_Phase).AddTextBox(_("LFO Sta&rt Phase (deg.):"), wxT(""), 15);
291  mPhaseT->SetValidator(vldPhase);
292 
293  S.SetStyle(wxSL_HORIZONTAL);
294  mPhaseS = S.Id(ID_Phase).AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
295  mPhaseS->SetName(_("LFO start phase in degrees"));
296  mPhaseS->SetLineSize(10);
297  mPhaseS->SetMinSize(wxSize(100, -1));
298 
299  IntegerValidator<int> vldDepth(&mDepth);
300  vldDepth.SetRange(MIN_Depth, MAX_Depth);
301  mDepthT = S.Id(ID_Depth).AddTextBox(_("Dept&h:"), wxT(""), 15);
302  mDepthT->SetValidator(vldDepth);
303 
304  S.SetStyle(wxSL_HORIZONTAL);
305  mDepthS = S.Id(ID_Depth).AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
306  mDepthS->SetName(_("Depth in percent"));
307  mDepthS->SetMinSize(wxSize(100, -1));
308 
309  IntegerValidator<int> vldFeedback(&mFeedback);
310  vldFeedback.SetRange(MIN_Feedback, MAX_Feedback);
311  mFeedbackT = S.Id(ID_Feedback).AddTextBox(_("Feedbac&k (%):"), wxT(""), 15);
312  mFeedbackT->SetValidator(vldFeedback);
313 
314  S.SetStyle(wxSL_HORIZONTAL);
315  mFeedbackS = S.Id(ID_Feedback).AddSlider( {}, DEF_Feedback * SCL_Feedback, MAX_Feedback * SCL_Feedback, MIN_Feedback * SCL_Feedback);
316  mFeedbackS->SetName(_("Feedback in percent"));
317  mFeedbackS->SetLineSize(10);
318  mFeedbackS->SetMinSize(wxSize(100, -1));
319 
320  FloatingPointValidator<double> vldoutgain(1, &mOutGain);
321  vldoutgain.SetRange(MIN_OutGain, MAX_OutGain);
322  mOutGainT = S.Id(ID_OutGain).AddTextBox(_("&Output gain (dB):"), wxT(""), 12);
323  mOutGainT->SetValidator(vldoutgain);
324 
325  S.SetStyle(wxSL_HORIZONTAL);
326  mOutGainS = S.Id(ID_OutGain).AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
327  mOutGainS->SetName(_("Output gain (dB)"));
328  mOutGainS->SetMinSize(wxSize(100, -1));
329  }
330  S.EndMultiColumn();
331 }
332 
334 {
335  if (!mUIParent->TransferDataToWindow())
336  {
337  return false;
338  }
339 
340  mStagesS->SetValue((int) (mStages * SCL_Stages));
341  mDryWetS->SetValue((int) (mDryWet * SCL_DryWet));
342  mFreqS->SetValue((int) (mFreq * SCL_Freq));
343  mPhaseS->SetValue((int) (mPhase * SCL_Phase));
344  mDepthS->SetValue((int) (mDepth * SCL_Depth));
345  mFeedbackS->SetValue((int) (mFeedback * SCL_Feedback));
346  mOutGainS->SetValue((int) (mOutGain * SCL_OutGain));
347 
348  return true;
349 }
350 
352 {
353  if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
354  {
355  return false;
356  }
357 
358  if (mStages & 1) // must be even
359  {
360  mStages &= ~1;
361  mStagesT->GetValidator()->TransferToWindow();
362  }
363 
364  return true;
365 }
366 
367 // EffectPhaser implementation
368 
369 void EffectPhaser::InstanceInit(EffectPhaserState & data, float sampleRate)
370 {
371  data.samplerate = sampleRate;
372 
373  for (int j = 0; j < mStages; j++)
374  {
375  data.old[j] = 0;
376  }
377 
378  data.skipcount = 0;
379  data.gain = 0;
380  data.fbout = 0;
381  data.laststages = 0;
382  data.outgain = 0;
383 
384  return;
385 }
386 
387 size_t EffectPhaser::InstanceProcess(EffectPhaserState & data, float **inBlock, float **outBlock, size_t blockLen)
388 {
389  float *ibuf = inBlock[0];
390  float *obuf = outBlock[0];
391 
392  for (int j = data.laststages; j < mStages; j++)
393  {
394  data.old[j] = 0;
395  }
396  data.laststages = mStages;
397 
398  data.lfoskip = mFreq * 2 * M_PI / data.samplerate;
399  data.phase = mPhase * M_PI / 180;
400  data.outgain = DB_TO_LINEAR(mOutGain);
401 
402  for (decltype(blockLen) i = 0; i < blockLen; i++)
403  {
404  double in = ibuf[i];
405 
406  double m = in + data.fbout * mFeedback / 101; // Feedback must be less than 100% to avoid infinite gain.
407 
408  if (((data.skipcount++) % lfoskipsamples) == 0)
409  {
410  //compute sine between 0 and 1
411  data.gain =
412  (1.0 +
413  cos(data.skipcount.as_double() * data.lfoskip
414  + data.phase)) / 2.0;
415 
416  // change lfo shape
417  data.gain = expm1(data.gain * phaserlfoshape) / expm1(phaserlfoshape);
418 
419  // attenuate the lfo
420  data.gain = 1.0 - data.gain / 255.0 * mDepth;
421  }
422 
423  // phasing routine
424  for (int j = 0; j < mStages; j++)
425  {
426  double tmp = data.old[j];
427  data.old[j] = data.gain * tmp + m;
428  m = tmp - data.gain * data.old[j];
429  }
430  data.fbout = m;
431 
432  obuf[i] = (float) (data.outgain * (m * mDryWet + in * (255 - mDryWet)) / 255);
433  }
434 
435  return blockLen;
436 }
437 
438 void EffectPhaser::OnStagesSlider(wxCommandEvent & evt)
439 {
440  mStages = (evt.GetInt() / SCL_Stages) & ~1; // must be even;
441  mStagesT->GetValidator()->TransferToWindow();
442  EnableApply(mUIParent->Validate());
443 }
444 
445 void EffectPhaser::OnDryWetSlider(wxCommandEvent & evt)
446 {
447  mDryWet = evt.GetInt() / SCL_DryWet;
448  mDryWetT->GetValidator()->TransferToWindow();
449  EnableApply(mUIParent->Validate());
450 }
451 
452 void EffectPhaser::OnFreqSlider(wxCommandEvent & evt)
453 {
454  mFreq = (double) evt.GetInt() / SCL_Freq;
455  if (mFreq < MIN_Freq) mFreq = MIN_Freq;
456  mFreqT->GetValidator()->TransferToWindow();
457  EnableApply(mUIParent->Validate());
458 }
459 
460 void EffectPhaser::OnPhaseSlider(wxCommandEvent & evt)
461 {
462  int val = ((evt.GetInt() + 5) / 10) * 10; // round to nearest multiple of 10
463  val = val > MAX_Phase * SCL_Phase ? MAX_Phase * SCL_Phase : val;
464  mPhaseS->SetValue(val);
465  mPhase = (double) val / SCL_Phase;
466  mPhaseT->GetValidator()->TransferToWindow();
467  EnableApply(mUIParent->Validate());
468 }
469 
470 void EffectPhaser::OnDepthSlider(wxCommandEvent & evt)
471 {
472  mDepth = evt.GetInt() / SCL_Depth;
473  mDepthT->GetValidator()->TransferToWindow();
474  EnableApply(mUIParent->Validate());
475 }
476 
477 void EffectPhaser::OnFeedbackSlider(wxCommandEvent & evt)
478 {
479  int val = evt.GetInt();
480  val = ((val + (val > 0 ? 5 : -5)) / 10) * 10; // round to nearest multiple of 10
481  val = val > MAX_Feedback * SCL_Feedback ? MAX_Feedback * SCL_Feedback : val;
482  mFeedbackS->SetValue(val);
483  mFeedback = val / SCL_Feedback;
484  mFeedbackT->GetValidator()->TransferToWindow();
485  EnableApply(mUIParent->Validate());
486 }
487 
488 void EffectPhaser::OnGainSlider(wxCommandEvent & evt)
489 {
490  mOutGain = evt.GetInt() / SCL_OutGain;
491  mOutGainT->GetValidator()->TransferToWindow();
492  EnableApply(mUIParent->Validate());
493 }
494 
495 void EffectPhaser::OnStagesText(wxCommandEvent & WXUNUSED(evt))
496 {
497  if (!EnableApply(mUIParent->TransferDataFromWindow()))
498  {
499  return;
500  }
501 
502  mStagesS->SetValue((int) (mStages * SCL_Stages));
503 }
504 
505 void EffectPhaser::OnDryWetText(wxCommandEvent & WXUNUSED(evt))
506 {
507  if (!EnableApply(mUIParent->TransferDataFromWindow()))
508  {
509  return;
510  }
511 
512  mDryWetS->SetValue((int) (mDryWet * SCL_DryWet));
513 }
514 
515 void EffectPhaser::OnFreqText(wxCommandEvent & WXUNUSED(evt))
516 {
517  if (!EnableApply(mUIParent->TransferDataFromWindow()))
518  {
519  return;
520  }
521 
522  mFreqS->SetValue((int) (mFreq * SCL_Freq));
523 }
524 
525 void EffectPhaser::OnPhaseText(wxCommandEvent & WXUNUSED(evt))
526 {
527  if (!EnableApply(mUIParent->TransferDataFromWindow()))
528  {
529  return;
530  }
531 
532  mPhaseS->SetValue((int) (mPhase * SCL_Phase));
533 }
534 
535 void EffectPhaser::OnDepthText(wxCommandEvent & WXUNUSED(evt))
536 {
537  if (!EnableApply(mUIParent->TransferDataFromWindow()))
538  {
539  return;
540  }
541 
542  mDepthS->SetValue((int) (mDepth * SCL_Depth));
543 }
544 
545 void EffectPhaser::OnFeedbackText(wxCommandEvent & WXUNUSED(evt))
546 {
547  if (!EnableApply(mUIParent->TransferDataFromWindow()))
548  {
549  return;
550  }
551 
552  mFeedbackS->SetValue((int) (mFeedback * SCL_Feedback));
553 }
554 
555 void EffectPhaser::OnGainText(wxCommandEvent & WXUNUSED(evt))
556 {
557  if (!EnableApply(mUIParent->TransferDataFromWindow()))
558  {
559  return;
560  }
561 
562  mOutGainS->SetValue((int) (mOutGain * SCL_OutGain));
563 }
void OnDepthText(wxCommandEvent &evt)
Definition: Phaser.cpp:535
std::vector< EffectPhaserState > mSlaves
Definition: Phaser.h:122
wxSlider * mOutGainS
Definition: Phaser.h:147
int mStages
Definition: Phaser.h:125
void OnFreqSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:452
void OnFeedbackText(wxCommandEvent &evt)
Definition: Phaser.cpp:545
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: Phaser.cpp:145
wxString ManualPage() override
Definition: Phaser.cpp:112
void OnPhaseSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:460
bool SetAutomationParameters(CommandParameters &parms) override
Definition: Phaser.cpp:220
size_t SetBlockSize(size_t maxBlockSize) override
Definition: Effect.cpp:332
void OnPhaseText(wxCommandEvent &evt)
Definition: Phaser.cpp:525
double mOutGain
Definition: Phaser.h:131
wxSlider * mPhaseS
Definition: Phaser.h:144
void EndMultiColumn()
void OnFreqText(wxCommandEvent &evt)
Definition: Phaser.cpp:515
wxSlider * mFreqS
Definition: Phaser.h:143
EffectPhaserState mMaster
Definition: Phaser.h:121
double as_double() const
Definition: Types.h:88
wxTextCtrl * mFeedbackT
Definition: Phaser.h:138
wxTextCtrl * mStagesT
Definition: Phaser.h:133
size_t InstanceProcess(EffectPhaserState &data, float **inBlock, float **outBlock, size_t blockLen)
Definition: Phaser.cpp:387
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:60
IdentInterfaceSymbol GetSymbol() override
Definition: Phaser.cpp:102
double gain
Definition: Phaser.h:39
double lfoskip
Definition: Phaser.h:42
void OnFeedbackSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:477
double fbout
Definition: Phaser.h:40
double mSampleRate
Definition: Effect.h:455
void OnDepthSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:470
wxSlider * mStagesS
Definition: Phaser.h:141
sampleCount skipcount
Definition: Phaser.h:37
bool DefineParams(ShuttleParams &S) override
Definition: Phaser.cpp:196
wxTextCtrl * mDepthT
Definition: Phaser.h:137
int mDepth
Definition: Phaser.h:129
double phase
Definition: Phaser.h:43
unsigned GetAudioInCount() override
Definition: Phaser.cpp:135
double old[NUM_STAGES]
Definition: Phaser.h:38
wxSlider * mDepthS
Definition: Phaser.h:145
Param(Stages, int, wxT("Stages"), 2, 2, NUM_STAGES, 1)
void InstanceInit(EffectPhaserState &data, float sampleRate)
Definition: Phaser.cpp:369
wxTextCtrl * mPhaseT
Definition: Phaser.h:136
wxString GetDescription() override
Definition: Phaser.cpp:107
double outgain
Definition: Phaser.h:41
wxTextCtrl * mOutGainT
Definition: Phaser.h:139
bool RealtimeFinalize() override
Definition: Phaser.cpp:181
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:540
#define ReadAndVerifyInt(name)
Definition: Effect.h:797
bool TransferDataFromWindow() override
Definition: Phaser.cpp:351
unsigned GetAudioOutCount() override
Definition: Phaser.cpp:140
#define NUM_STAGES
Definition: Phaser.h:28
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Phaser.cpp:156
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
void OnStagesText(wxCommandEvent &evt)
Definition: Phaser.cpp:495
bool RealtimeAddProcessor(unsigned numChannels, float sampleRate) override
Definition: Phaser.cpp:170
wxTextCtrl * mDryWetT
Definition: Phaser.h:134
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
bool TransferDataToWindow() override
Definition: Phaser.cpp:333
ShuttleGui & Id(int id)
void SetStyle(int Style)
Definition: ShuttleGui.h:287
#define ReadAndVerifyDouble(name)
Definition: Effect.h:798
size_t RealtimeProcess(int group, float **inbuf, float **outbuf, size_t numSamples) override
Definition: Phaser.cpp:188
wxSlider * mFeedbackS
Definition: Phaser.h:146
double mPhase
Definition: Phaser.h:128
wxSlider * mDryWetS
Definition: Phaser.h:142
int mDryWet
Definition: Phaser.h:126
IdentInterfaceSymbol pairs a persistent string identifier used internally with an optional...
void OnStagesSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:438
enum ChannelName * ChannelNames
int mFeedback
Definition: Phaser.h:130
wxWindow * mUIParent
Definition: Effect.h:472
bool GetAutomationParameters(CommandParameters &parms) override
Definition: Phaser.cpp:207
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxTextCtrl * mFreqT
Definition: Phaser.h:135
EffectType
virtual ~EffectPhaser()
Definition: Phaser.cpp:96
#define M_PI
Definition: Distortion.cpp:28
void OnDryWetSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:445
#define phaserlfoshape
Definition: Phaser.cpp:57
double mFreq
Definition: Phaser.h:127
void OnGainSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:488
bool SupportsRealtime() override
Definition: Phaser.cpp:124
bool RealtimeInitialize() override
Definition: Phaser.cpp:161
float samplerate
Definition: Phaser.h:36
void PopulateOrExchange(ShuttleGui &S) override
Definition: Phaser.cpp:248
END_EVENT_TABLE()
wxSizerItem * AddSpace(int width, int height)
#define PHASER_PLUGIN_SYMBOL
Definition: Phaser.h:30
void SetBorder(int Border)
Definition: ShuttleGui.h:286
const double MIN_Threshold_Linear DB_TO_LINEAR(MIN_Threshold_dB)
An Effect that changes frequencies in a time varying manner.
Definition: Phaser.h:47
void OnGainText(wxCommandEvent &evt)
Definition: Phaser.cpp:555
void OnDryWetText(wxCommandEvent &evt)
Definition: Phaser.cpp:505
#define lfoskipsamples
Definition: Phaser.cpp:60
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:203
virtual bool EnableApply(bool enable=true)
Definition: Effect.cpp:1886
EffectType GetType() override
Definition: Phaser.cpp:119
wxSlider * AddSlider(const wxString &Prompt, int pos, int Max, int Min=0)
Definition: ShuttleGui.cpp:497