OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
node_chain_process.hpp
1#pragma once
2#include <ossia/dataflow/graph_node.hpp>
4
5namespace ossia
6{
7
8struct node_chain_process final : public looping_process<node_chain_process>
9{
10 node_chain_process() = default;
11
12 void state_impl(const ossia::token_request& req)
13 {
14 for(auto& node : nodes)
15 {
16 node->request(req);
17 }
18 }
19
20 void add_node(int64_t idx, std::shared_ptr<ossia::graph_node> n)
21 {
22 // n->set_prev_date(this->m_lastDate);
23 nodes.insert(nodes.begin() + idx, std::move(n));
24 }
25
26 void stop() override
27 {
28 for(auto& node : nodes)
29 {
30 node->all_notes_off();
31 }
32 }
33
34 void offset_impl(time_value date) override
35 {
36 for(auto& node : nodes)
37 {
38 node->all_notes_off();
39 }
40 }
41
42 void transport_impl(ossia::time_value date) override
43 {
44 for(auto& node : nodes)
45 {
46 node->all_notes_off();
47 }
48 }
49
50 void mute_impl(bool b) override
51 {
52 for(auto& node : nodes)
53 node->set_mute(b);
54 }
55 std::vector<std::shared_ptr<ossia::graph_node>> nodes;
56};
57}
Definition git_info.h:7
The time_value class.
Definition ossia/editor/scenario/time_value.hpp:30