| 1 |
/* |
| 2 |
* Dragonfly Reverb, a hall-style reverb plugin |
| 3 |
* Copyright (c) 2018 Michael Willis, Rob van den Berg |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU General Public License as |
| 7 |
* published by the Free Software Foundation; either version 3 of |
| 8 |
* the License, or any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* For a full copy of the GNU General Public License see the LICENSE file. |
| 16 |
*/ |
| 17 |
|
| 18 |
#ifndef DRAGONFLY_REVERB_UI_HPP_INCLUDED |
| 19 |
#define DRAGONFLY_REVERB_UI_HPP_INCLUDED |
| 20 |
|
| 21 |
#include "DistrhoUI.hpp" |
| 22 |
#include "ImageWidgets.hpp" |
| 23 |
#include "NanoVG.hpp" |
| 24 |
#include "DistrhoPlugin.hpp" |
| 25 |
#include "Spectrogram.hpp" |
| 26 |
#include "LabelledKnob.hpp" |
| 27 |
#include "AbstractUI.hpp" |
| 28 |
#include "Selection.hpp" |
| 29 |
|
| 30 |
START_NAMESPACE_DISTRHO |
| 31 |
|
| 32 |
// ----------------------------------------------------------------------- |
| 33 |
|
| 34 |
class DragonflyReverbUI : |
| 35 |
public DragonflyReverbAbstractUI, |
| 36 |
public ImageSlider::Callback, |
| 37 |
public Selection::Callback |
| 38 |
{ |
| 39 |
public: |
| 40 |
DragonflyReverbUI(); |
| 41 |
|
| 42 |
protected: |
| 43 |
// ------------------------------------------------------------------- |
| 44 |
// DSP Callbacks |
| 45 |
|
| 46 |
void parameterChanged ( uint32_t index, float value ) override; |
| 47 |
void stateChanged(const char* key, const char* value) override; |
| 48 |
|
| 49 |
void programLoaded (uint32_t index); |
| 50 |
|
| 51 |
// ------------------------------------------------------------------- |
| 52 |
// Widget Callbacks |
| 53 |
void imageKnobDragStarted ( ImageKnob* knob ) override; |
| 54 |
void imageKnobDragFinished ( ImageKnob* knob ) override; |
| 55 |
void imageKnobValueChanged ( ImageKnob* knob, float value ) override; |
| 56 |
void imageSliderDragStarted(ImageSlider* slider) override; |
| 57 |
void imageSliderDragFinished(ImageSlider* slider) override; |
| 58 |
void imageSliderValueChanged(ImageSlider* slider, float value) override; |
| 59 |
void selectionClicked(Selection* selection, int option) override; |
| 60 |
|
| 61 |
void onDisplay() override; |
| 62 |
void uiIdle() override; |
| 63 |
|
| 64 |
private: |
| 65 |
Image imgBackground,imgTabOff,imgTabOn; |
| 66 |
|
| 67 |
ScopedPointer<LabelledKnob> knobSize, knobWidth, knobPredelay, knobDecay, knobSpin, knobWander, knobDiffuse, knobModulation, knobLowCut, knobLowXover, knobLowMult, knobHighCut, knobHighXover, knobHighMult; |
| 68 |
ScopedPointer<ImageSlider> sliderDryLevel, sliderEarlyLevel, sliderEarlySend, sliderLateLevel; |
| 69 |
ScopedPointer<Spectrogram> spectrogram; |
| 70 |
ScopedPointer<Image> spectrogramImage; |
| 71 |
|
| 72 |
ScopedPointer<Selection> bankSelection; |
| 73 |
ScopedPointer<Selection> presetSelection; |
| 74 |
|
| 75 |
int currentBank; |
| 76 |
int currentProgram[NUM_BANKS]; |
| 77 |
|
| 78 |
DGL::Rectangle<int> rectSliders[4]; |
| 79 |
DGL::Rectangle<int> rectDisplay; |
| 80 |
|
| 81 |
void updateBank(int newBank); |
| 82 |
void updatePresetDefaults(); |
| 83 |
|
| 84 |
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR ( DragonflyReverbUI ) |
| 85 |
}; |
| 86 |
|
| 87 |
// ----------------------------------------------------------------------- |
| 88 |
|
| 89 |
END_NAMESPACE_DISTRHO |
| 90 |
|
| 91 |
#endif // |