Audacity 3.2.0
Wahwah.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 Wahwah.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 "Wahwah.h"
23#include "EffectEditor.h"
24#include "LoadEffects.h"
25
26#include <math.h>
27
28#include <wx/slider.h>
29#include <wx/weakref.h>
30
31#include "ShuttleGui.h"
32#include "../widgets/valnum.h"
33
35{
38 > parameters;
39 return parameters;
40}
41
42// How many samples are processed before recomputing the lfo value again
43#define lfoskipsamples 30
44
45//
46// EffectWahwah
47//
48
50{ XO("Wahwah") };
51
53
56{
57 Editor(const EffectUIServices& services,
59 ) : EffectEditor{ services, access }
61 {}
62 virtual ~Editor() = default;
63
64 bool ValidateUI() override;
65 bool UpdateUI() override;
66
68
69 void OnFreqSlider(wxCommandEvent& evt);
70 void OnPhaseSlider(wxCommandEvent& evt);
71 void OnDepthSlider(wxCommandEvent& evt);
72 void OnResonanceSlider(wxCommandEvent& evt);
73 void OnFreqOffSlider(wxCommandEvent& evt);
74 void OnGainSlider(wxCommandEvent& evt);
75
76 void OnFreqText(wxCommandEvent& evt);
77 void OnPhaseText(wxCommandEvent& evt);
78 void OnDepthText(wxCommandEvent& evt);
79 void OnResonanceText(wxCommandEvent& evt);
80 void OnFreqOffText(wxCommandEvent& evt);
81 void OnGainText(wxCommandEvent& evt);
82
83 wxTextCtrl* mFreqT;
84 wxTextCtrl* mPhaseT;
85 wxTextCtrl* mDepthT;
86 wxTextCtrl* mResT;
87 wxTextCtrl* mFreqOfsT;
88 wxTextCtrl* mOutGainT;
89
90 wxSlider* mFreqS;
91 wxSlider* mPhaseS;
92 wxSlider* mDepthS;
93 wxSlider* mResS;
94 wxSlider* mFreqOfsS;
95 wxSlider* mOutGainS;
96
97
98 wxWeakRef<wxWindow> mUIParent;
100
102 {
103 EnableApply(mUIParent, mUIParent->Validate());
104 }
105
107 {
108 return EnableApply(mUIParent, mUIParent->TransferDataFromWindow());
109 }
110};
111
112
114{
116 (
117 [this](EffectSettings& settings)
118 {
119 // pass back the modified settings to the MessageBuffer
121 return nullptr;
122 }
123 );
124
125 return true;
126}
127
128
132{
133 explicit Instance(const PerTrackEffect& effect)
134 : PerTrackEffect::Instance{ effect }
135 {}
136
138 ChannelNames chanMap) override;
139
141 const float* const* inBlock, float* const* outBlock, size_t blockLen) override;
142
143 //bool ProcessFinalize() noexcept override;
144
145 bool RealtimeInitialize(EffectSettings& settings, double) override;
146
148 EffectOutputs *pOutputs, unsigned numChannels, float sampleRate) override;
149
150 bool RealtimeFinalize(EffectSettings& settings) noexcept override;
151
152 size_t RealtimeProcess(size_t group, EffectSettings& settings,
153 const float* const* inbuf, float* const* outbuf, size_t numSamples)
154 override;
155
156
158
160 const float* const* inBlock, float* const* outBlock, size_t blockLen);
161
162 unsigned GetAudioInCount() const override;
163 unsigned GetAudioOutCount() const override;
164
166 std::vector<EffectWahwah::Instance> mSlaves;
167};
168
169
170std::shared_ptr<EffectInstance> EffectWahwah::MakeInstance() const
171{
172 return std::make_shared<Instance>(*this);
173}
174
176{
178}
179
181{
182}
183
184// ComponentInterface implementation
185
187{
188 return Symbol;
189}
190
192{
193 return XO("Rapid tone quality variations, like that guitar sound so popular in the 1970's");
194}
195
197{
198 return L"Wahwah";
199}
200
201// EffectDefinitionInterface implementation
202
204{
205 return EffectTypeProcess;
206}
207
209{
211}
212
214 double sampleRate, ChannelNames chanMap)
215{
216 InstanceInit(settings, mState, sampleRate);
217 if (chanMap[0] == ChannelNameFrontRight)
218 mState.phase += M_PI;
219 return true;
220}
221
223 const float *const *inBlock, float *const *outBlock, size_t blockLen)
224{
225 return InstanceProcess(settings, mState, inBlock, outBlock, blockLen);
226}
227
229{
230 SetBlockSize(512);
231 mSlaves.clear();
232 return true;
233}
234
236 EffectSettings &settings, EffectOutputs *, unsigned, float sampleRate)
237{
238 EffectWahwah::Instance slave(mProcessor);
239
240 InstanceInit(settings, slave.mState, sampleRate);
241
242 mSlaves.push_back(slave);
243
244 return true;
245}
246
248{
249 mSlaves.clear();
250
251 return true;
252}
253
255 const float *const *inbuf, float *const *outbuf, size_t numSamples)
256{
257 if (group >= mSlaves.size())
258 return 0;
259 return InstanceProcess(settings, mSlaves[group].mState, inbuf, outbuf, numSamples);
260}
261
262// Effect implementation
263
264std::unique_ptr<EffectEditor> EffectWahwah::MakeEditor(
266 const EffectOutputs *) const
267{
268 auto& settings = access.Get();
269 auto& myEffSettings = GetSettings(settings);
270 auto result = std::make_unique<Editor>(*this, access, myEffSettings);
271 result->PopulateOrExchange(S);
272 return result;
273}
274
276{
277 mUIParent = S.GetParent();
278 auto& ms = mSettings;
279
280 S.SetBorder(5);
281 S.AddSpace(0, 5);
282
283 S.StartMultiColumn(3, wxEXPAND);
284 {
285 S.SetStretchyCol(2);
286
287 mFreqT = S
288 .Validator<FloatingPointValidator<double>>(
289 5, &ms.mFreq, NumValidatorStyle::ONE_TRAILING_ZERO, Freq.min, Freq.max)
290 .AddTextBox(XXO("LFO Freq&uency (Hz):"), L"", 12);
291 BindTo(*mFreqT, wxEVT_TEXT, &Editor::OnFreqText);
292
293 mFreqS = S
294 .Name(XO("LFO frequency in hertz"))
295 .Style(wxSL_HORIZONTAL)
296 .MinSize( { 100, -1 } )
297 .AddSlider( {}, Freq.def * Freq.scale, Freq.max * Freq.scale, Freq.min * Freq.scale);
298 BindTo(*mFreqS, wxEVT_SLIDER, &Editor::OnFreqSlider);
299
300 mPhaseT = S
301 .Validator<FloatingPointValidator<double>>(
302 1, &ms.mPhase, NumValidatorStyle::DEFAULT, Phase.min, Phase.max)
303 .AddTextBox(XXO("LFO Sta&rt Phase (deg.):"), L"", 12);
304 BindTo(*mPhaseT, wxEVT_TEXT, &Editor::OnPhaseText);
305
306 mPhaseS = S
307 .Name(XO("LFO start phase in degrees"))
308 .Style(wxSL_HORIZONTAL)
309 .MinSize( { 100, -1 } )
310 .AddSlider( {}, Phase.def * Phase.scale, Phase.max * Phase.scale, Phase.min * Phase.scale);
311 mPhaseS->SetLineSize(10);
312 BindTo(*mPhaseS, wxEVT_SLIDER, &Editor::OnPhaseSlider);
313
314 mDepthT = S
315 .Validator<IntegerValidator<int>>(
316 &ms.mDepth, NumValidatorStyle::DEFAULT, Depth.min, Depth.max)
317 .AddTextBox(XXO("Dept&h (%):"), L"", 12);
318 BindTo(*mDepthT, wxEVT_TEXT, &Editor::OnDepthText);
319
320 mDepthS = S
321 .Name(XO("Depth in percent"))
322 .Style(wxSL_HORIZONTAL)
323 .MinSize( { 100, -1 } )
324 .AddSlider( {}, Depth.def * Depth.scale, Depth.max * Depth.scale, Depth.min * Depth.scale);
325 BindTo(*mDepthS, wxEVT_SLIDER, &Editor::OnDepthSlider);
326
327 mResT = S
328 .Validator<FloatingPointValidator<double>>(
329 1, &ms.mRes, NumValidatorStyle::DEFAULT, Res.min, Res.max)
330 .AddTextBox(XXO("Reso&nance:"), L"", 12);
331 BindTo(*mResT, wxEVT_TEXT, &Editor::OnResonanceText);
332
333 mResS = S
334 .Name(XO("Resonance"))
335 .Style(wxSL_HORIZONTAL)
336 .MinSize( { 100, -1 } )
337 .AddSlider( {}, Res.def * Res.scale, Res.max * Res.scale, Res.min * Res.scale);
338 BindTo(*mResS, wxEVT_SLIDER, &Editor::OnResonanceSlider);
339
340 mFreqOfsT = S
341 .Validator<IntegerValidator<int>>(
342 &ms.mFreqOfs, NumValidatorStyle::DEFAULT, FreqOfs.min, FreqOfs.max)
343 .AddTextBox(XXO("Wah Frequency Offse&t (%):"), L"", 12);
344 BindTo(*mFreqOfsT, wxEVT_TEXT, &Editor::OnFreqOffText);
345
346 mFreqOfsS = S
347 .Name(XO("Wah frequency offset in percent"))
348 .Style(wxSL_HORIZONTAL)
349 .MinSize( { 100, -1 } )
351 BindTo(*mFreqOfsS, wxEVT_SLIDER, &Editor::OnFreqOffSlider);
352
353 mOutGainT = S
354 .Validator<FloatingPointValidator<double>>(
355 1, &ms.mOutGain, NumValidatorStyle::DEFAULT, OutGain.min, OutGain.max)
356 .AddTextBox(XXO("&Output gain (dB):"), L"", 12);
357 BindTo(*mOutGainT, wxEVT_TEXT, &Editor::OnGainText);
358
359 mOutGainS = S
360 .Name(XO("Output gain (dB)"))
361 .Style(wxSL_HORIZONTAL)
362 .MinSize( { 100, -1 } )
364 BindTo(*mOutGainS, wxEVT_SLIDER, &Editor::OnGainSlider);
365 }
366 S.EndMultiColumn();
367}
368
370{
371 // get the settings from the MessageBuffer and write them to our local copy
372 const auto& settings = mAccess.Get();
373
374 mSettings = GetSettings(settings);
375
376 auto& ms = mSettings;
377
378 mFreqS->SetValue((int)(ms.mFreq * Freq.scale));
379 mPhaseS->SetValue((int)(ms.mPhase * Phase.scale));
380 mDepthS->SetValue((int)(ms.mDepth * Depth.scale));
381 mResS->SetValue((int)(ms.mRes * Res.scale));
382 mFreqOfsS->SetValue((int)(ms.mFreqOfs * FreqOfs.scale));
383 mOutGainS->SetValue((int)(ms.mOutGain * OutGain.scale));
384
385 return true;
386}
387
388// EffectWahwah implementation
389
391{
392 auto& ms = GetSettings(settings);
393
394 data.samplerate = sampleRate;
395 data.lfoskip = ms.mFreq * 2 * M_PI / sampleRate;
396 data.skipcount = 0;
397 data.xn1 = 0;
398 data.xn2 = 0;
399 data.yn1 = 0;
400 data.yn2 = 0;
401 data.b0 = 0;
402 data.b1 = 0;
403 data.b2 = 0;
404 data.a0 = 0;
405 data.a1 = 0;
406 data.a2 = 0;
407
408 data.depth = ms.mDepth / 100.0;
409 data.freqofs = ms.mFreqOfs / 100.0;
410 data.phase = ms.mPhase * M_PI / 180.0;
411 data.outgain = DB_TO_LINEAR(ms.mOutGain);
412}
413
415 EffectWahwahState & data,
416 const float *const *inBlock, float *const *outBlock, size_t blockLen)
417{
418 auto& ms = GetSettings(settings);
419
420 const float *ibuf = inBlock[0];
421 float *obuf = outBlock[0];
422 double frequency, omega, sn, cs, alpha;
423 double in, out;
424
425 data.lfoskip = ms.mFreq * 2 * M_PI / data.samplerate;
426 data.depth = ms.mDepth / 100.0;
427 data.freqofs = ms.mFreqOfs / 100.0;
428
429 data.phase = ms.mPhase * M_PI / 180.0;
430 data.outgain = DB_TO_LINEAR(ms.mOutGain);
431
432 for (decltype(blockLen) i = 0; i < blockLen; i++)
433 {
434 in = (double) ibuf[i];
435
436 if ((data.skipcount++) % lfoskipsamples == 0)
437 {
438 frequency = (1 + cos(data.skipcount * data.lfoskip + data.phase)) / 2;
439 frequency = frequency * data.depth * (1 - data.freqofs) + data.freqofs;
440 frequency = exp((frequency - 1) * 6);
441 omega = M_PI * frequency;
442 sn = sin(omega);
443 cs = cos(omega);
444 alpha = sn / (2 * ms.mRes);
445 data.b0 = (1 - cs) / 2;
446 data.b1 = 1 - cs;
447 data.b2 = (1 - cs) / 2;
448 data.a0 = 1 + alpha;
449 data.a1 = -2 * cs;
450 data.a2 = 1 - alpha;
451 };
452 out = (data.b0 * in + data.b1 * data.xn1 + data.b2 * data.xn2 - data.a1 * data.yn1 - data.a2 * data.yn2) / data.a0;
453 data.xn2 = data.xn1;
454 data.xn1 = in;
455 data.yn2 = data.yn1;
456 data.yn1 = out;
457 out *= data.outgain;
458
459 obuf[i] = (float) out;
460 }
461
462 return blockLen;
463}
464
466{
467 return 1;
468}
469
471{
472 return 1;
473}
474
475void EffectWahwah::Editor::OnFreqSlider(wxCommandEvent& evt)
476{
477 auto& ms = mSettings;
478
479 ms.mFreq = (double)evt.GetInt() / Freq.scale;
480 mFreqT->GetValidator()->TransferToWindow();
481
482 EnableApplyFromValidate();
483 ValidateUI();
484 Publish(EffectSettingChanged{});
485}
486
487void EffectWahwah::Editor::OnPhaseSlider(wxCommandEvent& evt)
488{
489 auto& ms = mSettings;
490
491 int val = ((evt.GetInt() + 5) / 10) * 10; // round to nearest multiple of 10
492 val = val > Phase.max * Phase.scale ? Phase.max * Phase.scale : val;
493 mPhaseS->SetValue(val);
494 ms.mPhase = (double)val / Phase.scale;
495 mPhaseT->GetValidator()->TransferToWindow();
496
497 EnableApplyFromValidate();
498 ValidateUI();
499 Publish(EffectSettingChanged{});
500}
501
502void EffectWahwah::Editor::OnDepthSlider(wxCommandEvent& evt)
503{
504 auto& ms = mSettings;
505
506 ms.mDepth = evt.GetInt() / Depth.scale;
507 mDepthT->GetValidator()->TransferToWindow();
508
509 EnableApplyFromValidate();
510 ValidateUI();
511 Publish(EffectSettingChanged{});
512}
513
515{
516 auto& ms = mSettings;
517
518 ms.mRes = (double)evt.GetInt() / Res.scale;
519 mResT->GetValidator()->TransferToWindow();
520
521 EnableApplyFromValidate();
522 ValidateUI();
523 Publish(EffectSettingChanged{});
524}
525
527{
528 auto& ms = mSettings;
529
530 ms.mFreqOfs = evt.GetInt() / FreqOfs.scale;
531 mFreqOfsT->GetValidator()->TransferToWindow();
532
533 EnableApplyFromValidate();
534 ValidateUI();
535 Publish(EffectSettingChanged{});
536}
537
538void EffectWahwah::Editor::OnGainSlider(wxCommandEvent& evt)
539{
540 auto& ms = mSettings;
541
542 ms.mOutGain = evt.GetInt() / OutGain.scale;
543 mOutGainT->GetValidator()->TransferToWindow();
544
545 EnableApplyFromValidate();
546 ValidateUI();
547 Publish(EffectSettingChanged{});
548}
549
550void EffectWahwah::Editor::OnFreqText(wxCommandEvent& WXUNUSED(evt))
551{
552 auto& ms = mSettings;
553
554 if (!EnableApplyFromTransferDataToWindow())
555 {
556 return;
557 }
558
559 mFreqS->SetValue((int)(ms.mFreq * Freq.scale));
560 ValidateUI();
561 Publish(EffectSettingChanged{});
562}
563
564void EffectWahwah::Editor::OnPhaseText(wxCommandEvent& WXUNUSED(evt))
565{
566 auto& ms = mSettings;
567
568 if (!EnableApplyFromTransferDataToWindow())
569 {
570 return;
571 }
572
573 mPhaseS->SetValue((int)(ms.mPhase * Phase.scale));
574 ValidateUI();
575 Publish(EffectSettingChanged{});
576}
577
578void EffectWahwah::Editor::OnDepthText(wxCommandEvent& WXUNUSED(evt))
579{
580 auto& ms = mSettings;
581
582 if (!EnableApplyFromTransferDataToWindow())
583 {
584 return;
585 }
586
587 mDepthS->SetValue((int)(ms.mDepth * Depth.scale));
588 ValidateUI();
589 Publish(EffectSettingChanged{});
590}
591
592void EffectWahwah::Editor::OnResonanceText(wxCommandEvent& WXUNUSED(evt))
593{
594 auto& ms = mSettings;
595
596 if (!EnableApplyFromTransferDataToWindow())
597 {
598 return;
599 }
600
601 mResS->SetValue((int)(ms.mRes * Res.scale));
602 ValidateUI();
603 Publish(EffectSettingChanged{});
604}
605
606void EffectWahwah::Editor::OnFreqOffText(wxCommandEvent& WXUNUSED(evt))
607{
608 auto& ms = mSettings;
609
610 if (!EnableApplyFromTransferDataToWindow())
611 {
612 return;
613 }
614
615 mFreqOfsS->SetValue((int)(ms.mFreqOfs * FreqOfs.scale));
616 ValidateUI();
617 Publish(EffectSettingChanged{});
618}
619
620void EffectWahwah::Editor::OnGainText(wxCommandEvent& WXUNUSED(evt))
621{
622 auto& ms = mSettings;
623
624 if (!EnableApplyFromTransferDataToWindow())
625 {
626 return;
627 }
628
629 mOutGainS->SetValue((int)(ms.mOutGain * OutGain.scale));
630 ValidateUI();
631 Publish(EffectSettingChanged{});
632}
#define M_PI
Definition: Distortion.cpp:30
struct State mState
EffectType
@ EffectTypeProcess
ChannelName
@ ChannelNameFrontRight
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
#define DB_TO_LINEAR(x)
Definition: MemoryX.h:335
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:69
#define lfoskipsamples
Definition: Wahwah.cpp:43
bool ValidateUI(const EffectPlugin &context, EffectSettings &) const override
Generates EffectParameterMethods overrides from variadic template arguments.
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: EffectBase.cpp:215
RealtimeSince
In which versions of Audacity was an effect realtime capable?
static bool EnableApply(wxWindow *parent, bool enable=true)
Enable or disable the Apply button of the dialog that contains parent.
EffectSettingsAccess & mAccess
Definition: EffectEditor.h:92
Performs effect computation.
Inherit to add a state variable to an EffectInstance subclass.
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
void ModifySettings(Function &&function)
Do a correct read-modify-write of settings.
virtual const EffectSettings & Get()=0
static constexpr EffectParameter Freq
Definition: Wahwah.h:108
static constexpr EffectParameter FreqOfs
Definition: Wahwah.h:112
static constexpr EffectParameter Res
Definition: Wahwah.h:111
static constexpr EffectParameter Depth
Definition: Wahwah.h:110
const EffectParameterMethods & Parameters() const override
Definition: Wahwah.cpp:34
static const ComponentInterfaceSymbol Symbol
Definition: Wahwah.h:76
ComponentInterfaceSymbol GetSymbol() const override
Definition: Wahwah.cpp:186
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
Definition: Wahwah.cpp:196
EffectType GetType() const override
Type determines how it behaves.
Definition: Wahwah.cpp:203
virtual ~EffectWahwah()
Definition: Wahwah.cpp:180
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
Definition: Wahwah.cpp:170
static constexpr EffectParameter Phase
Definition: Wahwah.h:109
TranslatableString GetDescription() const override
Definition: Wahwah.cpp:191
static constexpr EffectParameter OutGain
Definition: Wahwah.h:113
std::unique_ptr< EffectEditor > MakeEditor(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
Called only from PopulateUI, to add controls to effect panel.
Definition: Wahwah.cpp:264
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
Definition: Wahwah.cpp:208
double yn2
Definition: Wahwah.h:34
double freqofs
Definition: Wahwah.h:29
double xn2
Definition: Wahwah.h:34
float samplerate
Definition: Wahwah.h:27
unsigned long skipcount
Definition: Wahwah.h:33
double yn1
Definition: Wahwah.h:34
double outgain
Definition: Wahwah.h:31
double xn1
Definition: Wahwah.h:34
double phase
Definition: Wahwah.h:30
double depth
Definition: Wahwah.h:28
double lfoskip
Definition: Wahwah.h:32
static EffectWahwahSettings & GetSettings(EffectSettings &settings)
Assume settings originated from MakeSettings() and copies thereof.
Definition: Effect.h:169
Base class for many of the effects in Audacity.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
BuiltinEffectsModule::Registration< EffectWahwah > reg
Definition: Wahwah.cpp:52
const Type scale
Scaling factor, for slider control.
const Type def
Default value.
const Type min
Minimum value.
const Type max
Maximum value.
Message sent by EffectEditor when a setting is changed by the user.
Definition: EffectEditor.h:26
Externalized state of a plug-in.
void EnableApplyFromValidate()
Definition: Wahwah.cpp:101
wxSlider * mDepthS
Definition: Wahwah.cpp:92
virtual ~Editor()=default
void OnFreqOffText(wxCommandEvent &evt)
Definition: Wahwah.cpp:606
wxSlider * mOutGainS
Definition: Wahwah.cpp:95
Editor(const EffectUIServices &services, EffectSettingsAccess &access, const EffectWahwahSettings &settings)
Definition: Wahwah.cpp:57
void OnResonanceSlider(wxCommandEvent &evt)
Definition: Wahwah.cpp:514
wxTextCtrl * mPhaseT
Definition: Wahwah.cpp:84
wxTextCtrl * mOutGainT
Definition: Wahwah.cpp:88
wxSlider * mResS
Definition: Wahwah.cpp:93
void OnGainSlider(wxCommandEvent &evt)
Definition: Wahwah.cpp:538
wxTextCtrl * mFreqOfsT
Definition: Wahwah.cpp:87
void OnFreqOffSlider(wxCommandEvent &evt)
Definition: Wahwah.cpp:526
EffectWahwahSettings mSettings
Definition: Wahwah.cpp:99
bool UpdateUI() override
Update appearance of the panel for changes in settings.
Definition: Wahwah.cpp:369
bool EnableApplyFromTransferDataToWindow()
Definition: Wahwah.cpp:106
wxTextCtrl * mDepthT
Definition: Wahwah.cpp:85
void OnPhaseSlider(wxCommandEvent &evt)
Definition: Wahwah.cpp:487
void OnFreqSlider(wxCommandEvent &evt)
Definition: Wahwah.cpp:475
void OnDepthSlider(wxCommandEvent &evt)
Definition: Wahwah.cpp:502
wxTextCtrl * mResT
Definition: Wahwah.cpp:86
wxSlider * mPhaseS
Definition: Wahwah.cpp:91
wxTextCtrl * mFreqT
Definition: Wahwah.cpp:83
void OnDepthText(wxCommandEvent &evt)
Definition: Wahwah.cpp:578
bool ValidateUI() override
Get settings data from the panel; may make error dialogs and return false.
Definition: Wahwah.cpp:113
void OnFreqText(wxCommandEvent &evt)
Definition: Wahwah.cpp:550
void OnGainText(wxCommandEvent &evt)
Definition: Wahwah.cpp:620
void PopulateOrExchange(ShuttleGui &S)
Definition: Wahwah.cpp:275
wxSlider * mFreqOfsS
Definition: Wahwah.cpp:94
void OnResonanceText(wxCommandEvent &evt)
Definition: Wahwah.cpp:592
wxSlider * mFreqS
Definition: Wahwah.cpp:90
void OnPhaseText(wxCommandEvent &evt)
Definition: Wahwah.cpp:564
wxWeakRef< wxWindow > mUIParent
Definition: Wahwah.cpp:98
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
Definition: Wahwah.cpp:213
void InstanceInit(EffectSettings &settings, EffectWahwahState &data, float sampleRate)
Definition: Wahwah.cpp:390
size_t RealtimeProcess(size_t group, EffectSettings &settings, const float *const *inbuf, float *const *outbuf, size_t numSamples) override
Definition: Wahwah.cpp:254
bool RealtimeInitialize(EffectSettings &settings, double) override
Definition: Wahwah.cpp:228
EffectWahwahState mState
Definition: Wahwah.cpp:165
size_t InstanceProcess(EffectSettings &settings, EffectWahwahState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
Definition: Wahwah.cpp:414
size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
Called for destructive effect computation.
Definition: Wahwah.cpp:222
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
Definition: Wahwah.cpp:470
bool RealtimeAddProcessor(EffectSettings &settings, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate) override
Definition: Wahwah.cpp:235
Instance(const PerTrackEffect &effect)
Definition: Wahwah.cpp:133
std::vector< EffectWahwah::Instance > mSlaves
Definition: Wahwah.cpp:166
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
Definition: Wahwah.cpp:465
bool RealtimeFinalize(EffectSettings &settings) noexcept override
Definition: Wahwah.cpp:247