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
EffectBassTreble Class Referencefinal

A high shelf and low shelf filter. More...

#include <BassTreble.h>

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

Public Member Functions

 EffectBassTreble ()
 
virtual ~EffectBassTreble ()
 
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, 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, EffectOutputs *pOutputs, 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, const EffectOutputs *pOutputs) 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...
 
bool CheckWhetherSkipEffect (const EffectSettings &settings) const override
 After Init(), tell whether Process() should be skipped. 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 bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr)
 
virtual bool ProcessFinalize () noexcept
 
virtual size_t ProcessBlock (EffectSettings &settings, const float *const *inBlock, float *const *outBlock, size_t blockLen)=0
 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, EffectOutputs *pOutputs, unsigned numChannels, float sampleRate)
 
virtual bool RealtimeSuspend ()
 
virtual bool RealtimeResume ()
 
virtual bool RealtimeProcessStart (MessagePackage &package)
 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
 
virtual unsigned GetAudioInCount () const
 How many input buffers to allocate at once. More...
 
virtual unsigned GetAudioOutCount () const
 How many output buffers to allocate at once. More...
 
virtual sampleCount GetLatency () 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...
 
OptionalMessage LoadUserPreset (const RegistryPath &name, EffectSettings &settings) const override
 
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...
 
OptionalMessage LoadFactoryPreset (int id, EffectSettings &settings) const override
 
OptionalMessage LoadFactoryDefaults (EffectSettings &settings) const override
 
virtual const EffectParameterMethodsParameters () const
 
int ShowClientInterface (wxWindow &parent, wxDialog &dialog, EffectUIValidator *pValidator, bool forceModal) override
 
EffectUIClientInterfaceGetEffectUIClientInterface () override
 Returns the EffectUIClientInterface instance for this effect. More...
 
std::unique_ptr< EffectUIValidatorPopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) 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
 
OptionalMessage 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
 
OptionalMessage 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
 
void SetTracks (TrackList *pTracks)
 
- Public Member Functions inherited from EffectUIClientInterface
virtual ~EffectUIClientInterface ()
 
virtual int ShowClientInterface (wxWindow &parent, wxDialog &dialog, EffectUIValidator *pValidator, bool forceModal=false)=0
 
virtual bool IsGraphicalUI ()=0
 
virtual std::unique_ptr< EffectUIValidatorPopulateUI (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)=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 OptionalMessage ImportPresets (EffectSettings &settings)=0
 
virtual bool HasOptions ()=0
 
virtual void ShowOptions ()=0
 
virtual bool ValidateUI (EffectSettings &settings)=0
 
virtual bool CloseUI ()=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 EffectUIClientInterfaceGetEffectUIClientInterface ()=0
 Returns the EffectUIClientInterface instance for this effect. More...
 
virtual void Preview (EffectSettingsAccess &access, bool dryOnly)=0
 
virtual bool SaveSettingsAsString (const EffectSettings &settings, wxString &parms) const =0
 
virtual OptionalMessage 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...
 
- 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...
 
virtual std::unique_ptr< EffectOutputsMakeOutputs () const
 Produce an object to hold values to send to effect output meters. 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 EffectBassTrebleFetchParameters (EffectBassTreble &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("Bass and Treble") }
 
- 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 (EffectBassTrebleState &data, float sampleRate)
 
size_t InstanceProcess (EffectSettings &settings, EffectBassTrebleState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
 
void Coefficients (double hz, double slope, double gain, double samplerate, int type, double &a0, double &a1, double &a2, double &b0, double &b1, double &b2)
 
float DoFilter (EffectBassTrebleState &data, float in)
 
void OnBassText (wxCommandEvent &evt)
 
void OnTrebleText (wxCommandEvent &evt)
 
void OnGainText (wxCommandEvent &evt)
 
void OnBassSlider (wxCommandEvent &evt)
 
void OnTrebleSlider (wxCommandEvent &evt)
 
void OnGainSlider (wxCommandEvent &evt)
 
void OnLinkCheckbox (wxCommandEvent &evt)
 
void UpdateGain (double oldVal, int control)
 
const EffectParameterMethodsParameters () const override
 

Private Attributes

EffectBassTrebleState mMaster
 
std::vector< EffectBassTrebleStatemSlaves
 
double mBass
 
double mTreble
 
double mGain
 
bool mLink
 
wxSlider * mBassS
 
wxSlider * mTrebleS
 
wxSlider * mGainS
 
wxTextCtrl * mBassT
 
wxTextCtrl * mTrebleT
 
wxTextCtrl * mGainT
 
wxCheckBox * mLinkCheckBox
 

Static Private Attributes

static constexpr EffectParameter Bass
 
static constexpr EffectParameter Treble
 
static constexpr EffectParameter Gain
 
static constexpr EffectParameter Link
 

Additional Inherited Members

- Public Types inherited from StatefulEffectBase
using MessagePackage = EffectInstance::MessagePackage
 
- 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, const EffectOutputs *pOutputs)
 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
 
- 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 }
 
- Static Protected Attributes inherited from EffectBase
static int nEffectsDone = 0
 

Detailed Description

A high shelf and low shelf filter.

Definition at line 37 of file BassTreble.h.

Constructor & Destructor Documentation

◆ EffectBassTreble()

EffectBassTreble::EffectBassTreble ( )

Definition at line 74 of file BassTreble.cpp.

75{
76 Parameters().Reset(*this);
77
79}
void SetLinearEffectFlag(bool linearEffectFlag)
Definition: EffectBase.cpp:222
const EffectParameterMethods & Parameters() const override
Definition: BassTreble.cpp:44
virtual void Reset(Effect &effect) const =0

Referenced by Parameters().

Here is the caller graph for this function:

◆ ~EffectBassTreble()

EffectBassTreble::~EffectBassTreble ( )
virtual

Definition at line 81 of file BassTreble.cpp.

82{
83}

Member Function Documentation

◆ CheckWhetherSkipEffect()

bool EffectBassTreble::CheckWhetherSkipEffect ( const EffectSettings settings) const
overridevirtual

After Init(), tell whether Process() should be skipped.

Implements EffectBase.

Definition at line 173 of file BassTreble.cpp.

174{
175 return (mBass == 0.0 && mTreble == 0.0 && mGain == 0.0);
176}

References mBass, mGain, and mTreble.

◆ Coefficients()

void EffectBassTreble::Coefficients ( double  hz,
double  slope,
double  gain,
double  samplerate,
int  type,
double &  a0,
double &  a1,
double &  a2,
double &  b0,
double &  b1,
double &  b2 
)
private

Definition at line 357 of file BassTreble.cpp.

360{
361 double w = 2 * M_PI * hz / samplerate;
362 double a = exp(log(10.0) * gain / 40);
363 double b = sqrt((a * a + 1) / slope - (pow((a - 1), 2)));
364
365 if (type == kBass)
366 {
367 b0 = a * ((a + 1) - (a - 1) * cos(w) + b * sin(w));
368 b1 = 2 * a * ((a - 1) - (a + 1) * cos(w));
369 b2 = a * ((a + 1) - (a - 1) * cos(w) - b * sin(w));
370 a0 = ((a + 1) + (a - 1) * cos(w) + b * sin(w));
371 a1 = -2 * ((a - 1) + (a + 1) * cos(w));
372 a2 = (a + 1) + (a - 1) * cos(w) - b * sin(w);
373 }
374 else //assumed kTreble
375 {
376 b0 = a * ((a + 1) + (a - 1) * cos(w) + b * sin(w));
377 b1 = -2 * a * ((a - 1) + (a + 1) * cos(w));
378 b2 = a * ((a + 1) + (a - 1) * cos(w) - b * sin(w));
379 a0 = ((a + 1) - (a - 1) * cos(w) + b * sin(w));
380 a1 = 2 * ((a - 1) - (a + 1) * cos(w));
381 a2 = (a + 1) - (a - 1) * cos(w) - b * sin(w);
382 }
383}
@ kBass
Definition: BassTreble.cpp:55
#define M_PI
Definition: Distortion.cpp:29

References kBass, and M_PI.

Referenced by InstanceProcess().

Here is the caller graph for this function:

◆ DoFilter()

float EffectBassTreble::DoFilter ( EffectBassTrebleState data,
float  in 
)
private

Definition at line 385 of file BassTreble.cpp.

386{
387 // Bass filter
388 float out = (data.b0Bass * in + data.b1Bass * data.xn1Bass + data.b2Bass * data.xn2Bass -
389 data.a1Bass * data.yn1Bass - data.a2Bass * data.yn2Bass) / data.a0Bass;
390 data.xn2Bass = data.xn1Bass;
391 data.xn1Bass = in;
392 data.yn2Bass = data.yn1Bass;
393 data.yn1Bass = out;
394
395 // Treble filter
396 in = out;
397 out = (data.b0Treble * in + data.b1Treble * data.xn1Treble + data.b2Treble * data.xn2Treble -
398 data.a1Treble * data.yn1Treble - data.a2Treble * data.yn2Treble) / data.a0Treble;
399 data.xn2Treble = data.xn1Treble;
400 data.xn1Treble = in;
401 data.yn2Treble = data.yn1Treble;
402 data.yn1Treble = out;
403
404 return out;
405}

References EffectBassTrebleState::a0Bass, EffectBassTrebleState::a0Treble, EffectBassTrebleState::a1Bass, EffectBassTrebleState::a1Treble, EffectBassTrebleState::a2Bass, EffectBassTrebleState::a2Treble, EffectBassTrebleState::b0Bass, EffectBassTrebleState::b0Treble, EffectBassTrebleState::b1Bass, EffectBassTrebleState::b1Treble, EffectBassTrebleState::b2Bass, EffectBassTrebleState::b2Treble, EffectBassTrebleState::xn1Bass, EffectBassTrebleState::xn1Treble, EffectBassTrebleState::xn2Bass, EffectBassTrebleState::xn2Treble, EffectBassTrebleState::yn1Bass, EffectBassTrebleState::yn1Treble, EffectBassTrebleState::yn2Bass, and EffectBassTrebleState::yn2Treble.

Referenced by InstanceProcess().

Here is the caller graph for this function:

◆ FetchParameters()

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

Definition at line 41 of file BassTreble.h.

41{ return &e; }

◆ GetAudioInCount()

unsigned EffectBassTreble::GetAudioInCount ( ) const
overridevirtual

How many input buffers to allocate at once.

If the instance processes channels independently, this can return 1 The result is not necessarily well defined before RealtimeInitialize Default implementation returns 0

Reimplemented from StatefulEffectBase.

Definition at line 116 of file BassTreble.cpp.

117{
118 return 1;
119}

◆ GetAudioOutCount()

unsigned EffectBassTreble::GetAudioOutCount ( ) const
overridevirtual

How many output buffers to allocate at once.

The result is not necessarily well defined before RealtimeInitialize Default implementation returns 0

Reimplemented from StatefulEffectBase.

Definition at line 121 of file BassTreble.cpp.

122{
123 return 1;
124}

◆ GetDescription()

TranslatableString EffectBassTreble::GetDescription ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 92 of file BassTreble.cpp.

93{
94 return XO("Simple tone control effect");
95}
#define XO(s)
Definition: Internat.h:31

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol EffectBassTreble::GetSymbol ( ) const
overridevirtual

Implements ComponentInterface.

Definition at line 87 of file BassTreble.cpp.

88{
89 return Symbol;
90}
static const ComponentInterfaceSymbol Symbol
Definition: BassTreble.h:42

References Symbol.

◆ GetType()

EffectType EffectBassTreble::GetType ( ) const
overridevirtual

Type determines how it behaves.

Implements EffectDefinitionInterface.

Definition at line 104 of file BassTreble.cpp.

105{
106 return EffectTypeProcess;
107}
@ EffectTypeProcess

References EffectTypeProcess.

◆ InstanceInit()

void EffectBassTreble::InstanceInit ( EffectBassTrebleState data,
float  sampleRate 
)
private

Definition at line 283 of file BassTreble.cpp.

284{
285 data.samplerate = sampleRate;
286 data.slope = 0.4f; // same slope for both filters
287 data.hzBass = 250.0f; // could be tunable in a more advanced version
288 data.hzTreble = 4000.0f; // could be tunable in a more advanced version
289
290 data.a0Bass = 1;
291 data.a1Bass = 0;
292 data.a2Bass = 0;
293 data.b0Bass = 0;
294 data.b1Bass = 0;
295 data.b2Bass = 0;
296
297 data.a0Treble = 1;
298 data.a1Treble = 0;
299 data.a2Treble = 0;
300 data.b0Treble = 0;
301 data.b1Treble = 0;
302 data.b2Treble = 0;
303
304 data.xn1Bass = 0;
305 data.xn2Bass = 0;
306 data.yn1Bass = 0;
307 data.yn2Bass = 0;
308
309 data.xn1Treble = 0;
310 data.xn2Treble = 0;
311 data.yn1Treble = 0;
312 data.yn2Treble = 0;
313
314 data.bass = -1;
315 data.treble = -1;
316 data.gain = DB_TO_LINEAR(mGain);
317
318}
#define DB_TO_LINEAR(x)
Definition: MemoryX.h:543

References EffectBassTrebleState::a0Bass, EffectBassTrebleState::a0Treble, EffectBassTrebleState::a1Bass, EffectBassTrebleState::a1Treble, EffectBassTrebleState::a2Bass, EffectBassTrebleState::a2Treble, EffectBassTrebleState::b0Bass, EffectBassTrebleState::b0Treble, EffectBassTrebleState::b1Bass, EffectBassTrebleState::b1Treble, EffectBassTrebleState::b2Bass, EffectBassTrebleState::b2Treble, EffectBassTrebleState::bass, DB_TO_LINEAR, EffectBassTrebleState::gain, EffectBassTrebleState::hzBass, EffectBassTrebleState::hzTreble, mGain, EffectBassTrebleState::samplerate, EffectBassTrebleState::slope, EffectBassTrebleState::treble, EffectBassTrebleState::xn1Bass, EffectBassTrebleState::xn1Treble, EffectBassTrebleState::xn2Bass, EffectBassTrebleState::xn2Treble, EffectBassTrebleState::yn1Bass, EffectBassTrebleState::yn1Treble, EffectBassTrebleState::yn2Bass, and EffectBassTrebleState::yn2Treble.

Referenced by ProcessInitialize(), and RealtimeAddProcessor().

Here is the caller graph for this function:

◆ InstanceProcess()

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

Definition at line 320 of file BassTreble.cpp.

323{
324 const float *ibuf = inBlock[0];
325 float *obuf = outBlock[0];
326
327 // Set value to ensure correct rounding
328 double oldBass = DB_TO_LINEAR(mBass);
329 double oldTreble = DB_TO_LINEAR(mTreble);
330
331 data.gain = DB_TO_LINEAR(mGain);
332
333 // Compute coefficients of the low shelf biquand IIR filter
334 if (data.bass != oldBass)
335 Coefficients(data.hzBass, data.slope, mBass, data.samplerate, kBass,
336 data.a0Bass, data.a1Bass, data.a2Bass,
337 data.b0Bass, data.b1Bass, data.b2Bass);
338
339 // Compute coefficients of the high shelf biquand IIR filter
340 if (data.treble != oldTreble)
342 data.a0Treble, data.a1Treble, data.a2Treble,
343 data.b0Treble, data.b1Treble, data.b2Treble);
344
345 for (decltype(blockLen) i = 0; i < blockLen; i++) {
346 obuf[i] = DoFilter(data, ibuf[i]) * data.gain;
347 }
348
349 return blockLen;
350}
@ kTreble
Definition: BassTreble.cpp:56
float DoFilter(EffectBassTrebleState &data, float in)
Definition: BassTreble.cpp:385
void Coefficients(double hz, double slope, double gain, double samplerate, int type, double &a0, double &a1, double &a2, double &b0, double &b1, double &b2)
Definition: BassTreble.cpp:357

References EffectBassTrebleState::a0Bass, EffectBassTrebleState::a0Treble, EffectBassTrebleState::a1Bass, EffectBassTrebleState::a1Treble, EffectBassTrebleState::a2Bass, EffectBassTrebleState::a2Treble, EffectBassTrebleState::b0Bass, EffectBassTrebleState::b0Treble, EffectBassTrebleState::b1Bass, EffectBassTrebleState::b1Treble, EffectBassTrebleState::b2Bass, EffectBassTrebleState::b2Treble, EffectBassTrebleState::bass, Coefficients(), DB_TO_LINEAR, DoFilter(), EffectBassTrebleState::gain, EffectBassTrebleState::hzBass, EffectBassTrebleState::hzTreble, kBass, kTreble, mBass, mGain, mTreble, EffectBassTrebleState::samplerate, EffectBassTrebleState::slope, and EffectBassTrebleState::treble.

Referenced by ProcessBlock(), and RealtimeProcess().

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

◆ ManualPage()

ManualPageID EffectBassTreble::ManualPage ( ) const
overridevirtual

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

Reimplemented from EffectDefinitionInterface.

Definition at line 97 of file BassTreble.cpp.

98{
99 return L"Bass_and_Treble";
100}

◆ OnBassSlider()

void EffectBassTreble::OnBassSlider ( wxCommandEvent &  evt)
private

Definition at line 444 of file BassTreble.cpp.

445{
446 double oldBass = mBass;
447 mBass = (double) evt.GetInt() / Bass.scale;
448 mBassT->GetValidator()->TransferToWindow();
449
450 if (mLink) UpdateGain(oldBass, kBass);
451 EnableApply(mUIParent->Validate());
452}
static constexpr EffectParameter Bass
Definition: BassTreble.h:129
wxTextCtrl * mBassT
Definition: BassTreble.h:120
void UpdateGain(double oldVal, int control)
Definition: BassTreble.cpp:477
bool EnableApply(bool enable=true)
Definition: Effect.cpp:612
wxWindow * mUIParent
Definition: Effect.h:307
const Type scale
Scaling factor, for slider control.
Definition: Shuttle.h:32

References Bass, Effect::EnableApply(), kBass, mBass, mBassT, mLink, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, and UpdateGain().

Here is the call graph for this function:

◆ OnBassText()

void EffectBassTreble::OnBassText ( wxCommandEvent &  evt)
private

Definition at line 408 of file BassTreble.cpp.

409{
410 double oldBass = mBass;
411
412 if (!EnableApply(mUIParent->TransferDataFromWindow()))
413 {
414 return;
415 }
416
417 if (mLink) UpdateGain(oldBass, kBass);
418 mBassS->SetValue((int) (mBass * Bass.scale));
419}
wxSlider * mBassS
Definition: BassTreble.h:116

References Bass, Effect::EnableApply(), kBass, mBass, mBassS, mLink, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, and UpdateGain().

Here is the call graph for this function:

◆ OnGainSlider()

void EffectBassTreble::OnGainSlider ( wxCommandEvent &  evt)
private

Definition at line 464 of file BassTreble.cpp.

465{
466 mGain = (double) evt.GetInt() / Gain.scale;
467 mGainT->GetValidator()->TransferToWindow();
468
469 EnableApply(mUIParent->Validate());
470}
static constexpr EffectParameter Gain
Definition: BassTreble.h:133
wxTextCtrl * mGainT
Definition: BassTreble.h:122

References Effect::EnableApply(), Gain, mGain, mGainT, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnGainText()

void EffectBassTreble::OnGainText ( wxCommandEvent &  evt)
private

Definition at line 434 of file BassTreble.cpp.

435{
436 if (!EnableApply(mUIParent->TransferDataFromWindow()))
437 {
438 return;
439 }
440
441 mGainS->SetValue((int) (mGain * Gain.scale));
442}
wxSlider * mGainS
Definition: BassTreble.h:118

References Effect::EnableApply(), Gain, mGain, mGainS, Effect::mUIParent, and EffectParameter< Structure, Member, Type, Value >::scale.

Here is the call graph for this function:

◆ OnLinkCheckbox()

void EffectBassTreble::OnLinkCheckbox ( wxCommandEvent &  evt)
private

Definition at line 472 of file BassTreble.cpp.

473{
474 mLink = mLinkCheckBox->GetValue();
475}
wxCheckBox * mLinkCheckBox
Definition: BassTreble.h:124

References mLink, and mLinkCheckBox.

◆ OnTrebleSlider()

void EffectBassTreble::OnTrebleSlider ( wxCommandEvent &  evt)
private

Definition at line 454 of file BassTreble.cpp.

455{
456 double oldTreble = mTreble;
457 mTreble = (double) evt.GetInt() / Treble.scale;
458 mTrebleT->GetValidator()->TransferToWindow();
459
460 if (mLink) UpdateGain(oldTreble, kTreble);
461 EnableApply(mUIParent->Validate());
462}
static constexpr EffectParameter Treble
Definition: BassTreble.h:131
wxTextCtrl * mTrebleT
Definition: BassTreble.h:121

References Effect::EnableApply(), kTreble, mLink, mTreble, mTrebleT, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, Treble, and UpdateGain().

Here is the call graph for this function:

◆ OnTrebleText()

void EffectBassTreble::OnTrebleText ( wxCommandEvent &  evt)
private

Definition at line 421 of file BassTreble.cpp.

422{
423 double oldTreble = mTreble;
424
425 if (!EnableApply(mUIParent->TransferDataFromWindow()))
426 {
427 return;
428 }
429
430 if (mLink) UpdateGain(oldTreble, kTreble);
431 mTrebleS->SetValue((int) (mTreble * Treble.scale));
432}
wxSlider * mTrebleS
Definition: BassTreble.h:117

References Effect::EnableApply(), kTreble, mLink, mTreble, mTrebleS, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, Treble, and UpdateGain().

Here is the call graph for this function:

◆ Parameters()

const EffectParameterMethods & EffectBassTreble::Parameters ( ) const
overrideprivatevirtual

Reimplemented from Effect.

Definition at line 44 of file BassTreble.cpp.

45{
48 > parameters;
49 return parameters;
50}
Generates EffectParameterMethods overrides from variadic template arguments.
static constexpr EffectParameter Link
Definition: BassTreble.h:135

References Bass, EffectBassTreble(), Gain, Link, and Treble.

Here is the call graph for this function:

◆ PopulateOrExchange()

std::unique_ptr< EffectUIValidator > EffectBassTreble::PopulateOrExchange ( ShuttleGui S,
EffectInstance instance,
EffectSettingsAccess access,
const EffectOutputs pOutputs 
)
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 181 of file BassTreble.cpp.

184{
185 S.SetBorder(5);
186 S.AddSpace(0, 5);
187
188 S.StartStatic(XO("Tone controls"));
189 {
190 S.StartMultiColumn(3, wxEXPAND);
191 {
192 S.SetStretchyCol(2);
193
194 // Bass control
195 mBassT = S.Id(ID_Bass)
196 .Name(XO("Bass (dB):"))
197 .Validator<FloatingPointValidator<double>>(
198 1, &mBass, NumValidatorStyle::DEFAULT, Bass.min, Bass.max)
199 .AddTextBox(XXO("Ba&ss (dB):"), L"", 10);
200
201 mBassS = S.Id(ID_Bass)
202 .Name(XO("Bass"))
203 .Style(wxSL_HORIZONTAL)
204 .AddSlider( {}, 0, Bass.max * Bass.scale, Bass.min * Bass.scale);
205
206 // Treble control
207 mTrebleT = S.Id(ID_Treble)
208 .Validator<FloatingPointValidator<double>>(
209 1, &mTreble, NumValidatorStyle::DEFAULT, Treble.min, Treble.max)
210 .AddTextBox(XXO("&Treble (dB):"), L"", 10);
211
212 mTrebleS = S.Id(ID_Treble)
213 .Name(XO("Treble"))
214 .Style(wxSL_HORIZONTAL)
215 .AddSlider( {}, 0, Treble.max * Treble.scale, Treble.min * Treble.scale);
216 }
217 S.EndMultiColumn();
218 }
219 S.EndStatic();
220
221 S.StartStatic(XO("Output"));
222 {
223 S.StartMultiColumn(3, wxEXPAND);
224 {
225 S.SetStretchyCol(2);
226
227 // Gain control
228 mGainT = S.Id(ID_Gain)
229 .Validator<FloatingPointValidator<double>>(
230 1, &mGain, NumValidatorStyle::DEFAULT, Gain.min, Gain.max)
231 .AddTextBox(XXO("&Volume (dB):"), L"", 10);
232
233 mGainS = S.Id(ID_Gain)
234 .Name(XO("Level"))
235 .Style(wxSL_HORIZONTAL)
236 .AddSlider( {}, 0, Gain.max * Gain.scale, Gain.min * Gain.scale);
237 }
238 S.EndMultiColumn();
239
240 S.StartMultiColumn(2, wxCENTER);
241 {
242 // Link checkbox
244 S
245 .Id(ID_Link)
246 .AddCheckBox(XXO("&Link Volume control to Tone controls"),
247 Link.def);
248 }
249 S.EndMultiColumn();
250 }
251 S.EndStatic();
252 return nullptr;
253}
@ ID_Treble
Definition: BassTreble.cpp:39
@ ID_Gain
Definition: BassTreble.cpp:40
@ ID_Link
Definition: BassTreble.cpp:41
@ ID_Bass
Definition: BassTreble.cpp:38
#define XXO(s)
Definition: Internat.h:44
#define S(N)
Definition: ToChars.cpp:64
const Type def
Default value.
Definition: Shuttle.h:29
const Type min
Minimum value.
Definition: Shuttle.h:30
const Type max
Maximum value.
Definition: Shuttle.h:31

References Bass, EffectParameter< Structure, Member, Type, Value >::def, Gain, ID_Bass, ID_Gain, ID_Link, ID_Treble, Link, EffectParameter< Structure, Member, Type, Value >::max, mBass, mBassS, mBassT, mGain, mGainS, mGainT, EffectParameter< Structure, Member, Type, Value >::min, mLinkCheckBox, mTreble, mTrebleS, mTrebleT, S, EffectParameter< Structure, Member, Type, Value >::scale, Treble, XO, and XXO.

◆ ProcessBlock()

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

Called for destructive effect computation.

Implements StatefulPerTrackEffect.

Definition at line 133 of file BassTreble.cpp.

135{
136 return InstanceProcess(settings, mMaster, inBlock, outBlock, blockLen);
137}
static Settings & settings()
Definition: TrackInfo.cpp:87
size_t InstanceProcess(EffectSettings &settings, EffectBassTrebleState &data, const float *const *inBlock, float *const *outBlock, size_t blockLen)
Definition: BassTreble.cpp:320
EffectBassTrebleState mMaster
Definition: BassTreble.h:108

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

Here is the call graph for this function:

◆ ProcessInitialize()

bool EffectBassTreble::ProcessInitialize ( EffectSettings settings,
double  sampleRate,
ChannelNames  chanMap 
)
overridevirtual

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

Parameters
chanMapnull or array terminated with ChannelNameEOL. Do not retain the pointer
Postcondition
GetAudioInCount() and GetAudioOutCount() are well defined

Reimplemented from StatefulPerTrackEffect.

Definition at line 126 of file BassTreble.cpp.

128{
129 InstanceInit(mMaster, sampleRate);
130 return true;
131}
void InstanceInit(EffectBassTrebleState &data, float sampleRate)
Definition: BassTreble.cpp:283

References InstanceInit(), and mMaster.

Here is the call graph for this function:

◆ RealtimeAddProcessor()

bool EffectBassTreble::RealtimeAddProcessor ( EffectSettings settings,
EffectOutputs pOutputs,
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 146 of file BassTreble.cpp.

148{
150
151 InstanceInit(slave, sampleRate);
152
153 mSlaves.push_back(slave);
154
155 return true;
156}
std::vector< EffectBassTrebleState > mSlaves
Definition: BassTreble.h:109

References InstanceInit(), and mSlaves.

Here is the call graph for this function:

◆ RealtimeFinalize()

bool EffectBassTreble::RealtimeFinalize ( EffectSettings settings)
overridevirtualnoexcept

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

Reimplemented from StatefulEffectBase.

Definition at line 158 of file BassTreble.cpp.

159{
160 mSlaves.clear();
161
162 return true;
163}

◆ RealtimeInitialize()

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

Returns
success
Postcondition
GetAudioInCount() and GetAudioOutCount() are well defined

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 139 of file BassTreble.cpp.

140{
141 SetBlockSize(512);
142 mSlaves.clear();
143 return true;
144}
size_t SetBlockSize(size_t maxBlockSize) override

References mSlaves, and StatefulPerTrackEffect::SetBlockSize().

Here is the call graph for this function:

◆ RealtimeProcess()

size_t EffectBassTreble::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 165 of file BassTreble.cpp.

167{
168 if (group >= mSlaves.size())
169 return 0;
170 return InstanceProcess(settings, mSlaves[group], inbuf, outbuf, numSamples);
171}

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

Here is the call graph for this function:

◆ RealtimeSupport()

auto EffectBassTreble::RealtimeSupport ( ) const
overridevirtual

Since which version of Audacity has the effect supported realtime?

Implements EffectDefinitionInterface.

Definition at line 109 of file BassTreble.cpp.

110{
111 // TODO reenable after achieving statelessness
113// return RealtimeSince::Always;
114}

References EffectDefinitionInterface::Never.

◆ TransferDataFromWindow()

bool EffectBassTreble::TransferDataFromWindow ( EffectSettings settings)
overridevirtual

Update the given settings from controls.

Implements EffectPlugin.

Definition at line 270 of file BassTreble.cpp.

271{
272 if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
273 {
274 return false;
275 }
276
277 return true;
278}

References Effect::mUIParent.

◆ TransferDataToWindow()

bool EffectBassTreble::TransferDataToWindow ( const EffectSettings settings)
overridevirtual

Update controls for the settings.

Implements EffectPlugin.

Definition at line 255 of file BassTreble.cpp.

256{
257 if (!mUIParent->TransferDataToWindow())
258 {
259 return false;
260 }
261
262 mBassS->SetValue((int) (mBass * Bass.scale));
263 mTrebleS->SetValue((int) mTreble *Treble.scale);
264 mGainS->SetValue((int) mGain * Gain.scale);
265 mLinkCheckBox->SetValue(mLink);
266
267 return true;
268}

References Bass, Gain, mBass, mBassS, mGain, mGainS, mLink, mLinkCheckBox, mTreble, mTrebleS, Effect::mUIParent, EffectParameter< Structure, Member, Type, Value >::scale, and Treble.

◆ UpdateGain()

void EffectBassTreble::UpdateGain ( double  oldVal,
int  control 
)
private

Definition at line 477 of file BassTreble.cpp.

478{
479 double newVal;
480 oldVal = (oldVal > 0)? oldVal / 2.0 : oldVal / 4.0;
481
482 if (control == kBass)
483 newVal = (mBass > 0)? mBass / 2.0 : mBass / 4.0;
484 else
485 newVal = (mTreble > 0)? mTreble / 2.0 : mTreble / 4.0;
486
487 mGain -= newVal - oldVal;
488 mGain = std::min(Gain.max, std::max(Gain.min, mGain));
489
490 mGainS->SetValue(mGain);
491 mGainT->GetValidator()->TransferToWindow();
492
493}
int min(int a, int b)

References Gain, kBass, EffectParameter< Structure, Member, Type, Value >::max, mBass, mGain, mGainS, mGainT, min(), EffectParameter< Structure, Member, Type, Value >::min, and mTreble.

Referenced by OnBassSlider(), OnBassText(), OnTrebleSlider(), and OnTrebleText().

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

Member Data Documentation

◆ Bass

constexpr EffectParameter EffectBassTreble::Bass
staticconstexprprivate
Initial value:
L"Bass", 0.0, -30.0, 30.0, 1 }

Definition at line 129 of file BassTreble.h.

Referenced by OnBassSlider(), OnBassText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().

◆ Gain

constexpr EffectParameter EffectBassTreble::Gain
staticconstexprprivate
Initial value:
L"Gain", 0.0, -30.0, 30.0, 1 }

Definition at line 133 of file BassTreble.h.

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

◆ Link

constexpr EffectParameter EffectBassTreble::Link
staticconstexprprivate
Initial value:
L"Link Sliders", false, false, true, 1 }

Definition at line 135 of file BassTreble.h.

Referenced by Parameters(), and PopulateOrExchange().

◆ mBass

double EffectBassTreble::mBass
private

◆ mBassS

wxSlider* EffectBassTreble::mBassS
private

Definition at line 116 of file BassTreble.h.

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

◆ mBassT

wxTextCtrl* EffectBassTreble::mBassT
private

Definition at line 120 of file BassTreble.h.

Referenced by OnBassSlider(), and PopulateOrExchange().

◆ mGain

double EffectBassTreble::mGain
private

◆ mGainS

wxSlider* EffectBassTreble::mGainS
private

Definition at line 118 of file BassTreble.h.

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

◆ mGainT

wxTextCtrl* EffectBassTreble::mGainT
private

Definition at line 122 of file BassTreble.h.

Referenced by OnGainSlider(), PopulateOrExchange(), and UpdateGain().

◆ mLink

bool EffectBassTreble::mLink
private

◆ mLinkCheckBox

wxCheckBox* EffectBassTreble::mLinkCheckBox
private

Definition at line 124 of file BassTreble.h.

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

◆ mMaster

EffectBassTrebleState EffectBassTreble::mMaster
private

Definition at line 108 of file BassTreble.h.

Referenced by ProcessBlock(), and ProcessInitialize().

◆ mSlaves

std::vector<EffectBassTrebleState> EffectBassTreble::mSlaves
private

Definition at line 109 of file BassTreble.h.

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

◆ mTreble

double EffectBassTreble::mTreble
private

◆ mTrebleS

wxSlider* EffectBassTreble::mTrebleS
private

Definition at line 117 of file BassTreble.h.

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

◆ mTrebleT

wxTextCtrl* EffectBassTreble::mTrebleT
private

Definition at line 121 of file BassTreble.h.

Referenced by OnTrebleSlider(), and PopulateOrExchange().

◆ Symbol

const ComponentInterfaceSymbol EffectBassTreble::Symbol { XO("Bass and Treble") }
static

Definition at line 42 of file BassTreble.h.

Referenced by GetSymbol().

◆ Treble

constexpr EffectParameter EffectBassTreble::Treble
staticconstexprprivate
Initial value:
L"Treble", 0.0, -30.0, 30.0, 1 }

Definition at line 131 of file BassTreble.h.

Referenced by OnTrebleSlider(), OnTrebleText(), Parameters(), PopulateOrExchange(), and TransferDataToWindow().


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