OSSIA
Open Scenario System for Interactive Application
ossia::time_process Class Referenceabstract

The time_process class. More...

Inherited by ossia::looping_process< node_process_raw >, ossia::looping_process< node_chain_process >, ossia::looping_process< scenario >, ossia::looping_process< T >, and ossia::qt::qml_script_process.

Detailed Description

The time_process class.

#TimeProcess is the parent class used to describe temporal content.

Public Member Functions

virtual ~time_process ()
 destructor
 
void offset (ossia::time_value date)
 get a #StateElement from the process on its parent #time_interval offset More...
 
void transport (ossia::time_value date)
 
virtual void state (const ossia::token_request &)=0
 get a #StateElement from the process depending on its parent #time_interval date More...
 
virtual void start ()
 start More...
 
virtual void stop ()
 stop More...
 
virtual void pause ()
 stop More...
 
virtual void resume ()
 resume More...
 
void mute (bool m)
 mute Mutes or unmute the process. More...
 
bool unmuted () const
 True if the process is not currently muted.
 
void enable (bool m)
 Enables or disable the process. More...
 
bool enabled () const
 True if the process is enabled.
 
void set_loops (bool b)
 Enables looping of the process after every loop_duration.
 
void set_start_offset (time_value v)
 Make the process's data be displaced of v units.
 
void set_loop_duration (time_value v)
 Set how long a single loop lasts. More...
 

Protected Member Functions

virtual void mute_impl (bool)
 Reimplement this to have a special behaviour on mute.
 
virtual void offset_impl (ossia::time_value date)=0
 
virtual void transport_impl (ossia::time_value date)=0
 

Protected Attributes

time_value m_loop_duration {}
 
time_value m_start_offset {}
 
bool m_loops = false
 
bool m_unmuted = true
 
bool m_enabled = true
 

Member Function Documentation

◆ offset()

void ossia::time_process::offset ( ossia::time_value  date)

get a #StateElement from the process on its parent #time_interval offset

don't call offset when the parent #time_interval is running

Parameters
dateoffset date
posoffset position (in [0;1] relative to parent nominal duration)

◆ state()

virtual void ossia::time_process::state ( const ossia::token_request &  )
pure virtual

get a #StateElement from the process depending on its parent #time_interval date

don't call state when the parent #time_interval is not running

◆ start()

void ossia::time_process::start ( )
virtual

start

Will be called when the parent time interval is started.

◆ stop()

void ossia::time_process::stop ( )
virtual

stop

Will be called when the parent time interval is stopped.

◆ pause()

void ossia::time_process::pause ( )
virtual

stop

Will be called when the parent time interval is paused.

◆ resume()

void ossia::time_process::resume ( )
virtual

resume

Will be called when the parent time interval is resumed.

◆ mute()

void ossia::time_process::mute ( bool  m)

mute Mutes or unmute the process.

mute(true) mutes the process. A muted process executes itself but does not send its state.

◆ enable()

void ossia::time_process::enable ( bool  m)

Enables or disable the process.

Unlike a muted process, a disabled process does not execute at all.

◆ set_loop_duration()

void ossia::time_process::set_loop_duration ( time_value  v)

Set how long a single loop lasts.

Only relevant if loops have been enabled.