2#include <ossia/detail/config.hpp>
4#include <ossia/dataflow/control_inlets.hpp>
5#include <ossia/dataflow/graph_node.hpp>
6#include <ossia/dataflow/node_process.hpp>
7#include <ossia/dataflow/port.hpp>
8#include <ossia/editor/automation/curve_value_visitor.hpp>
39class automation final :
public ossia::nonowning_graph_node
42 automation() { m_outlets.push_back(&value_out); }
46 [[nodiscard]] std::string label()
const noexcept override {
return "automation"; }
48 void set_behavior(
const ossia::behavior& b) { m_drive = b; }
50 void reset_drive() { m_drive.reset(); }
53 void run(
const ossia::token_request& t, ossia::exec_state_facade e)
noexcept override
57 const auto [tick_start, d] = e.timings(t);
59 ossia::value_port& vp = *value_out;
62 ossia::detail::compute_value_visitor{t.position(), ossia::val_type::FLOAT},
67 ossia::behavior m_drive;
68 ossia::value_outlet value_out;
71class float_automation final :
public ossia::nonowning_graph_node
74 float_automation() { m_outlets.push_back(&value_out); }
76 ~float_automation()
override =
default;
78 std::string label() const noexcept
override {
return "automation (float)"; }
82 void reset_drive() { m_drive.reset(); }
85 void run(
const ossia::token_request& t, ossia::exec_state_facade e)
noexcept override
87 const auto [tick_start, d] = e.timings(t);
89 ossia::value_port& vp = *value_out;
90 vp.write_value(m_drive.value_at(t.position()), tick_start);
94 ossia::minmax_float_outlet value_out;
97#if defined(OSSIA_SCENARIO_DATAFLOW)
98class automation_process final :
public ossia::node_process
101 using ossia::node_process::node_process;
102 void start()
override
The curve class.
Definition curve.hpp:59
The ossia::nodes::automation class.
Definition automation.hpp:40