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 // EffectIdentInterface 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 
145 bool EffectPhaser::ProcessInitialize(sampleCount WXUNUSED(totalLen), ChannelNames chanMap)
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 }
196 
197 bool EffectPhaser::GetAutomationParameters(EffectAutomationParameters & parms)
198 {
199  parms.Write(KEY_Stages, mStages);
200  parms.Write(KEY_DryWet, mDryWet);
201  parms.Write(KEY_Freq, mFreq);
202  parms.Write(KEY_Phase, mPhase);
203  parms.Write(KEY_Depth, mDepth);
204  parms.Write(KEY_Feedback, mFeedback);
205  parms.Write(KEY_OutGain, mOutGain);
206 
207  return true;
208 }
209 
210 bool EffectPhaser::SetAutomationParameters(EffectAutomationParameters & parms)
211 {
212  ReadAndVerifyInt(Stages);
213  ReadAndVerifyInt(DryWet);
214  ReadAndVerifyDouble(Freq);
215  ReadAndVerifyDouble(Phase);
216  ReadAndVerifyInt(Depth);
217  ReadAndVerifyInt(Feedback);
218  ReadAndVerifyDouble(OutGain);
219 
220  if (Stages & 1) // must be even, but don't complain about it
221  {
222  Stages &= ~1;
223  }
224 
225  mFreq = Freq;
226  mFeedback = Feedback;
227  mStages = Stages;
228  mDryWet = DryWet;
229  mDepth = Depth;
230  mPhase = Phase;
231  mOutGain = OutGain;
232 
233  return true;
234 }
235 
236 // Effect implementation
237 
239 {
240  S.SetBorder(5);
241  S.AddSpace(0, 5);
242 
243  S.StartMultiColumn(3, wxEXPAND);
244  {
245  S.SetStretchyCol(2);
246 
247  IntegerValidator<int> vldStages(&mStages);
248  vldStages.SetRange(MIN_Stages, MAX_Stages);
249  mStagesT = S.Id(ID_Stages).AddTextBox(_("&Stages:"), wxT(""), 15);
250  mStagesT->SetValidator(vldStages);
251 
252  S.SetStyle(wxSL_HORIZONTAL);
253  mStagesS = S.Id(ID_Stages).AddSlider( {}, DEF_Stages * SCL_Stages, MAX_Stages * SCL_Stages, MIN_Stages * SCL_Stages);
254  mStagesS->SetName(_("Stages"));
255  mStagesS->SetLineSize(2);
256  mStagesS->SetMinSize(wxSize(100, -1));
257 
258  IntegerValidator<int> vldDryWet(&mDryWet);
259  vldDryWet.SetRange(MIN_DryWet, MAX_DryWet);
260  mDryWetT = S.Id(ID_DryWet).AddTextBox(_("&Dry/Wet:"), wxT(""), 15);
261  mDryWetT->SetValidator(vldDryWet);
262 
263  S.SetStyle(wxSL_HORIZONTAL);
264  mDryWetS = S.Id(ID_DryWet).AddSlider( {}, DEF_DryWet * SCL_DryWet, MAX_DryWet * SCL_DryWet, MIN_DryWet * SCL_DryWet);
265  mDryWetS->SetName(_("Dry Wet"));
266  mDryWetS->SetMinSize(wxSize(100, -1));
267 
268  FloatingPointValidator<double> vldFreq(5, &mFreq, NumValidatorStyle::ONE_TRAILING_ZERO);
269  vldFreq.SetRange(MIN_Freq, MAX_Freq);
270  mFreqT = S.Id(ID_Freq).AddTextBox(_("LFO Freq&uency (Hz):"), wxT(""), 15);
271  mFreqT->SetValidator(vldFreq);
272 
273  S.SetStyle(wxSL_HORIZONTAL);
274  mFreqS = S.Id(ID_Freq).AddSlider( {}, DEF_Freq * SCL_Freq, MAX_Freq * SCL_Freq, 0.0);
275  mFreqS ->SetName(_("LFO frequency in hertz"));
276  mFreqS ->SetMinSize(wxSize(100, -1));
277 
278  FloatingPointValidator<double> vldPhase(1, &mPhase);
279  vldPhase.SetRange(MIN_Phase, MAX_Phase);
280  mPhaseT = S.Id(ID_Phase).AddTextBox(_("LFO Sta&rt Phase (deg.):"), wxT(""), 15);
281  mPhaseT->SetValidator(vldPhase);
282 
283  S.SetStyle(wxSL_HORIZONTAL);
284  mPhaseS = S.Id(ID_Phase).AddSlider( {}, DEF_Phase * SCL_Phase, MAX_Phase * SCL_Phase, MIN_Phase * SCL_Phase);
285  mPhaseS->SetName(_("LFO start phase in degrees"));
286  mPhaseS->SetLineSize(10);
287  mPhaseS->SetMinSize(wxSize(100, -1));
288 
289  IntegerValidator<int> vldDepth(&mDepth);
290  vldDepth.SetRange(MIN_Depth, MAX_Depth);
291  mDepthT = S.Id(ID_Depth).AddTextBox(_("Dept&h:"), wxT(""), 15);
292  mDepthT->SetValidator(vldDepth);
293 
294  S.SetStyle(wxSL_HORIZONTAL);
295  mDepthS = S.Id(ID_Depth).AddSlider( {}, DEF_Depth * SCL_Depth, MAX_Depth * SCL_Depth, MIN_Depth * SCL_Depth);
296  mDepthS->SetName(_("Depth in percent"));
297  mDepthS->SetMinSize(wxSize(100, -1));
298 
299  IntegerValidator<int> vldFeedback(&mFeedback);
300  vldFeedback.SetRange(MIN_Feedback, MAX_Feedback);
301  mFeedbackT = S.Id(ID_Feedback).AddTextBox(_("Feedbac&k (%):"), wxT(""), 15);
302  mFeedbackT->SetValidator(vldFeedback);
303 
304  S.SetStyle(wxSL_HORIZONTAL);
305  mFeedbackS = S.Id(ID_Feedback).AddSlider( {}, DEF_Feedback * SCL_Feedback, MAX_Feedback * SCL_Feedback, MIN_Feedback * SCL_Feedback);
306  mFeedbackS->SetName(_("Feedback in percent"));
307  mFeedbackS->SetLineSize(10);
308  mFeedbackS->SetMinSize(wxSize(100, -1));
309 
310  FloatingPointValidator<double> vldoutgain(1, &mOutGain);
311  vldoutgain.SetRange(MIN_OutGain, MAX_OutGain);
312  mOutGainT = S.Id(ID_OutGain).AddTextBox(_("&Output gain (dB):"), wxT(""), 12);
313  mOutGainT->SetValidator(vldoutgain);
314 
315  S.SetStyle(wxSL_HORIZONTAL);
316  mOutGainS = S.Id(ID_OutGain).AddSlider( {}, DEF_OutGain * SCL_OutGain, MAX_OutGain * SCL_OutGain, MIN_OutGain * SCL_OutGain);
317  mOutGainS->SetName(_("Output gain (dB)"));
318  mOutGainS->SetMinSize(wxSize(100, -1));
319  }
320  S.EndMultiColumn();
321 }
322 
324 {
325  if (!mUIParent->TransferDataToWindow())
326  {
327  return false;
328  }
329 
330  mStagesS->SetValue((int) (mStages * SCL_Stages));
331  mDryWetS->SetValue((int) (mDryWet * SCL_DryWet));
332  mFreqS->SetValue((int) (mFreq * SCL_Freq));
333  mPhaseS->SetValue((int) (mPhase * SCL_Phase));
334  mDepthS->SetValue((int) (mDepth * SCL_Depth));
335  mFeedbackS->SetValue((int) (mFeedback * SCL_Feedback));
336  mOutGainS->SetValue((int) (mOutGain * SCL_OutGain));
337 
338  return true;
339 }
340 
342 {
343  if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
344  {
345  return false;
346  }
347 
348  if (mStages & 1) // must be even
349  {
350  mStages &= ~1;
351  mStagesT->GetValidator()->TransferToWindow();
352  }
353 
354  return true;
355 }
356 
357 // EffectPhaser implementation
358 
359 void EffectPhaser::InstanceInit(EffectPhaserState & data, float sampleRate)
360 {
361  data.samplerate = sampleRate;
362 
363  for (int j = 0; j < mStages; j++)
364  {
365  data.old[j] = 0;
366  }
367 
368  data.skipcount = 0;
369  data.gain = 0;
370  data.fbout = 0;
371  data.laststages = 0;
372  data.outgain = 0;
373 
374  return;
375 }
376 
377 size_t EffectPhaser::InstanceProcess(EffectPhaserState & data, float **inBlock, float **outBlock, size_t blockLen)
378 {
379  float *ibuf = inBlock[0];
380  float *obuf = outBlock[0];
381 
382  for (int j = data.laststages; j < mStages; j++)
383  {
384  data.old[j] = 0;
385  }
386  data.laststages = mStages;
387 
388  data.lfoskip = mFreq * 2 * M_PI / data.samplerate;
389  data.phase = mPhase * M_PI / 180;
390  data.outgain = DB_TO_LINEAR(mOutGain);
391 
392  for (decltype(blockLen) i = 0; i < blockLen; i++)
393  {
394  double in = ibuf[i];
395 
396  double m = in + data.fbout * mFeedback / 101; // Feedback must be less than 100% to avoid infinite gain.
397 
398  if (((data.skipcount++) % lfoskipsamples) == 0)
399  {
400  //compute sine between 0 and 1
401  data.gain =
402  (1.0 +
403  cos(data.skipcount.as_double() * data.lfoskip
404  + data.phase)) / 2.0;
405 
406  // change lfo shape
407  data.gain = expm1(data.gain * phaserlfoshape) / expm1(phaserlfoshape);
408 
409  // attenuate the lfo
410  data.gain = 1.0 - data.gain / 255.0 * mDepth;
411  }
412 
413  // phasing routine
414  for (int j = 0; j < mStages; j++)
415  {
416  double tmp = data.old[j];
417  data.old[j] = data.gain * tmp + m;
418  m = tmp - data.gain * data.old[j];
419  }
420  data.fbout = m;
421 
422  obuf[i] = (float) (data.outgain * (m * mDryWet + in * (255 - mDryWet)) / 255);
423  }
424 
425  return blockLen;
426 }
427 
428 void EffectPhaser::OnStagesSlider(wxCommandEvent & evt)
429 {
430  mStages = (evt.GetInt() / SCL_Stages) & ~1; // must be even;
431  mStagesT->GetValidator()->TransferToWindow();
432  EnableApply(mUIParent->Validate());
433 }
434 
435 void EffectPhaser::OnDryWetSlider(wxCommandEvent & evt)
436 {
437  mDryWet = evt.GetInt() / SCL_DryWet;
438  mDryWetT->GetValidator()->TransferToWindow();
439  EnableApply(mUIParent->Validate());
440 }
441 
442 void EffectPhaser::OnFreqSlider(wxCommandEvent & evt)
443 {
444  mFreq = (double) evt.GetInt() / SCL_Freq;
445  if (mFreq < MIN_Freq) mFreq = MIN_Freq;
446  mFreqT->GetValidator()->TransferToWindow();
447  EnableApply(mUIParent->Validate());
448 }
449 
450 void EffectPhaser::OnPhaseSlider(wxCommandEvent & evt)
451 {
452  int val = ((evt.GetInt() + 5) / 10) * 10; // round to nearest multiple of 10
453  val = val > MAX_Phase * SCL_Phase ? MAX_Phase * SCL_Phase : val;
454  mPhaseS->SetValue(val);
455  mPhase = (double) val / SCL_Phase;
456  mPhaseT->GetValidator()->TransferToWindow();
457  EnableApply(mUIParent->Validate());
458 }
459 
460 void EffectPhaser::OnDepthSlider(wxCommandEvent & evt)
461 {
462  mDepth = evt.GetInt() / SCL_Depth;
463  mDepthT->GetValidator()->TransferToWindow();
464  EnableApply(mUIParent->Validate());
465 }
466 
467 void EffectPhaser::OnFeedbackSlider(wxCommandEvent & evt)
468 {
469  int val = evt.GetInt();
470  val = ((val + (val > 0 ? 5 : -5)) / 10) * 10; // round to nearest multiple of 10
471  val = val > MAX_Feedback * SCL_Feedback ? MAX_Feedback * SCL_Feedback : val;
472  mFeedbackS->SetValue(val);
473  mFeedback = val / SCL_Feedback;
474  mFeedbackT->GetValidator()->TransferToWindow();
475  EnableApply(mUIParent->Validate());
476 }
477 
478 void EffectPhaser::OnGainSlider(wxCommandEvent & evt)
479 {
480  mOutGain = evt.GetInt() / SCL_OutGain;
481  mOutGainT->GetValidator()->TransferToWindow();
482  EnableApply(mUIParent->Validate());
483 }
484 
485 void EffectPhaser::OnStagesText(wxCommandEvent & WXUNUSED(evt))
486 {
487  if (!EnableApply(mUIParent->TransferDataFromWindow()))
488  {
489  return;
490  }
491 
492  mStagesS->SetValue((int) (mStages * SCL_Stages));
493 }
494 
495 void EffectPhaser::OnDryWetText(wxCommandEvent & WXUNUSED(evt))
496 {
497  if (!EnableApply(mUIParent->TransferDataFromWindow()))
498  {
499  return;
500  }
501 
502  mDryWetS->SetValue((int) (mDryWet * SCL_DryWet));
503 }
504 
505 void EffectPhaser::OnFreqText(wxCommandEvent & WXUNUSED(evt))
506 {
507  if (!EnableApply(mUIParent->TransferDataFromWindow()))
508  {
509  return;
510  }
511 
512  mFreqS->SetValue((int) (mFreq * SCL_Freq));
513 }
514 
515 void EffectPhaser::OnPhaseText(wxCommandEvent & WXUNUSED(evt))
516 {
517  if (!EnableApply(mUIParent->TransferDataFromWindow()))
518  {
519  return;
520  }
521 
522  mPhaseS->SetValue((int) (mPhase * SCL_Phase));
523 }
524 
525 void EffectPhaser::OnDepthText(wxCommandEvent & WXUNUSED(evt))
526 {
527  if (!EnableApply(mUIParent->TransferDataFromWindow()))
528  {
529  return;
530  }
531 
532  mDepthS->SetValue((int) (mDepth * SCL_Depth));
533 }
534 
535 void EffectPhaser::OnFeedbackText(wxCommandEvent & WXUNUSED(evt))
536 {
537  if (!EnableApply(mUIParent->TransferDataFromWindow()))
538  {
539  return;
540  }
541 
542  mFeedbackS->SetValue((int) (mFeedback * SCL_Feedback));
543 }
544 
545 void EffectPhaser::OnGainText(wxCommandEvent & WXUNUSED(evt))
546 {
547  if (!EnableApply(mUIParent->TransferDataFromWindow()))
548  {
549  return;
550  }
551 
552  mOutGainS->SetValue((int) (mOutGain * SCL_OutGain));
553 }
void OnDepthText(wxCommandEvent &evt)
Definition: Phaser.cpp:525
std::vector< EffectPhaserState > mSlaves
Definition: Phaser.h:121
wxSlider * mOutGainS
Definition: Phaser.h:146
int mStages
Definition: Phaser.h:124
void OnFreqSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:442
void OnFeedbackText(wxCommandEvent &evt)
Definition: Phaser.cpp:535
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:366
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:450
size_t SetBlockSize(size_t maxBlockSize) override
Definition: Effect.cpp:357
void OnPhaseText(wxCommandEvent &evt)
Definition: Phaser.cpp:515
double mOutGain
Definition: Phaser.h:130
wxSlider * mPhaseS
Definition: Phaser.h:143
void EndMultiColumn()
wxString GetSymbol() override
Definition: Phaser.cpp:102
void OnFreqText(wxCommandEvent &evt)
Definition: Phaser.cpp:505
wxSlider * mFreqS
Definition: Phaser.h:142
EffectPhaserState mMaster
Definition: Phaser.h:120
wxTextCtrl * mFeedbackT
Definition: Phaser.h:137
wxTextCtrl * mStagesT
Definition: Phaser.h:132
size_t InstanceProcess(EffectPhaserState &data, float **inBlock, float **outBlock, size_t blockLen)
Definition: Phaser.cpp:377
double gain
Definition: Phaser.h:39
double lfoskip
Definition: Phaser.h:42
void OnFeedbackSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:467
double fbout
Definition: Phaser.h:40
double mSampleRate
Definition: Effect.h:458
void OnDepthSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:460
wxSlider * mStagesS
Definition: Phaser.h:140
sampleCount skipcount
Definition: Phaser.h:37
wxTextCtrl * mDepthT
Definition: Phaser.h:136
int mDepth
Definition: Phaser.h:128
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:144
Param(Stages, int, wxT("Stages"), 2, 2, NUM_STAGES, 1)
void InstanceInit(EffectPhaserState &data, float sampleRate)
Definition: Phaser.cpp:359
wxTextCtrl * mPhaseT
Definition: Phaser.h:135
wxString GetDescription() override
Definition: Phaser.cpp:107
double outgain
Definition: Phaser.h:41
wxTextCtrl * mOutGainT
Definition: Phaser.h:138
bool RealtimeFinalize() override
Definition: Phaser.cpp:181
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:493
#define ReadAndVerifyInt(name)
Definition: Effect.h:790
bool TransferDataFromWindow() override
Definition: Phaser.cpp:341
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)
Definition: ShuttleGui.cpp:998
void OnStagesText(wxCommandEvent &evt)
Definition: Phaser.cpp:485
bool RealtimeAddProcessor(unsigned numChannels, float sampleRate) override
Definition: Phaser.cpp:170
wxTextCtrl * mDryWetT
Definition: Phaser.h:133
bool TransferDataToWindow() override
Definition: Phaser.cpp:323
ShuttleGui & Id(int id)
void SetStyle(int Style)
Definition: ShuttleGui.h:252
#define ReadAndVerifyDouble(name)
Definition: Effect.h:791
size_t RealtimeProcess(int group, float **inbuf, float **outbuf, size_t numSamples) override
Definition: Phaser.cpp:188
wxSlider * mFeedbackS
Definition: Phaser.h:145
double mPhase
Definition: Phaser.h:127
wxSlider * mDryWetS
Definition: Phaser.h:141
int mDryWet
Definition: Phaser.h:125
void OnStagesSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:428
int mFeedback
Definition: Phaser.h:129
wxWindow * mUIParent
Definition: Effect.h:475
bool GetAutomationParameters(EffectAutomationParameters &parms) override
Definition: Phaser.cpp:197
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop"))), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom"))), OnMoveTrack) void TrackMenuTable::OnSetName(wxCommandEvent &)
wxTextCtrl * mFreqT
Definition: Phaser.h:134
virtual ~EffectPhaser()
Definition: Phaser.cpp:96
#define M_PI
Definition: Distortion.cpp:28
void PopulateOrExchange(ShuttleGui &S)
Definition: Phaser.cpp:238
void OnDryWetSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:435
#define phaserlfoshape
Definition: Phaser.cpp:57
double mFreq
Definition: Phaser.h:126
void OnGainSlider(wxCommandEvent &evt)
Definition: Phaser.cpp:478
bool SupportsRealtime() override
Definition: Phaser.cpp:124
bool RealtimeInitialize() override
Definition: Phaser.cpp:161
float samplerate
Definition: Phaser.h:36
END_EVENT_TABLE()
wxSizerItem * AddSpace(int width, int height)
#define PHASER_PLUGIN_SYMBOL
Definition: Phaser.h:30
void SetBorder(int Border)
Definition: ShuttleGui.h:251
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:545
bool SetAutomationParameters(EffectAutomationParameters &parms) override
Definition: Phaser.cpp:210
void OnDryWetText(wxCommandEvent &evt)
Definition: Phaser.cpp:495
#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:192
virtual bool EnableApply(bool enable=true)
Definition: Effect.cpp:1889
EffectType GetType() override
Definition: Phaser.cpp:119
wxSlider * AddSlider(const wxString &Prompt, int pos, int Max, int Min=0)
Definition: ShuttleGui.cpp:456