Audacity 3.2.0
Reverb.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4 Audacity(R) is copyright (c) 1999-2013 Audacity Team.
5 License: GPL v2 or later. See License.txt.
6
7 Reverb.cpp
8 Rob Sykes, Vaughan Johnson
9
10******************************************************************//*******************************************************************/
16
17
18#include "Reverb.h"
19#include "LoadEffects.h"
20
21#include <wx/arrstr.h>
22#include <wx/checkbox.h>
23#include <wx/slider.h>
24#include <wx/spinctrl.h>
25
26#include "Prefs.h"
27#include "../ShuttleGui.h"
28#include "../widgets/valnum.h"
29
30#include "Reverb_libSoX.h"
31
32
34{
38 > parameters;
39 return parameters;
40}
41
42static const struct
43{
46}
48{
49 // Room Pre Hf Tone Tone Wet Dry Stereo Wet
50 // Name Size, Delay, Reverb, Damping, Low, High, Gain, Gain, Width, Only
51 { XO("Vocal I" ), { 70, 20, 40, 99, 100, 50, -12, 0, 70, false } },
52 { XO("Vocal II"), { 50, 0, 50, 99, 50, 100, -1, -1, 70, false } },
53 { XO("Bathroom"), { 16, 8, 80, 0, 0, 100, -6, 0, 100, false } },
54 { XO("Small Room Bright"), { 30, 10, 50, 50, 50, 100, -1, -1, 100, false } },
55 { XO("Small Room Dark"), { 30, 10, 50, 50, 100, 0, -1, -1, 100, false } },
56 { XO("Medium Room"), { 75, 10, 40, 50, 100, 70, -1, -1, 70, false } },
57 { XO("Large Room"), { 85, 10, 40, 50, 100, 80, 0, -6, 90, false } },
58 { XO("Church Hall"), { 90, 32, 60, 50, 100, 50, 0, -12, 100, false } },
59 { XO("Cathedral"), { 90, 16, 90, 50, 100, 0, 0, -20, 100, false } },
60};
61
63{
65 float *dry;
66 float *wet[2];
67};
68
70{
73 {
75 }
76};
77
79{
80 unsigned mNumChans{};
81 std::unique_ptr<Reverb_priv_ex[]> mP{};
82};
83
84
85//
86// EffectReverb
87//
88
90{ XO("Reverb") };
91
93
94
97{
100 : EffectUIValidator{ effect, access }
102 {}
103 virtual ~Validator() = default;
104
105 Effect& GetEffect() const { return static_cast<Effect&>(mEffect); }
106
107 bool ValidateUI() override;
108 bool UpdateUI() override;
109
111
113
114 bool mProcessingEvent = false;
115
116#define SpinSlider(n) \
117 wxSpinCtrl *m ## n ## T; \
118 wxSlider *m ## n ## S;
119
129
130#undef SpinSlider
131
132 wxCheckBox* mWetOnlyC;
133
134
135#define SpinSliderHandlers(n) \
136 void On ## n ## Slider(wxCommandEvent & evt); \
137 void On ## n ## Text(wxCommandEvent & evt);
138
148
149#undef SpinSliderHandlers
150
151 void OnCheckbox(wxCommandEvent &evt);
152
153};
154
155
157{
158 auto& rs = mSettings;
159
160 rs.mRoomSize = mRoomSizeS->GetValue();
161 rs.mPreDelay = mPreDelayS->GetValue();
162 rs.mReverberance = mReverberanceS->GetValue();
163 rs.mHfDamping = mHfDampingS->GetValue();
164 rs.mToneLow = mToneLowS->GetValue();
165 rs.mToneHigh = mToneHighS->GetValue();
166 rs.mWetGain = mWetGainS->GetValue();
167 rs.mDryGain = mDryGainS->GetValue();
168 rs.mStereoWidth = mStereoWidthS->GetValue();
169 rs.mWetOnly = mWetOnlyC->GetValue();
170
172 (
173 [this](EffectSettings& settings)
174 {
175 // pass back the modified settings to the MessageBuffer
176
178 return nullptr;
179 }
180 );
181
182 return true;
183}
184
185
189{
190 explicit Instance(const PerTrackEffect& effect)
191 : PerTrackEffect::Instance{ effect }
192 {}
193
194 bool ProcessInitialize(EffectSettings &settings, double sampleRate,
195 ChannelNames chanMap) override;
196
198 const float* const* inBlock, float* const* outBlock, size_t blockLen) override;
199
200 bool ProcessFinalize(void) noexcept override;
201
202 // Realtime section
203
204 bool RealtimeInitialize(EffectSettings& settings, double sampleRate) override
205 {
206 SetBlockSize(512);
207 mSlaves.clear();
208
210 mLastSampleRate = sampleRate;
211
212 return true;
213 }
214
216 unsigned numChannels, float sampleRate) override
217 {
219
220 // The notion of ChannelNames is unavailable here,
221 // so we'll have to force the stereo init, if this is the case
222 //
223 InstanceInit(settings, sampleRate,
224 slave.mState, /*ChannelNames=*/nullptr, /*forceStereo=*/(numChannels == 2));
225
226 mSlaves.push_back( std::move(slave) );
227 return true;
228 }
229
230 bool RealtimeFinalize(EffectSettings& settings) noexcept override
231 {
232 mSlaves.clear();
233 return true;
234 }
235
237 const float* const* inbuf, float* const* outbuf, size_t numSamples) override
238 {
239
240 const auto& incomingSettings = GetSettings(settings);
241 if ( !(incomingSettings == mLastAppliedSettings) )
242 {
243 const bool onlySimpleOnes = OnlySimpleParametersChanged(incomingSettings, mLastAppliedSettings);
244
245 for (auto& slave : mSlaves)
246 {
247 for (unsigned int i = 0; i < slave.mState.mNumChans; i++)
248 {
249 auto& reverbCore = slave.mState.mP[i].reverb;
250 const auto& is = incomingSettings;
251
252 if (onlySimpleOnes)
253 {
255 is.mWetGain, is.mReverberance, is.mHfDamping, is.mToneLow, is.mToneHigh);
256 }
257 else
258 {
259 // One of the non-simple parameters changed, so we need to do a full reinit
260 reverb_init(&reverbCore, mLastSampleRate,
261 is.mWetGain, is.mRoomSize, is.mReverberance, is.mHfDamping,
262 is.mPreDelay, is.mStereoWidth, is.mToneLow, is.mToneHigh );
263 }
264 }
265 }
266
267 mLastAppliedSettings = incomingSettings;
268 }
269
270
271 if (group >= mSlaves.size())
272 return 0;
273 return InstanceProcess(settings, mSlaves[group].mState, inbuf, outbuf, numSamples);
274 }
275
276
277 bool RealtimeSuspend() override
278 {
279 for (auto& slave : mSlaves)
280 {
281 for (unsigned int i = 0; i < slave.mState.mNumChans; i++)
282 {
283 reverb_clear( &(slave.mState.mP[i].reverb) );
284 }
285 }
286
287 return true;
288 }
289
290
291 unsigned GetAudioOutCount() const override
292 {
293 return mChannels;
294 }
295
296 unsigned GetAudioInCount() const override
297 {
298 return mChannels;
299 }
300
301 bool InstanceInit(EffectSettings& settings, double sampleRate,
302 EffectReverbState& data, ChannelNames chanMap, bool forceStereo);
303
305 const float* const* inBlock, float* const* outBlock, size_t blockLen);
306
308 std::vector<EffectReverb::Instance> mSlaves;
309
310 unsigned mChannels{ 2 };
311
313 double mLastSampleRate{ 0 };
314};
315
316
317
318std::shared_ptr<EffectInstance>
320{
321 return std::make_shared<Instance>(*this);
322}
323
324
326{
328}
329
331{
332}
333
334// ComponentInterface implementation
335
337{
338 return Symbol;
339}
340
342{
343 return XO("Adds ambience or a \"hall effect\"");
344}
345
347{
348 return L"Reverb";
349}
350
351// EffectDefinitionInterface implementation
352
354{
355 return EffectTypeProcess;
356}
357
359{
361}
362
363static size_t BLOCK = 16384;
364
366 double sampleRate, ChannelNames chanMap)
367{
368 // For descructive processing, fix the number of channels, maybe as 1 not 2
369 auto& rs = GetSettings(settings);
370 mChannels = rs.mStereoWidth ? 2 : 1;
371
372 return InstanceInit(settings,
373 sampleRate, mState, chanMap, /* forceStereo = */ false);
374}
375
376
378 double sampleRate, EffectReverbState& state,
379 ChannelNames chanMap, bool forceStereo)
380{
381 auto& rs = GetSettings(settings);
382
383 bool isStereo = false;
384 state.mNumChans = 1;
385 if ( (chanMap && chanMap[0] != ChannelNameEOL && chanMap[1] == ChannelNameFrontRight)
386 || forceStereo )
387 {
388 isStereo = true;
389 state.mNumChans = 2;
390 }
391
392 state.mP = std::make_unique<Reverb_priv_ex[]>(state.mNumChans);
393
394 for (unsigned int i = 0; i < state.mNumChans; i++)
395 {
396 reverb_create(&state.mP[i].reverb,
397 sampleRate,
398 rs.mWetGain,
399 rs.mRoomSize,
400 rs.mReverberance,
401 rs.mHfDamping,
402 rs.mPreDelay,
403 rs.mStereoWidth * (isStereo ? 1 : 0),
404 rs.mToneLow,
405 rs.mToneHigh,
406 BLOCK,
407 state.mP[i].wet);
408 }
409
410 return true;
411}
412
414{
415 return true;
416}
417
419 const float* const* inBlock, float* const* outBlock, size_t blockLen)
420{
421 return InstanceProcess(settings, mState, inBlock, outBlock, blockLen);
422}
423
425 const float* const* inBlock, float* const* outBlock, size_t blockLen)
426{
427 auto& rs = GetSettings(settings);
428
429 const float *ichans[2] = {NULL, NULL};
430 float *ochans[2] = {NULL, NULL};
431
432 for (unsigned int c = 0; c < state.mNumChans; c++)
433 {
434 ichans[c] = inBlock[c];
435 ochans[c] = outBlock[c];
436 }
437
438 float const dryMult = rs.mWetOnly ? 0 : dB_to_linear(rs.mDryGain);
439
440 auto remaining = blockLen;
441
442 while (remaining)
443 {
444 auto len = std::min(remaining, decltype(remaining)(BLOCK));
445 for (unsigned int c = 0; c < state.mNumChans; c++)
446 {
447 // Write the input samples to the reverb fifo. Returned value is the address of the
448 // fifo buffer which contains a copy of the input samples.
449 state.mP[c].dry = (float *) fifo_write(&state.mP[c].reverb.input_fifo, len, ichans[c]);
450 reverb_process(&state.mP[c].reverb, len);
451 }
452
453 if (state.mNumChans == 2)
454 {
455 for (decltype(len) i = 0; i < len; i++)
456 {
457 for (int w = 0; w < 2; w++)
458 {
459 ochans[w][i] = dryMult *
460 state.mP[w].dry[i] +
461 0.5 *
462 (state.mP[0].wet[w][i] + state.mP[1].wet[w][i]);
463 }
464 }
465 }
466 else
467 {
468 for (decltype(len) i = 0; i < len; i++)
469 {
470 ochans[0][i] = dryMult *
471 state.mP[0].dry[i] +
472 state.mP[0].wet[0][i];
473 }
474 }
475
476 remaining -= len;
477
478 for (unsigned int c = 0; c < state.mNumChans; c++)
479 {
480 ichans[c] += len;
481 ochans[c] += len;
482 }
483 }
484
485 return blockLen;
486}
487
489{
491
492 for (size_t i = 0; i < WXSIZEOF(FactoryPresets); i++)
493 {
494 names.push_back( FactoryPresets[i].name.Translation() );
495 }
496
497 return names;
498}
499
500
503{
504 if (id < 0 || id >= (int) WXSIZEOF(FactoryPresets))
505 {
506 return {};
507 }
508
510
511 return { nullptr };
512}
513
514// Effect implementation
515std::unique_ptr<EffectUIValidator> EffectReverb::PopulateOrExchange(
517 const EffectOutputs *)
518{
519 auto& settings = access.Get();
520 auto& myEffSettings = GetSettings(settings);
521
522 auto result = std::make_unique<Validator>(*this, access, myEffSettings);
523 result->PopulateOrExchange(S);
524 return result;
525}
526
527
529{
530 S.AddSpace(0, 5);
531
532 S.StartMultiColumn(3, wxEXPAND);
533 {
534 S.SetStretchyCol(2);
535
536#define SpinSlider(n, p) \
537 m ## n ## T = S.AddSpinCtrl( p, n.def, n.max, n.min); \
538 BindTo(*m ## n ## T, wxEVT_SPINCTRL, &Validator::On ## n ## Text);\
539 \
540 m ## n ## S = S.Style(wxSL_HORIZONTAL).AddSlider( {}, n.def, n.max, n.min); \
541 BindTo(*m ## n ## S, wxEVT_SLIDER, &Validator::On ## n ## Slider);
542
543 SpinSlider(RoomSize, XXO("&Room Size (%):"))
544 SpinSlider(PreDelay, XXO("&Pre-delay (ms):"))
545 SpinSlider(Reverberance, XXO("Rever&berance (%):"))
546 SpinSlider(HfDamping, XXO("Da&mping (%):"))
547 SpinSlider(ToneLow, XXO("Tone &Low (%):"))
548 SpinSlider(ToneHigh, XXO("Tone &High (%):"))
549 SpinSlider(WetGain, XXO("Wet &Gain (dB):"))
550 SpinSlider(DryGain, XXO("Dr&y Gain (dB):"))
551 SpinSlider(StereoWidth, XXO("Stereo Wid&th (%):"))
552
553#undef SpinSlider
554
555 }
556 S.EndMultiColumn();
557
558 S.StartHorizontalLay(wxCENTER, false);
559 {
560 mWetOnlyC =
561 S.AddCheckBox(XXO("Wet O&nly"), WetOnly.def);
562 BindTo(*mWetOnlyC, wxEVT_CHECKBOX, &Validator::OnCheckbox);
563 }
564 S.EndHorizontalLay();
565
566}
567
569{
570 // get the settings from the MessageBuffer and write them to our local copy
571 mSettings = GetSettings(mAccess.Get());
572
573 auto& rs = mSettings;
574
575#define SetSpinSlider(n) \
576 m ## n ## S->SetValue((int) rs.m ## n); \
577 m ## n ## T->SetValue(wxString::Format(wxT("%d"), (int) rs.m ## n));
578
588
589#undef SetSpinSlider
590
591 mWetOnlyC->SetValue((int) rs.mWetOnly);
592
593 return true;
594}
595
596
597#define SpinSliderHandlers(n) \
598 void EffectReverb::Validator::On ## n ## Slider(wxCommandEvent & evt) \
599 { \
600 if (mProcessingEvent) return; \
601 mProcessingEvent = true; \
602 m ## n ## T->SetValue(wxString::Format(wxT("%d"), evt.GetInt())); \
603 mProcessingEvent = false; \
604 ValidateUI(); \
605 Publish(EffectSettingChanged{}); \
606 } \
607 void EffectReverb::Validator::On ## n ## Text(wxCommandEvent & evt) \
608 { \
609 if (mProcessingEvent) return; \
610 mProcessingEvent = true; \
611 m ## n ## S->SetValue(std::clamp<long>(evt.GetInt(), n.min, n.max)); \
612 mProcessingEvent = false; \
613 ValidateUI(); \
614 Publish(EffectSettingChanged{}); \
615 }
616
626
627void EffectReverb::Validator::OnCheckbox(wxCommandEvent &evt)
628{
629 ValidateUI();
630 Publish(EffectSettingChanged{});
631}
632
633#undef SpinSliderHandlers
634
636{
637 // With C++20, all of this can be replaced by =default
638 return (a.mRoomSize == b.mRoomSize)
639 && (a.mPreDelay == b.mPreDelay)
640 && (a.mReverberance == b.mReverberance)
641 && (a.mHfDamping == b.mHfDamping)
642 && (a.mToneLow == b.mToneLow)
643 && (a.mToneHigh == b.mToneHigh)
644 && (a.mWetGain == b.mWetGain)
645 && (a.mDryGain == b.mDryGain)
646 && (a.mStereoWidth == b.mStereoWidth)
647 && (a.mWetOnly == b.mWetOnly);
648}
649
651{
652 // A "simple" reverb parameter is one that when changed, does not require the
653 // reverb allpass/comb filters to be reset. This distinction enables us to
654 // code things so that the user can keep hearing the processed sound while
655 // they tweak one of the simple parameters.
656
657 const bool oneSimpleParameterChanged =
658
660 || (a.mHfDamping != b.mHfDamping)
661 || (a.mToneLow != b.mToneLow)
662 || (a.mToneHigh != b.mToneHigh)
663 || (a.mWetGain != b.mWetGain);
664
665
666 const bool allNonSimpleParametersStayedTheSame =
667
668 (a.mRoomSize == b.mRoomSize)
669 && (a.mPreDelay == b.mPreDelay)
670 && (a.mStereoWidth == b.mStereoWidth);
671
672 return oneSimpleParameterChanged && allNonSimpleParametersStayedTheSame;
673}
int min(int a, int b)
struct State mState
std::optional< std::unique_ptr< EffectSettingsAccess::Message > > OptionalMessage
EffectType
@ EffectTypeProcess
ChannelName
@ ChannelNameEOL
@ ChannelNameFrontRight
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
#define SetSpinSlider(n)
static size_t BLOCK
Definition: Reverb.cpp:363
#define SpinSliderHandlers(n)
Definition: Reverb.cpp:597
static const struct @33 FactoryPresets[]
EffectReverbSettings preset
Definition: Reverb.cpp:45
bool operator==(const EffectReverbSettings &a, const EffectReverbSettings &b)
Definition: Reverb.cpp:635
bool OnlySimpleParametersChanged(const EffectReverbSettings &a, const EffectReverbSettings &b)
Definition: Reverb.cpp:650
const TranslatableString name
Definition: Reverb.cpp:44
#define SpinSlider(n)
Definition: Reverb.cpp:116
static void reverb_init(reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double room_scale, double reverberance, double hf_damping, double pre_delay_ms, double stereo_depth, double tone_low, double tone_high)
#define dB_to_linear(x)
Definition: Reverb_libSoX.h:27
static void reverb_set_simple_params(reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double reverberance, double hf_damping, double tone_low, double tone_high)
static void reverb_process(reverb_t *p, size_t length)
static void reverb_delete(reverb_t *p)
static void reverb_clear(reverb_t *p)
static void reverb_create(reverb_t *p, double sample_rate_Hz, double wet_gain_dB, double room_scale, double reverberance, double hf_damping, double pre_delay_ms, double stereo_depth, double tone_low, double tone_high, size_t buffer_size, float **out)
static void * fifo_write(fifo_t *f, FIFO_SIZE_T n, void const *data)
Definition: Reverb_libSoX.h:81
static TranslatableStrings names
Definition: TagsEditor.cpp:152
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:87
int id
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:223
RealtimeSince
In which versions of Audacity was an effect realtime capable?
Base class for many of the effects in Audacity.
Definition: Effect.h:63
bool ValidateUI(EffectSettings &) override
Definition: Effect.cpp:315
Performs effect computation.
Inherit to add a state variable to an EffectInstance subclass.
size_t SetBlockSize(size_t maxBlockSize) override
Hold values to send to effect output meters.
Interface for manipulations of an Effect's settings.
const EffectParameterMethods & Parameters() const override
Definition: Reverb.cpp:33
RealtimeSince RealtimeSupport() const override
Since which version of Audacity has the effect supported realtime?
Definition: Reverb.cpp:358
virtual ~EffectReverb()
Definition: Reverb.cpp:330
OptionalMessage LoadFactoryPreset(int id, EffectSettings &settings) const override
Definition: Reverb.cpp:502
EffectType GetType() const override
Type determines how it behaves.
Definition: Reverb.cpp:353
static constexpr EffectParameter ToneLow
Definition: Reverb.h:108
static constexpr EffectParameter PreDelay
Definition: Reverb.h:99
static constexpr EffectParameter RoomSize
Definition: Reverb.h:96
ComponentInterfaceSymbol GetSymbol() const override
Definition: Reverb.cpp:336
static constexpr EffectParameter StereoWidth
Definition: Reverb.h:120
static const ComponentInterfaceSymbol Symbol
Definition: Reverb.h:56
static constexpr EffectParameter Reverberance
Definition: Reverb.h:102
static constexpr EffectParameter WetGain
Definition: Reverb.h:114
std::unique_ptr< EffectUIValidator > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
Add controls to effect panel; always succeeds.
Definition: Reverb.cpp:515
static constexpr EffectParameter HfDamping
Definition: Reverb.h:105
static constexpr EffectParameter ToneHigh
Definition: Reverb.h:111
static constexpr EffectParameter WetOnly
Definition: Reverb.h:123
TranslatableString GetDescription() const override
Definition: Reverb.cpp:341
ManualPageID ManualPage() const override
Name of a page in the Audacity alpha manual, default is empty.
Definition: Reverb.cpp:346
static constexpr EffectParameter DryGain
Definition: Reverb.h:117
std::shared_ptr< EffectInstance > MakeInstance() const override
Make an object maintaining short-term state of an Effect.
Definition: Reverb.cpp:319
RegistryPaths GetFactoryPresets() const override
Report names of factory presets.
Definition: Reverb.cpp:488
void ModifySettings(Function &&function)
Do a correct read-modify-write of settings.
virtual const EffectSettings & Get()=0
EffectUIClientInterface is an abstract base class to populate a UI and validate UI values....
Definition: EffectPlugin.h:170
Interface for transferring values from a panel of effect controls.
Definition: EffectPlugin.h:239
EffectSettingsAccess & mAccess
Definition: EffectPlugin.h:297
EffectUIClientInterface & mEffect
Definition: EffectPlugin.h:296
static EffectReverbSettings & GetSettings(EffectSettings &settings)
Assume settings originated from MakeSettings() and copies thereof.
Definition: Effect.h:326
const PerTrackEffect & mProcessor
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:628
Holds a msgid for the translation catalog; may also bind format arguments.
wxString Translation() const
BuiltinEffectsModule::Registration< EffectReverb > reg
Definition: Reverb.cpp:92
const Type def
Default value.
Definition: Shuttle.h:29
unsigned GetAudioOutCount() const override
How many output buffers to allocate at once.
Definition: Reverb.cpp:291
bool ProcessInitialize(EffectSettings &settings, double sampleRate, ChannelNames chanMap) override
Definition: Reverb.cpp:365
size_t RealtimeProcess(size_t group, EffectSettings &settings, const float *const *inbuf, float *const *outbuf, size_t numSamples) override
Definition: Reverb.cpp:236
unsigned GetAudioInCount() const override
How many input buffers to allocate at once.
Definition: Reverb.cpp:296
EffectReverbSettings mLastAppliedSettings
Definition: Reverb.cpp:312
bool InstanceInit(EffectSettings &settings, double sampleRate, EffectReverbState &data, ChannelNames chanMap, bool forceStereo)
Definition: Reverb.cpp:377
size_t ProcessBlock(EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
Called for destructive effect computation.
Definition: Reverb.cpp:418
size_t InstanceProcess(EffectSettings &settings, EffectReverbState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
Definition: Reverb.cpp:424
std::vector< EffectReverb::Instance > mSlaves
Definition: Reverb.cpp:308
bool RealtimeSuspend() override
Definition: Reverb.cpp:277
bool RealtimeInitialize(EffectSettings &settings, double sampleRate) override
Definition: Reverb.cpp:204
Instance(const PerTrackEffect &effect)
Definition: Reverb.cpp:190
bool RealtimeAddProcessor(EffectSettings &settings, EffectOutputs *, unsigned numChannels, float sampleRate) override
Definition: Reverb.cpp:215
bool RealtimeFinalize(EffectSettings &settings) noexcept override
Definition: Reverb.cpp:230
EffectReverbState mState
Definition: Reverb.cpp:307
bool ProcessFinalize(void) noexcept override
Definition: Reverb.cpp:413
SpinSliderHandlers(RoomSize) SpinSliderHandlers(PreDelay) SpinSliderHandlers(Reverberance) SpinSliderHandlers(HfDamping) SpinSliderHandlers(ToneLow) SpinSliderHandlers(ToneHigh) SpinSliderHandlers(WetGain) SpinSliderHandlers(DryGain) SpinSliderHandlers(StereoWidth) void OnCheckbox(wxCommandEvent &evt)
void PopulateOrExchange(ShuttleGui &S)
Definition: Reverb.cpp:528
EffectReverbSettings mSettings
Definition: Reverb.cpp:112
virtual ~Validator()=default
bool ValidateUI() override
Get settings data from the panel; may make error dialogs and return false.
Definition: Reverb.cpp:156
Effect & GetEffect() const
Definition: Reverb.cpp:105
Validator(EffectUIClientInterface &effect, EffectSettingsAccess &access, const EffectReverbSettings &settings)
Definition: Reverb.cpp:98
SpinSlider(RoomSize) SpinSlider(PreDelay) SpinSlider(Reverberance) SpinSlider(HfDamping) SpinSlider(ToneLow) SpinSlider(ToneHigh) SpinSlider(WetGain) SpinSlider(DryGain) SpinSlider(StereoWidth) wxCheckBox *mWetOnlyC
bool UpdateUI() override
Update appearance of the panel for changes in settings.
Definition: Reverb.cpp:568
double mStereoWidth
Definition: Reverb.h:42
double mReverberance
Definition: Reverb.h:36
double mHfDamping
Definition: Reverb.h:37
double mRoomSize
Definition: Reverb.h:34
double mPreDelay
Definition: Reverb.h:35
double mToneHigh
Definition: Reverb.h:39
std::unique_ptr< Reverb_priv_ex[]> mP
Definition: Reverb.cpp:81
unsigned mNumChans
Definition: Reverb.cpp:80
Message sent by validator when a setting is changed by a user.
Definition: EffectPlugin.h:225
Externalized state of a plug-in.
float * wet[2]
Definition: Reverb.cpp:66
reverb_t reverb
Definition: Reverb.cpp:64
float * dry
Definition: Reverb.cpp:65