feat(params): add parameters, macros, RAVE controls and resources

This commit is contained in:
2026-09-08 14:55:22 +02:00
parent a9abca9e15
commit 0a94208d0f
12 changed files with 1198 additions and 0 deletions
+40
View File
@@ -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