#pragma once #include #include "Params.h" namespace serum { // =========================================================================== // RAVE — one-shot "make it huge" control. Toggling on snapshots the current // values of the affected parameters and pushes unison, width, drive, OTT and // reverb to their boosted settings; toggling off restores the snapshot. // =========================================================================== class RaveController { public: void setEnabled (bool enabled, juce::AudioProcessorValueTreeState& apvts); bool isEnabled() const noexcept { return enabled; } void resetSnapshot(); private: bool enabled = false; std::vector> snapshot; void snapshotParam (const juce::String& id, juce::AudioProcessorValueTreeState& apvts); void setParam (const juce::String& id, float value, juce::AudioProcessorValueTreeState& apvts); }; } // namespace serum