2 #include <Process/Dataflow/TimeSignature.hpp>
3 #include <Process/Instantiations.hpp>
4 #include <Process/Process.hpp>
5 #include <Process/TimeValue.hpp>
7 #include <Scenario/Document/Interval/ExecutionState.hpp>
8 #include <Scenario/Document/Interval/IntervalDurations.hpp>
9 #include <Scenario/Document/Interval/Slot.hpp>
10 #include <Scenario/Document/Interval/TimeSignatureMap.hpp>
11 #include <Scenario/Document/Metatypes.hpp>
12 #include <Scenario/Document/ModelConsistency.hpp>
14 #include <score/model/Component.hpp>
15 #include <score/model/EntityImpl.hpp>
16 #include <score/model/EntityMap.hpp>
17 #include <score/model/IdentifiedObject.hpp>
18 #include <score/model/Identifier.hpp>
19 #include <score/selection/Selectable.hpp>
20 #include <score/serialization/MapSerialization.hpp>
21 #include <score/tools/Metadata.hpp>
22 #include <score/tools/std/Optional.hpp>
27 #include <nano_signal_slot.hpp>
49 ,
public Nano::Observer
53 SCORE_SERIALIZE_FRIENDS
58 std::unique_ptr<Process::AudioInlet> inlet;
59 std::unique_ptr<Process::AudioOutlet> outlet;
66 IntervalDurations duration{*
this};
95 void setStartDate(
const TimeVal& start);
96 void translate(
const TimeVal& deltaTime);
98 double heightPercentage()
const;
100 void startExecution();
101 void stopExecution();
105 void setHeightPercentage(
double arg);
106 void setExecutionState(IntervalExecutionState);
108 IntervalExecutionState executionState()
const;
116 ViewMode viewMode() const noexcept;
117 void setViewMode(ViewMode v);
118 void viewModeChanged(ViewMode v)
119 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, viewModeChanged, v)
122 ZoomRatio zoom() const;
123 void setZoom(const ZoomRatio& zoom);
126 void setMidTime(const
TimeVal& value);
128 void setSmallViewVisible(
bool);
129 bool smallViewVisible() const;
131 const Rack& smallView() const noexcept {
return m_smallView; }
132 const FullRack& fullView() const noexcept {
return m_fullView; }
134 void clearSmallView();
135 void clearFullView();
136 void replaceSmallView(
const Rack& other);
137 void replaceFullView(
const FullRack& other);
140 void addSlot(Slot s);
141 void addSlot(Slot s,
int pos);
142 void removeSlot(
int pos);
148 void putLayerToFront(
int slot, std::nullopt_t);
150 void swapSlots(
int pos1,
int pos2, Slot::RackView fullview);
152 double getSlotHeight(
const SlotId& slot)
const;
153 void setSlotHeight(
const SlotId& slot,
double height);
154 double getHeight() const noexcept;
157 double getSlotHeightForProcess(const
Id<
Process::ProcessModel>& p) const;
159 const Slot* findSmallViewSlot(
int slot) const;
160 const Slot& getSmallViewSlot(
int slot) const;
161 Slot& getSmallViewSlot(
int slot);
163 const FullSlot* findFullViewSlot(
int slot) const;
164 const FullSlot& getFullViewSlot(
int slot) const;
165 FullSlot& getFullViewSlot(
int slot);
167 bool muted() const noexcept {
return m_muted; }
168 void setMuted(
bool m);
170 bool graphal() const noexcept {
return m_graphal; }
171 void setGraphal(
bool m);
173 bool executing() const noexcept {
return m_executing; }
174 void setExecuting(
bool m);
177 bool hasTimeSignature() const noexcept {
return m_hasSignature; }
178 void setHasTimeSignature(
bool b);
180 TimeVal contentDuration() const noexcept;
182 TempoProcess* tempoCurve() const noexcept;
184 void ancestorStartDateChanged();
185 void ancestorTempoChanged();
187 void addSignature(
TimeVal t, ossia::time_signature sig);
188 void removeSignature(
TimeVal t);
189 void setTimeSignatureMap(const TimeSignatureMap& map);
190 const TimeSignatureMap& timeSignatureMap() const noexcept;
192 ossia::musical_sync quantizationRate() const noexcept;
193 void setQuantizationRate(ossia::musical_sync b);
195 void setStartMarker(
TimeVal t);
196 TimeVal startMarker() const noexcept;
198 void hasTimeSignatureChanged(
bool arg_1)
199 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, hasTimeSignatureChanged, arg_1)
200 void timeSignaturesChanged(const TimeSignatureMap& arg_1)
201 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, timeSignaturesChanged, arg_1)
202 void quantizationRateChanged(ossia::musical_sync arg)
203 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, quantizationRateChanged, arg)
205 void requestHeightChange(
double y)
206 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, requestHeightChange, y)
207 void heightPercentageChanged(
double arg_1)
208 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, heightPercentageChanged, arg_1)
210 void dateChanged(const
TimeVal& arg_1)
211 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, dateChanged, arg_1)
212 void startMarkerChanged(const
TimeVal& arg_1)
213 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, startMarkerChanged, arg_1)
215 void focusChanged(
bool arg_1)
216 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, focusChanged, arg_1)
217 void executionStateChanged(
Scenario::IntervalExecutionState arg_1)
218 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, executionStateChanged, arg_1)
220 void executionEvent(
Scenario::IntervalExecutionEvent ev)
221 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, executionEvent, ev)
223 void smallViewVisibleChanged(
bool fv)
224 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, smallViewVisibleChanged, fv)
226 void rackChanged(
Scenario::Slot::RackView fv)
227 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, rackChanged, fv)
228 void slotAdded(
Scenario::SlotId arg_1)
229 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, slotAdded, arg_1)
230 void slotRemoved(
Scenario::SlotId arg_1)
231 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, slotRemoved, arg_1)
232 void slotResized(
Scenario::SlotId arg_1)
233 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, slotResized, arg_1)
234 void slotsSwapped(
int slot1,
int slot2, Slot::RackView fv)
235 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, slotsSwapped, slot1, slot2, fv)
236 void heightFinishedChanging()
237 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, heightFinishedChanging)
240 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, layerAdded, arg_1, arg_2)
242 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, layerRemoved, arg_1, arg_2)
243 void frontLayerChanged(
int arg_1, OptionalId<
Process::ProcessModel> arg_2)
244 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, frontLayerChanged, arg_1, arg_2)
246 void mutedChanged(
bool arg_1)
247 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, mutedChanged, arg_1)
248 void executingChanged(
bool arg_1)
249 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, executingChanged, arg_1)
251 void busChanged(
bool arg_1) E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, busChanged, arg_1)
253 void graphalChanged(
bool arg_1)
254 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, graphalChanged, arg_1)
256 PROPERTY(
bool, muted READ muted WRITE setMuted NOTIFY mutedChanged)
257 PROPERTY(
bool, graphal READ graphal WRITE setGraphal NOTIFY graphalChanged)
259 double, heightPercentage READ heightPercentage WRITE setHeightPercentage NOTIFY
260 heightPercentageChanged)
263 bool, timeSignature READ hasTimeSignature WRITE setHasTimeSignature NOTIFY
264 hasTimeSignatureChanged)
267 ossia::musical_sync, quantizationRate READ quantizationRate WRITE
268 setQuantizationRate NOTIFY quantizationRateChanged)
270 void on_addProcess(
Process::ProcessModel&);
271 void on_removingProcess(const
Process::ProcessModel&);
272 void initConnections();
276 const
score::DocumentContext& m_context;
281 TimeSignatureMap m_signatures;
283 Id<StateModel> m_startState;
284 Id<StateModel> m_endState;
289 double m_heightPercentage{0.5};
291 double m_nodalFullViewSlotHeight{100};
292 double m_quantRate{-1.0};
294 ZoomRatio m_zoom{-1};
296 IntervalExecutionState m_executionState : 2;
297 ViewMode m_viewMode : 1;
298 bool m_smallViewShown : 1;
300 bool m_executing : 1;
302 bool m_hasSignature : 1;
306 SCORE_PLUGIN_SCENARIO_EXPORT
308 SCORE_PLUGIN_SCENARIO_EXPORT
311 SCORE_PLUGIN_SCENARIO_EXPORT
315 SCORE_PLUGIN_SCENARIO_EXPORT
325 SCORE_PLUGIN_SCENARIO_EXPORT
326 IntervalModel* closestParentInterval(
const QObject*) noexcept;
328 SCORE_PLUGIN_SCENARIO_EXPORT
330 SCORE_PLUGIN_SCENARIO_EXPORT
332 SCORE_PLUGIN_SCENARIO_EXPORT
335 SCORE_PLUGIN_SCENARIO_EXPORT
341 Q_DECLARE_METATYPE(
Scenario::IntervalModel::ViewMode)
342 W_REGISTER_ARGTYPE(
Scenario::IntervalModel::ViewMode)
343 Q_DECLARE_METATYPE(QPointer<
Scenario::IntervalModel>)
344 W_REGISTER_ARGTYPE(QPointer<
Scenario::IntervalModel>)
348 Q_DECLARE_METATYPE(
Scenario::IntervalModel*)
349 W_REGISTER_ARGTYPE(
Scenario::IntervalModel*)
350 Q_DECLARE_METATYPE(const
Scenario::IntervalModel*)
351 W_REGISTER_ARGTYPE(const
Scenario::IntervalModel*)
Definition: QmlObjects.hpp:406
Definition: QmlObjects.hpp:433
Definition: VisitorInterface.hpp:53
Definition: DataStreamVisitor.hpp:202
Definition: VisitorInterface.hpp:61
Definition: JSONVisitor.hpp:423
Metadata to get the name that will be shown in the user interface.
Definition: lib/score/tools/Metadata.hpp:42
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: IntervalModel.hpp:50
score::EntityMap< Process::ProcessModel, true > processes
Definition: IntervalModel.hpp:62
Definition: ModelConsistency.hpp:11
The Selectable class.
Definition: Selectable.hpp:14
The id_base_t class.
Definition: Identifier.hpp:57
Base for complex model objects.
Definition: EntityBase.hpp:24
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: dataStructures.hpp:40
Definition: IntervalModel.hpp:319
Definition: TimeValue.hpp:21
Definition: DocumentContext.hpp:18