feat(params): add parameters, macros, RAVE controls and resources
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <JuceHeader.h>
|
||||
#include "Params.h"
|
||||
|
||||
namespace serum
|
||||
{
|
||||
|
||||
// ===========================================================================
|
||||
// One assignable destination for a macro knob.
|
||||
// ===========================================================================
|
||||
struct MacroAssignment
|
||||
{
|
||||
ModTarget target = ModTarget::None;
|
||||
float depth = 0.0f;
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
// Four macros (Energy, Width, Drive, Atmosphere). Macro *values* are APVTS
|
||||
// parameters; this class stores the assignable destinations and serialises
|
||||
// them with the preset.
|
||||
// ===========================================================================
|
||||
class MacroControls
|
||||
{
|
||||
public:
|
||||
static constexpr int kMaxAssignments = 8;
|
||||
|
||||
std::array<std::vector<MacroAssignment>, kNumMacros> assignments;
|
||||
|
||||
bool addAssignment (int macro, ModTarget target, float depth);
|
||||
void removeAssignment (int macro, int index);
|
||||
void clear();
|
||||
|
||||
juce::ValueTree toValueTree() const;
|
||||
void fromValueTree (const juce::ValueTree& tree);
|
||||
|
||||
static juce::String macroName (int index);
|
||||
};
|
||||
|
||||
} // namespace serum
|
||||
Reference in New Issue
Block a user