51#if defined(OSSIA_SCENARIO_DATAFLOW)
52 const std::shared_ptr<ossia::graph_node> node;
55 auto get_date()
const noexcept {
return m_date; }
56 auto get_offset()
const noexcept {
return m_offset; }
57 double get_internal_speed()
const noexcept {
return m_speed; }
59 double get_speed(
time_value date)
const noexcept;
62 void set_speed(
double g)
noexcept { m_speed = g; }
64 void set_parent_speed(
double sp)
noexcept { m_parentSpeed = sp; }
65 tick_transport_info current_transport_info()
const noexcept;
68 tick_current(
ossia::time_value offset,
const ossia::token_request& parent_request);
71 ossia::time_value,
const ossia::token_request& parent_request,
double ratio = 1.0);
74 const ossia::token_request& parent_request);
75 void tick_offset_speed_precomputed(
77 const ossia::token_request& parent_request);
97 static std::shared_ptr<time_interval> create(
110 void start_and_tick();
140 const time_value& get_nominal_duration()
const;
177 void add_time_process(std::shared_ptr<time_process>);
185 void reserve_processes(std::size_t sz);
194 bool running() const noexcept {
return m_running; }
198#if defined(OSSIA_SCENARIO_DATAFLOW)
199 void set_tempo_curve(std::optional<tempo_curve> curve);
201 void set_time_signature_map(std::optional<time_signature_map> map);
202 void set_quarter_duration(
double tu);
204#if defined(OSSIA_EXECUTION_LOG)
211 time_interval(
const time_interval&) =
delete;
212 time_interval(time_interval&&) =
delete;
213 time_interval& operator=(
const time_interval&) =
delete;
214 time_interval& operator=(time_interval&&) =
delete;
224 signature(time_value date,
const ossia::token_request& parent_request)
const noexcept;
226 tempo(time_value date,
const ossia::token_request& parent_request)
const noexcept;
227 double tempo(time_value date)
const noexcept;
231 const ossia::token_request& parent_request);
233 std::vector<std::shared_ptr<time_process>> m_processes;
234 time_interval::exec_callback m_callback;
239 time_value m_nominal{};
244 time_value m_offset{};
246 time_value m_tick_offset{};
248 double m_current_tempo{};
250 time_signature_map m_timeSignature{};
251#if defined(OSSIA_SCENARIO_DATAFLOW)
252 tempo_curve m_tempoCurve{};
255 ossia::quarter_note m_musical_start_last_signature{};
257 ossia::quarter_note m_musical_start_last_bar{};
258 ossia::quarter_note m_musical_start_position{};
260 ossia::quarter_note m_musical_end_last_bar{};
261 ossia::quarter_note m_musical_end_position{};
264 double m_globalSpeed{1.};
265 double m_parentSpeed{1.};
266 time_signature m_current_signature{};
267 double m_quarter_duration{ossia::quarter_duration<double>};
268 bool m_running{
false};
269 bool m_hasTempo{
false};
270 bool m_hasSignature{
false};
const std::vector< std::shared_ptr< time_process > > & get_time_processes() const
get time processes attached to the time_interval
Definition time_interval.hpp:189
std::optional< smallfun::function< void(bool, ossia::time_value), 32 > > exec_callback
to get the interval execution back
Definition time_interval.hpp:84