18 Q_PROPERTY (
float value READ value WRITE setValue NOTIFY valueChanged)
24 AutomationPoint (
const dsp::TempoMap &tempo_map, QObject * parent =
nullptr);
25 Z_DISABLE_COPY_MOVE (AutomationPoint)
26 ~AutomationPoint ()
override;
32 float value ()
const {
return normalized_value_; }
33 void setValue (
float dval)
35 const auto val = dval;
36 if (qFuzzyCompare (normalized_value_, val))
39 normalized_value_ = val;
40 Q_EMIT valueChanged (dval);
42 Q_SIGNAL
void valueChanged (
float);
46 return curve_opts_adapter_.get ();
52 friend void init_from (
54 const AutomationPoint &other,
57 static constexpr auto kNormalizedValueKey =
"normalizedValue"sv;
58 static constexpr auto kCurveOptionsKey =
"curveOptions"sv;
59 friend void to_json (nlohmann::json &j,
const AutomationPoint &point);
60 friend void from_json (
const nlohmann::json &j, AutomationPoint &point);
64 float normalized_value_ = 0.f;
69 BOOST_DESCRIBE_CLASS (
74 (normalized_value_, curve_opts_))