andrewm@0: /* andrewm@0: This code accompanies the textbook: andrewm@0: andrewm@0: Digital Audio Effects: Theory, Implementation and Application andrewm@0: Joshua D. Reiss and Andrew P. McPherson andrewm@0: andrewm@0: --- andrewm@0: andrewm@0: Compressor: dynamic range compression effect andrewm@0: See textbook Chapter 6: Dynamics Processing andrewm@0: andrewm@0: Code by Joshua Reiss, Brecht de Man and Andrew McPherson andrewm@0: andrewm@0: --- andrewm@0: andrewm@0: This program is free software: you can redistribute it and/or modify andrewm@0: it under the terms of the GNU General Public License as published by andrewm@0: the Free Software Foundation, either version 3 of the License, or andrewm@0: (at your option) any later version. andrewm@0: andrewm@0: This program is distributed in the hope that it will be useful, andrewm@0: but WITHOUT ANY WARRANTY; without even the implied warranty of andrewm@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the andrewm@0: GNU General Public License for more details. andrewm@0: andrewm@0: You should have received a copy of the GNU General Public License andrewm@0: along with this program. If not, see . andrewm@0: */ andrewm@0: andrewm@0: #ifndef __JUCER_HEADER_COMPRESSORAUDIOPROCESSOREDITOR_PLUGINEDITOR_75AA535A__ andrewm@0: #define __JUCER_HEADER_COMPRESSORAUDIOPROCESSOREDITOR_PLUGINEDITOR_75AA535A__ andrewm@0: andrewm@0: //[Headers] -- You can add your own extra header files here -- andrewm@0: //[/Headers] andrewm@0: andrewm@0: andrewm@0: andrewm@0: //============================================================================== andrewm@0: /** andrewm@0: //[Comments] andrewm@0: An auto-generated component, created by the Jucer. andrewm@0: andrewm@0: Describe your class and how it works here! andrewm@0: //[/Comments] andrewm@0: */ andrewm@0: class CompressorAudioProcessorEditor : public AudioProcessorEditor, andrewm@0: public Timer, andrewm@0: public ButtonListener, andrewm@0: public SliderListener andrewm@0: { andrewm@0: public: andrewm@0: //============================================================================== andrewm@0: CompressorAudioProcessorEditor (CompressorAudioProcessor* ownerFilter); andrewm@0: ~CompressorAudioProcessorEditor(); andrewm@0: andrewm@0: //============================================================================== andrewm@0: //[UserMethods] -- You can add your own custom methods in this section. andrewm@0: void timerCallback(); andrewm@0: //[/UserMethods] andrewm@0: andrewm@0: void paint (Graphics& g); andrewm@0: void resized(); andrewm@0: void buttonClicked (Button* buttonThatWasClicked); andrewm@0: void sliderValueChanged (Slider* sliderThatWasMoved); andrewm@0: andrewm@0: // Binary resources: andrewm@0: static const char* brushedMetalDark_jpg; andrewm@0: static const int brushedMetalDark_jpgSize; andrewm@0: static const char* c4dm_png2; andrewm@0: static const int c4dm_png2Size; andrewm@0: static const char* qmul_png2; andrewm@0: static const int qmul_png2Size; andrewm@0: static const char* knobstrip_png; andrewm@0: static const int knobstrip_pngSize; andrewm@0: static const char* scaleLr_png; andrewm@0: static const int scaleLr_pngSize; andrewm@0: andrewm@0: andrewm@0: //============================================================================== andrewm@0: juce_UseDebuggingNewOperator andrewm@0: andrewm@0: private: andrewm@0: //[UserVariables] -- You can add your own custom variables in this section. andrewm@0: andrewm@0: ScopedPointer resizer; andrewm@0: ComponentBoundsConstrainer resizeLimits; andrewm@0: andrewm@0: andrewm@0: andrewm@0: AudioPlayHead::CurrentPositionInfo lastDisplayedPosition; andrewm@0: andrewm@0: CompressorAudioProcessor* getProcessor() const andrewm@0: { andrewm@0: return static_cast (getAudioProcessor()); andrewm@0: } andrewm@0: andrewm@0: void displayPositionInfo (const AudioPlayHead::CurrentPositionInfo& pos); andrewm@0: andrewm@0: //[/UserVariables] andrewm@0: andrewm@0: //============================================================================== andrewm@0: TextButton* buttonONOFF; andrewm@0: Label* label; andrewm@0: Slider* sliderThreshold; andrewm@0: Label* label2; andrewm@0: Slider* sliderRatio; andrewm@0: Label* label3; andrewm@0: Slider* sliderGain; andrewm@0: Label* label7; andrewm@0: Slider* sliderAttack; andrewm@0: Label* label5; andrewm@0: Slider* sliderRelease; andrewm@0: Label* label6; andrewm@0: Image cachedImage_brushedMetalDark_jpg; andrewm@0: andrewm@0: andrewm@0: //============================================================================== andrewm@0: // (prevent copy constructor and operator= being generated..) andrewm@0: CompressorAudioProcessorEditor (const CompressorAudioProcessorEditor&); andrewm@0: const CompressorAudioProcessorEditor& operator= (const CompressorAudioProcessorEditor&); andrewm@0: }; andrewm@0: andrewm@0: andrewm@0: #endif // __JUCER_HEADER_COMPRESSORAUDIOPROCESSOREDITOR_PLUGINEDITOR_75AA535A__