annotate effects/reverb/Source/PluginEditor.cpp @ 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 ==============================================================================
andrewm@0 3
andrewm@0 4 This is an automatically generated GUI class created by the Introjucer!
andrewm@0 5
andrewm@0 6 Be careful when adding custom code to these files, as only the code within
andrewm@0 7 the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
andrewm@0 8 and re-saved.
andrewm@0 9
andrewm@0 10 Created with Introjucer version: 3.1.0
andrewm@0 11
andrewm@0 12 ------------------------------------------------------------------------------
andrewm@0 13
andrewm@0 14 The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
andrewm@0 15 Copyright 2004-13 by Raw Material Software Ltd.
andrewm@0 16
andrewm@0 17 ==============================================================================
andrewm@0 18 */
andrewm@0 19
andrewm@0 20 //[Headers] You can add your own extra header files here...
andrewm@0 21 #include "PluginProcessor.h"
andrewm@0 22 #include "MVerb.h"
andrewm@0 23 //[/Headers]
andrewm@0 24
andrewm@0 25 #include "PluginEditor.h"
andrewm@0 26
andrewm@0 27
andrewm@0 28 //[MiscUserDefs] You can add your own user definitions and misc code here...
andrewm@0 29
andrewm@0 30 //LookAndFeelCustom* ReverbAudioProcessorEditor::customLookAndFeel = NULL;
andrewm@0 31
andrewm@0 32 //[/MiscUserDefs]
andrewm@0 33
andrewm@0 34 //==============================================================================
andrewm@0 35 ReverbAudioProcessorEditor::ReverbAudioProcessorEditor (ReverbAudioProcessor* ownerFilter)
andrewm@0 36 : AudioProcessorEditor (ownerFilter)
andrewm@0 37 {
andrewm@0 38 addAndMakeVisible (lateEarlySlider = new Slider ("new slider"));
andrewm@0 39 lateEarlySlider->setRange (0, 1, 0.01);
andrewm@0 40 lateEarlySlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 41 lateEarlySlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 42 lateEarlySlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 43 lateEarlySlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 44 lateEarlySlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 45 lateEarlySlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 46 lateEarlySlider->addListener (this);
andrewm@0 47
andrewm@0 48 addAndMakeVisible (mixSlider = new Slider ("new slider"));
andrewm@0 49 mixSlider->setRange (0, 1, 0.01);
andrewm@0 50 mixSlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 51 mixSlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 52 mixSlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 53 mixSlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 54 mixSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 55 mixSlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 56 mixSlider->addListener (this);
andrewm@0 57
andrewm@0 58 addAndMakeVisible (gainSlider = new Slider ("new slider"));
andrewm@0 59 gainSlider->setRange (0, 1, 0.01);
andrewm@0 60 gainSlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 61 gainSlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 62 gainSlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 63 gainSlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 64 gainSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 65 gainSlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 66 gainSlider->addListener (this);
andrewm@0 67
andrewm@0 68 addAndMakeVisible (preDelaySlider = new Slider ("new slider"));
andrewm@0 69 preDelaySlider->setRange (0, 1, 0.01);
andrewm@0 70 preDelaySlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 71 preDelaySlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 72 preDelaySlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 73 preDelaySlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 74 preDelaySlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 75 preDelaySlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 76 preDelaySlider->addListener (this);
andrewm@0 77
andrewm@0 78 addAndMakeVisible (bandWidthSlider = new Slider ("new slider"));
andrewm@0 79 bandWidthSlider->setRange (0, 1, 0.01);
andrewm@0 80 bandWidthSlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 81 bandWidthSlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 82 bandWidthSlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 83 bandWidthSlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 84 bandWidthSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 85 bandWidthSlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 86 bandWidthSlider->addListener (this);
andrewm@0 87
andrewm@0 88 addAndMakeVisible (dampSlider = new Slider ("new slider"));
andrewm@0 89 dampSlider->setRange (0, 1, 0.01);
andrewm@0 90 dampSlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 91 dampSlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 92 dampSlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 93 dampSlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 94 dampSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 95 dampSlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 96 dampSlider->addListener (this);
andrewm@0 97
andrewm@0 98 addAndMakeVisible (sizeSlider = new Slider ("new slider"));
andrewm@0 99 sizeSlider->setRange (0, 1, 0.01);
andrewm@0 100 sizeSlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 101 sizeSlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 102 sizeSlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 103 sizeSlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 104 sizeSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 105 sizeSlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 106 sizeSlider->addListener (this);
andrewm@0 107
andrewm@0 108 addAndMakeVisible (decaySlider = new Slider ("new slider"));
andrewm@0 109 decaySlider->setRange (0, 1, 0.01);
andrewm@0 110 decaySlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 111 decaySlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 112 decaySlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 113 decaySlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 114 decaySlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 115 decaySlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 116 decaySlider->addListener (this);
andrewm@0 117
andrewm@0 118 addAndMakeVisible (densitySlider = new Slider ("new slider"));
andrewm@0 119 densitySlider->setRange (0, 1, 0.01);
andrewm@0 120 densitySlider->setSliderStyle (Slider::RotaryHorizontalVerticalDrag);
andrewm@0 121 densitySlider->setTextBoxStyle (Slider::TextBoxBelow, false, 40, 20);
andrewm@0 122 densitySlider->setColour (Slider::rotarySliderFillColourId, Colour (0x7fffffff));
andrewm@0 123 densitySlider->setColour (Slider::textBoxTextColourId, Colours::white);
andrewm@0 124 densitySlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00ffffff));
andrewm@0 125 densitySlider->setColour (Slider::textBoxOutlineColourId, Colour (0x00808080));
andrewm@0 126 densitySlider->addListener (this);
andrewm@0 127
andrewm@0 128
andrewm@0 129 //[UserPreSize]
andrewm@0 130 addAndMakeVisible (resizer = new ResizableCornerComponent (this, &resizeLimits));
andrewm@0 131 resizeLimits.setSizeLimits (150, 150, 850, 290);
andrewm@0 132 //[/UserPreSize]
andrewm@0 133
andrewm@0 134 setSize (470, 470);
andrewm@0 135
andrewm@0 136
andrewm@0 137 //[Constructor] You can add your own custom stuff here..
andrewm@0 138
andrewm@0 139 UpdateInterfaceValues();
andrewm@0 140
andrewm@0 141 //************************************ SET LOOKANDFEEL **********************************
andrewm@0 142 // if( customLookAndFeel == NULL )
andrewm@0 143 // {
andrewm@0 144 // customLookAndFeel = new LookAndFeelCustom();
andrewm@0 145 // LookAndFeel::setDefaultLookAndFeel (/*&*/customLookAndFeel);
andrewm@0 146 // }
andrewm@0 147
andrewm@0 148 //***************************************************************************************
andrewm@0 149
andrewm@0 150 startTimer (50);
andrewm@0 151
andrewm@0 152 //[/Constructor]
andrewm@0 153 }
andrewm@0 154
andrewm@0 155 ReverbAudioProcessorEditor::~ReverbAudioProcessorEditor()
andrewm@0 156 {
andrewm@0 157 //[Destructor_pre]. You can add your own custom destruction code here..
andrewm@0 158 //[/Destructor_pre]
andrewm@0 159
andrewm@0 160 lateEarlySlider = nullptr;
andrewm@0 161 mixSlider = nullptr;
andrewm@0 162 gainSlider = nullptr;
andrewm@0 163 preDelaySlider = nullptr;
andrewm@0 164 bandWidthSlider = nullptr;
andrewm@0 165 dampSlider = nullptr;
andrewm@0 166 sizeSlider = nullptr;
andrewm@0 167 decaySlider = nullptr;
andrewm@0 168 densitySlider = nullptr;
andrewm@0 169
andrewm@0 170
andrewm@0 171 //[Destructor]. You can add your own custom destruction code here..
andrewm@0 172
andrewm@0 173 //[/Destructor]
andrewm@0 174 }
andrewm@0 175
andrewm@0 176 //==============================================================================
andrewm@0 177 void ReverbAudioProcessorEditor::paint (Graphics& g)
andrewm@0 178 {
andrewm@0 179 //[UserPrePaint] Add your own custom painting code here..
andrewm@0 180 //[/UserPrePaint]
andrewm@0 181
andrewm@0 182 g.fillAll (Colour (0xff000a39));
andrewm@0 183
andrewm@0 184 g.setColour (Colour (0xff315d9d));
andrewm@0 185 g.fillEllipse (332.0f, 204.0f, 88.0f, 88.0f);
andrewm@0 186
andrewm@0 187 g.setColour (Colour (0xff2c333b));
andrewm@0 188 g.fillEllipse (348.0f, 220.0f, 56.0f, 56.0f);
andrewm@0 189
andrewm@0 190 g.setColour (Colour (0xff2f3d6a));
andrewm@0 191 g.fillRoundedRectangle (136.0f, 5.0f, 175.0f, 37.0f, 10.000f);
andrewm@0 192
andrewm@0 193 g.setColour (Colours::white);
andrewm@0 194 g.setFont (Font (Font::getDefaultMonospacedFontName(), 22.30f, Font::bold));
andrewm@0 195 g.drawText (TRANS("reverb"),
andrewm@0 196 1, 13, 446, 24,
andrewm@0 197 Justification::centredTop, true);
andrewm@0 198
andrewm@0 199 g.setColour (Colours::white);
andrewm@0 200 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 201 g.drawText (TRANS("MIX"),
andrewm@0 202 346, 183, 59, 30,
andrewm@0 203 Justification::centred, true);
andrewm@0 204
andrewm@0 205 g.setColour (Colour (0xff315d9d));
andrewm@0 206 g.fillEllipse (332.0f, 337.0f, 88.0f, 88.0f);
andrewm@0 207
andrewm@0 208 g.setColour (Colour (0xff2c333b));
andrewm@0 209 g.fillEllipse (348.0f, 353.0f, 56.0f, 56.0f);
andrewm@0 210
andrewm@0 211 g.setColour (Colours::white);
andrewm@0 212 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 213 g.drawText (TRANS("LATE/EARLY"),
andrewm@0 214 333, 316, 83, 30,
andrewm@0 215 Justification::centred, true);
andrewm@0 216
andrewm@0 217 g.setColour (Colour (0xff315d9d));
andrewm@0 218 g.fillEllipse (332.0f, 78.0f, 88.0f, 88.0f);
andrewm@0 219
andrewm@0 220 g.setColour (Colour (0xff2c333b));
andrewm@0 221 g.fillEllipse (348.0f, 94.0f, 56.0f, 56.0f);
andrewm@0 222
andrewm@0 223 g.setColour (Colours::white);
andrewm@0 224 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 225 g.drawText (TRANS("GAIN"),
andrewm@0 226 346, 57, 59, 30,
andrewm@0 227 Justification::centred, true);
andrewm@0 228
andrewm@0 229 g.setColour (Colour (0xff315d9d));
andrewm@0 230 g.fillEllipse (190.0f, 204.0f, 88.0f, 88.0f);
andrewm@0 231
andrewm@0 232 g.setColour (Colour (0xff2c333b));
andrewm@0 233 g.fillEllipse (206.0f, 220.0f, 56.0f, 56.0f);
andrewm@0 234
andrewm@0 235 g.setColour (Colours::white);
andrewm@0 236 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 237 g.drawText (TRANS("BANDWITH"),
andrewm@0 238 201, 183, 65, 30,
andrewm@0 239 Justification::centred, true);
andrewm@0 240
andrewm@0 241 g.setColour (Colour (0xff315d9d));
andrewm@0 242 g.fillEllipse (190.0f, 337.0f, 88.0f, 88.0f);
andrewm@0 243
andrewm@0 244 g.setColour (Colour (0xff2c333b));
andrewm@0 245 g.fillEllipse (206.0f, 353.0f, 56.0f, 56.0f);
andrewm@0 246
andrewm@0 247 g.setColour (Colours::white);
andrewm@0 248 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 249 g.drawText (TRANS("PREDELAY"),
andrewm@0 250 202, 316, 64, 30,
andrewm@0 251 Justification::centred, true);
andrewm@0 252
andrewm@0 253 g.setColour (Colour (0xff315d9d));
andrewm@0 254 g.fillEllipse (190.0f, 78.0f, 88.0f, 88.0f);
andrewm@0 255
andrewm@0 256 g.setColour (Colour (0xff2c333b));
andrewm@0 257 g.fillEllipse (206.0f, 94.0f, 56.0f, 56.0f);
andrewm@0 258
andrewm@0 259 g.setColour (Colours::white);
andrewm@0 260 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 261 g.drawText (TRANS("DAMP"),
andrewm@0 262 204, 57, 59, 30,
andrewm@0 263 Justification::centred, true);
andrewm@0 264
andrewm@0 265 g.setColour (Colour (0xff315d9d));
andrewm@0 266 g.fillEllipse (48.0f, 204.0f, 88.0f, 88.0f);
andrewm@0 267
andrewm@0 268 g.setColour (Colour (0xff2c333b));
andrewm@0 269 g.fillEllipse (64.0f, 220.0f, 56.0f, 56.0f);
andrewm@0 270
andrewm@0 271 g.setColour (Colours::white);
andrewm@0 272 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 273 g.drawText (TRANS("DECAY"),
andrewm@0 274 62, 183, 59, 30,
andrewm@0 275 Justification::centred, true);
andrewm@0 276
andrewm@0 277 g.setColour (Colour (0xff315d9d));
andrewm@0 278 g.fillEllipse (48.0f, 337.0f, 88.0f, 88.0f);
andrewm@0 279
andrewm@0 280 g.setColour (Colour (0xff2c333b));
andrewm@0 281 g.fillEllipse (64.0f, 353.0f, 56.0f, 56.0f);
andrewm@0 282
andrewm@0 283 g.setColour (Colours::white);
andrewm@0 284 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 285 g.drawText (TRANS("SIZE"),
andrewm@0 286 62, 316, 59, 30,
andrewm@0 287 Justification::centred, true);
andrewm@0 288
andrewm@0 289 g.setColour (Colour (0xff315d9d));
andrewm@0 290 g.fillEllipse (48.0f, 78.0f, 88.0f, 88.0f);
andrewm@0 291
andrewm@0 292 g.setColour (Colour (0xff2c333b));
andrewm@0 293 g.fillEllipse (64.0f, 94.0f, 56.0f, 56.0f);
andrewm@0 294
andrewm@0 295 g.setColour (Colours::white);
andrewm@0 296 g.setFont (Font (Font::getDefaultMonospacedFontName(), 15.00f, Font::plain));
andrewm@0 297 g.drawText (TRANS("DENSITY"),
andrewm@0 298 63, 57, 59, 30,
andrewm@0 299 Justification::centred, true);
andrewm@0 300
andrewm@0 301 //[UserPaint] Add your own custom painting code here..
andrewm@0 302
andrewm@0 303 // Version number
andrewm@0 304 String str("v ");
andrewm@0 305 str.append(JucePlugin_VersionString, 4);
andrewm@0 306 g.setColour (Colours::white);
andrewm@0 307 g.setFont (Font (Font::getDefaultMonospacedFontName(), 11.00f, Font::plain));
andrewm@0 308 g.drawText (str,
andrewm@0 309 189, 37, 54, 30,
andrewm@0 310 Justification::centredLeft, true);
andrewm@0 311
andrewm@0 312 //[/UserPaint]
andrewm@0 313 }
andrewm@0 314
andrewm@0 315 void ReverbAudioProcessorEditor::resized()
andrewm@0 316 {
andrewm@0 317 lateEarlySlider->setBounds (294, 339, 164, 102);
andrewm@0 318 mixSlider->setBounds (294, 207, 164, 102);
andrewm@0 319 gainSlider->setBounds (294, 81, 164, 102);
andrewm@0 320 preDelaySlider->setBounds (152, 340, 164, 102);
andrewm@0 321 bandWidthSlider->setBounds (152, 207, 164, 102);
andrewm@0 322 dampSlider->setBounds (152, 80, 164, 102);
andrewm@0 323 sizeSlider->setBounds (11, 340, 164, 102);
andrewm@0 324 decaySlider->setBounds (10, 207, 164, 102);
andrewm@0 325 densitySlider->setBounds (10, 81, 164, 102);
andrewm@0 326 //[UserResized] Add your own custom resize handling here..
andrewm@0 327 getProcessor()->_lastUIWidth = getWidth();
andrewm@0 328 getProcessor()->_lastUIHeight = getHeight();
andrewm@0 329 //[/UserResized]
andrewm@0 330 }
andrewm@0 331
andrewm@0 332 void ReverbAudioProcessorEditor::sliderValueChanged (Slider* sliderThatWasMoved)
andrewm@0 333 {
andrewm@0 334 //[UsersliderValueChanged_Pre]
andrewm@0 335 ReverbAudioProcessor* ourProcessor = getProcessor();
andrewm@0 336 //[/UsersliderValueChanged_Pre]
andrewm@0 337
andrewm@0 338 if (sliderThatWasMoved == lateEarlySlider)
andrewm@0 339 {
andrewm@0 340 //[UserSliderCode_lateEarlySlider] -- add your slider handling code here..
andrewm@0 341 ourProcessor->SetLateEarly(lateEarlySlider->getValue());
andrewm@0 342 ourProcessor->updateParameters(MVerb<float>::EARLYMIX);
andrewm@0 343 //[/UserSliderCode_lateEarlySlider]
andrewm@0 344 }
andrewm@0 345 else if (sliderThatWasMoved == mixSlider)
andrewm@0 346 {
andrewm@0 347 //[UserSliderCode_mixSlider] -- add your slider handling code here..
andrewm@0 348 ourProcessor->SetMix(mixSlider->getValue());
andrewm@0 349 ourProcessor->updateParameters(MVerb<float>::MIX);
andrewm@0 350 //[/UserSliderCode_mixSlider]
andrewm@0 351 }
andrewm@0 352 else if (sliderThatWasMoved == gainSlider)
andrewm@0 353 {
andrewm@0 354 //[UserSliderCode_gainSlider] -- add your slider handling code here..
andrewm@0 355 ourProcessor->SetGain(gainSlider->getValue());
andrewm@0 356 ourProcessor->updateParameters(MVerb<float>::GAIN);
andrewm@0 357 //[/UserSliderCode_gainSlider]
andrewm@0 358 }
andrewm@0 359 else if (sliderThatWasMoved == preDelaySlider)
andrewm@0 360 {
andrewm@0 361 //[UserSliderCode_preDelaySlider] -- add your slider handling code here..
andrewm@0 362 ourProcessor->SetPredelay(preDelaySlider->getValue());
andrewm@0 363 ourProcessor->updateParameters(MVerb<float>::PREDELAY);
andrewm@0 364 //[/UserSliderCode_preDelaySlider]
andrewm@0 365 }
andrewm@0 366 else if (sliderThatWasMoved == bandWidthSlider)
andrewm@0 367 {
andrewm@0 368 //[UserSliderCode_bandWidthSlider] -- add your slider handling code here..
andrewm@0 369 ourProcessor->SetBandwidth(bandWidthSlider->getValue());
andrewm@0 370 ourProcessor->updateParameters(MVerb<float>::BANDWIDTHFREQ);
andrewm@0 371 //[/UserSliderCode_bandWidthSlider]
andrewm@0 372 }
andrewm@0 373 else if (sliderThatWasMoved == dampSlider)
andrewm@0 374 {
andrewm@0 375 //[UserSliderCode_dampSlider] -- add your slider handling code here..
andrewm@0 376 ourProcessor->SetDamp(dampSlider->getValue());
andrewm@0 377 ourProcessor->updateParameters(MVerb<float>::DAMPINGFREQ);
andrewm@0 378 //[/UserSliderCode_dampSlider]
andrewm@0 379 }
andrewm@0 380 else if (sliderThatWasMoved == sizeSlider)
andrewm@0 381 {
andrewm@0 382 //[UserSliderCode_sizeSlider] -- add your slider handling code here..
andrewm@0 383 ourProcessor->SetSize(sizeSlider->getValue());
andrewm@0 384 ourProcessor->updateParameters(MVerb<float>::SIZE);
andrewm@0 385 //[/UserSliderCode_sizeSlider]
andrewm@0 386 }
andrewm@0 387 else if (sliderThatWasMoved == decaySlider)
andrewm@0 388 {
andrewm@0 389 //[UserSliderCode_decaySlider] -- add your slider handling code here..
andrewm@0 390 ourProcessor->SetDecay(decaySlider->getValue());
andrewm@0 391 ourProcessor->updateParameters(MVerb<float>::DECAY);
andrewm@0 392 //[/UserSliderCode_decaySlider]
andrewm@0 393 }
andrewm@0 394 else if (sliderThatWasMoved == densitySlider)
andrewm@0 395 {
andrewm@0 396 //[UserSliderCode_densitySlider] -- add your slider handling code here..
andrewm@0 397 ourProcessor->SetDensity(densitySlider->getValue());
andrewm@0 398 ourProcessor->updateParameters(MVerb<float>::DENSITY);
andrewm@0 399 //[/UserSliderCode_densitySlider]
andrewm@0 400 }
andrewm@0 401
andrewm@0 402 //[UsersliderValueChanged_Post]
andrewm@0 403 //[/UsersliderValueChanged_Post]
andrewm@0 404 }
andrewm@0 405
andrewm@0 406
andrewm@0 407
andrewm@0 408 //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
andrewm@0 409
andrewm@0 410 void ReverbAudioProcessorEditor::UpdateInterfaceValues()
andrewm@0 411 {
andrewm@0 412 ReverbAudioProcessor* ourProcessor = getProcessor();
andrewm@0 413
andrewm@0 414 // Update Sliders
andrewm@0 415 lateEarlySlider ->setValue(ourProcessor->_lateEarly,dontSendNotification);
andrewm@0 416 densitySlider ->setValue(ourProcessor->_density,dontSendNotification);
andrewm@0 417 mixSlider ->setValue(ourProcessor->_mix,dontSendNotification);
andrewm@0 418 preDelaySlider ->setValue(ourProcessor->_predelay,dontSendNotification);
andrewm@0 419 dampSlider ->setValue(ourProcessor->_damp,dontSendNotification);
andrewm@0 420 sizeSlider ->setValue(ourProcessor->_size,dontSendNotification);
andrewm@0 421 decaySlider ->setValue(ourProcessor->_decay,dontSendNotification);
andrewm@0 422 bandWidthSlider ->setValue(ourProcessor->_bandwidth,dontSendNotification);
andrewm@0 423 gainSlider ->setValue(ourProcessor->_gain,dontSendNotification);
andrewm@0 424 }
andrewm@0 425
andrewm@0 426 void ReverbAudioProcessorEditor::timerCallback()
andrewm@0 427 {
andrewm@0 428 //DistortionAudioProcessor* ourProcessor = getProcessor();
andrewm@0 429
andrewm@0 430
andrewm@0 431 }
andrewm@0 432
andrewm@0 433 //[/MiscUserCode]
andrewm@0 434
andrewm@0 435
andrewm@0 436 //==============================================================================
andrewm@0 437 #if 0
andrewm@0 438 /* -- Introjucer information section --
andrewm@0 439
andrewm@0 440 This is where the Introjucer stores the metadata that describe this GUI layout, so
andrewm@0 441 make changes in here at your peril!
andrewm@0 442
andrewm@0 443 BEGIN_JUCER_METADATA
andrewm@0 444
andrewm@0 445 <JUCER_COMPONENT documentType="Component" className="ReverbAudioProcessorEditor"
andrewm@0 446 componentName="" parentClasses="public AudioProcessorEditor, public Timer"
andrewm@0 447 constructorParams="ReverbAudioProcessor* ownerFilter" variableInitialisers="AudioProcessorEditor (ownerFilter)"
andrewm@0 448 snapPixels="8" snapActive="0" snapShown="1" overlayOpacity="0.330"
andrewm@0 449 fixedSize="1" initialWidth="470" initialHeight="470">
andrewm@0 450 <BACKGROUND backgroundColour="ff000a39">
andrewm@0 451 <ELLIPSE pos="332 204 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 452 <ELLIPSE pos="348 220 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 453 <ROUNDRECT pos="136 5 175 37" cornerSize="10" fill="solid: ff2f3d6a" hasStroke="0"/>
andrewm@0 454 <TEXT pos="1 13 446 24" fill="solid: ffffffff" hasStroke="0" text="reverb"
andrewm@0 455 fontname="Default monospaced font" fontsize="22.300000000000000711"
andrewm@0 456 bold="1" italic="0" justification="12"/>
andrewm@0 457 <TEXT pos="346 183 59 30" fill="solid: ffffffff" hasStroke="0" text="MIX"
andrewm@0 458 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 459 justification="36"/>
andrewm@0 460 <ELLIPSE pos="332 337 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 461 <ELLIPSE pos="348 353 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 462 <TEXT pos="333 316 83 30" fill="solid: ffffffff" hasStroke="0" text="LATE/EARLY"
andrewm@0 463 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 464 justification="36"/>
andrewm@0 465 <ELLIPSE pos="332 78 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 466 <ELLIPSE pos="348 94 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 467 <TEXT pos="346 57 59 30" fill="solid: ffffffff" hasStroke="0" text="GAIN"
andrewm@0 468 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 469 justification="36"/>
andrewm@0 470 <ELLIPSE pos="190 204 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 471 <ELLIPSE pos="206 220 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 472 <TEXT pos="201 183 65 30" fill="solid: ffffffff" hasStroke="0" text="BANDWITH"
andrewm@0 473 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 474 justification="36"/>
andrewm@0 475 <ELLIPSE pos="190 337 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 476 <ELLIPSE pos="206 353 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 477 <TEXT pos="202 316 64 30" fill="solid: ffffffff" hasStroke="0" text="PREDELAY"
andrewm@0 478 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 479 justification="36"/>
andrewm@0 480 <ELLIPSE pos="190 78 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 481 <ELLIPSE pos="206 94 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 482 <TEXT pos="204 57 59 30" fill="solid: ffffffff" hasStroke="0" text="DAMP"
andrewm@0 483 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 484 justification="36"/>
andrewm@0 485 <ELLIPSE pos="48 204 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 486 <ELLIPSE pos="64 220 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 487 <TEXT pos="62 183 59 30" fill="solid: ffffffff" hasStroke="0" text="DECAY"
andrewm@0 488 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 489 justification="36"/>
andrewm@0 490 <ELLIPSE pos="48 337 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 491 <ELLIPSE pos="64 353 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 492 <TEXT pos="62 316 59 30" fill="solid: ffffffff" hasStroke="0" text="SIZE"
andrewm@0 493 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 494 justification="36"/>
andrewm@0 495 <ELLIPSE pos="48 78 88 88" fill="solid: ff315d9d" hasStroke="0"/>
andrewm@0 496 <ELLIPSE pos="64 94 56 56" fill="solid: ff2c333b" hasStroke="0"/>
andrewm@0 497 <TEXT pos="63 57 59 30" fill="solid: ffffffff" hasStroke="0" text="DENSITY"
andrewm@0 498 fontname="Default monospaced font" fontsize="15" bold="0" italic="0"
andrewm@0 499 justification="36"/>
andrewm@0 500 </BACKGROUND>
andrewm@0 501 <SLIDER name="new slider" id="b7cd5ae6d0a3bfc6" memberName="lateEarlySlider"
andrewm@0 502 virtualName="" explicitFocusOrder="0" pos="294 339 164 102" rotarysliderfill="7fffffff"
andrewm@0 503 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 504 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 505 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 506 textBoxHeight="20" skewFactor="1"/>
andrewm@0 507 <SLIDER name="new slider" id="8312c8e1102eca31" memberName="mixSlider"
andrewm@0 508 virtualName="" explicitFocusOrder="0" pos="294 207 164 102" rotarysliderfill="7fffffff"
andrewm@0 509 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 510 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 511 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 512 textBoxHeight="20" skewFactor="1"/>
andrewm@0 513 <SLIDER name="new slider" id="a0cf664fb4a85f44" memberName="gainSlider"
andrewm@0 514 virtualName="" explicitFocusOrder="0" pos="294 81 164 102" rotarysliderfill="7fffffff"
andrewm@0 515 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 516 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 517 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 518 textBoxHeight="20" skewFactor="1"/>
andrewm@0 519 <SLIDER name="new slider" id="55b568b536e67525" memberName="preDelaySlider"
andrewm@0 520 virtualName="" explicitFocusOrder="0" pos="152 340 164 102" rotarysliderfill="7fffffff"
andrewm@0 521 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 522 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 523 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 524 textBoxHeight="20" skewFactor="1"/>
andrewm@0 525 <SLIDER name="new slider" id="391314f65024cc7c" memberName="bandWidthSlider"
andrewm@0 526 virtualName="" explicitFocusOrder="0" pos="152 207 164 102" rotarysliderfill="7fffffff"
andrewm@0 527 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 528 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 529 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 530 textBoxHeight="20" skewFactor="1"/>
andrewm@0 531 <SLIDER name="new slider" id="8ec0d4dbfb348651" memberName="dampSlider"
andrewm@0 532 virtualName="" explicitFocusOrder="0" pos="152 80 164 102" rotarysliderfill="7fffffff"
andrewm@0 533 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 534 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 535 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 536 textBoxHeight="20" skewFactor="1"/>
andrewm@0 537 <SLIDER name="new slider" id="6120b55e7065ff03" memberName="sizeSlider"
andrewm@0 538 virtualName="" explicitFocusOrder="0" pos="11 340 164 102" rotarysliderfill="7fffffff"
andrewm@0 539 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 540 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 541 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 542 textBoxHeight="20" skewFactor="1"/>
andrewm@0 543 <SLIDER name="new slider" id="5aa10525b640e47e" memberName="decaySlider"
andrewm@0 544 virtualName="" explicitFocusOrder="0" pos="10 207 164 102" rotarysliderfill="7fffffff"
andrewm@0 545 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 546 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 547 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 548 textBoxHeight="20" skewFactor="1"/>
andrewm@0 549 <SLIDER name="new slider" id="4aebd74c8aeafbac" memberName="densitySlider"
andrewm@0 550 virtualName="" explicitFocusOrder="0" pos="10 81 164 102" rotarysliderfill="7fffffff"
andrewm@0 551 textboxtext="ffffffff" textboxbkgd="ffffff" textboxoutline="808080"
andrewm@0 552 min="0" max="1" int="0.010000000000000000208" style="RotaryHorizontalVerticalDrag"
andrewm@0 553 textBoxPos="TextBoxBelow" textBoxEditable="1" textBoxWidth="40"
andrewm@0 554 textBoxHeight="20" skewFactor="1"/>
andrewm@0 555 </JUCER_COMPONENT>
andrewm@0 556
andrewm@0 557 END_JUCER_METADATA
andrewm@0 558 */
andrewm@0 559 #endif
andrewm@0 560
andrewm@0 561
andrewm@0 562 //[EndFile] You can add extra defines here...
andrewm@0 563 //[/EndFile]