Audacity  3.0.3
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. 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/intl.h>
24 #include <wx/slider.h>
25 #include <wx/spinctrl.h>
26 
27 #include "../Prefs.h"
28 #include "../Shuttle.h"
29 #include "../ShuttleGui.h"
30 #include "../widgets/valnum.h"
31 
32 #include "Reverb_libSoX.h"
33 
34 enum
35 {
36  ID_RoomSize = 10000,
46 };
47 
48 // Define keys, defaults, minimums, and maximums for the effect parameters
49 //
50 // Name Type Key Def Min Max Scale
51 Param( RoomSize, double, wxT("RoomSize"), 75, 0, 100, 1 );
52 Param( PreDelay, double, wxT("Delay"), 10, 0, 200, 1 );
53 Param( Reverberance, double, wxT("Reverberance"), 50, 0, 100, 1 );
54 Param( HfDamping, double, wxT("HfDamping"), 50, 0, 100, 1 );
55 Param( ToneLow, double, wxT("ToneLow"), 100, 0, 100, 1 );
56 Param( ToneHigh, double, wxT("ToneHigh"), 100, 0, 100, 1 );
57 Param( WetGain, double, wxT("WetGain"), -1, -20, 10, 1 );
58 Param( DryGain, double, wxT("DryGain"), -1, -20, 10, 1 );
59 Param( StereoWidth, double, wxT("StereoWidth"), 100, 0, 100, 1 );
60 Param( WetOnly, bool, wxT("WetOnly"), false, false, true, 1 );
61 
62 static const struct
63 {
66 }
68 {
69  // Room Pre Hf Tone Tone Wet Dry Stereo Wet
70  // Name Size, Delay, Reverb, Damping, Low, High, Gain, Gain, Width, Only
71  { XO("Vocal I" ), { 70, 20, 40, 99, 100, 50, -12, 0, 70, false } },
72  { XO("Vocal II"), { 50, 0, 50, 99, 50, 100, -1, -1, 70, false } },
73  { XO("Bathroom"), { 16, 8, 80, 0, 0, 100, -6, 0, 100, false } },
74  { XO("Small Room Bright"), { 30, 10, 50, 50, 50, 100, -1, -1, 100, false } },
75  { XO("Small Room Dark"), { 30, 10, 50, 50, 100, 0, -1, -1, 100, false } },
76  { XO("Medium Room"), { 75, 10, 40, 50, 100, 70, -1, -1, 70, false } },
77  { XO("Large Room"), { 85, 10, 40, 50, 100, 80, 0, -6, 90, false } },
78  { XO("Church Hall"), { 90, 32, 60, 50, 100, 50, 0, -12, 100, false } },
79  { XO("Cathedral"), { 90, 16, 90, 50, 100, 0, 0, -20, 100, false } },
80 };
81 
83 {
85  float *dry;
86  float *wet[2];
87 };
88 
89 //
90 // EffectReverb
91 //
92 
94 { XO("Reverb") };
95 
97 
98 BEGIN_EVENT_TABLE(EffectReverb, wxEvtHandler)
99 
100 #define SpinSliderEvent(n) \
101  EVT_SLIDER(ID_ ## n, EffectReverb::On ## n ## Slider) \
102  EVT_TEXT(ID_ ## n, EffectReverb::On ## n ## Text)
103 
104  SpinSliderEvent(RoomSize)
105  SpinSliderEvent(PreDelay)
106  SpinSliderEvent(Reverberance)
107  SpinSliderEvent(HfDamping)
108  SpinSliderEvent(ToneLow)
109  SpinSliderEvent(ToneHigh)
110  SpinSliderEvent(WetGain)
111  SpinSliderEvent(DryGain)
112  SpinSliderEvent(StereoWidth)
113 
114 #undef SpinSliderEvent
115 
117 
119 {
120  mParams.mRoomSize = DEF_RoomSize;
121  mParams.mPreDelay = DEF_PreDelay;
122  mParams.mReverberance = DEF_Reverberance;
123  mParams.mHfDamping = DEF_HfDamping;
124  mParams.mToneLow = DEF_ToneLow;
125  mParams.mToneHigh = DEF_ToneHigh;
126  mParams.mWetGain = DEF_WetGain;
127  mParams.mDryGain = DEF_DryGain;
128  mParams.mStereoWidth = DEF_StereoWidth;
129  mParams.mWetOnly = DEF_WetOnly;
130 
131  mProcessingEvent = false;
132 
133  SetLinearEffectFlag(true);
134 }
135 
137 {
138 }
139 
140 // ComponentInterface implementation
141 
143 {
144  return Symbol;
145 }
146 
148 {
149  return XO("Adds ambience or a \"hall effect\"");
150 }
151 
153 {
154  return wxT("Reverb");
155 }
156 
157 // EffectDefinitionInterface implementation
158 
160 {
161  return EffectTypeProcess;
162 }
163 
164 // EffectClientInterface implementation
165 
167 {
168  return mParams.mStereoWidth ? 2 : 1;
169 }
170 
172 {
173  return mParams.mStereoWidth ? 2 : 1;
174 }
175 
176 static size_t BLOCK = 16384;
177 
179 {
180  bool isStereo = false;
181  mNumChans = 1;
182  if (chanMap && chanMap[0] != ChannelNameEOL && chanMap[1] == ChannelNameFrontRight)
183  {
184  isStereo = true;
185  mNumChans = 2;
186  }
187 
188  mP = (Reverb_priv_t *) calloc(sizeof(*mP), mNumChans);
189 
190  for (unsigned int i = 0; i < mNumChans; i++)
191  {
192  reverb_create(&mP[i].reverb,
193  mSampleRate,
199  mParams.mStereoWidth * (isStereo ? 1 : 0),
202  BLOCK,
203  mP[i].wet);
204  }
205 
206  return true;
207 }
208 
210 {
211  for (unsigned int i = 0; i < mNumChans; i++)
212  {
213  reverb_delete(&mP[i].reverb);
214  }
215 
216  free(mP);
217 
218  return true;
219 }
220 
221 size_t EffectReverb::ProcessBlock(float **inBlock, float **outBlock, size_t blockLen)
222 {
223  float *ichans[2] = {NULL, NULL};
224  float *ochans[2] = {NULL, NULL};
225 
226  for (unsigned int c = 0; c < mNumChans; c++)
227  {
228  ichans[c] = inBlock[c];
229  ochans[c] = outBlock[c];
230  }
231 
232  float const dryMult = mParams.mWetOnly ? 0 : dB_to_linear(mParams.mDryGain);
233 
234  auto remaining = blockLen;
235 
236  while (remaining)
237  {
238  auto len = std::min(remaining, decltype(remaining)(BLOCK));
239  for (unsigned int c = 0; c < mNumChans; c++)
240  {
241  // Write the input samples to the reverb fifo. Returned value is the address of the
242  // fifo buffer which contains a copy of the input samples.
243  mP[c].dry = (float *) fifo_write(&mP[c].reverb.input_fifo, len, ichans[c]);
244  reverb_process(&mP[c].reverb, len);
245  }
246 
247  if (mNumChans == 2)
248  {
249  for (decltype(len) i = 0; i < len; i++)
250  {
251  for (int w = 0; w < 2; w++)
252  {
253  ochans[w][i] = dryMult *
254  mP[w].dry[i] +
255  0.5 *
256  (mP[0].wet[w][i] + mP[1].wet[w][i]);
257  }
258  }
259  }
260  else
261  {
262  for (decltype(len) i = 0; i < len; i++)
263  {
264  ochans[0][i] = dryMult *
265  mP[0].dry[i] +
266  mP[0].wet[0][i];
267  }
268  }
269 
270  remaining -= len;
271 
272  for (unsigned int c = 0; c < mNumChans; c++)
273  {
274  ichans[c] += len;
275  ochans[c] += len;
276  }
277  }
278 
279  return blockLen;
280 }
282  S.SHUTTLE_PARAM( mParams.mRoomSize, RoomSize );
283  S.SHUTTLE_PARAM( mParams.mPreDelay, PreDelay );
284  S.SHUTTLE_PARAM( mParams.mReverberance, Reverberance );
285  S.SHUTTLE_PARAM( mParams.mHfDamping, HfDamping );
286  S.SHUTTLE_PARAM( mParams.mToneLow, ToneLow );
287  S.SHUTTLE_PARAM( mParams.mToneHigh, ToneHigh );
288  S.SHUTTLE_PARAM( mParams.mWetGain, WetGain );
289  S.SHUTTLE_PARAM( mParams.mDryGain, DryGain );
290  S.SHUTTLE_PARAM( mParams.mStereoWidth, StereoWidth );
291  S.SHUTTLE_PARAM( mParams.mWetOnly, WetOnly );
292  return true;
293 }
294 
296 {
297  parms.Write(KEY_RoomSize, mParams.mRoomSize);
298  parms.Write(KEY_PreDelay, mParams.mPreDelay);
299  parms.Write(KEY_Reverberance, mParams.mReverberance);
300  parms.Write(KEY_HfDamping, mParams.mHfDamping);
301  parms.Write(KEY_ToneLow, mParams.mToneLow);
302  parms.Write(KEY_ToneHigh, mParams.mToneHigh);
303  parms.Write(KEY_WetGain, mParams.mWetGain);
304  parms.Write(KEY_DryGain, mParams.mDryGain);
305  parms.Write(KEY_StereoWidth, mParams.mStereoWidth);
306  parms.Write(KEY_WetOnly, mParams.mWetOnly);
307 
308  return true;
309 }
310 
312 {
313  ReadAndVerifyDouble(RoomSize);
314  ReadAndVerifyDouble(PreDelay);
315  ReadAndVerifyDouble(Reverberance);
316  ReadAndVerifyDouble(HfDamping);
317  ReadAndVerifyDouble(ToneLow);
318  ReadAndVerifyDouble(ToneHigh);
319  ReadAndVerifyDouble(WetGain);
320  ReadAndVerifyDouble(DryGain);
321  ReadAndVerifyDouble(StereoWidth);
322  ReadAndVerifyBool(WetOnly);
323 
324  mParams.mRoomSize = RoomSize;
325  mParams.mPreDelay = PreDelay;
326  mParams.mReverberance = Reverberance;
327  mParams.mHfDamping = HfDamping;
328  mParams.mToneLow = ToneLow;
329  mParams.mToneHigh = ToneHigh;
330  mParams.mWetGain = WetGain;
331  mParams.mDryGain = DryGain;
332  mParams.mStereoWidth = StereoWidth;
333  mParams.mWetOnly = WetOnly;
334 
335  return true;
336 }
337 
339 {
341 
342  for (size_t i = 0; i < WXSIZEOF(FactoryPresets); i++)
343  {
344  names.push_back( FactoryPresets[i].name.Translation() );
345  }
346 
347  return names;
348 }
349 
351 {
352  if (id < 0 || id >= (int) WXSIZEOF(FactoryPresets))
353  {
354  return false;
355  }
356 
357  mParams = FactoryPresets[id].params;
358 
359  if (mUIDialog)
360  {
362  }
363 
364  return true;
365 }
366 
367 // Effect implementation
368 
370 {
371  wxString base = wxT("/Effects/Reverb/");
372 
373  // Migrate settings from 2.1.0 or before
374 
375  // Already migrated, so bail
376  if (gPrefs->Exists(base + wxT("Migrated")))
377  {
378  return true;
379  }
380 
381  // Load the old "current" settings
382  if (gPrefs->Exists(base))
383  {
384  gPrefs->Read(base + wxT("RoomSize"), &mParams.mRoomSize, DEF_RoomSize);
385  gPrefs->Read(base + wxT("Delay"), &mParams.mPreDelay, DEF_PreDelay);
386  gPrefs->Read(base + wxT("Reverberance"), &mParams.mReverberance, DEF_Reverberance);
387  gPrefs->Read(base + wxT("HfDamping"), &mParams.mHfDamping, DEF_HfDamping);
388  gPrefs->Read(base + wxT("ToneLow"), &mParams.mToneLow, DEF_ToneLow);
389  gPrefs->Read(base + wxT("ToneHigh"), &mParams.mToneHigh, DEF_ToneHigh);
390  gPrefs->Read(base + wxT("WetGain"), &mParams.mWetGain, DEF_WetGain);
391  gPrefs->Read(base + wxT("DryGain"), &mParams.mDryGain, DEF_DryGain);
392  gPrefs->Read(base + wxT("StereoWidth"), &mParams.mStereoWidth, DEF_StereoWidth);
393  gPrefs->Read(base + wxT("WetOnly"), &mParams.mWetOnly, DEF_WetOnly);
394 
396 
397  // Do not migrate again
398  gPrefs->Write(base + wxT("Migrated"), true);
399  }
400 
401  // Load the previous user presets
402  for (int i = 0; i < 10; i++)
403  {
404  wxString path = base + wxString::Format(wxT("%d/"), i);
405  if (gPrefs->Exists(path))
406  {
407  Params save = mParams;
408  wxString name;
409 
410  gPrefs->Read(path + wxT("RoomSize"), &mParams.mRoomSize, DEF_RoomSize);
411  gPrefs->Read(path + wxT("Delay"), &mParams.mPreDelay, DEF_PreDelay);
412  gPrefs->Read(path + wxT("Reverberance"), &mParams.mReverberance, DEF_Reverberance);
413  gPrefs->Read(path + wxT("HfDamping"), &mParams.mHfDamping, DEF_HfDamping);
414  gPrefs->Read(path + wxT("ToneLow"), &mParams.mToneLow, DEF_ToneLow);
415  gPrefs->Read(path + wxT("ToneHigh"), &mParams.mToneHigh, DEF_ToneHigh);
416  gPrefs->Read(path + wxT("WetGain"), &mParams.mWetGain, DEF_WetGain);
417  gPrefs->Read(path + wxT("DryGain"), &mParams.mDryGain, DEF_DryGain);
418  gPrefs->Read(path + wxT("StereoWidth"), &mParams.mStereoWidth, DEF_StereoWidth);
419  gPrefs->Read(path + wxT("WetOnly"), &mParams.mWetOnly, DEF_WetOnly);
420  gPrefs->Read(path + wxT("name"), &name, wxEmptyString);
421 
422  if (!name.empty())
423  {
424  name.Prepend(wxT(" - "));
425  }
426  name.Prepend(wxString::Format(wxT("Settings%d"), i));
427 
429 
430  mParams = save;
431  }
432  }
433 
434  return true;
435 }
436 
438 {
439  S.AddSpace(0, 5);
440 
441  S.StartMultiColumn(3, wxEXPAND);
442  {
443  S.SetStretchyCol(2);
444 
445 #define SpinSlider(n, p) \
446  m ## n ## T = S.Id(ID_ ## n). \
447  AddSpinCtrl( p, DEF_ ## n, MAX_ ## n, MIN_ ## n); \
448  S; \
449  m ## n ## S = S.Id(ID_ ## n) \
450  .Style(wxSL_HORIZONTAL) \
451  .AddSlider( {}, DEF_ ## n, MAX_ ## n, MIN_ ## n);
452 
453  SpinSlider(RoomSize, XXO("&Room Size (%):"))
454  SpinSlider(PreDelay, XXO("&Pre-delay (ms):"))
455  SpinSlider(Reverberance, XXO("Rever&berance (%):"))
456  SpinSlider(HfDamping, XXO("Da&mping (%):"))
457  SpinSlider(ToneLow, XXO("Tone &Low (%):"))
458  SpinSlider(ToneHigh, XXO("Tone &High (%):"))
459  SpinSlider(WetGain, XXO("Wet &Gain (dB):"))
460  SpinSlider(DryGain, XXO("Dr&y Gain (dB):"))
461  SpinSlider(StereoWidth, XXO("Stereo Wid&th (%):"))
462 
463 #undef SpinSlider
464 
465  }
466  S.EndMultiColumn();
467 
468  S.StartHorizontalLay(wxCENTER, false);
469  {
470  mWetOnlyC = S.Id(ID_WetOnly).
471  AddCheckBox(XXO("Wet O&nly"), DEF_WetOnly);
472  }
473  S.EndHorizontalLay();
474 
475  return;
476 }
477 
479 {
480 #define SetSpinSlider(n) \
481  m ## n ## S->SetValue((int) mParams.m ## n); \
482  m ## n ## T->SetValue(wxString::Format(wxT("%d"), (int) mParams.m ## n));
483 
484  SetSpinSlider(RoomSize);
485  SetSpinSlider(PreDelay);
486  SetSpinSlider(Reverberance);
487  SetSpinSlider(HfDamping);
488  SetSpinSlider(ToneLow);
489  SetSpinSlider(ToneHigh);
490  SetSpinSlider(WetGain);
491  SetSpinSlider(DryGain);
492  SetSpinSlider(StereoWidth);
493 
494 #undef SetSpinSlider
495 
496  mWetOnlyC->SetValue((int) mParams.mWetOnly);
497 
498  return true;
499 }
500 
502 {
503  if (!mUIParent->Validate())
504  {
505  return false;
506  }
507 
508  mParams.mRoomSize = mRoomSizeS->GetValue();
509  mParams.mPreDelay = mPreDelayS->GetValue();
510  mParams.mReverberance = mReverberanceS->GetValue();
511  mParams.mHfDamping = mHfDampingS->GetValue();
512  mParams.mToneLow = mToneLowS->GetValue();
513  mParams.mToneHigh = mToneHighS->GetValue();
514  mParams.mWetGain = mWetGainS->GetValue();
515  mParams.mDryGain = mDryGainS->GetValue();
516  mParams.mStereoWidth = mStereoWidthS->GetValue();
517  mParams.mWetOnly = mWetOnlyC->GetValue();
518 
519  return true;
520 }
521 
522 #define SpinSliderHandlers(n) \
523  void EffectReverb::On ## n ## Slider(wxCommandEvent & evt) \
524  { \
525  if (mProcessingEvent) return; \
526  mProcessingEvent = true; \
527  m ## n ## T->SetValue(wxString::Format(wxT("%d"), evt.GetInt())); \
528  mProcessingEvent = false; \
529  } \
530  void EffectReverb::On ## n ## Text(wxCommandEvent & evt) \
531  { \
532  if (mProcessingEvent) return; \
533  mProcessingEvent = true; \
534  m ## n ## S->SetValue(TrapLong(evt.GetInt(), MIN_ ## n, MAX_ ## n)); \
535  mProcessingEvent = false; \
536  }
537 
539 SpinSliderHandlers(PreDelay)
540 SpinSliderHandlers(Reverberance)
541 SpinSliderHandlers(HfDamping)
542 SpinSliderHandlers(ToneLow)
543 SpinSliderHandlers(ToneHigh)
544 SpinSliderHandlers(WetGain)
545 SpinSliderHandlers(DryGain)
546 SpinSliderHandlers(StereoWidth)
547 
548 #undef SpinSliderHandlers
549 
550 void EffectReverb::SetTitle(const wxString & name)
551 {
552  mUIDialog->SetTitle(
553  name.empty()
554  ? _("Reverb")
555  : wxString::Format( _("Reverb: %s"), name )
556  );
557 }
RegistryPaths
std::vector< RegistryPath > RegistryPaths
Definition: Types.h:262
Reverb_priv_t::reverb
reverb_t reverb
Definition: Reverb.cpp:84
Reverb_libSoX.h
EffectReverb::Params::mDryGain
double mDryGain
Definition: Reverb.h:41
TranslatableString
Definition: Types.h:290
EffectReverb::DefineParams
bool DefineParams(ShuttleParams &S) override
Definition: Reverb.cpp:281
ID_RoomSize
@ ID_RoomSize
Definition: Reverb.cpp:36
Param
Param(RoomSize, double, wxT("RoomSize"), 75, 0, 100, 1)
CommandParameters
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the Shuttle cla...
Definition: EffectAutomationParameters.h:67
params
EffectReverb::Params params
Definition: Reverb.cpp:65
TranslatableString::empty
bool empty() const
Definition: Types.h:329
name
const TranslatableString name
Definition: Reverb.cpp:64
EffectReverb::mP
SpinSliderHandlers(RoomSize) SpinSliderHandlers(PreDelay) SpinSliderHandlers(Reverberance) SpinSliderHandlers(HfDamping) SpinSliderHandlers(ToneLow) SpinSliderHandlers(ToneHigh) SpinSliderHandlers(WetGain) SpinSliderHandlers(DryGain) SpinSliderHandlers(StereoWidth) private Reverb_priv_t * mP
Definition: Reverb.h:85
EffectTypeProcess
@ EffectTypeProcess
Definition: EffectInterface.h:59
Effect::mUIDialog
wxDialog * mUIDialog
Definition: Effect.h:476
EffectReverb::GetFactoryPresets
RegistryPaths GetFactoryPresets() override
Definition: Reverb.cpp:338
Reverb_priv_t::dry
float * dry
Definition: Reverb.cpp:85
EffectReverb::Startup
bool Startup() override
Definition: Reverb.cpp:369
EffectReverb::Params::mPreDelay
double mPreDelay
Definition: Reverb.h:35
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:67
SpinSliderHandlers
#define SpinSliderHandlers(n)
Definition: Reverb.cpp:522
Reverb.h
SetSpinSlider
#define SetSpinSlider(n)
fifo_write
static void * fifo_write(fifo_t *f, FIFO_SIZE_T n, void const *data)
Definition: Reverb_libSoX.h:74
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2421
ID_WetOnly
@ ID_WetOnly
Definition: Reverb.cpp:45
XO
#define XO(s)
Definition: Internat.h:32
ShuttleParams
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:61
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1212
Effect::GetUserPresetsGroup
RegistryPath GetUserPresetsGroup(const RegistryPath &name) override
Definition: Effect.cpp:854
ID_ToneHigh
@ ID_ToneHigh
Definition: Reverb.cpp:41
Effect::SaveUserPreset
bool SaveUserPreset(const RegistryPath &name) override
Definition: Effect.cpp:569
reverb_process
static void reverb_process(reverb_t *p, size_t length)
Definition: Reverb_libSoX.h:253
Reverb_priv_t
Definition: Reverb.cpp:83
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterface.h:60
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2248
ID_HfDamping
@ ID_HfDamping
Definition: Reverb.cpp:39
EffectReverb::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: Reverb.cpp:142
EffectReverb::~EffectReverb
virtual ~EffectReverb()
Definition: Reverb.cpp:136
reverb_delete
static void reverb_delete(reverb_t *p)
Definition: Reverb_libSoX.h:261
EffectReverb::GetAudioOutCount
unsigned GetAudioOutCount() override
Definition: Reverb.cpp:171
XXO
#define XXO(s)
Definition: Internat.h:45
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1170
EffectReverb::ManualPage
wxString ManualPage() override
Definition: Reverb.cpp:152
ID_DryGain
@ ID_DryGain
Definition: Reverb.cpp:43
ChannelNameEOL
@ ChannelNameEOL
Definition: Types.h:752
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1160
EffectReverb::mParams
Params mParams
Definition: Reverb.h:101
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1203
EffectReverb::Params::mHfDamping
double mHfDamping
Definition: Reverb.h:37
EffectReverb::ProcessBlock
size_t ProcessBlock(float **inBlock, float **outBlock, size_t blockLen) override
Definition: Reverb.cpp:221
ChannelNames
enum ChannelName * ChannelNames
EffectReverb::Params::mStereoWidth
double mStereoWidth
Definition: Reverb.h:42
FactoryPresets
static const struct @1 FactoryPresets[]
SpinSliderEvent
#define SpinSliderEvent(n)
Definition: Reverb.cpp:100
EffectReverb::TransferDataToWindow
bool TransferDataToWindow() override
Definition: Reverb.cpp:478
EffectReverb::LoadFactoryPreset
bool LoadFactoryPreset(int id) override
Definition: Reverb.cpp:350
EffectReverb::GetAutomationParameters
bool GetAutomationParameters(CommandParameters &parms) override
Definition: Reverb.cpp:295
reverb_create
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)
Definition: Reverb_libSoX.h:221
EffectReverb::Params
Definition: Reverb.h:33
EffectReverb::GetType
EffectType GetType() override
Definition: Reverb.cpp:159
EffectReverb::Params::mToneLow
double mToneLow
Definition: Reverb.h:38
Reverb_priv_t::wet
float * wet[2]
Definition: Reverb.cpp:86
EffectReverb::GetDescription
TranslatableString GetDescription() override
Definition: Reverb.cpp:147
dB_to_linear
#define dB_to_linear(x)
Definition: Reverb_libSoX.h:27
ReadAndVerifyDouble
#define ReadAndVerifyDouble(name)
Definition: Effect.h:632
ID_Reverberance
@ ID_Reverberance
Definition: Reverb.cpp:38
Effect::GetCurrentSettingsGroup
RegistryPath GetCurrentSettingsGroup() override
Definition: Effect.cpp:865
LoadEffects.h
id
int id
Definition: WaveTrackControls.cpp:589
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
Effect::mSampleRate
double mSampleRate
Definition: Effect.h:459
EffectReverb::SpinSlider
SpinSlider(RoomSize) SpinSlider(PreDelay) SpinSlider(Reverberance) SpinSlider(HfDamping) SpinSlider(ToneLow) SpinSlider(ToneHigh) SpinSlider(WetGain) SpinSlider(DryGain) SpinSlider(StereoWidth) wxCheckBox *mWetOnlyC
anonymous_namespace{Reverb.cpp}::reg
BuiltinEffectsModule::Registration< EffectReverb > reg
Definition: Reverb.cpp:96
EffectReverb::Params::mRoomSize
double mRoomSize
Definition: Reverb.h:34
BuiltinEffectsModule::Registration
Definition: LoadEffects.h:40
EffectReverb
A reverberation effect.
Definition: Reverb.h:25
Effect::mUIParent
wxWindow * mUIParent
Definition: Effect.h:477
ID_ToneLow
@ ID_ToneLow
Definition: Reverb.cpp:40
names
static TranslatableStrings names
Definition: Tags.cpp:743
EffectReverb::Params::mToneHigh
double mToneHigh
Definition: Reverb.h:39
_
#define _(s)
Definition: Internat.h:76
sampleCount
Definition: Types.h:589
EffectReverb::ProcessFinalize
bool ProcessFinalize() override
Definition: Reverb.cpp:209
EffectReverb::Params::mReverberance
double mReverberance
Definition: Reverb.h:36
EffectReverb::ProcessInitialize
bool ProcessInitialize(sampleCount totalLen, ChannelNames chanMap=NULL) override
Definition: Reverb.cpp:178
reverb_t
Definition: Reverb_libSoX.h:212
BLOCK
static size_t BLOCK
Definition: Reverb.cpp:176
EffectReverb::Params::mWetGain
double mWetGain
Definition: Reverb.h:40
EffectReverb::TransferDataFromWindow
bool TransferDataFromWindow() override
Definition: Reverb.cpp:501
TranslatableString::Translation
wxString Translation() const
Definition: Types.h:337
EffectReverb::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: Reverb.cpp:437
ChannelNameFrontRight
@ ChannelNameFrontRight
Definition: Types.h:757
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:195
ID_WetGain
@ ID_WetGain
Definition: Reverb.cpp:42
ID_PreDelay
@ ID_PreDelay
Definition: Reverb.cpp:37
EffectReverb::SetTitle
void SetTitle(const wxString &name={})
EffectReverb::Params::mWetOnly
bool mWetOnly
Definition: Reverb.h:43
END_EVENT_TABLE
END_EVENT_TABLE()
EffectReverb::GetAudioInCount
unsigned GetAudioInCount() override
Definition: Reverb.cpp:166
EffectReverb::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: Reverb.h:27
ReadAndVerifyBool
#define ReadAndVerifyBool(name)
Definition: Effect.h:634
ID_StereoWidth
@ ID_StereoWidth
Definition: Reverb.cpp:44
EffectReverb::SetAutomationParameters
bool SetAutomationParameters(CommandParameters &parms) override
Definition: Reverb.cpp:311
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:638