50 void begin(std::initializer_list<ParamID> ids) {
56 values_[count_] = store_->get_value(
id);
57 store_->begin_gesture(
id);
69 for (std::size_t i = 0; i < count_; ++i) {
72 store_->set_value(
id, value);
84 for (std::size_t i = 0; i < count_; ++i)
85 if (ids_[i] ==
id)
return values_[i];
90 bool active()
const {
return active_; }
96 for (std::size_t i = 0; i < count_; ++i)
97 store_->end_gesture(ids_[i]);
104 std::array<ParamID, kMaxParams> ids_{};
105 std::array<float, kMaxParams> values_{};
106 std::size_t count_ = 0;
107 bool active_ =
false;
void set(ParamID id, float value)
Write a raw value to a parameter inside the gesture and update the in-flight cache.
Definition parameter_edit.hpp:68
ParameterEdit(StateStore &store)
Definition parameter_edit.hpp:37
void begin(ParamID id)
Convenience single-parameter begin.
Definition parameter_edit.hpp:64
void finish()
End the gesture (closing each parameter's host gesture).
Definition parameter_edit.hpp:94
bool active() const
Definition parameter_edit.hpp:90
float display_value(ParamID id, float fallback) const
The value the UI should display for id: the in-flight cache while a gesture is active,...
Definition parameter_edit.hpp:82
void begin(std::initializer_list< ParamID > ids)
Begin a gesture over ids.
Definition parameter_edit.hpp:50
ParameterEdit & operator=(const ParameterEdit &)=delete
~ParameterEdit()
End any in-flight gesture so a gesture is never left open if the view is destroyed mid-drag.
Definition parameter_edit.hpp:44
ParameterEdit(const ParameterEdit &)=delete
static constexpr std::size_t kMaxParams
Maximum number of parameters a single gesture can drive.
Definition parameter_edit.hpp:35
Centralized parameter storage with lock-free value access.
Definition store.hpp:164
SequencerStateChannel is the audio-safe transport for a plugin's structured NON-parameter state: the ...
Definition audio_device_manager.hpp:48
uint32_t ParamID
Unique parameter identifier, stable across plugin versions.
Definition parameter.hpp:55