#pragma once #include #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, 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