16 Q_PROPERTY (
double tempo READ tempo WRITE setTempo NOTIFY tempoChanged)
25 static constexpr double DEFAULT_TEMPO = 120.0;
30 QObject * parent =
nullptr);
41 double tempo ()
const {
return tempo_; }
42 void setTempo (
double tempo);
43 Q_SIGNAL
void tempoChanged (
double tempo);
45 CurveType curve ()
const {
return curve_; }
46 void setCurve (CurveType curve);
47 Q_SIGNAL
void curveChanged (CurveType curve);
52 friend void init_from (
54 const TempoObject &other,
57 static constexpr auto kTempoKey =
"tempo"sv;
58 static constexpr auto kCurveTypeKey =
"curveType"sv;
59 friend void to_json (nlohmann::json &j,
const TempoObject &so);
60 friend void from_json (
const nlohmann::json &j, TempoObject &so);
63 double tempo_{ DEFAULT_TEMPO };
64 CurveType curve_{ CurveType::Constant };
66 BOOST_DESCRIBE_CLASS (TempoObject, (
ArrangerObject), (), (), (tempo_))
ArrangerObject(Type type, const dsp::TempoMapWrapper &tempo_map_wrapper, ArrangerObjectFeatures features, QObject *parent=nullptr) noexcept
Construct a new ArrangerObject.