Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
EffectPhaser Class Referencefinal

An Effect that changes frequencies in a time varying manner. More...

#include <Phaser.h>

Inheritance diagram for EffectPhaser:
[legend]
Collaboration diagram for EffectPhaser:
[legend]

Public Member Functions

 EffectPhaser ()
 
virtual ~EffectPhaser ()
 
ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
ManualPageID ManualPage () const override
 Name of a page in the Audacity alpha manual, default is empty. More...
 
EffectType GetType () const override
 Type determines how it behaves. More...
 
RealtimeSince RealtimeSupport () const override
 Since which version of Audacity has the effect supported realtime? More...
 
unsigned GetAudioInCount () const override
 How many input buffers to allocate at once. More...
 
unsigned GetAudioOutCount () const override
 How many output buffers to allocate at once. More...
 
bool ProcessInitialize (EffectSettings &settings, double sampleRate, sampleCount totalLen, ChannelNames chanMap) override
 
size_t ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen) override
 Called for destructive effect computation. More...
 
bool RealtimeInitialize (EffectSettings &settings, double sampleRate) override
 
bool RealtimeAddProcessor (EffectSettings &settings, unsigned numChannels, float sampleRate) override
 
bool RealtimeFinalize (EffectSettings &settings) noexcept override
 
size_t RealtimeProcess (size_t group, EffectSettings &settings, const float *const *inbuf, float *const *outbuf, size_t numSamples) override
 
std::unique_ptr< EffectUIValidatorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) override
 Add controls to effect panel; always succeeds. More...
 
bool TransferDataToWindow (const EffectSettings &settings) override
 Update controls for the settings. More...
 
bool TransferDataFromWindow (EffectSettings &settings) override
 Update the given settings from controls. More...
 
- Public Member Functions inherited from StatefulPerTrackEffect
std::shared_ptr< EffectInstanceMakeInstance () const override
 Make an object maintaining short-term state of an Effect. More...
 
size_t SetBlockSize (size_t maxBlockSize) override
 
size_t GetBlockSize () const override
 
virtual sampleCount GetLatency ()
 
virtual bool ProcessInitialize (EffectSettings &settings, double sampleRate, sampleCount totalLen, ChannelNames chanMap=nullptr)
 
virtual bool ProcessFinalize ()
 
virtual size_t ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen)
 Called for destructive effect computation. More...
 
- Public Member Functions inherited from StatefulEffectBase
virtual bool Init ()
 Call once to set up state for whole list of tracks to be processed. More...
 
virtual bool Process (EffectInstance &instance, EffectSettings &settings)=0
 Actually do the effect here. More...
 
virtual bool RealtimeInitialize (EffectSettings &settings, double sampleRate)
 
virtual bool RealtimeAddProcessor (EffectSettings &settings, unsigned numChannels, float sampleRate)
 
virtual bool RealtimeSuspend ()
 
virtual bool RealtimeResume ()
 
virtual bool RealtimeProcessStart (EffectSettings &settings)
 settings are possibly changed, since last call, by an asynchronous dialog More...
 
virtual size_t RealtimeProcess (size_t group, EffectSettings &settings, const float *const *inBuf, float *const *outBuf, size_t numSamples)
 
virtual bool RealtimeProcessEnd (EffectSettings &settings) noexcept
 settings can be updated to let a dialog change appearance at idle More...
 
virtual bool RealtimeFinalize (EffectSettings &settings) noexcept
 
virtual size_t SetBlockSize (size_t maxBlockSize)
 
virtual size_t GetBlockSize () const
 
- Public Member Functions inherited from PerTrackEffect
 ~PerTrackEffect () override
 
- Public Member Functions inherited from Effect
 Effect ()
 
virtual ~Effect ()
 
PluginPath GetPath () const override
 
bool VisitSettings (SettingsVisitor &visitor, EffectSettings &settings) override
 
bool VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const override
 
ComponentInterfaceSymbol GetSymbol () const override
 
VendorSymbol GetVendor () const override
 
wxString GetVersion () const override
 
TranslatableString GetDescription () const override
 
EffectType GetType () const override
 Type determines how it behaves. More...
 
EffectFamilySymbol GetFamily () const override
 Report identifier and user-visible name of the effect protocol. More...
 
bool IsInteractive () const override
 Whether the effect needs a dialog for entry of settings. More...
 
bool IsDefault () const override
 Whether the effect sorts "above the line" in the menus. More...
 
RealtimeSince RealtimeSupport () const override
 Since which version of Audacity has the effect supported realtime? More...
 
bool SupportsAutomation () const override
 Whether the effect has any automatable controls. More...
 
bool SaveSettings (const EffectSettings &settings, CommandParameters &parms) const override
 Store settings as keys and values. More...
 
bool LoadSettings (const CommandParameters &parms, EffectSettings &settings) const override
 Restore settings from keys and values. More...
 
bool LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const override
 Change settings to a user-named preset. More...
 
bool SaveUserPreset (const RegistryPath &name, const EffectSettings &settings) const override
 Save settings in the configuration file as a user-named preset. More...
 
RegistryPaths GetFactoryPresets () const override
 Report names of factory presets. More...
 
bool LoadFactoryPreset (int id, EffectSettings &settings) const override
 Change settings to the preset whose name is GetFactoryPresets()[id] More...
 
bool LoadFactoryDefaults (EffectSettings &settings) const override
 Change settings back to "factory default". More...
 
unsigned GetAudioInCount () const override
 How many input buffers to allocate at once. More...
 
unsigned GetAudioOutCount () const override
 How many output buffers to allocate at once. More...
 
virtual const EffectParameterMethodsParameters () const
 
int ShowClientInterface (wxWindow &parent, wxDialog &dialog, bool forceModal=false) override
 
std::unique_ptr< EffectUIValidatorPopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access) override
 Adds controls to a panel that is given as the parent window of S More...
 
bool IsGraphicalUI () override
 
bool ValidateUI (EffectSettings &) override
 
bool CloseUI () override
 
bool CanExportPresets () override
 
void ExportPresets (const EffectSettings &settings) const override
 
void ImportPresets (EffectSettings &settings) override
 
bool HasOptions () override
 
void ShowOptions () override
 
const EffectSettingsManagerGetDefinition () const override
 
virtual NumericFormatSymbol GetSelectionFormat ()
 
int ShowHostInterface (wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false) override
 Usually applies factory to self and given access. More...
 
bool SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const override
 
bool LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const override
 
bool IsBatchProcessing () const override
 
void SetBatchProcessing () override
 
void UnsetBatchProcessing () override
 
bool TransferDataToWindow (const EffectSettings &settings) override
 Update controls for the settings. More...
 
bool TransferDataFromWindow (EffectSettings &settings) override
 Update the given settings from controls. More...
 
unsigned TestUIFlags (unsigned mask)
 
bool Delegate (Effect &delegate, EffectSettings &settings)
 Re-invoke DoEffect on another Effect object that implements the work. More...
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={}) const
 
bool EnableApply (bool enable=true)
 
wxWindow * GetUIParent ()
 
- Public Member Functions inherited from EffectBase
 EffectBase ()
 
 ~EffectBase () override
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
virtual int ShowClientInterface (wxWindow &parent, wxDialog &dialog, bool forceModal=false)=0
 
virtual bool IsGraphicalUI ()=0
 
virtual std::unique_ptr< EffectUIValidatorPopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access)=0
 Adds controls to a panel that is given as the parent window of S More...
 
virtual bool CanExportPresets ()=0
 
virtual void ExportPresets (const EffectSettings &settings) const =0
 
virtual void ImportPresets (EffectSettings &settings)=0
 
virtual bool HasOptions ()=0
 
virtual void ShowOptions ()=0
 
- Public Member Functions inherited from EffectPlugin
EffectPluginoperator= (EffectPlugin &)=delete
 
virtual ~EffectPlugin ()
 
virtual const EffectSettingsManagerGetDefinition () const =0
 
virtual int ShowHostInterface (wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)=0
 Usually applies factory to self and given access. More...
 
virtual void Preview (EffectSettingsAccess &access, bool dryOnly)=0
 
virtual bool SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const =0
 
virtual bool LoadSettingsFromString (const wxString &parms, EffectSettings &settings) const =0
 
virtual bool IsBatchProcessing () const =0
 
virtual void SetBatchProcessing ()=0
 
virtual void UnsetBatchProcessing ()=0
 
virtual bool DoEffect (EffectSettings &settings, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent=nullptr, const EffectDialogFactory &dialogFactory={}, const EffectSettingsAccessPtr &pAccess=nullptr)=0
 Unfortunately complicated dual-use function. More...
 
virtual bool TransferDataToWindow (const EffectSettings &settings)=0
 Update controls for the settings. More...
 
virtual bool TransferDataFromWindow (EffectSettings &settings)=0
 Update the given settings from controls. More...
 
- Public Member Functions inherited from EffectInstanceFactory
virtual ~EffectInstanceFactory ()
 
virtual std::shared_ptr< EffectInstanceMakeInstance () const =0
 Make an object maintaining short-term state of an Effect. More...
 
virtual unsigned GetAudioInCount () const =0
 How many input buffers to allocate at once. More...
 
virtual unsigned GetAudioOutCount () const =0
 How many output buffers to allocate at once. More...
 
virtual int GetMidiInCount () const
 Function that has not yet found a use. More...
 
virtual int GetMidiOutCount () const
 Function that has not yet found a use. More...
 
- Public Member Functions inherited from EffectSettingsManager
virtual ~EffectSettingsManager ()
 
virtual bool VisitSettings (SettingsVisitor &visitor, EffectSettings &settings)
 
virtual bool VisitSettings (ConstSettingsVisitor &visitor, const EffectSettings &settings) const
 
virtual EffectSettings MakeSettings () const
 
virtual bool CopySettingsContents (const EffectSettings &src, EffectSettings &dst) const
 Update one settings object from another. More...
 
- Public Member Functions inherited from EffectDefinitionInterface
virtual ~EffectDefinitionInterface ()
 
virtual EffectType GetType () const =0
 Type determines how it behaves. More...
 
virtual EffectType GetClassification () const
 Determines which menu it appears in; default same as GetType(). More...
 
virtual EffectFamilySymbol GetFamily () const =0
 Report identifier and user-visible name of the effect protocol. More...
 
virtual bool IsInteractive () const =0
 Whether the effect needs a dialog for entry of settings. More...
 
virtual bool IsDefault () const =0
 Whether the effect sorts "above the line" in the menus. More...
 
virtual RealtimeSince RealtimeSupport () const =0
 Since which version of Audacity has the effect supported realtime? More...
 
bool SupportsRealtime () const
 
virtual bool SupportsAutomation () const =0
 Whether the effect has any automatable controls. More...
 
virtual bool EnablesDebug () const
 Whether the effect dialog should have a Debug button; default, always false. More...
 
virtual ManualPageID ManualPage () const
 Name of a page in the Audacity alpha manual, default is empty. More...
 
virtual FilePath HelpPage () const
 Fully qualified local help file name, default is empty. More...
 
virtual bool IsHiddenFromMenus () const
 Default is false. More...
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 

Static Public Member Functions

static EffectPhaserFetchParameters (EffectPhaser &e, EffectSettings &)
 
- Static Public Member Functions inherited from Effect
static EffectFetchParameters (Effect &e, EffectSettings &)
 
static void IncEffectCounter ()
 
- Static Public Member Functions inherited from EffectDefinitionInterface
static Identifier GetSquashedName (const Identifier &ident)
 A utility that strips spaces and CamelCases a name. More...
 

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Phaser") }
 
- Static Public Attributes inherited from EffectPlugin
static const wxString kUserPresetIdent = wxT("User Preset:")
 
static const wxString kFactoryPresetIdent = wxT("Factory Preset:")
 
static const wxString kCurrentSettingsIdent = wxT("<Current Settings>")
 
static const wxString kFactoryDefaultsIdent = wxT("<Factory Defaults>")
 

Private Member Functions

void InstanceInit (EffectPhaserState &data, float sampleRate)
 
size_t InstanceProcess (EffectSettings &settings, EffectPhaserState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
 
void OnStagesSlider (wxCommandEvent &evt)
 
void OnDryWetSlider (wxCommandEvent &evt)
 
void OnFeedbackSlider (wxCommandEvent &evt)
 
void OnDepthSlider (wxCommandEvent &evt)
 
void OnPhaseSlider (wxCommandEvent &evt)
 
void OnFreqSlider (wxCommandEvent &evt)
 
void OnGainSlider (wxCommandEvent &evt)
 
void OnStagesText (wxCommandEvent &evt)
 
void OnDryWetText (wxCommandEvent &evt)
 
void OnFeedbackText (wxCommandEvent &evt)
 
void OnDepthText (wxCommandEvent &evt)
 
void OnPhaseText (wxCommandEvent &evt)
 
void OnFreqText (wxCommandEvent &evt)
 
void OnGainText (wxCommandEvent &evt)
 
const EffectParameterMethodsParameters () const override
 

Private Attributes

EffectPhaserState mMaster
 
std::vector< EffectPhaserStatemSlaves
 
int mStages
 
int mDryWet
 
double mFreq
 
double mPhase
 
int mDepth
 
int mFeedback
 
double mOutGain
 
wxTextCtrl * mStagesT
 
wxTextCtrl * mDryWetT
 
wxTextCtrl * mFreqT
 
wxTextCtrl * mPhaseT
 
wxTextCtrl * mDepthT
 
wxTextCtrl * mFeedbackT
 
wxTextCtrl * mOutGainT
 
wxSlider * mStagesS
 
wxSlider * mDryWetS
 
wxSlider * mFreqS
 
wxSlider * mPhaseS
 
wxSlider * mDepthS
 
wxSlider * mFeedbackS
 
wxSlider * mOutGainS
 

Static Private Attributes

static constexpr EffectParameter Stages
 
static constexpr EffectParameter DryWet
 
static constexpr EffectParameter Freq
 
static constexpr EffectParameter Phase
 
static constexpr EffectParameter Depth
 
static constexpr EffectParameter Feedback
 
static constexpr EffectParameter OutGain
 

Additional Inherited Members

- Public Types inherited from Effect
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Public Types inherited from EffectPlugin
using EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess >
 
- Public Types inherited from EffectDefinitionInterface
enum class  RealtimeSince : unsigned { Never , Since_3_2 , Always }
 In which versions of Audacity was an effect realtime capable? More...
 
- Protected Member Functions inherited from PerTrackEffect
bool DoPass1 () const
 
bool DoPass2 () const
 
bool Process (EffectInstance &instance, EffectSettings &settings) const
 
- Protected Member Functions inherited from Effect
bool EnablePreview (bool enable=true)
 
bool CheckWhetherSkipEffect (const EffectSettings &settings) const override
 Default implementation returns false. More...
 
double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const override
 Default implementation returns previewLength More...
 
virtual std::unique_ptr< EffectUIValidatorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access)
 Add controls to effect panel; always succeeds. More...
 
bool TotalProgress (double frac, const TranslatableString &={}) const
 
bool TrackProgress (int whichTrack, double frac, const TranslatableString &={}) const
 
bool TrackGroupProgress (int whichGroup, double frac, const TranslatableString &={}) const
 
int GetNumWaveTracks () const
 
int GetNumWaveGroups () const
 
void GetBounds (const WaveTrack &track, const WaveTrack *pRight, sampleCount *start, sampleCount *len)
 
void CopyInputTracks (bool allSyncLockSelected=false)
 
std::shared_ptr< AddedAnalysisTrackAddAnalysisTrack (const wxString &name=wxString())
 
ModifiedAnalysisTrack ModifyAnalysisTrack (const LabelTrack *pOrigTrack, const wxString &name=wxString())
 
TrackAddToOutputTracks (const std::shared_ptr< Track > &t)
 
- Protected Member Functions inherited from EffectBase
void Preview (EffectSettingsAccess &access, bool dryOnly) override
 
bool DoEffect (EffectSettings &settings, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, wxWindow *pParent, const EffectDialogFactory &dialogFactory, const EffectSettingsAccessPtr &pAccess) override
 Unfortunately complicated dual-use function. More...
 
virtual bool CheckWhetherSkipEffect (const EffectSettings &settings) const =0
 After Init(), tell whether Process() should be skipped. More...
 
virtual double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const =0
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing () const
 
void IncludeNotSelectedPreviewTracks (bool includeNotSelected)
 
void ReplaceProcessedTracks (const bool bGoodResult)
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 
virtual bool ValidateUI (EffectSettings &settings)=0
 
virtual bool CloseUI ()=0
 
- Protected Attributes inherited from PerTrackEffect
sampleCount mSampleCnt {}
 
- Protected Attributes inherited from Effect
wxWeakRef< wxDialog > mHostUIDialog
 This smart pointer tracks the lifetime of the dialog. More...
 
wxWindow * mUIParent {}
 
- Protected Attributes inherited from EffectBase
BasicUI::ProgressDialogmProgress {}
 
double mProjectRate {}
 
WaveTrackFactorymFactory {}
 
std::shared_ptr< TrackListmOutputTracks
 
double mT0 {}
 
double mT1 {}
 
wxArrayString mPresetNames
 
unsigned mUIFlags { 0 }
 
- Protected Attributes inherited from EffectUIClientInterface
friend EffectUIValidator
 
friend DefaultEffectUIValidator
 
- Static Protected Attributes inherited from EffectBase
static int nEffectsDone = 0
 

Detailed Description

An Effect that changes frequencies in a time varying manner.

Definition at line 43 of file Phaser.h.

Constructor & Destructor Documentation

◆ EffectPhaser()

EffectPhaser::EffectPhaser ( )

Definition at line 91 of file Phaser.cpp.

92{
93 Parameters().Reset(*this);
95}
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: EffectBase.cpp:218
virtual void Reset(Effect &effect) const =0
const EffectParameterMethods & Parameters() const override
Definition: Phaser.cpp:45

Referenced by Parameters().

Here is the caller graph for this function:

◆ ~EffectPhaser()

EffectPhaser::~EffectPhaser ( )
virtual

Definition at line 97 of file Phaser.cpp.

98{
99}

Member Function Documentation

◆ FetchParameters()

static EffectPhaser * EffectPhaser::FetchParameters ( EffectPhaser e,
EffectSettings  
)
inlinestatic

Definition at line 47 of file Phaser.h.

47{ return &e; }

◆ GetAudioInCount()

unsigned EffectPhaser::GetAudioInCount ( ) const
overridevirtual

How many input buffers to allocate at once.

If the effect ALWAYS processes channels independently, this can return 1

Reimplemented from Effect.

Definition at line 132 of file Phaser.cpp.

133{
134 return 1;
135}

◆ GetAudioOutCount()

unsigned EffectPhaser::GetAudioOutCount ( ) const
overridevirtual

How many output buffers to allocate at once.

Reimplemented from Effect.

Definition at line 137 of file Phaser.cpp.

138{
139 return 1;
140}

◆ GetDescription()

TranslatableString EffectPhaser::GetDescription ( ) const
overridevirtual

Reimplemented from Effect.

Definition at line 108 of file Phaser.cpp.

109{
110 return XO("Combines phase-shifted signals with the original signal");
111}
#define XO(s)
Definition: Internat.h:31

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol EffectPhaser::GetSymbol ( ) const
overridevirtual

Reimplemented from Effect.

Definition at line 103 of file Phaser.cpp.

104{
105 return Symbol;
106}
static const ComponentInterfaceSymbol Symbol
Definition: Phaser.h:48

References Symbol.

◆ GetType()

EffectType EffectPhaser::GetType ( ) const
overridevirtual

Type determines how it behaves.

Reimplemented from Effect.

Definition at line 120 of file Phaser.cpp.

121{
122 return EffectTypeProcess;
123}
@ EffectTypeProcess

References EffectTypeProcess.

◆ InstanceInit()

void EffectPhaser::InstanceInit ( EffectPhaserState data,
float  sampleRate 
)
private

Definition at line 313 of file Phaser.cpp.

314{
315 data.samplerate = sampleRate;
316
317 for (int j = 0; j < mStages; j++)
318 {
319 data.old[j] = 0;
320 }
321
322 data.skipcount = 0;
323 data.gain = 0;
324 data.fbout = 0;
325 data.laststages = 0;
326 data.outgain = 0;
327
328 return;
329}
int mStages
Definition: Phaser.h:126
double outgain
Definition: Phaser.h:37
double fbout
Definition: Phaser.h:36
double gain
Definition: Phaser.h:35
double old[NUM_STAGES]
Definition: Phaser.h:34
float samplerate
Definition: Phaser.h:32
sampleCount skipcount
Definition: Phaser.h:33

References EffectPhaserState::fbout, EffectPhaserState::gain, EffectPhaserState::laststages, mStages, EffectPhaserState::old, EffectPhaserState::outgain, EffectPhaserState::samplerate, and EffectPhaserState::skipcount.

Referenced by ProcessInitialize(), and RealtimeAddProcessor().

Here is the caller graph for this function:

◆ InstanceProcess()

size_t EffectPhaser::InstanceProcess ( EffectSettings settings,
EffectPhaserState data,
const float *const *  inBlock,
float *const *  outBlock,
size_t  blockLen 
)
private

Definition at line 331 of file Phaser.cpp.

334{
335 const float *ibuf = inBlock[0];
336 float *obuf = outBlock[0];
337
338 for (int j = data.laststages; j < mStages; j++)
339 {
340 data.old[j] = 0;
341 }
342 data.laststages = mStages;
343
344 data.lfoskip = mFreq * 2 * M_PI / data.samplerate;
345 data.phase = mPhase * M_PI / 180;
347
348 for (decltype(blockLen) i = 0; i < blockLen; i++)
349 {
350 double in = ibuf[i];
351
352 double m = in + data.fbout * mFeedback / 101; // Feedback must be less than 100% to avoid infinite gain.
353
354 if (((data.skipcount++) % lfoskipsamples) == 0)
355 {
356 //compute sine between 0 and 1
357 data.gain =
358 (1.0 +
359 cos(data.skipcount.as_double() * data.lfoskip
360 + data.phase)) / 2.0;
361
362 // change lfo shape
363 data.gain = expm1(data.gain * phaserlfoshape) / expm1(phaserlfoshape);
364
365 // attenuate the lfo
366 data.gain = 1.0 - data.gain / 255.0 * mDepth;
367 }
368
369 // phasing routine
370 for (int j = 0; j < mStages; j++)
371 {
372 double tmp = data.old[j];
373 data.old[j] = data.gain * tmp + m;
374 m = tmp - data.gain * data.old[j];
375 }
376 data.fbout = m;
377
378 obuf[i] = (float) (data.outgain * (m * mDryWet + in * (255 - mDryWet)) / 255);
379 }
380
381 return blockLen;
382}
#define M_PI
Definition: Distortion.cpp:29
#define DB_TO_LINEAR(x)
Definition: MemoryX.h:535
#define phaserlfoshape
Definition: Phaser.cpp:60
#define lfoskipsamples
Definition: Phaser.cpp:63
double mPhase
Definition: Phaser.h:129
double mFreq
Definition: Phaser.h:128
int mDryWet
Definition: Phaser.h:127
int mDepth
Definition: Phaser.h:130
int mFeedback
Definition: Phaser.h:131
double mOutGain
Definition: Phaser.h:132
double lfoskip
Definition: Phaser.h:38
double phase
Definition: Phaser.h:39
double as_double() const
Definition: SampleCount.h:45

References sampleCount::as_double(), DB_TO_LINEAR, EffectPhaserState::fbout, EffectPhaserState::gain, EffectPhaserState::laststages, EffectPhaserState::lfoskip, lfoskipsamples, M_PI, mDepth, mDryWet, mFeedback, mFreq, mOutGain, mPhase, mStages, EffectPhaserState::old, EffectPhaserState::outgain, EffectPhaserState::phase, phaserlfoshape, EffectPhaserState::samplerate, and EffectPhaserState::skipcount.

Referenced by ProcessBlock(), and RealtimeProcess().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ManualPage()

ManualPageID EffectPhaser::ManualPage ( ) const
overridevirtual

Name of a page in the Audacity alpha manual, default is empty.

Reimplemented from EffectDefinitionInterface.

Definition at line 113 of file Phaser.cpp.

114{
115 return L"Phaser";
116}

◆ OnDepthSlider()

void EffectPhaser::OnDepthSlider ( wxCommandEvent &  evt)
private

Definition at line 416 of file Phaser.cpp.

417{
418 mDepth = evt.GetInt() / Depth.scale;
419 mDepthT->GetValidator()->TransferToWindow();
420 EnableApply(mUIParent->Validate());
421}
bool EnableApply(bool enable=true)
Definition: Effect.cpp:613
wxWindow * mUIParent
Definition: Effect.h:270
wxTextCtrl * mDepthT
Definition: Phaser.h:138
static constexpr EffectParameter Depth
Definition: Phaser.h:161
const Type scale
Scaling factor, for slider control.
Definition: Shuttle.h:32

References Depth, Effect::EnableApply(), mDepth, mDepthT, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnDepthText()

void EffectPhaser::OnDepthText ( wxCommandEvent &  evt)
private

Definition at line 481 of file Phaser.cpp.

482{
483 if (!EnableApply(mUIParent->TransferDataFromWindow()))
484 {
485 return;
486 }
487
488 mDepthS->SetValue((int) (mDepth * Depth.scale));
489}
wxSlider * mDepthS
Definition: Phaser.h:146

References Depth, Effect::EnableApply(), mDepth, mDepthS, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnDryWetSlider()

void EffectPhaser::OnDryWetSlider ( wxCommandEvent &  evt)
private

Definition at line 391 of file Phaser.cpp.

392{
393 mDryWet = evt.GetInt() / DryWet.scale;
394 mDryWetT->GetValidator()->TransferToWindow();
395 EnableApply(mUIParent->Validate());
396}
static constexpr EffectParameter DryWet
Definition: Phaser.h:155
wxTextCtrl * mDryWetT
Definition: Phaser.h:135

References DryWet, Effect::EnableApply(), mDryWet, mDryWetT, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnDryWetText()

void EffectPhaser::OnDryWetText ( wxCommandEvent &  evt)
private

Definition at line 451 of file Phaser.cpp.

452{
453 if (!EnableApply(mUIParent->TransferDataFromWindow()))
454 {
455 return;
456 }
457
458 mDryWetS->SetValue((int) (mDryWet * DryWet.scale));
459}
wxSlider * mDryWetS
Definition: Phaser.h:143

References DryWet, Effect::EnableApply(), mDryWet, mDryWetS, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnFeedbackSlider()

void EffectPhaser::OnFeedbackSlider ( wxCommandEvent &  evt)
private

Definition at line 423 of file Phaser.cpp.

424{
425 int val = evt.GetInt();
426 val = ((val + (val > 0 ? 5 : -5)) / 10) * 10; // round to nearest multiple of 10
427 val = val > Feedback.max * Feedback.scale ? Feedback.max * Feedback.scale : val;
428 mFeedbackS->SetValue(val);
429 mFeedback = val / Feedback.scale;
430 mFeedbackT->GetValidator()->TransferToWindow();
431 EnableApply(mUIParent->Validate());
432}
static constexpr EffectParameter Feedback
Definition: Phaser.h:163
wxTextCtrl * mFeedbackT
Definition: Phaser.h:139
wxSlider * mFeedbackS
Definition: Phaser.h:147
const Type max
Maximum value.
Definition: Shuttle.h:31

References Effect::EnableApply(), Feedback, EffectParameter< Structure, Member, Type, Value >::max, mFeedback, mFeedbackS, mFeedbackT, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnFeedbackText()

void EffectPhaser::OnFeedbackText ( wxCommandEvent &  evt)
private

Definition at line 491 of file Phaser.cpp.

492{
493 if (!EnableApply(mUIParent->TransferDataFromWindow()))
494 {
495 return;
496 }
497
498 mFeedbackS->SetValue((int) (mFeedback * Feedback.scale));
499}

References Effect::EnableApply(), Feedback, mFeedback, mFeedbackS, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnFreqSlider()

void EffectPhaser::OnFreqSlider ( wxCommandEvent &  evt)
private

Definition at line 398 of file Phaser.cpp.

399{
400 mFreq = (double) evt.GetInt() / Freq.scale;
401 if (mFreq < Freq.min) mFreq = Freq.min;
402 mFreqT->GetValidator()->TransferToWindow();
403 EnableApply(mUIParent->Validate());
404}
wxTextCtrl * mFreqT
Definition: Phaser.h:136
static constexpr EffectParameter Freq
Definition: Phaser.h:157
const Type min
Minimum value.
Definition: Shuttle.h:30

References Effect::EnableApply(), Freq, mFreq, mFreqT, EffectParameter< Structure, Member, Type, Value >::min, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnFreqText()

void EffectPhaser::OnFreqText ( wxCommandEvent &  evt)
private

Definition at line 461 of file Phaser.cpp.

462{
463 if (!EnableApply(mUIParent->TransferDataFromWindow()))
464 {
465 return;
466 }
467
468 mFreqS->SetValue((int) (mFreq * Freq.scale));
469}
wxSlider * mFreqS
Definition: Phaser.h:144

References Effect::EnableApply(), Freq, mFreq, mFreqS, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnGainSlider()

void EffectPhaser::OnGainSlider ( wxCommandEvent &  evt)
private

Definition at line 434 of file Phaser.cpp.

435{
436 mOutGain = evt.GetInt() / OutGain.scale;
437 mOutGainT->GetValidator()->TransferToWindow();
438 EnableApply(mUIParent->Validate());
439}
wxTextCtrl * mOutGainT
Definition: Phaser.h:140
static constexpr EffectParameter OutGain
Definition: Phaser.h:165

References Effect::EnableApply(), mOutGain, mOutGainT, Effect::mUIParent, OutGain, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnGainText()

void EffectPhaser::OnGainText ( wxCommandEvent &  evt)
private

Definition at line 501 of file Phaser.cpp.

502{
503 if (!EnableApply(mUIParent->TransferDataFromWindow()))
504 {
505 return;
506 }
507
508 mOutGainS->SetValue((int) (mOutGain * OutGain.scale));
509}
wxSlider * mOutGainS
Definition: Phaser.h:148

References Effect::EnableApply(), mOutGain, mOutGainS, Effect::mUIParent, OutGain, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnPhaseSlider()

void EffectPhaser::OnPhaseSlider ( wxCommandEvent &  evt)
private

Definition at line 406 of file Phaser.cpp.

407{
408 int val = ((evt.GetInt() + 5) / 10) * 10; // round to nearest multiple of 10
409 val = val > Phase.max * Phase.scale ? Phase.max * Phase.scale : val;
410 mPhaseS->SetValue(val);
411 mPhase = (double) val / Phase.scale;
412 mPhaseT->GetValidator()->TransferToWindow();
413 EnableApply(mUIParent->Validate());
414}
static constexpr EffectParameter Phase
Definition: Phaser.h:159
wxTextCtrl * mPhaseT
Definition: Phaser.h:137
wxSlider * mPhaseS
Definition: Phaser.h:145

References Effect::EnableApply(), EffectParameter< Structure, Member, Type, Value >::max, mPhase, mPhaseS, mPhaseT, Effect::mUIParent, Phase, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnPhaseText()

void EffectPhaser::OnPhaseText ( wxCommandEvent &  evt)
private

Definition at line 471 of file Phaser.cpp.

472{
473 if (!EnableApply(mUIParent->TransferDataFromWindow()))
474 {
475 return;
476 }
477
478 mPhaseS->SetValue((int) (mPhase * Phase.scale));
479}

References Effect::EnableApply(), mPhase, mPhaseS, Effect::mUIParent, Phase, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnStagesSlider()

void EffectPhaser::OnStagesSlider ( wxCommandEvent &  evt)
private

Definition at line 384 of file Phaser.cpp.

385{
386 mStages = (evt.GetInt() / Stages.scale) & ~1; // must be even;
387 mStagesT->GetValidator()->TransferToWindow();
388 EnableApply(mUIParent->Validate());
389}
static constexpr EffectParameter Stages
Definition: Phaser.h:153
wxTextCtrl * mStagesT
Definition: Phaser.h:134

References Effect::EnableApply(), mStages, mStagesT, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, and Stages.

Here is the call graph for this function:

◆ OnStagesText()

void EffectPhaser::OnStagesText ( wxCommandEvent &  evt)
private

Definition at line 441 of file Phaser.cpp.

442{
443 if (!EnableApply(mUIParent->TransferDataFromWindow()))
444 {
445 return;
446 }
447
448 mStagesS->SetValue((int) (mStages * Stages.scale));
449}
wxSlider * mStagesS
Definition: Phaser.h:142

References Effect::EnableApply(), mStages, mStagesS, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, and Stages.

Here is the call graph for this function:

◆ Parameters()

const EffectParameterMethods & EffectPhaser::Parameters ( ) const
overrideprivatevirtual

Reimplemented from Effect.

Definition at line 45 of file Phaser.cpp.

46{
49 > parameters{
50 [](EffectPhaser &, EffectSettings &, EffectPhaser &e, bool updating){
51 if (updating)
52 e.mStages &= ~1; // must be even, but don't complain about it
53 return true;
54 },
55 };
56 return parameters;
57}
Generates EffectParameterMethods overrides from variadic template arguments.
An Effect that changes frequencies in a time varying manner.
Definition: Phaser.h:44
EffectPhaser()
Definition: Phaser.cpp:91
Externalized state of a plug-in.

References Depth, DryWet, EffectPhaser(), Feedback, Freq, OutGain, Phase, and Stages.

Here is the call graph for this function:

◆ PopulateOrExchange()

std::unique_ptr< EffectUIValidator > EffectPhaser::PopulateOrExchange ( ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access 
)
overridevirtual

Add controls to effect panel; always succeeds.

Returns
if not null, then return it from Effect::PopulateUI instead of a DefaultEffectUIValidator; default implementation returns null

Reimplemented from Effect.

Definition at line 193 of file Phaser.cpp.

195{
196 S.SetBorder(5);
197 S.AddSpace(0, 5);
198
199 S.StartMultiColumn(3, wxEXPAND);
200 {
201 S.SetStretchyCol(2);
202
203 mStagesT = S.Id(ID_Stages)
204 .Validator<IntegerValidator<int>>(
205 &mStages, NumValidatorStyle::DEFAULT, Stages.min, Stages.max)
206 .AddTextBox(XXO("&Stages:"), L"", 15);
207
208 mStagesS = S.Id(ID_Stages)
209 .Name(XO("Stages"))
210 .Style(wxSL_HORIZONTAL)
211 .MinSize( { 100, -1 } )
212 .AddSlider( {}, Stages.def * Stages.scale, Stages.max * Stages.scale, Stages.min * Stages.scale);
213 mStagesS->SetLineSize(2);
214
215 mDryWetT = S.Id(ID_DryWet)
216 .Validator<IntegerValidator<int>>(
217 &mDryWet, NumValidatorStyle::DEFAULT, DryWet.min, DryWet.max)
218 .AddTextBox(XXO("&Dry/Wet:"), L"", 15);
219
220 mDryWetS = S.Id(ID_DryWet)
221 .Name(XO("Dry Wet"))
222 .Style(wxSL_HORIZONTAL)
223 .MinSize( { 100, -1 } )
224 .AddSlider( {}, DryWet.def * DryWet.scale, DryWet.max * DryWet.scale, DryWet.min * DryWet.scale);
225
226 mFreqT = S.Id(ID_Freq)
227 .Validator<FloatingPointValidator<double>>(
228 5, &mFreq, NumValidatorStyle::ONE_TRAILING_ZERO, Freq.min, Freq.max)
229 .AddTextBox(XXO("LFO Freq&uency (Hz):"), L"", 15);
230
231 mFreqS = S.Id(ID_Freq)
232 .Name(XO("LFO frequency in hertz"))
233 .Style(wxSL_HORIZONTAL)
234 .MinSize( { 100, -1 } )
235 .AddSlider( {}, Freq.def * Freq.scale, Freq.max * Freq.scale, 0.0);
236
237 mPhaseT = S.Id(ID_Phase)
238 .Validator<FloatingPointValidator<double>>(
239 1, &mPhase, NumValidatorStyle::DEFAULT, Phase.min, Phase.max)
240 .AddTextBox(XXO("LFO Sta&rt Phase (deg.):"), L"", 15);
241
242 mPhaseS = S.Id(ID_Phase)
243 .Name(XO("LFO start phase in degrees"))
244 .Style(wxSL_HORIZONTAL)
245 .MinSize( { 100, -1 } )
246 .AddSlider( {}, Phase.def * Phase.scale, Phase.max * Phase.scale, Phase.min * Phase.scale);
247 mPhaseS->SetLineSize(10);
248
249 mDepthT = S.Id(ID_Depth)
250 .Validator<IntegerValidator<int>>(
251 &mDepth, NumValidatorStyle::DEFAULT, Depth.min, Depth.max)
252 .AddTextBox(XXO("Dept&h:"), L"", 15);
253
254 mDepthS = S.Id(ID_Depth)
255 .Name(XO("Depth in percent"))
256 .Style(wxSL_HORIZONTAL)
257 .MinSize( { 100, -1 } )
258 .AddSlider( {}, Depth.def * Depth.scale, Depth.max * Depth.scale, Depth.min * Depth.scale);
259
261 .Validator<IntegerValidator<int>>(
262 &mFeedback, NumValidatorStyle::DEFAULT, Feedback.min, Feedback.max)
263 .AddTextBox(XXO("Feedbac&k (%):"), L"", 15);
264
266 .Name(XO("Feedback in percent"))
267 .Style(wxSL_HORIZONTAL)
268 .MinSize( { 100, -1 } )
270 mFeedbackS->SetLineSize(10);
271
273 .Validator<FloatingPointValidator<double>>(
274 1, &mOutGain, NumValidatorStyle::DEFAULT, OutGain.min, OutGain.max)
275 .AddTextBox(XXO("&Output gain (dB):"), L"", 12);
276
278 .Name(XO("Output gain (dB)"))
279 .Style(wxSL_HORIZONTAL)
280 .MinSize( { 100, -1 } )
282 }
283 S.EndMultiColumn();
284 return nullptr;
285}
#define XXO(s)
Definition: Internat.h:44
@ ID_Feedback
Definition: Phaser.cpp:41
@ ID_Freq
Definition: Phaser.cpp:38
@ ID_Depth
Definition: Phaser.cpp:40
@ ID_OutGain
Definition: Phaser.cpp:42
@ ID_Stages
Definition: Phaser.cpp:36
@ ID_DryWet
Definition: Phaser.cpp:37
@ ID_Phase
Definition: Phaser.cpp:39
#define S(N)
Definition: ToChars.cpp:64
const Type def
Default value.
Definition: Shuttle.h:29

References EffectParameter< Structure, Member, Type, Value >::def, Depth, DryWet, Feedback, Freq, ID_Depth, ID_DryWet, ID_Feedback, ID_Freq, ID_OutGain, ID_Phase, ID_Stages, EffectParameter< Structure, Member, Type, Value >::max, mDepth, mDepthS, mDepthT, mDryWet, mDryWetS, mDryWetT, mFeedback, mFeedbackS, mFeedbackT, mFreq, mFreqS, mFreqT, EffectParameter< Structure, Member, Type, Value >::min, mOutGain, mOutGainS, mOutGainT, mPhase, mPhaseS, mPhaseT, mStages, mStagesS, mStagesT, OutGain, Phase, S, EffectParameter< Structure, Member, Type, Value >::scale, Stages, XO, and XXO.

◆ ProcessBlock()

size_t EffectPhaser::ProcessBlock ( EffectSettings settings,
const float *const *  inBlock,
float *const *  outBlock,
size_t  blockLen 
)
overridevirtual

Called for destructive effect computation.

Reimplemented from StatefulPerTrackEffect.

Definition at line 151 of file Phaser.cpp.

153{
154 return InstanceProcess(settings, mMaster, inBlock, outBlock, blockLen);
155}
static Settings & settings()
Definition: TrackInfo.cpp:87
size_t InstanceProcess(EffectSettings &settings, EffectPhaserState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
Definition: Phaser.cpp:331
EffectPhaserState mMaster
Definition: Phaser.h:122

References InstanceProcess(), mMaster, and settings().

Here is the call graph for this function:

◆ ProcessInitialize()

bool EffectPhaser::ProcessInitialize ( EffectSettings settings,
double  sampleRate,
sampleCount  totalLen,
ChannelNames  chanMap 
)
overridevirtual

Called at start of destructive processing, for each (mono/stereo) track Default implementation does nothing, returns true

Reimplemented from StatefulPerTrackEffect.

Definition at line 142 of file Phaser.cpp.

144{
145 InstanceInit(mMaster, sampleRate);
146 if (chanMap[0] == ChannelNameFrontRight)
147 mMaster.phase += M_PI;
148 return true;
149}
@ ChannelNameFrontRight
void InstanceInit(EffectPhaserState &data, float sampleRate)
Definition: Phaser.cpp:313

References ChannelNameFrontRight, InstanceInit(), M_PI, mMaster, and EffectPhaserState::phase.

Here is the call graph for this function:

◆ RealtimeAddProcessor()

bool EffectPhaser::RealtimeAddProcessor ( EffectSettings settings,
unsigned  numChannels,
float  sampleRate 
)
overridevirtual

Returns
success Default implementation does nothing, returns true Default implementation does nothing, returns true

Reimplemented from StatefulEffectBase.

Definition at line 164 of file Phaser.cpp.

166{
167 EffectPhaserState slave;
168
169 InstanceInit(slave, sampleRate);
170
171 mSlaves.push_back(slave);
172
173 return true;
174}
std::vector< EffectPhaserState > mSlaves
Definition: Phaser.h:123

References InstanceInit(), and mSlaves.

Here is the call graph for this function:

◆ RealtimeFinalize()

bool EffectPhaser::RealtimeFinalize ( EffectSettings settings)
overridevirtualnoexcept

Returns
success Default implementation does nothing, returns true Default implementation does nothing, returns false

Reimplemented from StatefulEffectBase.

Definition at line 176 of file Phaser.cpp.

177{
178 mSlaves.clear();
179
180 return true;
181}

◆ RealtimeInitialize()

bool EffectPhaser::RealtimeInitialize ( EffectSettings settings,
double  sampleRate 
)
overridevirtual

Returns
success Default implementation does nothing, returns false (so assume realtime is not supported). Other member functions related to realtime return true or zero, but will not be called, unless a derived class overrides RealtimeInitialize. Default implementation does nothing, returns false

Reimplemented from StatefulEffectBase.

Definition at line 157 of file Phaser.cpp.

158{
159 SetBlockSize(512);
160 mSlaves.clear();
161 return true;
162}
size_t SetBlockSize(size_t maxBlockSize) override

References mSlaves, and StatefulPerTrackEffect::SetBlockSize().

Here is the call graph for this function:

◆ RealtimeProcess()

size_t EffectPhaser::RealtimeProcess ( size_t  group,
EffectSettings settings,
const float *const *  inBuf,
float *const *  outBuf,
size_t  numSamples 
)
overridevirtual

Returns
success Default implementation does nothing, returns 0 Default implementation does nothing, returns 0

Reimplemented from StatefulEffectBase.

Definition at line 183 of file Phaser.cpp.

185{
186 if (group >= mSlaves.size())
187 return 0;
188 return InstanceProcess(settings, mSlaves[group], inbuf, outbuf, numSamples);
189}

References InstanceProcess(), mSlaves, and settings().

Here is the call graph for this function:

◆ RealtimeSupport()

auto EffectPhaser::RealtimeSupport ( ) const
overridevirtual

Since which version of Audacity has the effect supported realtime?

Reimplemented from Effect.

Definition at line 125 of file Phaser.cpp.

126{
127 // TODO reenable after achieving statelessness
129// return RealtimeSince::Always;
130}

References EffectDefinitionInterface::Never.

◆ TransferDataFromWindow()

bool EffectPhaser::TransferDataFromWindow ( EffectSettings settings)
overridevirtual

Update the given settings from controls.

Reimplemented from Effect.

Definition at line 300 of file Phaser.cpp.

301{
302 if (mStages & 1) // must be even
303 {
304 mStages &= ~1;
305 mStagesT->GetValidator()->TransferToWindow();
306 }
307
308 return true;
309}

References mStages, and mStagesT.

◆ TransferDataToWindow()

bool EffectPhaser::TransferDataToWindow ( const EffectSettings settings)
overridevirtual

Update controls for the settings.

Reimplemented from Effect.

Definition at line 287 of file Phaser.cpp.

288{
289 mStagesS->SetValue((int) (mStages * Stages.scale));
290 mDryWetS->SetValue((int) (mDryWet * DryWet.scale));
291 mFreqS->SetValue((int) (mFreq * Freq.scale));
292 mPhaseS->SetValue((int) (mPhase * Phase.scale));
293 mDepthS->SetValue((int) (mDepth * Depth.scale));
294 mFeedbackS->SetValue((int) (mFeedback * Feedback.scale));
295 mOutGainS->SetValue((int) (mOutGain * OutGain.scale));
296
297 return true;
298}

References Depth, DryWet, Feedback, Freq, mDepth, mDepthS, mDryWet, mDryWetS, mFeedback, mFeedbackS, mFreq, mFreqS, mOutGain, mOutGainS, mPhase, mPhaseS, mStages, mStagesS, OutGain, Phase, EffectParameter< Structure, Member, Type, Value >::scale, and Stages.

Member Data Documentation

◆ Depth

constexpr EffectParameter EffectPhaser::Depth
staticconstexprprivate
Initial value:
L"Depth", 100, 0, 255, 1 }

Definition at line 161 of file Phaser.h.

Referenced by OnDepthSlider(), OnDepthText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ DryWet

constexpr EffectParameter EffectPhaser::DryWet
staticconstexprprivate
Initial value:
L"DryWet", 128, 0, 255, 1 }

Definition at line 155 of file Phaser.h.

Referenced by OnDryWetSlider(), OnDryWetText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ Feedback

constexpr EffectParameter EffectPhaser::Feedback
staticconstexprprivate
Initial value:
L"Feedback", 0, -100, 100, 1 }

Definition at line 163 of file Phaser.h.

Referenced by OnFeedbackSlider(), OnFeedbackText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ Freq

constexpr EffectParameter EffectPhaser::Freq
staticconstexprprivate
Initial value:
L"Freq", 0.4, 0.001,4.0, 10.0 }

Definition at line 157 of file Phaser.h.

Referenced by OnFreqSlider(), OnFreqText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ mDepth

int EffectPhaser::mDepth
private

◆ mDepthS

wxSlider* EffectPhaser::mDepthS
private

Definition at line 146 of file Phaser.h.

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

◆ mDepthT

wxTextCtrl* EffectPhaser::mDepthT
private

Definition at line 138 of file Phaser.h.

Referenced by OnDepthSlider(), and PopulateOrExchange().

◆ mDryWet

int EffectPhaser::mDryWet
private

◆ mDryWetS

wxSlider* EffectPhaser::mDryWetS
private

Definition at line 143 of file Phaser.h.

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

◆ mDryWetT

wxTextCtrl* EffectPhaser::mDryWetT
private

Definition at line 135 of file Phaser.h.

Referenced by OnDryWetSlider(), and PopulateOrExchange().

◆ mFeedback

int EffectPhaser::mFeedback
private

◆ mFeedbackS

wxSlider* EffectPhaser::mFeedbackS
private

◆ mFeedbackT

wxTextCtrl* EffectPhaser::mFeedbackT
private

Definition at line 139 of file Phaser.h.

Referenced by OnFeedbackSlider(), and PopulateOrExchange().

◆ mFreq

double EffectPhaser::mFreq
private

◆ mFreqS

wxSlider* EffectPhaser::mFreqS
private

Definition at line 144 of file Phaser.h.

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

◆ mFreqT

wxTextCtrl* EffectPhaser::mFreqT
private

Definition at line 136 of file Phaser.h.

Referenced by OnFreqSlider(), and PopulateOrExchange().

◆ mMaster

EffectPhaserState EffectPhaser::mMaster
private

Definition at line 122 of file Phaser.h.

Referenced by ProcessBlock(), and ProcessInitialize().

◆ mOutGain

double EffectPhaser::mOutGain
private

◆ mOutGainS

wxSlider* EffectPhaser::mOutGainS
private

Definition at line 148 of file Phaser.h.

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

◆ mOutGainT

wxTextCtrl* EffectPhaser::mOutGainT
private

Definition at line 140 of file Phaser.h.

Referenced by OnGainSlider(), and PopulateOrExchange().

◆ mPhase

double EffectPhaser::mPhase
private

◆ mPhaseS

wxSlider* EffectPhaser::mPhaseS
private

Definition at line 145 of file Phaser.h.

Referenced by OnPhaseSlider(), OnPhaseText(), PopulateOrExchange(), and TransferDataToWindow().

◆ mPhaseT

wxTextCtrl* EffectPhaser::mPhaseT
private

Definition at line 137 of file Phaser.h.

Referenced by OnPhaseSlider(), and PopulateOrExchange().

◆ mSlaves

std::vector<EffectPhaserState> EffectPhaser::mSlaves
private

Definition at line 123 of file Phaser.h.

Referenced by RealtimeAddProcessor(), RealtimeInitialize(), and RealtimeProcess().

◆ mStages

int EffectPhaser::mStages
private

◆ mStagesS

wxSlider* EffectPhaser::mStagesS
private

Definition at line 142 of file Phaser.h.

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

◆ mStagesT

wxTextCtrl* EffectPhaser::mStagesT
private

Definition at line 134 of file Phaser.h.

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

◆ OutGain

constexpr EffectParameter EffectPhaser::OutGain
staticconstexprprivate
Initial value:
L"Gain", -6.0, -30.0, 30.0, 1 }

Definition at line 165 of file Phaser.h.

Referenced by OnGainSlider(), OnGainText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ Phase

constexpr EffectParameter EffectPhaser::Phase
staticconstexprprivate
Initial value:
L"Phase", 0.0, 0.0, 360.0, 1 }

Definition at line 159 of file Phaser.h.

Referenced by OnPhaseSlider(), OnPhaseText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ Stages

constexpr EffectParameter EffectPhaser::Stages
staticconstexprprivate
Initial value:
L"Stages", 2, 2, NUM_STAGES, 1 }
#define NUM_STAGES
Definition: Phaser.h:26

Definition at line 153 of file Phaser.h.

Referenced by OnStagesSlider(), OnStagesText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ Symbol

const ComponentInterfaceSymbol EffectPhaser::Symbol { XO("Phaser") }
static

Definition at line 48 of file Phaser.h.

Referenced by GetSymbol().


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