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