Audacity 3.2.0
ChangeTempo.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ChangeTempo.h
6
7 Vaughan Johnson, Dominic Mazzoni
8
9 Change Tempo effect provides speeding up or
10 slowing down tempo without changing pitch.
11
12**********************************************************************/
13
14
15#if USE_SOUNDTOUCH
16
17#ifndef __AUDACITY_EFFECT_CHANGETEMPO__
18#define __AUDACITY_EFFECT_CHANGETEMPO__
19
20#include "ChangeTempoBase.h"
22#include <wx/weakref.h>
23
24class wxSlider;
25class wxCheckBox;
26class wxTextCtrl;
27class ShuttleGui;
28
30 public ChangeTempoBase,
32{
33public:
34 std::unique_ptr<EffectEditor> PopulateOrExchange(
36 const EffectOutputs* pOutputs) override;
37 bool TransferDataToWindow(const EffectSettings& settings) override;
38 bool TransferDataFromWindow(EffectSettings& settings) override;
39
40 DECLARE_EVENT_TABLE()
41
42private:
43 // handlers
44 void OnText_PercentChange(wxCommandEvent & evt);
45 void OnSlider_PercentChange(wxCommandEvent & evt);
46 void OnText_FromBPM(wxCommandEvent & evt);
47 void OnText_ToBPM(wxCommandEvent & evt);
48 void OnText_ToLength(wxCommandEvent & evt);
49
50 // helper fns
51 void Update_Text_PercentChange(); // Update control per current m_PercentChange.
52 void Update_Slider_PercentChange(); // Update control per current m_PercentChange.
53 void Update_Text_ToBPM(); // Use m_FromBPM & m_PercentChange to set NEW m_ToBPM & control.
54 void Update_Text_ToLength(); // Use m_FromLength & m_PercentChange to set NEW m_ToLength & control.
55
56 wxWeakRef<wxWindow> mUIParent{};
57
58 // controls
59 wxTextCtrl * m_pTextCtrl_PercentChange;
60 wxSlider * m_pSlider_PercentChange;
61 wxTextCtrl * m_pTextCtrl_FromBPM;
62 wxTextCtrl * m_pTextCtrl_ToBPM;
63 wxTextCtrl * m_pTextCtrl_FromLength;
64 wxTextCtrl * m_pTextCtrl_ToLength;
65
66#if USE_SBSMS
67 wxCheckBox * mUseSBSMSCheckBox;
68#endif
69};
70
71#endif // __AUDACITY_EFFECT_CHANGETEMPO__
72
73#endif // USE_SOUNDTOUCH
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:51
A SoundTouchBase provides speeding up or slowing down tempo without changing pitch.
Performs effect computation.
Hold values to send to effect output meters.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Externalized state of a plug-in.