andrewm@0
|
1 /*
|
andrewm@0
|
2 This code accompanies the textbook:
|
andrewm@0
|
3
|
andrewm@0
|
4 Digital Audio Effects: Theory, Implementation and Application
|
andrewm@0
|
5 Joshua D. Reiss and Andrew P. McPherson
|
andrewm@0
|
6
|
andrewm@0
|
7 ---
|
andrewm@0
|
8
|
andrewm@0
|
9 PVOC Pitch Shift: pitch shifter using phase vocoder
|
andrewm@0
|
10 See textbook Chapter 8: The Phase Vocoder
|
andrewm@0
|
11
|
andrewm@0
|
12 Code by Andrew McPherson, Brecht De Man and Joshua Reiss
|
andrewm@0
|
13 Based on a project by Xinyuan Lai
|
andrewm@0
|
14
|
andrewm@0
|
15 This code requires the fftw library version 3 to compile:
|
andrewm@0
|
16 http://fftw.org
|
andrewm@0
|
17
|
andrewm@0
|
18 ---
|
andrewm@0
|
19
|
andrewm@0
|
20 This program is free software: you can redistribute it and/or modify
|
andrewm@0
|
21 it under the terms of the GNU General Public License as published by
|
andrewm@0
|
22 the Free Software Foundation, either version 3 of the License, or
|
andrewm@0
|
23 (at your option) any later version.
|
andrewm@0
|
24
|
andrewm@0
|
25 This program is distributed in the hope that it will be useful,
|
andrewm@0
|
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
andrewm@0
|
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
andrewm@0
|
28 GNU General Public License for more details.
|
andrewm@0
|
29
|
andrewm@0
|
30 You should have received a copy of the GNU General Public License
|
andrewm@0
|
31 along with this program. If not, see <http://www.gnu.org/licenses/>.
|
andrewm@0
|
32 */
|
andrewm@0
|
33
|
andrewm@0
|
34
|
andrewm@0
|
35 #ifndef __PLUGINEDITOR_H_6E48F605__
|
andrewm@0
|
36 #define __PLUGINEDITOR_H_6E48F605__
|
andrewm@0
|
37
|
andrewm@0
|
38 #include "../JuceLibraryCode/JuceHeader.h"
|
andrewm@0
|
39 #include "PluginProcessor.h"
|
andrewm@0
|
40
|
andrewm@0
|
41
|
andrewm@0
|
42 //==============================================================================
|
andrewm@0
|
43
|
andrewm@0
|
44 class PVOCPitchShiftAudioProcessorEditor : public AudioProcessorEditor,
|
andrewm@0
|
45 public SliderListener,
|
andrewm@0
|
46 public ComboBox::Listener,
|
andrewm@0
|
47 public Timer
|
andrewm@0
|
48 {
|
andrewm@0
|
49 public:
|
andrewm@0
|
50 PVOCPitchShiftAudioProcessorEditor (PVOCPitchShiftAudioProcessor* ownerFilter);
|
andrewm@0
|
51 ~PVOCPitchShiftAudioProcessorEditor();
|
andrewm@0
|
52
|
andrewm@0
|
53 //==============================================================================
|
andrewm@0
|
54 // This is just a standard Juce paint method...
|
andrewm@0
|
55 void timerCallback();
|
andrewm@0
|
56 void paint (Graphics& g);
|
andrewm@0
|
57 void resized();
|
andrewm@0
|
58 void sliderValueChanged (Slider*);
|
andrewm@0
|
59 void comboBoxChanged (ComboBox *);
|
andrewm@0
|
60
|
andrewm@0
|
61 private:
|
andrewm@0
|
62 Label fftSizeLabel_, hopSizeLabel_, windowTypeLabel_, pitchShiftLabel_; //(⊙_⊙)
|
andrewm@0
|
63 ComboBox fftSizeComboBox_, hopSizeComboBox_, windowTypeComboBox_, pitchShiftComboBox_; //(⊙_⊙)
|
andrewm@0
|
64
|
andrewm@0
|
65 ScopedPointer<ResizableCornerComponent> resizer_;
|
andrewm@0
|
66 ComponentBoundsConstrainer resizeLimits_;
|
andrewm@0
|
67
|
andrewm@0
|
68 PVOCPitchShiftAudioProcessor* getProcessor() const
|
andrewm@0
|
69 {
|
andrewm@0
|
70 return static_cast <PVOCPitchShiftAudioProcessor*> (getAudioProcessor());
|
andrewm@0
|
71 }
|
andrewm@0
|
72 };
|
andrewm@0
|
73
|
andrewm@0
|
74
|
andrewm@0
|
75 #endif // __PLUGINEDITOR_H_6E48F605__
|