Audacity 3.2.0
ChangePitch.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4 Audacity(R) is copyright (c) 1999-2012 Audacity Team.
5 License: GPL v2 or later. See License.txt.
6
7 ChangePitch.h
8 Vaughan Johnson, Dominic Mazzoni, Steve Daulton
9
10************************************************************************/
11
12#if USE_SOUNDTOUCH
13
14#ifndef __AUDACITY_EFFECT_CHANGEPITCH__
15#define __AUDACITY_EFFECT_CHANGEPITCH__
16
17#include "ChangePitchBase.h"
19
20#include <wx/weakref.h>
21
22class wxSlider;
23class wxChoice;
24class wxCheckBox;
25class wxTextCtrl;
26class wxSpinCtrl;
27class ShuttleGui;
28
29class EffectChangePitch :
30 public ChangePitchBase,
32{
33public:
34 std::unique_ptr<EffectEditor> PopulateOrExchange(
35 ShuttleGui & S, EffectInstance &instance,
36 EffectSettingsAccess &access, const EffectOutputs *pOutputs) override;
37 bool TransferDataToWindow(const EffectSettings &settings) override;
39
40 DECLARE_EVENT_TABLE()
41private:
42 // handlers
43 void OnChoice_FromPitch(wxCommandEvent & evt);
44 void OnSpin_FromOctave(wxCommandEvent & evt);
45 void OnChoice_ToPitch(wxCommandEvent & evt);
46 void OnSpin_ToOctave(wxCommandEvent & evt);
47
48 void OnText_SemitonesChange(wxCommandEvent & evt);
49
50 void OnText_FromFrequency(wxCommandEvent & evt);
51 void OnText_ToFrequency(wxCommandEvent & evt);
52
53 void OnText_PercentChange(wxCommandEvent & evt);
54 void OnSlider_PercentChange(wxCommandEvent & evt);
55
56 // helper fns for controls
57 void Update_Choice_FromPitch();
58 void Update_Spin_FromOctave();
59 void Update_Choice_ToPitch();
60 void Update_Spin_ToOctave();
61
62 void Update_Text_SemitonesChange();
63
64 void Update_Text_FromFrequency();
65 void Update_Text_ToFrequency();
66
67 void Update_Text_PercentChange(); // Update control per current m_dPercentChange.
68 void Update_Slider_PercentChange(); // Update control per current m_dPercentChange.
69
70 wxWeakRef<wxWindow> mUIParent{};
71
72 // controls
73 wxChoice* m_pChoice_FromPitch = nullptr;
74 wxSpinCtrl* m_pSpin_FromOctave = nullptr;
75 wxChoice* m_pChoice_ToPitch = nullptr;
76 wxSpinCtrl* m_pSpin_ToOctave = nullptr;
77 wxTextCtrl* m_pTextCtrl_SemitonesChange = nullptr;
78
79 wxTextCtrl* m_pTextCtrl_FromFrequency = nullptr;
80 wxTextCtrl* m_pTextCtrl_ToFrequency = nullptr;
81 wxTextCtrl* m_pTextCtrl_PercentChange = nullptr;
82 wxSlider* m_pSlider_PercentChange = nullptr;
83
84#if USE_SBSMS
85 wxCheckBox* mUseSBSMSCheckBox = nullptr;
86#endif
87};
88
89# endif // __AUDACITY_EFFECT_CHANGEPITCH__
90
91#endif // USE_SOUNDTOUCH
Change Pitch effect provides raising or lowering the pitch without changing the tempo.
#define S(N)
Definition: ToChars.cpp:64
static Settings & settings()
Definition: TrackInfo.cpp:51
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
virtual bool TransferDataToWindow(const EffectSettings &settings)
virtual std::unique_ptr< EffectEditor > PopulateOrExchange(ShuttleGui &S, EffectInstance &instance, EffectSettingsAccess &access, const EffectOutputs *pOutputs)
Add controls to effect panel; always succeeds.
virtual bool TransferDataFromWindow(EffectSettings &settings)
Externalized state of a plug-in.