16 Q_PROPERTY (
double tempo READ tempo WRITE setTempo NOTIFY tempoChanged)
25 static constexpr double DEFAULT_TEMPO = 120.0;
28 TempoObject (
const dsp::TempoMap &tempo_map, QObject * parent =
nullptr);
34 double tempo ()
const {
return tempo_; }
35 void setTempo (
double tempo);
36 Q_SIGNAL
void tempoChanged (
double tempo);
38 CurveType curve ()
const {
return curve_; }
39 void setCurve (CurveType curve);
40 Q_SIGNAL
void curveChanged (CurveType curve);
45 friend void init_from (
47 const TempoObject &other,
50 static constexpr auto kTempoKey =
"tempo"sv;
51 static constexpr auto kCurveTypeKey =
"curveType"sv;
52 friend void to_json (nlohmann::json &j,
const TempoObject &so);
53 friend void from_json (
const nlohmann::json &j, TempoObject &so);
56 double tempo_{ DEFAULT_TEMPO };
57 CurveType curve_{ CurveType::Constant };
59 BOOST_DESCRIBE_CLASS (TempoObject, (
ArrangerObject), (), (), (tempo_))