Loading...
Searching...
No Matches
InterpStateProcess.hpp
1#pragma once
2#include <State/Message.hpp>
3
4#include <Process/ProcessMetadata.hpp>
5
6#include <Curve/Process/CurveProcessModel.hpp>
7
8#include <score_plugin_scenario_export.h>
9namespace InterpState
10{
11class ProcessModel;
12}
13
14PROCESS_METADATA(
15 , InterpState::ProcessModel, "09fa6f72-55d5-4fee-8bc7-6f983c2e62d8", "InterpState",
16 "State interpolation", Process::ProcessCategory::Automation, "Automations",
17 "Interpolate between two states", "ossia score",
18 (QStringList{"Curve", "Automation"}), {},
19 {std::vector<Process::PortType>{Process::PortType::Message}},
21namespace InterpState
22{
23class SCORE_PLUGIN_SCENARIO_EXPORT ProcessModel final : public Curve::CurveProcessModel
24{
25 SCORE_SERIALIZE_FRIENDS
26 PROCESS_METADATA_IMPL(InterpState::ProcessModel)
27
28 W_OBJECT(ProcessModel)
29
30public:
31 ProcessModel(
32 const TimeVal& duration, const Id<Process::ProcessModel>& id, QObject* parent);
33
34 ~ProcessModel() override;
35
36 template <typename Impl>
37 ProcessModel(Impl& vis, QObject* parent)
38 : CurveProcessModel{vis, parent}
39 {
40 vis.writeTo(*this);
41 }
42
43 QString prettyName() const noexcept override;
44 QString prettyValue(double x, double y) const noexcept override;
45
46 State::MessageList startMessages() const;
47 State::MessageList endMessages() const;
48
49private:
51 void setDurationAndScale(const TimeVal& newDuration) noexcept override;
52 void setDurationAndGrow(const TimeVal& newDuration) noexcept override;
53 void setDurationAndShrink(const TimeVal& newDuration) noexcept override;
54};
55}
Definition CurveProcessModel.hpp:11
The id_base_t class.
Definition Identifier.hpp:57
@ SupportsTemporal
Can be loaded as a process of an interval.
Definition ProcessFlags.hpp:19
Utilities for OSSIA data structures.
Definition DeviceInterface.hpp:33
Definition TimeValue.hpp:21