30 lines
970 B
C++
30 lines
970 B
C++
#pragma once
|
|
|
|
#include <JuceHeader.h>
|
|
#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<std::pair<juce::String, float>> snapshot;
|
|
|
|
void snapshotParam (const juce::String& id, juce::AudioProcessorValueTreeState& apvts);
|
|
void setParam (const juce::String& id, float value, juce::AudioProcessorValueTreeState& apvts);
|
|
};
|
|
|
|
} // namespace serum
|