Audacity  2.2.2
Public Member Functions | Private Attributes | List of all members
EffectNoise Class Referencefinal

An effect to add white noise. More...

#include <Noise.h>

Inheritance diagram for EffectNoise:
Effect EffectClientInterface EffectUIClientInterface EffectHostInterface EffectDefinitionInterface ConfigClientInterface IdentInterface ParamsInterface

Public Member Functions

 EffectNoise ()
 
virtual ~EffectNoise ()
 
IdentInterfaceSymbol GetSymbol () override
 
wxString GetDescription () override
 
wxString ManualPage () override
 
EffectType GetType () override
 
unsigned GetAudioOutCount () override
 
size_t ProcessBlock (float **inBlock, float **outBlock, size_t blockLen) override
 
bool DefineParams (ShuttleParams &S) override
 
bool GetAutomationParameters (CommandParameters &parms) override
 
bool SetAutomationParameters (CommandParameters &parms) override
 
bool Startup () override
 
void PopulateOrExchange (ShuttleGui &S) override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
- Public Member Functions inherited from Effect
 Effect ()
 
virtual ~Effect ()
 
wxString GetPath () override
 
IdentInterfaceSymbol GetVendor () override
 
wxString GetVersion () override
 
IdentInterfaceSymbol GetFamilyId () override
 
bool IsInteractive () override
 
bool IsDefault () override
 
bool IsLegacy () override
 
bool SupportsRealtime () override
 
bool SupportsAutomation () override
 
bool SetHost (EffectHostInterface *host) override
 
unsigned GetAudioInCount () override
 
int GetMidiInCount () override
 
int GetMidiOutCount () override
 
sampleCount GetLatency () override
 
size_t GetTailSize () override
 
void SetSampleRate (double rate) override
 
size_t SetBlockSize (size_t maxBlockSize) override
 
bool IsReady () override
 
bool ProcessInitialize (sampleCount totalLen, ChannelNames chanMap=NULL) override
 
bool ProcessFinalize () override
 
bool RealtimeInitialize () override
 
bool RealtimeAddProcessor (unsigned numChannels, float sampleRate) override
 
bool RealtimeFinalize () override
 
bool RealtimeSuspend () override
 
bool RealtimeResume () override
 
bool RealtimeProcessStart () override
 
size_t RealtimeProcess (int group, float **inbuf, float **outbuf, size_t numSamples) override
 
bool RealtimeProcessEnd () override
 
bool ShowInterface (wxWindow *parent, bool forceModal=false) override
 
bool LoadUserPreset (const wxString &name) override
 
bool SaveUserPreset (const wxString &name) override
 
wxArrayString GetFactoryPresets () override
 
bool LoadFactoryPreset (int id) override
 
bool LoadFactoryDefaults () override
 
void SetHostUI (EffectUIHostInterface *host) override
 
bool PopulateUI (wxWindow *parent) override
 
bool IsGraphicalUI () override
 
bool ValidateUI () override
 
bool HideUI () override
 
bool CloseUI () override
 
bool CanExportPresets () override
 
void ExportPresets () override
 
void ImportPresets () override
 
bool HasOptions () override
 
void ShowOptions () override
 
double GetDefaultDuration () override
 
double GetDuration () override
 
NumericFormatId GetDurationFormat () override
 
virtual NumericFormatId GetSelectionFormat ()
 
void SetDuration (double duration) override
 
bool Apply () override
 
void Preview () override
 
wxDialog * CreateUI (wxWindow *parent, EffectUIClientInterface *client) override
 
wxString GetUserPresetsGroup (const wxString &name) override
 
wxString GetCurrentSettingsGroup () override
 
wxString GetFactoryDefaultsGroup () override
 
virtual wxString GetSavedStateGroup ()
 
bool HasSharedConfigGroup (const wxString &group) override
 
bool GetSharedConfigSubgroups (const wxString &group, wxArrayString &subgroups) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, wxString &value, const wxString &defval=wxEmptyString) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, int &value, int defval=0) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, bool &value, bool defval=false) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, float &value, float defval=0.0) override
 
bool GetSharedConfig (const wxString &group, const wxString &key, double &value, double defval=0.0) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const wxString &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const int &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const bool &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const float &value) override
 
bool SetSharedConfig (const wxString &group, const wxString &key, const double &value) override
 
bool RemoveSharedConfigSubgroup (const wxString &group) override
 
bool RemoveSharedConfig (const wxString &group, const wxString &key) override
 
bool HasPrivateConfigGroup (const wxString &group) override
 
bool GetPrivateConfigSubgroups (const wxString &group, wxArrayString &subgroups) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, wxString &value, const wxString &defval=wxEmptyString) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, int &value, int defval=0) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, bool &value, bool defval=false) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, float &value, float defval=0.0) override
 
bool GetPrivateConfig (const wxString &group, const wxString &key, double &value, double defval=0.0) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const wxString &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const int &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const bool &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const float &value) override
 
bool SetPrivateConfig (const wxString &group, const wxString &key, const double &value) override
 
bool RemovePrivateConfigSubgroup (const wxString &group) override
 
bool RemovePrivateConfig (const wxString &group, const wxString &key) override
 
virtual PluginID GetID ()
 
virtual bool Startup (EffectClientInterface *client)
 
virtual bool GetAutomationParameters (wxString &parms)
 
virtual bool SetAutomationParameters (const wxString &parms)
 
virtual wxArrayString GetUserPresets ()
 
virtual bool HasCurrentSettings ()
 
virtual bool HasFactoryDefaults ()
 
virtual wxString GetPreset (wxWindow *parent, const wxString &parms)
 
virtual wxString HelpPage ()
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
void SetPresetParameters (const wxArrayString *Names, const wxArrayString *Values)
 
bool DoEffect (wxWindow *parent, double projectRate, TrackList *list, TrackFactory *factory, SelectedRegion *selectedRegion, bool shouldPrompt=true)
 
bool Delegate (Effect &delegate, wxWindow *parent, bool shouldPrompt)
 
bool RealtimeAddProcessor (int group, unsigned chans, float rate)
 
size_t RealtimeProcess (int group, unsigned chans, float **inbuf, float **outbuf, size_t numSamples)
 
bool IsRealtimeActive ()
 
virtual bool IsHidden ()
 
int MessageBox (const wxString &message, long style=DefaultMessageBoxStyle, const wxString &titleStr=wxString{})
 
- Public Member Functions inherited from EffectClientInterface
virtual ~EffectClientInterface ()
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
- Public Member Functions inherited from IdentInterface
virtual ~IdentInterface ()
 
const wxString & GetTranslatedName ()
 
- Public Member Functions inherited from ParamsInterface
virtual ~ParamsInterface ()
 
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
- Public Member Functions inherited from EffectHostInterface
virtual ~EffectHostInterface ()
 
- Public Member Functions inherited from ConfigClientInterface
virtual ~ConfigClientInterface ()
 

Private Attributes

int mType
 
double mAmp
 
float y
 
float z
 
float buf0
 
float buf1
 
float buf2
 
float buf3
 
float buf4
 
float buf5
 
float buf6
 
NumericTextCtrlmNoiseDurationT
 

Additional Inherited Members

- Public Types inherited from Effect
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Protected Member Functions inherited from Effect
virtual bool Init ()
 
virtual bool PromptUser (wxWindow *parent)
 
virtual bool CheckWhetherSkipEffect ()
 
virtual bool Process ()
 
virtual bool ProcessPass ()
 
virtual bool InitPass1 ()
 
virtual bool InitPass2 ()
 
virtual int GetPass ()
 
virtual void End ()
 
virtual double CalcPreviewInputLength (double previewLength)
 
virtual void Preview (bool dryOnly)
 
virtual bool EnableApply (bool enable=true)
 
virtual bool EnablePreview (bool enable=true)
 
virtual void EnableDebug (bool enable=true)
 
bool TotalProgress (double frac)
 
bool TrackProgress (int whichTrack, double frac, const wxString &=wxEmptyString)
 
bool TrackGroupProgress (int whichGroup, double frac, const wxString &=wxEmptyString)
 
int GetNumWaveTracks ()
 
int GetNumWaveGroups ()
 
void GetSamples (const WaveTrack *track, sampleCount *start, sampleCount *len)
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing ()
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void CopyInputTracks ()
 
void CopyInputTracks (int trackType)
 
std::shared_ptr
< AddedAnalysisTrack
AddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
TrackAddToOutputTracks (std::unique_ptr< Track > &&t)
 
TrackListinputTracks () const
 
- Protected Attributes inherited from Effect
ProgressDialogmProgress
 
double mProjectRate
 
double mSampleRate
 
SelectedRegionmpSelectedRegion {}
 
TrackFactorymFactory
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0
 
double mT1
 
double mF0
 
double mF1
 
wxArrayString mPresetNames
 
wxArrayString mPresetValues
 
int mPass
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 
int mUIResultID
 
sampleCount mSampleCnt
 
int mOutputTracksType
 

Detailed Description

An effect to add white noise.

Definition at line 26 of file Noise.h.

Constructor & Destructor Documentation

EffectNoise::EffectNoise ( )

Definition at line 56 of file Noise.cpp.

References buf0, buf1, buf2, buf3, buf4, buf5, buf6, mAmp, mType, Effect::SetLinearEffectFlag(), y, and z.

57 {
58  mType = DEF_Type;
59  mAmp = DEF_Amp;
60 
61  SetLinearEffectFlag(true);
62 
63  y = z = buf0 = buf1 = buf2 = buf3 = buf4 = buf5 = buf6 = 0;
64 }
float buf1
Definition: Noise.h:64
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: Effect.cpp:1961
float y
Definition: Noise.h:64
float buf3
Definition: Noise.h:64
int mType
Definition: Noise.h:61
float buf2
Definition: Noise.h:64
double mAmp
Definition: Noise.h:62
float buf5
Definition: Noise.h:64
float z
Definition: Noise.h:64
float buf4
Definition: Noise.h:64
float buf6
Definition: Noise.h:64
float buf0
Definition: Noise.h:64
EffectNoise::~EffectNoise ( )
virtual

Definition at line 66 of file Noise.cpp.

67 {
68 }

Member Function Documentation

bool EffectNoise::DefineParams ( ShuttleParams S)
override

Definition at line 165 of file Noise.cpp.

References mAmp, mType, and nTypes.

165  {
166  S.SHUTTLE_ENUM_PARAM( mType, Type, kTypeStrings, nTypes );
167  S.SHUTTLE_PARAM( mAmp, Amp );
168  return true;
169 }
static const IdentInterfaceSymbol kTypeStrings[nTypes]
Definition: Noise.cpp:38
Definition: Noise.cpp:35
int mType
Definition: Noise.h:61
double mAmp
Definition: Noise.h:62
unsigned EffectNoise::GetAudioOutCount ( )
overridevirtual

Reimplemented from Effect.

Definition at line 96 of file Noise.cpp.

97 {
98  return 1;
99 }
bool EffectNoise::GetAutomationParameters ( CommandParameters parms)
overridevirtual

Reimplemented from Effect.

Definition at line 171 of file Noise.cpp.

References mAmp, and mType.

172 {
173  parms.Write(KEY_Type, kTypeStrings[mType].Internal());
174  parms.Write(KEY_Amp, mAmp);
175 
176  return true;
177 }
static const IdentInterfaceSymbol kTypeStrings[nTypes]
Definition: Noise.cpp:38
int mType
Definition: Noise.h:61
double mAmp
Definition: Noise.h:62
wxString EffectNoise::GetDescription ( )
overridevirtual

Reimplemented from Effect.

Definition at line 77 of file Noise.cpp.

References _().

78 {
79  return _("Generates one of three different types of noise");
80 }
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
IdentInterfaceSymbol EffectNoise::GetSymbol ( )
overridevirtual

Reimplemented from Effect.

Definition at line 72 of file Noise.cpp.

References NOISE_PLUGIN_SYMBOL.

73 {
74  return NOISE_PLUGIN_SYMBOL;
75 }
#define NOISE_PLUGIN_SYMBOL
Definition: Noise.h:24
EffectType EffectNoise::GetType ( )
overridevirtual

Reimplemented from Effect.

Definition at line 89 of file Noise.cpp.

References EffectTypeGenerate.

90 {
91  return EffectTypeGenerate;
92 }
wxString EffectNoise::ManualPage ( )
overridevirtual

Reimplemented from Effect.

Definition at line 82 of file Noise.cpp.

83 {
84  return wxT("Noise");
85 }
void EffectNoise::PopulateOrExchange ( ShuttleGui S)
overridevirtual

Reimplemented from Effect.

Definition at line 220 of file Noise.cpp.

References _(), ShuttleGuiBase::AddChoice(), ShuttleGuiBase::AddPrompt(), ShuttleGuiBase::AddTextBox(), ShuttleGuiBase::AddWindow(), NumericTextCtrl::Options::AutoPos(), ShuttleGuiBase::EndMultiColumn(), Effect::GetDuration(), Effect::GetDurationFormat(), ShuttleGuiBase::GetParent(), LocalizedStrings(), mAmp, mNoiseDurationT, Effect::mProjectRate, mType, nTypes, safenew, ShuttleGuiBase::StartMultiColumn(), and NumericConverter::TIME.

221 {
222  wxASSERT(nTypes == WXSIZEOF(kTypeStrings));
223 
224  S.StartMultiColumn(2, wxCENTER);
225  {
226  auto typeChoices = LocalizedStrings(kTypeStrings, nTypes);
227  S.AddChoice(_("Noise type:"), wxT(""), &typeChoices)->SetValidator(wxGenericValidator(&mType));
228 
229  FloatingPointValidator<double> vldAmp(6, &mAmp, NumValidatorStyle::NO_TRAILING_ZEROES);
230  vldAmp.SetRange(MIN_Amp, MAX_Amp);
231  S.AddTextBox(_("Amplitude (0-1):"), wxT(""), 12)->SetValidator(vldAmp);
232 
233  S.AddPrompt(_("Duration:"));
235  NumericTextCtrl(S.GetParent(), wxID_ANY,
238  GetDuration(),
239  mProjectRate,
241  .AutoPos(true));
242  mNoiseDurationT->SetName(_("Duration"));
243  S.AddWindow(mNoiseDurationT, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL);
244  }
245  S.EndMultiColumn();
246 }
NumericTextCtrl * mNoiseDurationT
Definition: Noise.h:66
static const IdentInterfaceSymbol kTypeStrings[nTypes]
Definition: Noise.cpp:38
double GetDuration() override
Definition: Effect.cpp:722
Definition: Noise.cpp:35
wxWindow * AddWindow(wxWindow *pWindow, int Flags=wxALIGN_CENTRE|wxALL)
Definition: ShuttleGui.cpp:288
wxArrayString LocalizedStrings(const IdentInterfaceSymbol strings[], size_t nStrings)
Definition: Internat.cpp:303
void EndMultiColumn()
NumericFormatId GetDurationFormat() override
Definition: Effect.cpp:732
int mType
Definition: Noise.h:61
#define safenew
Definition: Audacity.h:230
void AddPrompt(const wxString &Prompt)
Right aligned text string.
Definition: ShuttleGui.cpp:239
wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars)
Definition: ShuttleGui.cpp:540
double mAmp
Definition: Noise.h:62
wxWindow * GetParent()
Definition: ShuttleGui.h:294
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxChoice * AddChoice(const wxString &Prompt, const wxString &Selected, const wxArrayString *pChoices)
Definition: ShuttleGui.cpp:371
double mProjectRate
Definition: Effect.h:453
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
Options & AutoPos(bool value)
size_t EffectNoise::ProcessBlock ( float **  inBlock,
float **  outBlock,
size_t  blockLen 
)
overridevirtual

Reimplemented from Effect.

Definition at line 101 of file Noise.cpp.

References buf0, buf1, buf2, buf3, buf4, buf5, buf6, kBrownian, kPink, kWhite, mAmp, Effect::mSampleRate, mType, y, and z.

102 {
103  float *buffer = outbuf[0];
104 
105  float white;
106  float amplitude;
107  float div = ((float) RAND_MAX) / 2.0f;
108 
109  switch (mType)
110  {
111  default:
112  case kWhite: // white
113  for (decltype(size) i = 0; i < size; i++)
114  {
115  buffer[i] = mAmp * ((rand() / div) - 1.0f);
116  }
117  break;
118 
119  case kPink: // pink
120  // based on Paul Kellet's "instrumentation grade" algorithm.
121 
122  // 0.129f is an experimental normalization factor.
123  amplitude = mAmp * 0.129f;
124  for (decltype(size) i = 0; i < size; i++)
125  {
126  white = (rand() / div) - 1.0f;
127  buf0 = 0.99886f * buf0 + 0.0555179f * white;
128  buf1 = 0.99332f * buf1 + 0.0750759f * white;
129  buf2 = 0.96900f * buf2 + 0.1538520f * white;
130  buf3 = 0.86650f * buf3 + 0.3104856f * white;
131  buf4 = 0.55000f * buf4 + 0.5329522f * white;
132  buf5 = -0.7616f * buf5 - 0.0168980f * white;
133  buffer[i] = amplitude *
134  (buf0 + buf1 + buf2 + buf3 + buf4 + buf5 + buf6 + white * 0.5362);
135  buf6 = white * 0.115926;
136  }
137  break;
138 
139  case kBrownian: // Brownian
140  //float leakage=0.997; // experimental value at 44.1kHz
141  //double scaling = 0.05; // experimental value at 44.1kHz
142  // min and max protect against instability at extreme sample rates.
143  float leakage = ((mSampleRate - 144.0) / mSampleRate < 0.9999)
144  ? (mSampleRate - 144.0) / mSampleRate
145  : 0.9999f;
146 
147  float scaling = (9.0 / sqrt(mSampleRate) > 0.01)
148  ? 9.0 / sqrt(mSampleRate)
149  : 0.01f;
150 
151  for (decltype(size) i = 0; i < size; i++)
152  {
153  white = (rand() / div) - 1.0f;
154  z = leakage * y + white * scaling;
155  y = fabs(z) > 1.0
156  ? leakage * y - white * scaling
157  : z;
158  buffer[i] = mAmp * y;
159  }
160  break;
161  }
162 
163  return size;
164 }
float buf1
Definition: Noise.h:64
Definition: Noise.cpp:32
float y
Definition: Noise.h:64
float buf3
Definition: Noise.h:64
int mType
Definition: Noise.h:61
double mSampleRate
Definition: Effect.h:455
float buf2
Definition: Noise.h:64
double mAmp
Definition: Noise.h:62
Definition: Noise.cpp:33
float buf5
Definition: Noise.h:64
float z
Definition: Noise.h:64
float buf4
Definition: Noise.h:64
float buf6
Definition: Noise.h:64
float buf0
Definition: Noise.h:64
bool EffectNoise::SetAutomationParameters ( CommandParameters parms)
overridevirtual

Reimplemented from Effect.

Definition at line 179 of file Noise.cpp.

References mAmp, mType, nTypes, ReadAndVerifyDouble, and ReadAndVerifyEnum.

180 {
182  ReadAndVerifyDouble(Amp);
183 
184  mType = Type;
185  mAmp = Amp;
186 
187  return true;
188 }
static const IdentInterfaceSymbol kTypeStrings[nTypes]
Definition: Noise.cpp:38
Definition: Noise.cpp:35
int mType
Definition: Noise.h:61
#define ReadAndVerifyEnum(name, list, listSize)
Definition: Effect.h:786
double mAmp
Definition: Noise.h:62
#define ReadAndVerifyDouble(name)
Definition: Effect.h:798
bool EffectNoise::Startup ( )
overridevirtual

Reimplemented from Effect.

Definition at line 192 of file Noise.cpp.

References Effect::GetCurrentSettingsGroup(), gPrefs, mAmp, mType, and Effect::SaveUserPreset().

193 {
194  wxString base = wxT("/Effects/Noise/");
195 
196  // Migrate settings from 2.1.0 or before
197 
198  // Already migrated, so bail
199  if (gPrefs->Exists(base + wxT("Migrated")))
200  {
201  return true;
202  }
203 
204  // Load the old "current" settings
205  if (gPrefs->Exists(base))
206  {
207  gPrefs->Read(base + wxT("Type"), &mType, 0L);
208  gPrefs->Read(base + wxT("Amplitude"), &mAmp, 0.8f);
209 
211 
212  // Do not migrate again
213  gPrefs->Write(base + wxT("Migrated"), true);
214  gPrefs->Flush();
215  }
216 
217  return true;
218 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
bool SaveUserPreset(const wxString &name) override
Definition: Effect.cpp:600
wxString GetCurrentSettingsGroup() override
Definition: Effect.cpp:801
int mType
Definition: Noise.h:61
double mAmp
Definition: Noise.h:62
bool EffectNoise::TransferDataFromWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 260 of file Noise.cpp.

References NumericConverter::GetValue(), mNoiseDurationT, Effect::mUIParent, and Effect::SetDuration().

261 {
262  if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
263  {
264  return false;
265  }
266 
268 
269  return true;
270 }
NumericTextCtrl * mNoiseDurationT
Definition: Noise.h:66
void SetDuration(double duration) override
Definition: Effect.cpp:742
wxWindow * mUIParent
Definition: Effect.h:472
bool EffectNoise::TransferDataToWindow ( )
overridevirtual

Reimplemented from Effect.

Definition at line 248 of file Noise.cpp.

References Effect::GetDuration(), mNoiseDurationT, Effect::mUIParent, and NumericTextCtrl::SetValue().

249 {
250  if (!mUIParent->TransferDataToWindow())
251  {
252  return false;
253  }
254 
256 
257  return true;
258 }
NumericTextCtrl * mNoiseDurationT
Definition: Noise.h:66
double GetDuration() override
Definition: Effect.cpp:722
void SetValue(double newValue)
wxWindow * mUIParent
Definition: Effect.h:472

Member Data Documentation

float EffectNoise::buf0
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::buf1
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::buf2
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::buf3
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::buf4
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::buf5
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::buf6
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

double EffectNoise::mAmp
private
NumericTextCtrl* EffectNoise::mNoiseDurationT
private

Definition at line 66 of file Noise.h.

Referenced by PopulateOrExchange(), TransferDataFromWindow(), and TransferDataToWindow().

int EffectNoise::mType
private
float EffectNoise::y
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().

float EffectNoise::z
private

Definition at line 64 of file Noise.h.

Referenced by EffectNoise(), and ProcessBlock().


The documentation for this class was generated from the following files: