Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EffectTimeScale Class Reference

#include <TimeScale.h>

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

Public Member Functions

std::unique_ptr< EffectEditorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) override
 Add controls to effect panel; always succeeds. More...
 
bool TransferDataToWindow (const EffectSettings &settings) override
 
bool TransferDataFromWindow (EffectSettings &settings) override
 
- Public Member Functions inherited from TimeScaleBase
 TimeScaleBase ()
 
virtual ~TimeScaleBase ()
 
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...
 
std::any BeginPreview (const EffectSettings &settings) override
 Called when Preview() starts, to allow temporary effect state changes. More...
 
bool Process (EffectInstance &instance, EffectSettings &settings) override
 
double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const override
 
- Public Member Functions inherited from SBSMSBase
bool Process (EffectInstance &instance, EffectSettings &settings) override
 
void setParameters (double rateStart, double rateEnd, double pitchStart, double pitchEnd, SlideType rateSlideType, SlideType pitchSlideType, bool bLinkRatePitch, bool bRateReferenceInput, bool bPitchReferenceInput)
 
void setParameters (double tempoRatio, double pitchRatio)
 
- Public Member Functions inherited from StatefulEffect
 ~StatefulEffect () override
 
std::shared_ptr< EffectInstanceMakeInstance () const override
 Make an object maintaining short-term state of an Effect. More...
 
- Public Member Functions inherited from StatefulEffectBase
virtual bool Init ()
 
virtual bool Process (EffectInstance &instance, EffectSettings &settings)=0
 
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
 
virtual bool NeedsDither () const
 
virtual bool ProcessInitialize (EffectSettings &settings, double sampleRate, ChannelNames chanMap=nullptr)
 
virtual bool ProcessFinalize () noexcept
 
- 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
 
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
 
bool CanExportPresets () const override
 Whether the effect supports export of presets to files, and importing too. More...
 
bool HasOptions () const override
 
const EffectSettingsManagerGetDefinition () const override
 
virtual NumericFormatID GetSelectionFormat ()
 
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
 
unsigned TestUIFlags (unsigned mask)
 
bool Delegate (Effect &delegate, EffectSettings &settings, InstanceFinder finder={})
 Re-invoke DoEffect on another Effect object that implements the work. More...
 
- Public Member Functions inherited from EffectBase
 EffectBase ()
 
 ~EffectBase () override
 
bool IsLinearEffect () const
 
bool PreviewsFullSelection () const
 
void SetTracks (TrackList *pTracks)
 
double GetDefaultDuration ()
 
virtual std::any BeginPreview (const EffectSettings &settings)
 Called when Preview() starts, to allow temporary effect state changes. More...
 
bool DoEffect (EffectSettings &settings, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess) override
 
virtual double CalcPreviewInputLength (const EffectSettings &settings, double previewLength) const =0
 
void CountWaveTracks ()
 
- Public Member Functions inherited from EffectPlugin
EffectPluginoperator= (EffectPlugin &)=delete
 
virtual ~EffectPlugin ()
 
virtual bool HasOptions () const =0
 
virtual bool CanExportPresets () const =0
 Whether the effect supports export of presets to files, and importing too. More...
 
virtual const EffectSettingsManagerGetDefinition () const =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, const InstanceFinder &finder, double projectRate, TrackList *list, WaveTrackFactory *factory, NotifyingSelectedRegion &selectedRegion, unsigned flags, const EffectSettingsAccessPtr &pAccess=nullptr)=0
 
- 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
 
- Public Member Functions inherited from StatefulEffectUIServices
 ~StatefulEffectUIServices () override
 
std::unique_ptr< EffectEditorPopulateUI (const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const override
 Allows PopulateOrExchange to return null. More...
 
virtual std::unique_ptr< EffectEditorPopulateOrExchange (ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
 Add controls to effect panel; always succeeds. More...
 
virtual bool TransferDataToWindow (const EffectSettings &settings)
 
virtual bool TransferDataFromWindow (EffectSettings &settings)
 
- Public Member Functions inherited from BasicEffectUIServices
int ShowClientInterface (const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal) const override
 
void ExportPresets (const EffectPlugin &plugin, const EffectSettings &settings) const override
 
OptionalMessage ImportPresets (const EffectPlugin &plugin, EffectSettings &settings) const override
 
void ShowOptions (const EffectPlugin &plugin) const override
 
bool ValidateUI (const EffectPlugin &context, EffectSettings &) const override
 
bool CloseUI () const override
 
- Public Member Functions inherited from EffectUIServices
virtual ~EffectUIServices ()
 
virtual int ShowHostInterface (EffectBase &plugin, wxWindow &parent, const EffectDialogFactory &factory, std::shared_ptr< EffectInstance > &pInstance, EffectSettingsAccess &access, bool forceModal=false)
 
virtual int ShowClientInterface (const EffectPlugin &plugin, wxWindow &parent, wxDialog &dialog, EffectEditor *pEditor, bool forceModal=false) const =0
 
virtual std::unique_ptr< EffectEditorPopulateUI (const EffectPlugin &plugin, ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs) const =0
 Adds controls to a panel that is given as the parent window of S More...
 
virtual void ExportPresets (const EffectPlugin &plugin, const EffectSettings &settings) const =0
 
virtual OptionalMessage ImportPresets (const EffectPlugin &plugin, EffectSettings &settings) const =0
 
virtual void ShowOptions (const EffectPlugin &plugin) const =0
 
virtual bool ValidateUI (const EffectPlugin &context, EffectSettings &settings) const =0
 
virtual bool CloseUI () const =0
 

Private Member Functions

void OnText_RatePercentChangeStart (wxCommandEvent &evt)
 
void OnText_RatePercentChangeEnd (wxCommandEvent &evt)
 
void OnText_PitchPercentChangeStart (wxCommandEvent &evt)
 
void OnText_PitchPercentChangeEnd (wxCommandEvent &evt)
 
void OnText_PitchHalfStepsStart (wxCommandEvent &evt)
 
void OnText_PitchHalfStepsEnd (wxCommandEvent &evt)
 
void OnSlider_RatePercentChangeStart (wxCommandEvent &evt)
 
void OnSlider_RatePercentChangeEnd (wxCommandEvent &evt)
 
void OnCheckBox_PreAnalyze (wxCommandEvent &evt)
 
void Update_Text_RatePercentChangeStart ()
 
void Update_Text_RatePercentChangeEnd ()
 
void Update_Text_PitchPercentChangeStart ()
 
void Update_Text_PitchPercentChangeEnd ()
 
void Update_Text_PitchHalfStepsStart ()
 
void Update_Text_PitchHalfStepsEnd ()
 
void Update_Slider_RatePercentChangeStart ()
 
void Update_Slider_RatePercentChangeEnd ()
 

Private Attributes

wxWeakRef< wxWindow > mUIParent {}
 
wxTextCtrl * m_pTextCtrl_RatePercentChangeStart
 
wxTextCtrl * m_pTextCtrl_RatePercentChangeEnd
 
wxSlider * m_pSlider_RatePercentChangeStart
 
wxSlider * m_pSlider_RatePercentChangeEnd
 
wxTextCtrl * m_pTextCtrl_PitchHalfStepsStart
 
wxTextCtrl * m_pTextCtrl_PitchHalfStepsEnd
 
wxTextCtrl * m_pTextCtrl_PitchPercentChangeStart
 
wxTextCtrl * m_pTextCtrl_PitchPercentChangeEnd
 

Additional Inherited Members

- Public Types inherited from StatefulEffectBase
using MessagePackage = EffectInstance::MessagePackage
 
- Public Types inherited from EffectPlugin
using EffectSettingsAccessPtr = std::shared_ptr< EffectSettingsAccess >
 
using InstancePointer = std::shared_ptr< EffectInstanceEx >
 
using InstanceFinder = std::function< std::optional< InstancePointer >(EffectSettings &settings) >
 
- Public Types inherited from EffectDefinitionInterface
enum class  RealtimeSince : unsigned { Never , After_3_1 , Always }
 In which versions of Audacity was an effect realtime capable? More...
 
- Public Types inherited from EffectUIServices
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Static Public Member Functions inherited from TimeScaleBase
static TimeScaleBaseFetchParameters (TimeScaleBase &e, EffectSettings &)
 
- Static Public Member Functions inherited from SBSMSBase
static double getInvertedStretchedTime (double rateStart, double rateEnd, SlideType slideType, double outputTime)
 
static double getRate (double rateStart, double rateEnd, SlideType slideType, double t)
 
- Static Public Member Functions inherited from Effect
static EffectFetchParameters (Effect &e, EffectSettings &)
 
- Static Public Member Functions inherited from EffectBase
static std::optional< InstancePointerFindInstance (EffectPlugin &plugin)
 
static InstanceFinder DefaultInstanceFinder (EffectPlugin &plugin)
 
- 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 Member Functions inherited from EffectUIServices
static int DoMessageBox (const EffectPlugin &plugin, const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
- Public Attributes inherited from EffectBase
std::shared_ptr< TrackListmTracks {}
 
int mNumTracks {}
 
BasicUI::ProgressDialogmProgress {}
 
double mProjectRate {}
 
WaveTrackFactorymFactory {}
 
double mT0 {}
 
double mT1 {}
 
bool mIsPreview { false }
 
- Static Public Attributes inherited from TimeScaleBase
static const ComponentInterfaceSymbol Symbol
 
- 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>")
 
- Protected Member Functions inherited from TimeScaleBase
const EffectParameterMethodsParameters () const override
 
ComponentInterfaceSymbol GetSymbol () const override
 
- Protected Member Functions inherited from Effect
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...
 
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, sampleCount *start, sampleCount *len)
 
- Protected Member Functions inherited from EffectBase
virtual bool CheckWhetherSkipEffect (const EffectSettings &settings) const =0
 After Init(), tell whether Process() should be skipped. More...
 
void SetLinearEffectFlag (bool linearEffectFlag)
 
void SetPreviewFullSelectionFlag (bool previewDurationFlag)
 
bool IsPreviewing () const
 
const TrackListinputTracks () const
 
const AudacityProjectFindProject () const
 
- Static Protected Member Functions inherited from TimeScaleBase
static double PercentChangeToRatio (double percentChange)
 
static double HalfStepsToPercentChange (double halfSteps)
 
static double PercentChangeToHalfSteps (double percentChange)
 
- Protected Attributes inherited from TimeScaleBase
bool bPreview
 
double previewSelectedDuration
 
SlideType slideTypeRate
 
SlideType slideTypePitch
 
double m_RatePercentChangeStart
 
double m_RatePercentChangeEnd
 
double m_PitchHalfStepsStart
 
double m_PitchHalfStepsEnd
 
double m_PitchPercentChangeStart
 
double m_PitchPercentChangeEnd
 
- Protected Attributes inherited from SBSMSBase
TranslatableString mProxyEffectName { XO("SBSMS Time / Pitch Stretch") }
 
- Protected Attributes inherited from EffectBase
double mF0 {}
 
double mF1 {}
 
wxArrayString mPresetNames
 
unsigned mUIFlags { 0 }
 
- Static Protected Attributes inherited from TimeScaleBase
static constexpr EffectParameter RatePercentStart
 
static constexpr EffectParameter RatePercentEnd
 
static constexpr EffectParameter HalfStepsStart
 
static constexpr EffectParameter HalfStepsEnd
 
static constexpr EffectParameter PitchPercentStart
 
static constexpr EffectParameter PitchPercentEnd
 

Detailed Description

Definition at line 24 of file TimeScale.h.

Member Function Documentation

◆ OnCheckBox_PreAnalyze()

void EffectTimeScale::OnCheckBox_PreAnalyze ( wxCommandEvent &  evt)
private

◆ OnSlider_RatePercentChangeEnd()

void EffectTimeScale::OnSlider_RatePercentChangeEnd ( wxCommandEvent &  evt)
private

Definition at line 242 of file TimeScale.cpp.

243{
244 m_RatePercentChangeEnd = (double) evt.GetInt();
245
247}
void Update_Text_RatePercentChangeEnd()
Definition: TimeScale.cpp:178
double m_RatePercentChangeEnd
Definition: TimeScaleBase.h:59

References TimeScaleBase::m_RatePercentChangeEnd, and Update_Text_RatePercentChangeEnd().

Here is the call graph for this function:

◆ OnSlider_RatePercentChangeStart()

void EffectTimeScale::OnSlider_RatePercentChangeStart ( wxCommandEvent &  evt)
private

Definition at line 235 of file TimeScale.cpp.

236{
237 m_RatePercentChangeStart = (double) evt.GetInt();
238
240}
void Update_Text_RatePercentChangeStart()
Definition: TimeScale.cpp:173
double m_RatePercentChangeStart
Definition: TimeScaleBase.h:58

References TimeScaleBase::m_RatePercentChangeStart, and Update_Text_RatePercentChangeStart().

Here is the call graph for this function:

◆ OnText_PitchHalfStepsEnd()

void EffectTimeScale::OnText_PitchHalfStepsEnd ( wxCommandEvent &  evt)
private

Definition at line 261 of file TimeScale.cpp.

262{
264 mUIParent, mUIParent->TransferDataFromWindow()))
265 {
266 return;
267 }
268
271}
static bool EnableApply(wxWindow *parent, bool enable=true)
Enable or disable the Apply button of the dialog that contains parent.
wxWeakRef< wxWindow > mUIParent
Definition: TimeScale.h:55
void Update_Text_PitchPercentChangeEnd()
Definition: TimeScale.cpp:208
static double HalfStepsToPercentChange(double halfSteps)
double m_PitchPercentChangeEnd
Definition: TimeScaleBase.h:63
double m_PitchHalfStepsEnd
Definition: TimeScaleBase.h:61

References EffectEditor::EnableApply(), TimeScaleBase::HalfStepsToPercentChange(), TimeScaleBase::m_PitchHalfStepsEnd, TimeScaleBase::m_PitchPercentChangeEnd, mUIParent, and Update_Text_PitchPercentChangeEnd().

Here is the call graph for this function:

◆ OnText_PitchHalfStepsStart()

void EffectTimeScale::OnText_PitchHalfStepsStart ( wxCommandEvent &  evt)
private

Definition at line 249 of file TimeScale.cpp.

250{
252 mUIParent, mUIParent->TransferDataFromWindow()))
253 {
254 return;
255 }
256
259}
void Update_Text_PitchPercentChangeStart()
Definition: TimeScale.cpp:203
double m_PitchHalfStepsStart
Definition: TimeScaleBase.h:60
double m_PitchPercentChangeStart
Definition: TimeScaleBase.h:62

References EffectEditor::EnableApply(), TimeScaleBase::HalfStepsToPercentChange(), TimeScaleBase::m_PitchHalfStepsStart, TimeScaleBase::m_PitchPercentChangeStart, mUIParent, and Update_Text_PitchPercentChangeStart().

Here is the call graph for this function:

◆ OnText_PitchPercentChangeEnd()

void EffectTimeScale::OnText_PitchPercentChangeEnd ( wxCommandEvent &  evt)
private

Definition at line 285 of file TimeScale.cpp.

286{
288 mUIParent, mUIParent->TransferDataFromWindow()))
289 {
290 return;
291 }
292
295}
void Update_Text_PitchHalfStepsEnd()
Definition: TimeScale.cpp:198
static double PercentChangeToHalfSteps(double percentChange)

References EffectEditor::EnableApply(), TimeScaleBase::m_PitchHalfStepsEnd, TimeScaleBase::m_PitchPercentChangeEnd, mUIParent, TimeScaleBase::PercentChangeToHalfSteps(), and Update_Text_PitchHalfStepsEnd().

Here is the call graph for this function:

◆ OnText_PitchPercentChangeStart()

void EffectTimeScale::OnText_PitchPercentChangeStart ( wxCommandEvent &  evt)
private

Definition at line 273 of file TimeScale.cpp.

274{
276 mUIParent, mUIParent->TransferDataFromWindow()))
277 {
278 return;
279 }
280
283}
void Update_Text_PitchHalfStepsStart()
Definition: TimeScale.cpp:193

References EffectEditor::EnableApply(), TimeScaleBase::m_PitchHalfStepsStart, TimeScaleBase::m_PitchPercentChangeStart, mUIParent, TimeScaleBase::PercentChangeToHalfSteps(), and Update_Text_PitchHalfStepsStart().

Here is the call graph for this function:

◆ OnText_RatePercentChangeEnd()

void EffectTimeScale::OnText_RatePercentChangeEnd ( wxCommandEvent &  evt)
private

Definition at line 224 of file TimeScale.cpp.

225{
227 mUIParent, mUIParent->TransferDataFromWindow()))
228 {
229 return;
230 }
231
233}
void Update_Slider_RatePercentChangeEnd()
Definition: TimeScale.cpp:188

References EffectEditor::EnableApply(), mUIParent, and Update_Slider_RatePercentChangeEnd().

Here is the call graph for this function:

◆ OnText_RatePercentChangeStart()

void EffectTimeScale::OnText_RatePercentChangeStart ( wxCommandEvent &  evt)
private

Definition at line 213 of file TimeScale.cpp.

214{
216 mUIParent, mUIParent->TransferDataFromWindow()))
217 {
218 return;
219 }
220
222}
void Update_Slider_RatePercentChangeStart()
Definition: TimeScale.cpp:183

References EffectEditor::EnableApply(), mUIParent, and Update_Slider_RatePercentChangeStart().

Here is the call graph for this function:

◆ PopulateOrExchange()

std::unique_ptr< EffectEditor > EffectTimeScale::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 PopulateUI instead of a DefaultEffectEditor; default implementation returns null

Reimplemented from StatefulEffectUIServices.

Definition at line 43 of file TimeScale.cpp.

46{
47 mUIParent = S.GetParent();
48 S.SetBorder(5);
49 S.AddSpace(0, 5);
50
51 S.StartMultiColumn(2, wxALIGN_CENTER);
52 {
53 // Rate Start
54 S.StartStatic(XO("Initial Tempo Change (%)"));
55 {
56 S.StartMultiColumn(1, wxCENTER);
57 {
59 .Validator<FloatingPointValidator<double>>(
61 NumValidatorStyle::NO_TRAILING_ZEROES,
63 .AddTextBox( {}, L"", 12);
64 }
65 S.EndMultiColumn();
66 S.StartHorizontalLay(wxEXPAND, 0);
67 {
69 .Style(wxSL_HORIZONTAL)
71 }
72 S.EndHorizontalLay();
73 }
74 S.EndStatic();
75
76 S.StartStatic(XO("Final Tempo Change (%)"));
77 {
78 S.StartMultiColumn(1, wxCENTER);
79 {
81 .Validator<FloatingPointValidator<double>>(
83 NumValidatorStyle::NO_TRAILING_ZEROES,
85 .AddTextBox( {}, L"", 12);
86 }
87 S.EndMultiColumn();
88 S.StartHorizontalLay(wxEXPAND, 0);
89 {
91 .Style(wxSL_HORIZONTAL)
93 }
94 S.EndHorizontalLay();
95 }
96 S.EndStatic();
97
98 // Pitch Start
99 S.StartStatic(XO("Initial Pitch Shift"));
100 {
101 S.StartMultiColumn(2, wxCENTER);
102 {
104 .Validator<FloatingPointValidator<double>>(
106 NumValidatorStyle::NO_TRAILING_ZEROES,
108 .AddTextBox(XXO("(&semitones) [-12 to 12]:"), L"", 12);
109
110
112 .Validator<FloatingPointValidator<double>>(
114 NumValidatorStyle::NO_TRAILING_ZEROES,
116 .AddTextBox(XXO("(%) [-50 to 100]:"), L"", 12);
117 }
118 S.EndMultiColumn();
119 }
120 S.EndStatic();
121
122 // Pitch End
123 S.StartStatic(XO("Final Pitch Shift"));
124 {
125 S.StartMultiColumn(2, wxCENTER);
126 {
128 .Validator<FloatingPointValidator<double>>(
130 NumValidatorStyle::NO_TRAILING_ZEROES,
132 .AddTextBox(XXO("(s&emitones) [-12 to 12]:"), L"", 12);
133
135 .Validator<FloatingPointValidator<double>>(
137 NumValidatorStyle::NO_TRAILING_ZEROES,
139 .AddTextBox(XXO("(%) [-50 to 100]:"), L"", 12);
140 }
141 S.EndMultiColumn();
142 }
143 S.EndStatic();
144 }
145 S.EndMultiColumn();
146
147 return nullptr;
148}
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
@ ID_RatePercentChangeEnd
Definition: TimeScale.cpp:23
@ ID_PitchHalfStepsEnd
Definition: TimeScale.cpp:25
@ ID_RatePercentChangeStart
Definition: TimeScale.cpp:22
@ ID_PitchPercentChangeEnd
Definition: TimeScale.cpp:27
@ ID_PitchHalfStepsStart
Definition: TimeScale.cpp:24
@ ID_PitchPercentChangeStart
Definition: TimeScale.cpp:26
#define S(N)
Definition: ToChars.cpp:64
wxTextCtrl * m_pTextCtrl_PitchHalfStepsEnd
Definition: TimeScale.h:62
wxSlider * m_pSlider_RatePercentChangeStart
Definition: TimeScale.h:59
wxTextCtrl * m_pTextCtrl_RatePercentChangeStart
Definition: TimeScale.h:57
wxTextCtrl * m_pTextCtrl_RatePercentChangeEnd
Definition: TimeScale.h:58
wxSlider * m_pSlider_RatePercentChangeEnd
Definition: TimeScale.h:60
wxTextCtrl * m_pTextCtrl_PitchHalfStepsStart
Definition: TimeScale.h:61
wxTextCtrl * m_pTextCtrl_PitchPercentChangeStart
Definition: TimeScale.h:63
wxTextCtrl * m_pTextCtrl_PitchPercentChangeEnd
Definition: TimeScale.h:64
static constexpr EffectParameter HalfStepsEnd
Definition: TimeScaleBase.h:91
static constexpr EffectParameter RatePercentStart
Definition: TimeScaleBase.h:67
static constexpr EffectParameter RatePercentEnd
Definition: TimeScaleBase.h:75
static constexpr EffectParameter PitchPercentStart
Definition: TimeScaleBase.h:99
static constexpr EffectParameter HalfStepsStart
Definition: TimeScaleBase.h:83
const Type def
Default value.
const Type min
Minimum value.
const Type max
Maximum value.

References ID_PitchHalfStepsEnd, ID_PitchHalfStepsStart, ID_PitchPercentChangeEnd, ID_PitchPercentChangeStart, ID_RatePercentChangeEnd, ID_RatePercentChangeStart, S, XO(), and XXO().

Here is the call graph for this function:

◆ TransferDataFromWindow()

bool EffectTimeScale::TransferDataFromWindow ( EffectSettings settings)
overridevirtual

Update the given settings from controls; default does nothing, returns true

Reimplemented from StatefulEffectUIServices.

Definition at line 163 of file TimeScale.cpp.

164{
165 if (!mUIParent->Validate() || !mUIParent->TransferDataFromWindow())
166 {
167 return false;
168 }
169
170 return true;
171}

References mUIParent.

◆ TransferDataToWindow()

bool EffectTimeScale::TransferDataToWindow ( const EffectSettings settings)
overridevirtual

Update controls for the settings; default does nothing, returns true

Reimplemented from StatefulEffectUIServices.

Definition at line 150 of file TimeScale.cpp.

151{
152 if (!mUIParent->TransferDataToWindow())
153 {
154 return false;
155 }
156
159
160 return true;
161}

References mUIParent, Update_Slider_RatePercentChangeEnd(), and Update_Slider_RatePercentChangeStart().

Here is the call graph for this function:

◆ Update_Slider_RatePercentChangeEnd()

void EffectTimeScale::Update_Slider_RatePercentChangeEnd ( )
private

Definition at line 188 of file TimeScale.cpp.

189{
191}

References m_pSlider_RatePercentChangeEnd, and TimeScaleBase::m_RatePercentChangeEnd.

Referenced by OnText_RatePercentChangeEnd(), and TransferDataToWindow().

Here is the caller graph for this function:

◆ Update_Slider_RatePercentChangeStart()

void EffectTimeScale::Update_Slider_RatePercentChangeStart ( )
private

Definition at line 183 of file TimeScale.cpp.

184{
186}

References m_pSlider_RatePercentChangeStart, and TimeScaleBase::m_RatePercentChangeStart.

Referenced by OnText_RatePercentChangeStart(), and TransferDataToWindow().

Here is the caller graph for this function:

◆ Update_Text_PitchHalfStepsEnd()

void EffectTimeScale::Update_Text_PitchHalfStepsEnd ( )
private

Definition at line 198 of file TimeScale.cpp.

199{
200 m_pTextCtrl_PitchHalfStepsEnd->GetValidator()->TransferToWindow();
201}

References m_pTextCtrl_PitchHalfStepsEnd.

Referenced by OnText_PitchPercentChangeEnd().

Here is the caller graph for this function:

◆ Update_Text_PitchHalfStepsStart()

void EffectTimeScale::Update_Text_PitchHalfStepsStart ( )
private

Definition at line 193 of file TimeScale.cpp.

194{
195 m_pTextCtrl_PitchHalfStepsStart->GetValidator()->TransferToWindow();
196}

References m_pTextCtrl_PitchHalfStepsStart.

Referenced by OnText_PitchPercentChangeStart().

Here is the caller graph for this function:

◆ Update_Text_PitchPercentChangeEnd()

void EffectTimeScale::Update_Text_PitchPercentChangeEnd ( )
private

Definition at line 208 of file TimeScale.cpp.

209{
210 m_pTextCtrl_PitchPercentChangeEnd->GetValidator()->TransferToWindow();
211}

References m_pTextCtrl_PitchPercentChangeEnd.

Referenced by OnText_PitchHalfStepsEnd().

Here is the caller graph for this function:

◆ Update_Text_PitchPercentChangeStart()

void EffectTimeScale::Update_Text_PitchPercentChangeStart ( )
private

Definition at line 203 of file TimeScale.cpp.

204{
205 m_pTextCtrl_PitchPercentChangeStart->GetValidator()->TransferToWindow();
206}

References m_pTextCtrl_PitchPercentChangeStart.

Referenced by OnText_PitchHalfStepsStart().

Here is the caller graph for this function:

◆ Update_Text_RatePercentChangeEnd()

void EffectTimeScale::Update_Text_RatePercentChangeEnd ( )
private

Definition at line 178 of file TimeScale.cpp.

179{
180 m_pTextCtrl_RatePercentChangeEnd->GetValidator()->TransferToWindow();
181}

References m_pTextCtrl_RatePercentChangeEnd.

Referenced by OnSlider_RatePercentChangeEnd().

Here is the caller graph for this function:

◆ Update_Text_RatePercentChangeStart()

void EffectTimeScale::Update_Text_RatePercentChangeStart ( )
private

Definition at line 173 of file TimeScale.cpp.

174{
175 m_pTextCtrl_RatePercentChangeStart->GetValidator()->TransferToWindow();
176}

References m_pTextCtrl_RatePercentChangeStart.

Referenced by OnSlider_RatePercentChangeStart().

Here is the caller graph for this function:

Member Data Documentation

◆ m_pSlider_RatePercentChangeEnd

wxSlider* EffectTimeScale::m_pSlider_RatePercentChangeEnd
private

Definition at line 60 of file TimeScale.h.

Referenced by Update_Slider_RatePercentChangeEnd().

◆ m_pSlider_RatePercentChangeStart

wxSlider* EffectTimeScale::m_pSlider_RatePercentChangeStart
private

Definition at line 59 of file TimeScale.h.

Referenced by Update_Slider_RatePercentChangeStart().

◆ m_pTextCtrl_PitchHalfStepsEnd

wxTextCtrl* EffectTimeScale::m_pTextCtrl_PitchHalfStepsEnd
private

Definition at line 62 of file TimeScale.h.

Referenced by Update_Text_PitchHalfStepsEnd().

◆ m_pTextCtrl_PitchHalfStepsStart

wxTextCtrl* EffectTimeScale::m_pTextCtrl_PitchHalfStepsStart
private

Definition at line 61 of file TimeScale.h.

Referenced by Update_Text_PitchHalfStepsStart().

◆ m_pTextCtrl_PitchPercentChangeEnd

wxTextCtrl* EffectTimeScale::m_pTextCtrl_PitchPercentChangeEnd
private

Definition at line 64 of file TimeScale.h.

Referenced by Update_Text_PitchPercentChangeEnd().

◆ m_pTextCtrl_PitchPercentChangeStart

wxTextCtrl* EffectTimeScale::m_pTextCtrl_PitchPercentChangeStart
private

Definition at line 63 of file TimeScale.h.

Referenced by Update_Text_PitchPercentChangeStart().

◆ m_pTextCtrl_RatePercentChangeEnd

wxTextCtrl* EffectTimeScale::m_pTextCtrl_RatePercentChangeEnd
private

Definition at line 58 of file TimeScale.h.

Referenced by Update_Text_RatePercentChangeEnd().

◆ m_pTextCtrl_RatePercentChangeStart

wxTextCtrl* EffectTimeScale::m_pTextCtrl_RatePercentChangeStart
private

Definition at line 57 of file TimeScale.h.

Referenced by Update_Text_RatePercentChangeStart().

◆ mUIParent

wxWeakRef<wxWindow> EffectTimeScale::mUIParent {}
private

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