Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "TestProcessor.h"
- #include "vstguiex.h"
- #include "plugin-bindings\aeffguieditor.h"
- class GUI : public AEffGUIEditor, public CControlListener
- {
- public:
- GUI(Processor * effect)
- :
- AEffGUIEditor(effect), processor(effect),
- cutoff({0, 0, 80, 80}, this, effect->kCutoff, nullptr, nullptr),
- resonance({ 80, 0, 80, 80 }, this, effect->kResonance, nullptr, nullptr),
- curve({ 160, 0, 80, 80 }, this, /* any non-used value goes here */ 3, nullptr, nullptr)
- {
- // set size, etc.
- }
- void valueChanged(CControl * ctrl) override
- {
- // standard interface:
- if (ctrl == &cutoff)
- {
- processor->setParameterAutomated(processor->kCutoff, ctrl->getValue());
- }
- else if (ctrl == &resonance)
- {
- processor->setParameterAutomated(processor->kResonance, ctrl->getValue());
- }
- // a control the host doesn't know about!
- else if (ctrl == &curve)
- {
- processor->setCurve(ctrl->getValue());
- }
- }
- private:
- Processor * processor;
- CKnob cutoff, resonance, curve;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement