2 #include <State/Address.hpp>
3 #include <State/Message.hpp>
4 #include <State/Unit.hpp>
5 #include <State/Value.hpp>
7 #include <Process/ProcessMetadata.hpp>
8 #include <Process/State/MessageNode.hpp>
9 #include <Process/State/ProcessStateDataInterface.hpp>
11 #include <Curve/Process/CurveProcessModel.hpp>
14 #include <score/serialization/JSONVisitor.hpp>
16 #include <score_plugin_scenario_export.h>
19 namespace Interpolation
25 , Interpolation::ProcessModel,
"aa569e11-03a9-4023-92c2-b590e88fec90",
26 "Interpolation",
"Interpolation", Process::ProcessCategory::Automation,
27 "Automations",
"Interpolate between two states",
"ossia score",
28 (QStringList{
"Curve",
"Automation"}), {},
29 {std::vector<Process::PortType>{Process::PortType::Message}}, QUrl(
""),
30 Process::ProcessFlags::SupportsTemporal)
31 namespace Interpolation
35 W_OBJECT(ProcessState)
43 ProcessState(ProcessModel& process, Point watchedPoint, QObject* parent);
45 ProcessModel& process()
const;
52 ::State::MessageList
messages()
const override;
63 SCORE_SERIALIZE_FRIENDS
64 PROCESS_METADATA_IMPL(Interpolation::ProcessModel)
66 W_OBJECT(ProcessModel)
74 template <
typename Impl>
75 ProcessModel(Impl& vis, QObject* parent)
76 : CurveProcessModel{vis, parent}
77 , m_startState{new ProcessState{*this, ProcessState::Start, this}}
78 , m_endState{new ProcessState{*this, ProcessState::End, this}}
86 ossia::value start()
const;
87 ossia::value end()
const;
89 void setAddress(const ::State::AddressAccessor& arg);
91 void setStart(ossia::value arg);
92 void setEnd(ossia::value arg);
94 QString prettyName() const noexcept override;
95 QString prettyValue(
double x,
double y) const noexcept override;
97 bool tween()
const {
return m_tween; }
98 void setTween(
bool tween)
108 void addressChanged(const ::State::AddressAccessor& arg_1)
109 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, addressChanged, arg_1)
110 void startChanged(
const ossia::value& arg_1)
111 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, startChanged, arg_1)
112 void endChanged(
const ossia::value& arg_1)
113 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, endChanged, arg_1)
114 void tweenChanged(
bool tween)
115 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, tweenChanged, tween)
119 void setDurationAndScale(
const TimeVal& newDuration) noexcept
override;
120 void setDurationAndGrow(
const TimeVal& newDuration) noexcept
override;
121 void setDurationAndShrink(
const TimeVal& newDuration) noexcept
override;
125 ProcessState* endStateData() const noexcept override;
127 ::
State::AddressAccessor m_address;
128 State::Unit m_sourceUnit;
130 ossia::value m_start{};
131 ossia::value m_end{};
133 ProcessState* m_startState{};
134 ProcessState* m_endState{};
135 bool m_tween =
false;
137 W_PROPERTY(
bool, tween READ tween WRITE setTween NOTIFY tweenChanged)
139 W_PROPERTY(ossia::value, end READ end WRITE setEnd NOTIFY endChanged)
141 W_PROPERTY(ossia::value, start READ start WRITE setStart NOTIFY startChanged)
145 address READ address WRITE setAddress NOTIFY addressChanged)
Definition: CurveProcessModel.hpp:11
virtual ProcessStateDataInterface * startStateData() const noexcept
States. The process has ownership.
Definition: score-lib-process/Process/Process.cpp:164
Definition: ProcessStateDataInterface.hpp:24
virtual State::MessageList messages() const
messages The current messages in this point of the process.
Definition: ProcessStateDataInterface.hpp:42
virtual std::vector< State::AddressAccessor > matchingAddresses()
matchingAddresses The addresses that correspond to this state.
Definition: ProcessStateDataInterface.hpp:37
virtual State::MessageList setMessages(const State::MessageList &newMessages, const Process::MessageNode ¤tState)
setMessages Request a message change on behalf of the process.
Definition: ProcessStateDataInterface.hpp:50
The id_base_t class.
Definition: Identifier.hpp:57
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33
Definition: Address.hpp:108
The Message struct.
Definition: Message.hpp:15
Definition: TimeValue.hpp:21