annotate effects/compressor/Source/PluginEditor.h @ 1:04e171d2a747 tip

JUCE 4 compatible. Standardised paths on Mac: modules '../../juce/modules'; VST folder '~/SDKs/vstsdk2.4' (JUCE default). Replaced deprecated 'getSampleData(channel)'; getToggleState(...); setToggleState(...); setSelectedId(...). Removed unused variables. Ignore JUCE code and build files.
author Brecht De Man <b.deman@qmul.ac.uk>
date Sun, 22 Nov 2015 15:23:40 +0000
parents e32fe563e124
children
rev   line source
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 Compressor: dynamic range compression effect
andrewm@0 10 See textbook Chapter 6: Dynamics Processing
andrewm@0 11
andrewm@0 12 Code by Joshua Reiss, Brecht de Man and Andrew McPherson
andrewm@0 13
andrewm@0 14 ---
andrewm@0 15
andrewm@0 16 This program is free software: you can redistribute it and/or modify
andrewm@0 17 it under the terms of the GNU General Public License as published by
andrewm@0 18 the Free Software Foundation, either version 3 of the License, or
andrewm@0 19 (at your option) any later version.
andrewm@0 20
andrewm@0 21 This program is distributed in the hope that it will be useful,
andrewm@0 22 but WITHOUT ANY WARRANTY; without even the implied warranty of
andrewm@0 23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
andrewm@0 24 GNU General Public License for more details.
andrewm@0 25
andrewm@0 26 You should have received a copy of the GNU General Public License
andrewm@0 27 along with this program. If not, see <http://www.gnu.org/licenses/>.
andrewm@0 28 */
andrewm@0 29
andrewm@0 30 #ifndef __JUCER_HEADER_COMPRESSORAUDIOPROCESSOREDITOR_PLUGINEDITOR_75AA535A__
andrewm@0 31 #define __JUCER_HEADER_COMPRESSORAUDIOPROCESSOREDITOR_PLUGINEDITOR_75AA535A__
andrewm@0 32
andrewm@0 33 //[Headers] -- You can add your own extra header files here --
andrewm@0 34 //[/Headers]
andrewm@0 35
andrewm@0 36
andrewm@0 37
andrewm@0 38 //==============================================================================
andrewm@0 39 /**
andrewm@0 40 //[Comments]
andrewm@0 41 An auto-generated component, created by the Jucer.
andrewm@0 42
andrewm@0 43 Describe your class and how it works here!
andrewm@0 44 //[/Comments]
andrewm@0 45 */
andrewm@0 46 class CompressorAudioProcessorEditor : public AudioProcessorEditor,
andrewm@0 47 public Timer,
andrewm@0 48 public ButtonListener,
andrewm@0 49 public SliderListener
andrewm@0 50 {
andrewm@0 51 public:
andrewm@0 52 //==============================================================================
andrewm@0 53 CompressorAudioProcessorEditor (CompressorAudioProcessor* ownerFilter);
andrewm@0 54 ~CompressorAudioProcessorEditor();
andrewm@0 55
andrewm@0 56 //==============================================================================
andrewm@0 57 //[UserMethods] -- You can add your own custom methods in this section.
andrewm@0 58 void timerCallback();
andrewm@0 59 //[/UserMethods]
andrewm@0 60
andrewm@0 61 void paint (Graphics& g);
andrewm@0 62 void resized();
andrewm@0 63 void buttonClicked (Button* buttonThatWasClicked);
andrewm@0 64 void sliderValueChanged (Slider* sliderThatWasMoved);
andrewm@0 65
andrewm@0 66 // Binary resources:
andrewm@0 67 static const char* brushedMetalDark_jpg;
andrewm@0 68 static const int brushedMetalDark_jpgSize;
andrewm@0 69 static const char* c4dm_png2;
andrewm@0 70 static const int c4dm_png2Size;
andrewm@0 71 static const char* qmul_png2;
andrewm@0 72 static const int qmul_png2Size;
andrewm@0 73 static const char* knobstrip_png;
andrewm@0 74 static const int knobstrip_pngSize;
andrewm@0 75 static const char* scaleLr_png;
andrewm@0 76 static const int scaleLr_pngSize;
andrewm@0 77
andrewm@0 78
andrewm@0 79 //==============================================================================
andrewm@0 80 juce_UseDebuggingNewOperator
andrewm@0 81
andrewm@0 82 private:
andrewm@0 83 //[UserVariables] -- You can add your own custom variables in this section.
andrewm@0 84
andrewm@0 85 ScopedPointer<ResizableCornerComponent> resizer;
andrewm@0 86 ComponentBoundsConstrainer resizeLimits;
andrewm@0 87
andrewm@0 88
andrewm@0 89
andrewm@0 90 AudioPlayHead::CurrentPositionInfo lastDisplayedPosition;
andrewm@0 91
andrewm@0 92 CompressorAudioProcessor* getProcessor() const
andrewm@0 93 {
andrewm@0 94 return static_cast <CompressorAudioProcessor*> (getAudioProcessor());
andrewm@0 95 }
andrewm@0 96
andrewm@0 97 void displayPositionInfo (const AudioPlayHead::CurrentPositionInfo& pos);
andrewm@0 98
andrewm@0 99 //[/UserVariables]
andrewm@0 100
andrewm@0 101 //==============================================================================
andrewm@0 102 TextButton* buttonONOFF;
andrewm@0 103 Label* label;
andrewm@0 104 Slider* sliderThreshold;
andrewm@0 105 Label* label2;
andrewm@0 106 Slider* sliderRatio;
andrewm@0 107 Label* label3;
andrewm@0 108 Slider* sliderGain;
andrewm@0 109 Label* label7;
andrewm@0 110 Slider* sliderAttack;
andrewm@0 111 Label* label5;
andrewm@0 112 Slider* sliderRelease;
andrewm@0 113 Label* label6;
andrewm@0 114 Image cachedImage_brushedMetalDark_jpg;
andrewm@0 115
andrewm@0 116
andrewm@0 117 //==============================================================================
andrewm@0 118 // (prevent copy constructor and operator= being generated..)
andrewm@0 119 CompressorAudioProcessorEditor (const CompressorAudioProcessorEditor&);
andrewm@0 120 const CompressorAudioProcessorEditor& operator= (const CompressorAudioProcessorEditor&);
andrewm@0 121 };
andrewm@0 122
andrewm@0 123
andrewm@0 124 #endif // __JUCER_HEADER_COMPRESSORAUDIOPROCESSOREDITOR_PLUGINEDITOR_75AA535A__