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