OSSIA
Open Scenario System for Interactive Application
ossia Namespace Reference

Detailed Description

This file is based on the public domain MurmurHash3 algorithm https://github.com/PeterScott/murmur3/blob/master/murmur3.c

Namespaces

 detail
 

Classes

struct  context
 If using the library, you should create this class at some point. More...
 
struct  recabler
 
class  callback_container
 The callback_container class. More...
 
struct  pair
 A most simple pair type, to reduce binary bloat. More...
 
class  enum_map
 A container useful for mapping contiguous enums to strings without using too much memory. More...
 
class  locked_container
 Thread-safe read-only reference to a container. More...
 
class  curve_abstract
 The curve_abstract class. More...
 
struct  execution_error
 The execution_error class. More...
 
struct  invalid_access_error
 The invalid_access_error struct. More...
 
class  time_event
 The time_event class. More...
 
class  time_interval
 The time_interval class. More...
 
class  time_process
 The time_process class. More...
 
class  time_sync
 #time_sync is use to describe temporal structure to synchronize each attached #time_event evaluation. More...
 
struct  time_value
 The time_value class. More...
 
class  flat_set_state
 The flat_state class. More...
 
struct  message
 The message struct. More...
 
class  state
 The state class. More...
 
struct  websocket_log_sink
 A sink to use with spdlog, that will send its log messages over websockets. More...
 
struct  websocket_heartbeat
 Sends websocket "alive" messages at regular intervals. More...
 
struct  unit_t
 
struct  merger_impl
 Merge ///. More...
 
struct  value_with_unit
 
struct  list_clamp
 
struct  generic_clamp
 
struct  domain_value_set_creation_visitor
 The domain_value_set_creation_visitor struct. More...
 
struct  domain
 domain A domain of values More...
 
struct  parse_error
 The parse_error class. More...
 
struct  connection_error
 The connection_error class. More...
 
struct  invalid_node_error
 The invalid_node_error class. More...
 
struct  node_not_found_error
 Used when a requested node could not be found. More...
 
struct  bad_request_error
 Used when a bad network request is done on a local server. More...
 
struct  invalid_value_type_error
 The invalid_value_type_error class. More...
 
class  value
 The value class. More...
 

Typedefs

using audio_mapping = ossia::int_vector
 
using fft_plan = void *
 
using fft_real = double
 
using fft_complex = double[2]
 
using pan_weight = ossia::small_vector< double, 2 >
 
using destination_t = ossia::nullable_variant< ossia::net::parameter_base *, ossia::traversal::path, ossia::net::node_base * >
 
using node_ptr = std::shared_ptr< graph_node >
 
using edge_ptr = std::shared_ptr< graph_edge >
 
using inlet_ptr = inlet *
 
using outlet_ptr = outlet *
 
using delay_line_type = ossia::nullable_variant< audio_delay_line, midi_delay_line, value_delay_line, geometry_delay_line >
 
using mesh_list_ptr = std::shared_ptr< mesh_list >
 
using boost_pool = boost::pool< boost::default_user_allocator_malloc_free >
 
using task_function = smallfun::function< void(ossia::graph_node &), sizeof(void *) *4 >
 
using custom_parallel_tc_graph = graph_static< custom_parallel_update< tc_update< fast_tc > >, custom_parallel_exec >
 
using tc_graph = graph_static< tc_update< fast_tc >, static_exec >
 
using bfs_graph = graph_static< bfs_update, static_exec >
 
using logged_tc_graph = graph_static< tc_update< fast_tc >, static_exec_logger >
 
using graph_t = boost::adjacency_list< boost::smallvecS, boost::smallvecS, boost::directedS, node_ptr, std::shared_ptr< graph_edge > >
 
using graph_vertex_t = graph_t::vertex_descriptor
 
using graph_edge_t = graph_t::edge_descriptor
 
template<typename T , typename V >
using dense_shared_ptr_map = ankerl::unordered_dense::map< std::shared_ptr< T >, V, egur_hash, pointer_equal, std::vector< std::pair< std::shared_ptr< T >, V > > >
 
using node_map = ossia::dense_shared_ptr_map< ossia::graph_node, graph_vertex_t >
 
using edge_map = ossia::dense_shared_ptr_map< ossia::graph_edge, graph_edge_t >
 
using node_flat_set = ossia::flat_set< graph_node * >
 
using token_request_vec = ossia::small_vector< token_request, 4 >
 
using simple_token_request_vec = ossia::small_vector< simple_token_request, 4 >
 
using inlets = ossia::small_vector< inlet_ptr, 2 >
 
using outlets = ossia::small_vector< outlet_ptr, 2 >
 
using audio_channel = ossia::pod_vector< double >
 
using audio_vector = ossia::small_vector< audio_channel, 2 >
 
using audio_sample = float
 
using audio_array = ossia::small_vector< ossia::pod_vector< audio_sample >, 2 >
 
template<typename T >
using audio_span = ossia::small_vector< tcb::span< const T >, 8 >
 
template<typename T >
using mutable_audio_span = ossia::small_vector< tcb::span< T >, 8 >
 
using audio_handle = std::shared_ptr< audio_data >
 
using repitch_stretcher = raw_stretcher
 
using rubberband_stretcher = raw_stretcher
 
using quarter_note = double
 
using transport_info_fun = smallfun::function< void(const tick_transport_info &)>
 
template<typename T >
using value_vector = ossia::small_vector< T, 4 >
 
template<typename Vector >
using iterator_t = typename std::remove_reference< Vector >::type::iterator
 
using any = std::any
 
using any_map = string_map< ossia::any >
 A container to store any kind of data indexed by a string.
 
using extended_attributes = any_map
 
template<typename Value >
using case_insensitive_string_map = ossia::hash_map< std::string, Value, case_insensitive_hash, case_insensitive_equal >
 
using destination_index = ossia::small_vector< int32_t, 2 >
 
template<typename K , typename V , typename Compare = std::less<void>, typename Alloc = std::allocator<std::pair<K, V>>>
using flat_map = boost::container::flat_map< K, V, Compare, Alloc >
 
template<typename K , typename V >
using flat_multimap = boost::container::flat_multimap< K, V >
 
template<typename K , typename Compare = std::less<void>>
using flat_multiset = boost::container::flat_multiset< K, Compare >
 
template<typename K , typename Comparator = std::less<K>>
using flat_set = boost::container::flat_set< K, Comparator >
 
template<typename K , typename H = ossia::hash<K>, typename E = ossia::equal_to<K>, typename A = std::allocator<K>>
using hash_set = ankerl::unordered_dense::set< K, H, E, A >
 
template<typename K , typename V , typename H = ossia::hash<K>, typename E = ossia::equal_to<K>, typename A = std::allocator<std::pair<K, V>>>
using hash_map = ankerl::unordered_dense::map< K, V, H, E, A >
 
template<typename K , typename V , typename H = ossia::hash<K>, typename E = ossia::equal_to<K>, typename A = void>
using hash_multimap = std::unordered_multimap< K, V, H, E >
 
using json_writer = rapidjson::Writer< rapidjson::StringBuffer, rapidjson::UTF8<>, rapidjson::UTF8<>, rapidjson::CrtAllocator, rapidjson::WriteFlag::kWriteNanAndInfFlag >
 
template<typename T , size_t MAX_BLOCK_SIZE = 512>
using spsc_queue = moodycamel::ReaderWriterQueue< T, MAX_BLOCK_SIZE >
 
template<typename T >
using mpmc_queue = moodycamel::ConcurrentQueue< T >
 
using logger_type = bruh_logger
 
using mutex_t = std::mutex
 
using shared_mutex_t = std::mutex
 
using lock_t = std::lock_guard< mutex_t >
 
using write_lock_t = std::lock_guard< mutex_t >
 
using read_lock_t = std::lock_guard< mutex_t >
 
using none_t = decltype(std::nullopt)
 
template<typename T >
using pod_vector = boost::container::vector< T, pod_allocator_avx2< T > >
 
using int_vector = pod_vector< int >
 
using float_vector = pod_vector< float >
 
using double_vector = pod_vector< double >
 
template<typename T >
using ptr_container = std::vector< std::shared_ptr< T >, std::allocator< std::shared_ptr< T > >>
 
template<typename T , std::size_t N>
using small_ptr_container = ossia::small_vector< std::shared_ptr< T >, N >
 
template<typename T >
using ptr_set = ossia::hash_set< T, egur_hash, pointer_equal >
 
template<typename T , typename V >
using ptr_map = ossia::hash_map< T, V, egur_hash, pointer_equal >
 
template<typename K , typename V , std::size_t N, typename Compare = std::less<void>>
using small_flat_map = boost::container::flat_map< K, V, Compare, ossia::small_vector< std::pair< K, V >, N > >
 
template<typename K , typename V , std::size_t N, typename Compare = std::less<void>>
using static_flat_map = boost::container::flat_map< K, V, Compare, ossia::static_vector< std::pair< K, V >, N > >
 
template<typename T , std::size_t N>
using small_vector = boost::container::small_vector< T, N >
 
template<typename T , std::size_t N>
using small_pod_vector = boost::container::small_vector< T, N, pod_allocator< T > >
 
template<typename T , std::size_t N>
using static_vector = boost::container::static_vector< T, N >
 
template<typename Value >
using string_map = ossia::hash_map< std::string, Value, string_hash, string_equal >
 
template<typename Value >
using string_view_map = ossia::hash_map< std::string_view, Value, string_hash, string_equal >
 
using string_view = std::string_view
 
using thread_specs = ossia::flat_map< thread_type, thread_spec >
 
template<typename T , typename Compare = std::less<void>>
using timed_vec = ossia::flat_map< int64_t, T, Compare >
 
template<typename T , std::size_t N, typename Compare = std::less<void>>
using small_timed_vec = ossia::small_flat_map< int64_t, T, N, Compare >
 
using monostate = ossia_variant_alias::monostate
 
template<typename... Args>
using variant = ossia_variant_alias::variant< Args... >
 
template<typename... Args>
using slow_variant = ossia_variant_alias::variant< Args... >
 
template<std::size_t N, typename T >
using variant_element = ossia_variant_alias::variant_alternative< N, T >
 
template<std::size_t N, typename T >
using variant_element_t = ossia_variant_alias::variant_alternative_t< N, T >
 
using curve_type = std::pair< ossia::curve_segment_type, ossia::curve_segment_type >
 
using curve_ptr = std::shared_ptr< ossia::curve_abstract >
 
using curve_segment = smallfun::function< Y(double, Y, Y), 24 >
 
using expression_ptr = std::unique_ptr< expressions::expression_base >
 
using expression = expressions::expression_base
 
using clock_type = std::chrono::steady_clock
 
using mark_start_discontinuous = mark_discontinuous<&graph_node::set_start_discontinuous >
 
using mark_end_discontinuous = mark_discontinuous<&graph_node::set_end_discontinuous >
 
using past_events_map = ossia::flat_multimap< time_value, time_event * >
 
using DateMap = ossia::ptr_map< time_sync *, ossia::time_value >
 
using EventPtr = std::shared_ptr< ossia::time_event >
 
using IntervalPtr = std::shared_ptr< ossia::time_interval >
 
using interval_set = ossia::flat_set< time_interval * >
 
using sync_set = ossia::flat_set< time_sync * >
 
using small_sync_vec = ossia::small_vector< time_sync *, 4 >
 
using small_event_vec = std::vector< time_event * >
 
using overtick_map = ossia::flat_map< time_sync *, overtick >
 
using scenario_graph_vertex = time_sync *
 
using scenario_graph_edge = time_interval *
 
using scenario_graph_t = boost::adjacency_list< boost::smallvecS, boost::smallvecS, boost::undirectedS, scenario_graph_vertex, scenario_graph_edge >
 
using time_signature_map = ossia::flat_map< ossia::time_value, time_signature >
 
using physical_time = int64_t
 
using state_element = ossia::nullable_variant< message, state, piecewise_message, piecewise_vec_message< 2 >, piecewise_vec_message< 3 >, piecewise_vec_message< 4 > >
 
template<std::size_t N>
using state_element_by_index = typename ossia::variant_element_t< N, ossia::state_element >
 
using bundle = tcb::span< bundle_element >
 
using value_callback = std::function< void(const value &)>
 
using extended_type = std::string
 How a low-level type should be interpreted.
 
using complex_type = ossia::nullable_variant< ossia::val_type, ossia::unit_t, ossia::extended_type >
 
template<typename T , typename U >
using enable_if_same_dataspace = std::enable_if_t< std::is_same< typename T::dataspace_type, typename U::dataspace_type >::value >
 
template<typename T , typename U >
using enable_if_different_dataspace = std::enable_if_t< !std::is_same< typename T::dataspace_type, typename U::dataspace_type >::value >
 
using degree = strong_value< degree_u >
 
using radian = strong_value< radian_u >
 
using argb = strong_value< argb_u >
 
using rgba = strong_value< rgba_u >
 
using rgba8 = strong_value< rgba8_u >
 
using rgb = strong_value< rgb_u >
 
using bgr = strong_value< bgr_u >
 
using argb8 = strong_value< argb8_u >
 
using hsv = strong_value< hsv_u >
 
using cmy8 = strong_value< cmy8_u >
 
using hsl = strong_value< hsl_u >
 
using cmyk8 = strong_value< cmyk8_u >
 
using xyz = strong_value< xyz_u >
 
using yxy = strong_value< yxy_u >
 
using hunter_lab = strong_value< hunter_lab_u >
 
using cie_lab = strong_value< cie_lab_u >
 
using cie_luv = strong_value< cie_luv_u >
 
using meter_u = distance_ratio< std::ratio< 1 > >
 
using kilometer_u = distance_ratio< std::kilo >
 
using decimeter_u = distance_ratio< std::deci >
 
using centimeter_u = distance_ratio< std::centi >
 
using millimeter_u = distance_ratio< std::milli >
 
using micrometer_u = distance_ratio< std::micro >
 
using nanometer_u = distance_ratio< std::nano >
 
using picometer_u = distance_ratio< std::pico >
 
using inch_u = distance_ratio< std::ratio< 254, 10000 > >
 
using foot_u = distance_ratio< std::ratio< 254 *12, 10000 > >
 
using mile_u = distance_ratio< std::ratio< 254 *12 *5280, 10000 > >
 
using meter = strong_value< meter_u >
 
using kilometer = strong_value< kilometer_u >
 
using decimeter = strong_value< decimeter_u >
 
using centimeter = strong_value< centimeter_u >
 
using millimeter = strong_value< millimeter_u >
 
using micrometer = strong_value< micrometer_u >
 
using nanometer = strong_value< nanometer_u >
 
using picometer = strong_value< picometer_u >
 
using inch = strong_value< inch_u >
 
using foot = strong_value< foot_u >
 
using mile = strong_value< mile_u >
 
using linear = strong_value< linear_u >
 
using midigain = strong_value< midigain_u >
 
using decibel = strong_value< decibel_u >
 
using decibel_raw = strong_value< decibel_raw_u >
 
using quaternion = strong_value< quaternion_u >
 
using euler = strong_value< euler_u >
 
using axis = strong_value< axis_u >
 
using cartesian_3d = strong_value< cartesian_3d_u >
 
using cartesian_2d = strong_value< cartesian_2d_u >
 
using spherical = strong_value< spherical_u >
 
using polar = strong_value< polar_u >
 
using aed = strong_value< aed_u >
 
using ad = strong_value< ad_u >
 
using opengl = strong_value< opengl_u >
 
using cylindrical = strong_value< cylindrical_u >
 
using azd = strong_value< azd_u >
 
using meter_per_second_u = speed_ratio< std::ratio< 1 > >
 
using miles_per_hour_u = speed_ratio< std::ratio< 254 *12 *5280, 3600 *10000 > >
 
using kilometer_per_hour_u = speed_ratio< std::ratio< 1000, 3600 > >
 
using knot_u = speed_ratio< std::ratio< 1852, 3600 > >
 
using foot_per_hour_u = speed_ratio< std::ratio< 254 *12, 3600 *10000 > >
 
using foot_per_second_u = speed_ratio< std::ratio< 254 *12, 10000 > >
 
using meter_per_second = strong_value< meter_per_second_u >
 
using miles_per_hour = strong_value< miles_per_hour_u >
 
using kilometer_per_hour = strong_value< kilometer_per_hour_u >
 
using knot = strong_value< knot_u >
 
using foot_per_second = strong_value< foot_per_second_u >
 
using foot_per_hour = strong_value< foot_per_hour_u >
 
using second = strong_value< second_u >
 
using bark = strong_value< bark_u >
 
using bpm = strong_value< bpm_u >
 
using cent = strong_value< cent_u >
 
using frequency = strong_value< frequency_u >
 
using mel = strong_value< mel_u >
 
using midi_pitch = strong_value< midi_pitch_u >
 
using millisecond = strong_value< millisecond_u >
 
using playback_speed = strong_value< playback_speed_u >
 
using unit_parse_symbols_t = boost::spirit::qi::symbols< char, ossia::destination_qualifiers >
 
using angle_u_list = boost::mp11::mp_list< degree_u, radian_u >
 
using color_u_list = boost::mp11::mp_list< argb_u, rgba_u, rgb_u, bgr_u, argb8_u, rgba8_u, hsv_u, cmy8_u, xyz_u >
 
using distance_u_list = boost::mp11::mp_list< meter_u, kilometer_u, decimeter_u, centimeter_u, millimeter_u, micrometer_u, nanometer_u, picometer_u, inch_u, foot_u, mile_u >
 
using gain_u_list = boost::mp11::mp_list< linear_u, midigain_u, decibel_u, decibel_raw_u >
 
using orientation_u_list = boost::mp11::mp_list< quaternion_u, euler_u, axis_u >
 
using position_u_list = boost::mp11::mp_list< cartesian_3d_u, cartesian_2d_u, spherical_u, polar_u, aed_u, ad_u, opengl_u, cylindrical_u, azd_u >
 
using speed_u_list = boost::mp11::mp_list< meter_per_second_u, miles_per_hour_u, kilometer_per_hour_u, knot_u, foot_per_second_u, foot_per_hour_u >
 
using timing_u_list = boost::mp11::mp_list< second_u, bark_u, bpm_u, cent_u, frequency_u, mel_u, midi_pitch_u, millisecond_u, playback_speed_u >
 
using dataspace_variant_u_list = boost::mp11::mp_list< distance_u, position_u, speed_u, orientation_u, angle_u, color_u, gain_u, timing_u >
 
using dataspace_u_list = boost::mp11::mp_list< distance_u_list, position_u_list, speed_u_list, orientation_u_list, angle_u_list, color_u_list, gain_u_list, timing_u_list >
 
using angle_list = boost::mp11::mp_list< degree, radian >
 
using color_list = boost::mp11::mp_list< argb, rgba, rgb, bgr, argb8, rgba8, hsv, cmy8, xyz >
 
using distance_list = boost::mp11::mp_list< meter, kilometer, decimeter, centimeter, millimeter, micrometer, nanometer, picometer, inch, foot, mile >
 
using gain_list = boost::mp11::mp_list< linear, midigain, decibel, decibel_raw >
 
using orientation_list = boost::mp11::mp_list< quaternion, euler, axis >
 
using position_list = boost::mp11::mp_list< cartesian_3d, cartesian_2d, spherical, polar, aed, ad, opengl, cylindrical, azd >
 
using speed_list = boost::mp11::mp_list< meter_per_second, miles_per_hour, kilometer_per_hour, knot, foot_per_second, foot_per_hour >
 
using time_list = boost::mp11::mp_list< second, bark, bpm, cent, frequency, mel, midi_pitch, millisecond, playback_speed >
 
using dataspace_list = boost::mp11::mp_list< distance_list, position_list, speed_list, orientation_list, angle_list, color_list, gain_list, time_list >
 
using strong_value_variant_list = boost::mp11::mp_list< ossia::value, distance, position, speed, orientation, angle, color, gain, ossia::timing >
 
using value_map_element = std::pair< std::string, ossia::value >
 
using value_variant = value_variant_type
 
using vec2f = std::array< float, 2ul >
 
using vec3f = std::array< float, 3ul >
 
using vec4f = std::array< float, 4ul >
 
using musical_sync = double
 

Enumerations

enum  transport_mode { none , client , master }
 
enum  transport_status { stopped , starting , playing }
 
enum  audio_stretch_mode : int8_t {
  None , RubberBandStandard , RubberBandPercussive , Repitch ,
  RubberBandStandardHQ , RubberBandPercussiveHQ
}
 
enum class  node_ordering { topological , temporal , hierarchical }
 
enum  data_mix_method : int8_t { mix_append , mix_replace , mix_merge }
 
enum class  thread_type : unsigned char {
  Net = 'N' , Midi = 'M' , Gpu = 'G' , GpuTask = 'g' ,
  Audio = 'A' , AudioTask = 'a' , Ui = 'U' , UiTask = 'u'
}
 
enum class  curve_segment_type {
  INT , FLOAT , DOUBLE , BOOL ,
  INT64 , ANY
}
 The curve_segment_type enum. More...
 
enum  progress_mode { PROGRESS_MIN , PROGRESS_MAX }
 
enum class  sync_status { NOT_READY , RETRY , DONE }
 
enum class  val_type : int8_t {
  FLOAT , INT , VEC2F , VEC3F ,
  VEC4F , IMPULSE , BOOL , STRING ,
  LIST , MAP , NONE = std::numeric_limits<int8_t>::max()
}
 Enum to represent the types that a value can take. More...
 
enum class  parameter_type : int8_t {
  MESSAGE , AUDIO , MIDI , TEXTURE ,
  GEOMETRY
}
 Possible types of parameters / ports.
 
enum class  access_mode : int8_t { BI , GET , SET }
 Address behaviors at crossing domain boundaries time. More...
 
enum class  bounding_mode : int8_t {
  FREE , CLIP , WRAP , FOLD ,
  LOW , HIGH
}
 Address behaviors at crossing domain boundaries. More...
 
enum  repetition_filter : bool { OFF = false , ON = true }
 If enabled, sending twice the same value will only send it once by network.
 

Functions

OSSIA_EXPORT std::string get_commit_sha ()
 
OSSIA_EXPORT std::string get_commit_date ()
 
ossia::audio_engine * make_audio_engine (std::string proto, std::string name, std::string req_in, std::string req_out, int &inputs, int &outputs, int &rate, int &bs)
 
spdlog::logger & logger () noexcept
 Where the errors will be logged. Default is stderr. More...
 
std::shared_ptr< spdlog::logger > logger_ptr () noexcept
 
OSSIA_EXPORT void ensure_vector_sizes (const audio_vector &src_vec, audio_vector &sink_vec)
 
OSSIA_EXPORT void mix (const audio_vector &src_vec, audio_vector &sink_vec)
 
void process_control_value (ossia::value &v, const ossia::domain &source_domain, const ossia::domain &sink_domain) noexcept
 
void process_control_value (ossia::value &v, const ossia::complex_type &source_type, const ossia::complex_type &sink_type) noexcept
 
void process_control_value (ossia::value &v, const ossia::domain &source_domain, const ossia::domain &sink_domain, const ossia::complex_type &source_type, const ossia::complex_type &sink_type) noexcept
 
ossia::complex_type get_complex_type (const ossia::net::parameter_base &other)
 
template<typename Fun , typename NodeFun , typename DeviceList_T >
bool apply_to_destination (const destination_t &address, const DeviceList_T &devices, Fun f, NodeFun nf)
 
ossia::message to_state_element (ossia::net::parameter_base &p, ossia::typed_value &&v)
 
ossia::message to_state_element (ossia::net::parameter_base &p, const ossia::typed_value &v)
 
void to_state_element (ossia::net::parameter_base &p, const ossia::typed_value &v, std::vector< state_element > &out)
 
template<typename SampleFormat , int N>
constexpr SampleFormat float_to_sample (ossia::audio_sample sample) noexcept
 
template<>
constexpr uint8_t float_to_sample< uint8_t, 8 > (ossia::audio_sample sample) noexcept
 
template<>
constexpr int16_t float_to_sample< int16_t, 16 > (ossia::audio_sample sample) noexcept
 
template<>
constexpr int32_t float_to_sample< int32_t, 24 > (ossia::audio_sample sample) noexcept
 
template<>
constexpr int32_t float_to_sample< int32_t, 32 > (audio_sample x) noexcept
 
template<>
constexpr float float_to_sample< float, 32 > (float sample) noexcept
 
template<typename SampleFormat , int N, int ByteIncrement, typename InputFormat >
 requires (sizeof(SampleFormat)==ByteIncrement) inline void interleave(const InputFormat *const *OSSIA_RESTRICT in
 
template<typename Fin >
void for_each_inlet (const ossia::graph_node &node, Fin &&fin) noexcept
 
template<typename Fin >
bool any_of_inlet (const ossia::graph_node &node, Fin &&fin) noexcept
 
template<typename Fin >
bool all_of_inlet (const ossia::graph_node &node, Fin &&fin) noexcept
 
template<typename Fout >
void for_each_outlet (const ossia::graph_node &node, Fout &&fout) noexcept
 
template<typename Fout >
bool any_of_outlet (const ossia::graph_node &node, Fout &&fout) noexcept
 
template<typename Fout >
bool all_of_outlet (const ossia::graph_node &node, Fout &&fout) noexcept
 
const ossia::valuelast (const ossia::value_vector< ossia::timed_value > &vec)
 
std::shared_ptr< bench_map > bench_ptr ()
 
std::shared_ptr< ossia::graph_interface > make_graph_impl (const ossia::graph_setup_options &opt)
 
std::shared_ptr< ossia::graph_interface > make_graph_par_impl (const ossia::graph_setup_options &opt)
 
std::shared_ptr< ossia::graph_interface > make_graph (const ossia::graph_setup_options &opt)
 
smallfun::function< void(unsigned long, double), 128 > make_tick (const tick_setup_options &settings, ossia::execution_state &st, ossia::graph_interface &gb, ossia::time_interval &itv, ossia::scenario &root, ossia::transport_info_fun transport)
 
void remove_vertex (typename graph_t::vertex_descriptor v, graph_t &g)
 
template<typename VertexListGraph , typename OutputIterator >
void custom_topological_sort (VertexListGraph &g, OutputIterator result, std::vector< boost::default_color_type > &color_map, std::vector< boost::detail::DFSVertexInfo< VertexListGraph >> &stack)
 
template<typename T >
auto apply_con (const T &visitor, ossia::connection &con)
 
template<typename T >
auto apply_con (const T &visitor, const ossia::connection &con)
 
template<typename Graph_T , typename IO >
void print_graph (Graph_T &g, IO &stream)
 
template<typename T >
void resize_and_fill (T &vec, const std::size_t N)
 
template<typename T >
void resize_and_fill (std::vector< std::vector< T >> &vec, const std::size_t N)
 
template<typename T >
void resize_and_fill (std::vector< std::vector< T >> &vec, const std::size_t N, const std::size_t init_num, T init_val)
 
template<typename Graph , typename GraphTC , typename G_to_TC_VertexMap , typename VertexIndexMap >
void transitive_closure (const Graph &g, GraphTC &tc, G_to_TC_VertexMap g_to_tc_map, VertexIndexMap index_map, TransitiveClosureState< Graph, GraphTC > &state)
 
template<typename Graph , typename GraphTC >
void transitive_closure (const Graph &g, GraphTC &tc, TransitiveClosureState< Graph, GraphTC > &tc_state)
 
auto make_strict_edge (graph_interface &g, int pout, int pin, ossia::node_ptr nout, ossia::node_ptr nin)
 
auto make_glutton_edge (graph_interface &g, int pout, int pin, ossia::node_ptr nout, ossia::node_ptr nin)
 
auto make_delayed_strict_edge (graph_interface &g, int pout, int pin, ossia::node_ptr nout, ossia::node_ptr nin)
 
auto make_delayed_glutton_edge (graph_interface &g, int pout, int pin, ossia::node_ptr nout, ossia::node_ptr nin)
 
bool operator== (const token_request_vec &lhs, const simple_token_request_vec &rhs)
 
bool operator!= (const token_request_vec &lhs, const simple_token_request_vec &rhs)
 
bool operator== (const simple_token_request_vec &lhs, const token_request_vec &rhs)
 
bool operator!= (const simple_token_request_vec &lhs, const token_request_vec &rhs)
 
template<typename T , typename... Args>
auto make_node (const execution_state &st, Args &&... args)
 
void process_audio_out_mono (ossia::audio_port &i, ossia::audio_outlet &audio_out)
 
void process_audio_out_general (ossia::audio_port &i, ossia::audio_outlet &audio_out)
 
void process_audio_out_mono (ossia::audio_outlet &audio_out)
 
void process_audio_out_general (ossia::audio_outlet &audio_out)
 
template<typename T , std::size_t N>
constexpr const T * begin (const ebo_array< T, N > &e)
 
template<typename T , std::size_t N>
constexpr const T * end (const ebo_array< T, N > &e)
 
template<typename T , std::size_t N>
constexpr T * begin (ebo_array< T, N > &e)
 
template<typename T , std::size_t N>
constexpr T * end (ebo_array< T, N > &e)
 
template<typename SampleFormat , int N>
constexpr audio_sample sample_to_float (SampleFormat i)
 
template<>
constexpr audio_sample sample_to_float< uint8_t, 8 > (uint8_t i)
 
template<>
constexpr audio_sample sample_to_float< int16_t, 16 > (int16_t i)
 
template<>
constexpr audio_sample sample_to_float< int32_t, 24 > (int32_t i)
 
template<>
constexpr audio_sample sample_to_float< int32_t, 32 > (int32_t i)
 
template<>
constexpr audio_sample sample_to_float< float, 32 > (float i)
 
template<>
constexpr audio_sample sample_to_float< double, 64 > (double i)
 
void read_u8 (ossia::mutable_audio_span< float > &ap, void *data, int64_t samples)
 
void read_s16 (ossia::mutable_audio_span< float > &ap, void *data, int64_t samples)
 
void read_s24 (ossia::mutable_audio_span< float > &ap, void *data, int64_t samples)
 
void read_s32 (ossia::mutable_audio_span< float > &ap, void *data, int64_t samples)
 
void read_f32 (ossia::mutable_audio_span< float > &ap, void *data, int64_t samples)
 
void read_f64 (ossia::mutable_audio_span< float > &ap, void *data, int64_t samples)
 
bool operator== (const token_request &lhs, const token_request &rhs)
 
bool operator!= (const token_request &lhs, const token_request &rhs)
 
template<typename Vector , typename Value >
auto find (Vector &&v, const Value &val) noexcept
 
template<typename Vector , typename Fun >
auto find_if (Vector &&v, Fun fun)
 
template<typename Vector , typename Value >
auto * ptr_find (Vector &&v, const Value &val) noexcept
 
template<typename Vector , typename Fun >
auto * ptr_find_if (Vector &&v, Fun fun)
 
template<typename Vector , typename Value >
bool contains (Vector &&v, const Value &val) noexcept
 
template<typename Vector , typename Value >
void remove_one (Vector &&v, const Value &val)
 
template<typename Vector , typename Function >
void remove_one_if (Vector &v, const Function &val)
 
template<typename Vector , typename Value >
void remove_erase (Vector &v, const Value &val)
 
template<typename Vector , typename Function >
void remove_erase_if (Vector &v, const Function &val)
 
template<typename Vector , typename Fun >
void erase_if (Vector &r, Fun f)
 
template<typename Vector , typename Fun >
bool any_of (Vector &&v, Fun fun) noexcept
 
template<typename Vector , typename Fun >
auto all_of (Vector &&v, Fun fun) noexcept
 
template<typename Vector , typename Fun >
bool none_of (Vector &&v, Fun fun) noexcept
 
template<typename Vector , typename Fun >
auto remove_if (Vector &&v, Fun fun)
 
template<typename Vector , typename Fun >
auto count_if (Vector &&v, Fun fun)
 
template<typename Vector , typename Fun >
auto max_element (Vector &&v, Fun fun)
 
template<typename Vector >
auto sort (Vector &&v)
 
template<typename Vector , typename T >
auto fill (Vector &&v, const T &val)
 
template<typename Vector >
auto unique (Vector &&v)
 
template<typename Vector , typename Fun >
auto sort (Vector &&v, Fun fun)
 
template<typename Vector , typename OutputIterator , typename Fun >
auto transform (Vector &&v, OutputIterator it, Fun f)
 
template<typename Array1 , typename Array2 >
auto equal (const Array1 &v, const Array2 &v2) noexcept
 
template<typename Vector1 , typename Vector2 >
void copy (const Vector1 &source, Vector2 &destination)
 
template<typename Vector1 , typename Vector2 , typename Pred >
void copy_if (const Vector1 &source, Vector2 &destination, Pred predicate)
 
template<typename T , typename K >
auto last_before (T &&container, const K &k)
 
template<typename T , typename K >
auto find_key (T &&vec, const K &key) noexcept
 
template<class F , std::size_t... Is>
void for_each_in_range (F &&func, std::index_sequence< Is... >)
 
template<std::size_t N, typename F >
void for_each_in_range (F &&func)
 
template<class T , std::size_t N>
constexpr std::array< std::remove_cv_t< T >, N > to_array (T(&a)[N]) noexcept
 
template<typename... Args>
constexpr std::array< const char *, sizeof...(Args)> make_array (Args &&... args) noexcept
 
template<typename T >
void remove_duplicates (T &vec)
 
template<typename T , typename Comp >
void remove_duplicates (T &vec, Comp comparator)
 
template<typename Container , typename K , typename Comp , typename... Args>
auto emplace_sorted (Container &vec, const K &k, Comp &&comp, Args &&... args) -> decltype(auto)
 
template<typename D , template< typename, typename > typename S, typename T , typename Alloc >
auto insert_at_end (D &dest, S< T, Alloc > &&src)
 
template<typename T >
void change_item_position (T &v, size_t oldIndex, size_t newIndex)
 
template<typename Container , typename Item >
int index_in_container (Container &vec, Item i) noexcept
 
bool has_attribute (const any_map &e, std::string_view str) noexcept
 Checks if an attribute is present.
 
void set_attribute (any_map &e, std::string_view str)
 Sets a bool-like attribute. It should be checked for with has_attribute.
 
void set_attribute (any_map &e, std::string_view str, std::nullopt_t)
 Removes an attribute in an any_map.
 
void unset_attribute (any_map &e, std::string_view str)
 Remove an attribute.
 
template<typename T >
auto get_attribute (const any_map &e, std::string_view name)
 get_attribute Get an attribute of an any_map. More...
 
template<typename T >
std::optional< T > get_optional_attribute (const any_map &e, std::string_view name)
 get_optional_attribute Maybe get an attribute of an any_map. More...
 
template<typename T >
void set_attribute (any_map &e, std::string_view str, const T &val)
 Sets an attribute in an any_map.
 
template<typename T >
void set_attribute (any_map &e, std::string_view str, T &&val)
 Sets an attribute in an any_map.
 
template<typename T >
void set_optional_attribute (any_map &e, std::string_view str, const std::optional< T > &opt)
 Sets an attribute if opt has a value, else remove the attribute.
 
template<typename T >
void set_optional_attribute (any_map &e, std::string_view str, std::optional< T > &&opt)
 
struct TS_CAPABILITY ("mutex") audio_spin_mutex
 
template<typename T , typename U >
const auto & closest_element (const T &vec, const U &val) noexcept
 
template<typename T , typename U >
auto closest_element_it (const T &vec, const U &val) noexcept
 
template<typename T , typename U >
auto closest_next_element (T it, T end, const U &val) noexcept
 
template<typename T , typename U >
requires requires (T it)
 
constexpr small_string to_lower (std::string_view arr)
 
template<template< typename... > typename T, typename... Args, typename F >
constexpr void for_each (T< Args... >, F f)
 
template<template< typename... > typename T, typename... Args, typename F >
constexpr void for_each_tagged (T< Args... >, F f)
 
template<typename... Args, typename F >
constexpr void for_each_type (F f)
 
template<template< typename... > typename T, typename... Args, typename F >
constexpr void for_each_type (T< Args... >, F f)
 
template<typename... Args, typename F >
constexpr void for_each_type_tagged (F f)
 
template<typename... Args, typename F >
constexpr void for_each_type_if (F &&f)
 
template<typename... Args, typename F >
constexpr void for_each_type_if_tagged (F &&f)
 
template<class Tuple , class F >
void for_each_in_tuple (Tuple &&tuple, F &&func)
 
template<class F , class T1 , std::size_t... I1s, class T2 >
void for_each_in_tuples_impl (T1 &&t1, T2 &&t2, F &&func, std::index_sequence< I1s... >)
 
template<class F , template< class... > class T1, class... T1s, template< class... > class T2, class... T2s>
void for_each_in_tuples (T1< T1s... > &&t1, T2< T2s... > &&t2, F &&func)
 
template<class F , template< class... > class T1, class... T1s, std::size_t... I1s, template< class... > class T2, class... T2s>
void for_each_in_tuples_ref_impl (T1< T1s... > &t1, T2< T2s... > &t2, F &&func, std::index_sequence< I1s... >)
 
template<class F , template< class... > class T1, class... T1s, template< class... > class T2, class... T2s>
void for_each_in_tuples_ref (T1< T1s... > &t1, T2< T2s... > &t2, F &&func)
 
template<template< class... > class T1, class... T1s, std::size_t... I1s, template< class... > class T2, class... T2s>
auto concat_tuples_impl (T1< T1s... > &t1, T2< T2s... > &t2, std::index_sequence< I1s... >)
 
template<template< class... > class T1, class... T1s, template< class... > class T2, class... T2s>
void concat_tuples (T1< T1s... > &t1, T2< T2s... > &t2)
 
template<class F , template< class... > class T1, class... T1s, std::size_t... I1s, typename U , std::size_t N>
void tuple_array_func_impl (T1< T1s... > &t1, std::array< U, N > &t2, F &&func, std::index_sequence< I1s... >)
 
template<class F , template< class... > class T1, class... T1s, typename U , std::size_t N>
void tuple_array_func (T1< T1s... > &&t1, std::array< U, N > &t2, F &&func)
 
template<typename T >
constexpr void hash_combine (std::size_t &seed, const T &k) noexcept
 
template<typename T >
constexpr void hash_combine (std::size_t &seed, const T *k) noexcept
 
constexpr void hash_combine (uint64_t &seed, uint8_t k) noexcept
 
constexpr void hash_combine (uint64_t &seed, int8_t k) noexcept
 
constexpr void hash_combine (uint64_t &seed, uint16_t k) noexcept
 
constexpr void hash_combine (uint64_t &seed, int16_t k) noexcept
 
constexpr void hash_combine (uint64_t &seed, uint32_t k) noexcept
 
constexpr void hash_combine (uint64_t &seed, int32_t k) noexcept
 
constexpr void hash_combine (uint64_t &seed, int64_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, uint8_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, int8_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, uint16_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, int16_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, int32_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, uint64_t k) noexcept
 
constexpr void hash_combine (uint32_t &seed, int64_t k) noexcept
 
constexpr void hash_combine (uint32_t &h1, uint32_t k1) noexcept
 
constexpr void hash_combine (uint64_t &h, uint64_t k) noexcept
 
template<typename T >
ipow (T x, int N) noexcept
 
template<typename T >
auto norm (T x, T y) noexcept
 
template<typename T >
auto norm (T x, T y, T z) noexcept
 
constexpr size_t constexpr_log2 (size_t n) noexcept
 
template<typename T >
constexpr size_t constexpr_abs (T n) noexcept
 
template<typename T >
constexpr int64_t constexpr_floor (T val) noexcept
 
template<typename T >
constexpr int64_t constexpr_ceil (T f)
 
template<class T , class U >
constexpr OSSIA_INLINE auto max (const T a, const U b) noexcept -> typename std::conditional<(sizeof(T) > sizeof(U)), T, U >::type
 max function tailored for values
 
template<class T , class U >
constexpr OSSIA_INLINE auto min (const T a, const U b) noexcept -> typename std::conditional<(sizeof(T) > sizeof(U)), T, U >::type
 min function tailored for values
 
template<class T >
constexpr OSSIA_INLINE T clamp (T d, const T min, const T max) noexcept
 clamp Returns the value bounded by a min and a max
 
template<class T >
constexpr OSSIA_INLINE T wrap (const T val, const T low, const T high) noexcept
 
template<class T >
constexpr OSSIA_INLINE T fold (const T val, const T low, const T high) noexcept
 
template<class T >
constexpr OSSIA_INLINE std::pair< T, T > div (T num, T denom) noexcept
 
OSSIA_INLINE float log_to_normalized (float min, float range, float val) noexcept
 
OSSIA_INLINE float normalized_to_log (float min, float range, float val) noexcept
 
template<typename T , typename R >
constexpr OSSIA_INLINE bool valid_index (T idx, const R &range) noexcept
 
template<template< typename... > typename Sequence, template< typename... > typename Tuple, typename... Args>
auto list_of_tuple_to_tuple_of_list (const Sequence< Tuple< Args... >> &lst)
 
constexpr OSSIA_MAXIMUM_INLINE bool operator== (nullable_variant_index lhs, nullable_variant_index rhs) noexcept
 
constexpr OSSIA_MAXIMUM_INLINE bool operator!= (nullable_variant_index lhs, nullable_variant_index rhs) noexcept
 
constexpr OSSIA_MAXIMUM_INLINE bool operator< (nullable_variant_index lhs, nullable_variant_index rhs) noexcept
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply (F &&visitor, ossia::nullable_variant< Args... > &variant) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply (F &&visitor, const ossia::nullable_variant< Args... > &variant) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply (F &&visitor, ossia::nullable_variant< Args... > &&variant) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply_nonnull (F &&visitor, ossia::nullable_variant< Args... > &variant) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply_nonnull (F &&visitor, const ossia::nullable_variant< Args... > &variant) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply_nonnull (F &&visitor, ossia::nullable_variant< Args... > &&variant) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply_nonnull (F &&visitor, ossia::nullable_variant< Args... > &v1, ossia::nullable_variant< Args... > &v2) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply_nonnull (F &&visitor, const ossia::nullable_variant< Args... > &v1, const ossia::nullable_variant< Args... > &v2) -> decltype(auto)
 
template<typename F , typename... Args>
OSSIA_MAXIMUM_INLINE auto apply_nonnull (F &&visitor, ossia::nullable_variant< Args... > &&v1, const ossia::nullable_variant< Args... > &&v2) -> decltype(auto)
 
template<typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator== (const nullable_variant< Ts... > &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator!= (const nullable_variant< Ts... > &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator< (const nullable_variant< Ts... > &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator> (const nullable_variant< Ts... > &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator<= (const nullable_variant< Ts... > &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator>= (const nullable_variant< Ts... > &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename L , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator== (const L &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename L , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator!= (const L &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename L , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator< (const L &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename L , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator> (const L &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename L , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator<= (const L &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename L , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator>= (const L &lhs, const nullable_variant< Ts... > &rhs)
 
template<typename R , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator== (const nullable_variant< Ts... > &lhs, const R &rhs)
 
template<typename R , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator!= (const nullable_variant< Ts... > &lhs, const R &rhs)
 
template<typename R , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator< (const nullable_variant< Ts... > &lhs, const R &rhs)
 
template<typename R , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator> (const nullable_variant< Ts... > &lhs, const R &rhs)
 
template<typename R , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator<= (const nullable_variant< Ts... > &lhs, const R &rhs)
 
template<typename R , typename... Ts>
constexpr OSSIA_MAXIMUM_INLINE bool operator>= (const nullable_variant< Ts... > &lhs, const R &rhs)
 
template<typename Opt , typename Arg >
auto get_value_or (const Opt &opt, Arg &&arg)
 
template<>
std::optional< int > parse_relax< int > (std::string_view v)
 
template<>
std::optional< float > parse_relax< float > (std::string_view v)
 
template<>
std::optional< double > parse_relax< double > (std::string_view v)
 
constexpr bool string_starts_with (std::string_view src, std::string_view prefix) noexcept
 
template<std::size_t N>
constexpr std::string_view make_string_view (const char(&str)[N]) noexcept
 
template<typename... Args>
constexpr std::array< std::string_view, sizeof...(Args)> make_string_array (Args &&... args) noexcept
 
void set_thread_realtime (std::thread &t, int prio, bool algo_fifo)
 
void set_thread_name (std::thread &t, std::string_view name)
 
void set_thread_name (std::string_view name)
 
void set_thread_pinned (int cpu)
 
int get_pid ()
 
std::string get_exe_path ()
 
std::string get_module_path ()
 
void set_thread_pinned (thread_type spec, int thread_index)
 
const thread_specs & get_thread_specs () noexcept
 
template<class T , class = std::enable_if_t< std::is_class<T>::value && std::is_standard_layout<T>::value>>
auto to_tuple (T &&object) noexcept
 
template<typename Functor >
auto apply (Functor &&functor, const behavior &var) -> decltype(auto)
 
template<typename Functor >
auto apply (Functor &&functor, behavior &var) -> decltype(auto)
 
template<typename Functor >
auto apply (Functor &&functor, behavior &&var) -> decltype(auto)
 
template<typename Functor >
auto apply_nonnull (Functor &&functor, const behavior &var) -> decltype(auto)
 
template<typename Functor >
auto apply_nonnull (Functor &&functor, behavior &var) -> decltype(auto)
 
template<typename Functor >
auto apply_nonnull (Functor &&functor, behavior &&var) -> decltype(auto)
 
template<typename Easing , typename Y >
constexpr auto make_easing (Y start, Y end) noexcept
 
template<typename Y >
constexpr void make_easing (auto &res, std::string_view easing, Y start, Y end) noexcept
 
template<typename Y >
constexpr void make_easing (auto &res, std::string_view easing) noexcept
 
void process_offset (time_sync &timesync, ossia::time_value offset, past_events_map &pastEvents, ossia::flat_set< ossia::time_event * > &seen_events)
 
int is_timesync_ready (time_sync &sync, small_event_vec &pendingEvents, bool &maximalDurationReached)
 
void remove_vertex (typename scenario_graph_t::vertex_descriptor v, scenario_graph_t &g)
 
constexpr auto operator& (ossia::time_event::status lhs, ossia::time_event::status rhs) noexcept
 
std::optional< ossia::time_signature > get_time_signature (const std::string_view &v)
 
constexpr time_value operator""_tv (long double v) noexcept
 
constexpr time_value operator""_tv (unsigned long long v) noexcept
 
constexpr time_value abs (time_value t) noexcept
 
constexpr time_value norm (time_value t1, time_value t2) noexcept
 
constexpr int64_t to_sample (ossia::time_value t, double rate) noexcept
 
bool same_vec_type (const ossia::value &lhs, const ossia::value &rhs)
 
ossia::state_elementget_state_element (ossia::flat_set_state::iterator iterator)
 
bool operator== (const state &lhs, const state &rhs)
 
bool operator!= (const state &lhs, const state &rhs)
 
void flatten_and_filter (state &, const state_element &element)
 append each message of the state to the current state in order to eliminate address redundancy More...
 
void flatten_and_filter (ossia::state &state, state_element &&element)
 
void merge_flatten_and_filter (state &, const state_element &element)
 These will also merge single addresses.
 
void merge_flatten_and_filter (ossia::state &state, state_element &&element)
 
auto begin (state &s)
 
auto begin (const state &s)
 
auto end (state &s)
 
auto end (const state &s)
 
ossia::state_elementget_state_element (ossia::state_element *iterator)
 
void launch (state_element &e)
 launch Launch a state_element
 
std::ostream & print (std::ostream &os, const state_element &dt)
 print Print a state_element
 
ossia::state_elementget_state_element (std::vector< ossia::state_element >::iterator iterator)
 
OSSIA_INLINE bool safe_isnan (double val) noexcept
 
OSSIA_INLINE bool safe_isinf (double val) noexcept
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const behavior_variant_type &arg1)
 
ossia::val_type underlying_type (const complex_type &t)
 
net::parameter_basesetup_parameter (const complex_type &t, ossia::net::node_base &node)
 Creates a parameter in a node according to a complex type.
 
const ossia::net::parameter_datadefault_parameter_for_type (std::string_view type)
 
net::parameter_basetry_setup_parameter (std::string_view t, ossia::net::node_base &node)
 Creates a parameter in a node according to heuristics.
 
net::parameter_basecreate_parameter (net::node_base &parent, std::string_view node, std::string_view str)
 
void update_parameter_type (const complex_type &t, ossia::net::parameter_base &node)
 Change the type of a parameter according to a complex type.
 
ossia::value convert (const ossia::value &v, const ossia::complex_type &source_t, const ossia::complex_type &dest_t)
 
extended_type generic_buffer_type ()
 
extended_type filesystem_path_type ()
 
extended_type url_type ()
 
extended_type float_array_type ()
 
extended_type float_list_type ()
 Means that the array should be interpreted as a dynamic float list.
 
extended_type integer_list_type ()
 Means that the array should be interpreted as a dynamic int list.
 
extended_type string_list_type ()
 Means that the array should be interpreted as a dynamic string list.
 
extended_type list_type ()
 Means that the array is a dynamic array (e.g. ossia::val_type::LIST)
 
extended_type nil_type ()
 Means that the value is an impulse with OSC type-tag NIL.
 
extended_type empty_type ()
 Means that the value is an impulse with no OSC type-tag (,\0\0\0)
 
std::vector< ossia::val_typeunderlying_type (const extended_type &)
 Returns the possible implementation types for this high-level type.
 
template<typename Value_T >
ossia::value bound_value (const ossia::domain &dom, Value_T &&base_val, ossia::bounding_mode mode)
 
template<typename Addr_T >
ossia::value bound_value (const Addr_T &addr, const ossia::value &v)
 
template<typename Addr_T >
ossia::value bound_value (const Addr_T &addr, ossia::value &&v)
 
template<typename T >
void scale (T &value, double src_min, double src_max, double dst_min, double dst_max)
 
template<typename T , typename U >
auto constrain (T &value, const std::vector< U > &acceptable)
 
void map_value (value &source, const ossia::destination_index &idx, const domain &source_domain, const domain &target_domain)
 
template<typename T , typename U >
std::enable_if_t< is_unit< T >::value &&is_unit< U >::value, bool > operator== (T, U)
 
template<typename T , typename U >
std::enable_if_t< is_unit< T >::value &&is_unit< U >::value, bool > operator!= (T, U)
 
template<typename T >
std::enable_if_t< is_unit< T >::value, bool > operator== (T, T)
 
template<typename T >
std::enable_if_t< is_unit< T >::value, bool > operator!= (T, T)
 
OSSIA_EXPORT const unit_parse_symbols_t & get_unit_parser ()
 
template<typename Functor >
auto apply (Functor &&functor, const strong_value_variant &arg0, const unit_variant &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const angle_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const color_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const distance_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const gain_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const orientation_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const position_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const speed_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const value_variant_type &arg0, const timing_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const angle &arg0, const angle_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const color &arg0, const color_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const distance &arg0, const distance_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const gain &arg0, const gain_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const orientation &arg0, const orientation_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const position &arg0, const position_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const speed &arg0, const speed_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const timing &arg0, const timing_u &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const angle &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const color &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const distance &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const gain &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const orientation &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const position &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const speed &arg0, const value_variant_type &arg1)
 
template<typename Functor >
auto apply (Functor &&functor, const timing &arg0, const value_variant_type &arg1)
 
bool check_units_convertible (const ossia::unit_t &lhs, const ossia::unit_t &rhs)
 Checks ///. More...
 
std::string_view get_dataspace_text (const unit_t &u)
 Parse ///. More...
 
std::string_view get_unit_text (const ossia::unit_t &)
 get_unit_text More...
 
std::string_view get_unit_accessors (const ossia::unit_t &)
 get_unit_accessors More...
 
std::string_view get_pretty_unit_text (const ossia::unit_t &)
 get_pretty_unit_text Unit for human readability and debugging More...
 
unit_t parse_unit (std::string_view text, const ossia::unit_t &dataspace)
 parse_unit Takes a text and a dataspace and gives a corresponding unit. More...
 
template<typename T >
ossia::unit_t parse_unit (std::string_view text, T dataspace)
 parse_unit Alternative if we already have a dataspace type at hand. More...
 
unit_t parse_pretty_unit (std::string_view text)
 parse_pretty_unit Create a unit from a valid unit in the format of get_pretty_unit_text
 
unit_t parse_dataspace (std::string_view text)
 parse_dataspace More...
 
ossia::domain get_unit_default_domain (const ossia::unit_t &unit)
 
char get_unit_accessor (const ossia::unit_t &, uint8_t n)
 get_unit_accessor Return the character corresponding to the accessor More...
 
value_with_unit make_value (const ossia::value &v, const ossia::unit_t &u)
 Convert ///. More...
 
unit_t make_unit (uint64_t dataspace, uint64_t unit)
 get_unit Create an unit from indexes in the variant More...
 
val_type matching_type (const ossia::unit_t &u)
 underlying_type Get the implementation type of an unit More...
 
value_with_unit convert (const ossia::value_with_unit &v, const ossia::unit_t &t)
 convert Convert a value to another unit in the same dataspace More...
 
value to_value (const ossia::value_with_unit &v)
 convert Convert a value + unit to a simple value More...
 
unit_t to_unit (const ossia::value_with_unit &v)
 to_unit Get the unit part of a value_with_unit
 
std::string to_pretty_string (const ossia::value_with_unit &v)
 to_pretty_string Pretty string of unit & value More...
 
ossia::value_with_unit merge (const ossia::value_with_unit &, const ossia::value &, ossia::destination_index)
 merge Merge a computed value in a unit-aware value More...
 
ossia::value_with_unit merge (const value_with_unit &vu, const ossia::vec2f &val, std::bitset< 2 > idx)
 
ossia::value_with_unit merge (const value_with_unit &vu, const ossia::vec3f &val, std::bitset< 3 > idx)
 
ossia::value_with_unit merge (const value_with_unit &vu, const ossia::vec4f &val, std::bitset< 4 > idx)
 
ossia::value convert (const ossia::value &v, const ossia::unit_t &source_unit, const ossia::unit_t &destination_unit)
 convert Convert a value to another unit. More...
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::color_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::distance_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::position_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::speed_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::orientation_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::angle_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::gain_u)
 
template OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view, ossia::timing_u)
 
template<typename T >
OSSIA_EXPORT ossia::unit_t parse_unit (std::string_view text, T dataspace)
 parse_unit Alternative if we already have a dataspace type at hand. More...
 
ossia::val_type matching_type (ossia::unit_t &&u)
 
template<typename T >
convert (float f)
 
ossia::value clamp (const ossia::value &val, const ossia::value &min, const ossia::value &max)
 
ossia::value clamp (ossia::value &&val, const ossia::value &min, const ossia::value &max)
 
ossia::value clamp_max (const ossia::value &val, const ossia::value &max)
 
ossia::value clamp_max (ossia::value &&val, const ossia::value &max)
 
ossia::value clamp_min (const ossia::value &val, const ossia::value &min)
 
ossia::value clamp_min (ossia::value &&val, const ossia::value &min)
 
template<typename T >
auto & move (const T &t)
 
value get_min (const domain &dom)
 
value get_max (const domain &dom)
 
std::pair< std::optional< float >, std::optional< float > > get_float_minmax (const domain &dom)
 
void set_min (domain &dom, const ossia::value &val)
 
void set_max (domain &dom, const ossia::value &val)
 
void set_values (domain &dom, const std::vector< ossia::value > &val)
 
std::vector< ossia::valueget_values (const domain &dom)
 
domain make_domain (const ossia::value &min, const ossia::value &max)
 
domain make_domain (std::vector< std::string > s)
 
domain make_domain (tcb::span< const char * > span)
 
domain make_domain (const std::vector< ossia::value > &vals)
 
domain make_domain (const ossia::value &min, const ossia::value &max, const std::vector< ossia::value > &vals)
 
domain make_domain_from_osc (const ossia::small_vector< ossia::value, 2 > &val, const ossia::value &cur)
 
ossia::domain make_domain_from_minmax (const std::vector< ossia::value > &min, const std::vector< ossia::value > &max, ossia::val_type v)
 
value apply_domain (const domain &dom, bounding_mode b, const ossia::value &val)
 
value apply_domain (const domain &dom, bounding_mode b, ossia::value &&val)
 
domain init_domain (ossia::val_type type)
 
template<typename Functor >
auto apply (Functor &&functor, const domain &var) -> decltype(auto)
 
template<typename Functor >
auto apply (Functor &&functor, domain &var) -> decltype(auto)
 
template<typename Functor >
auto apply (Functor &&functor, domain &&var) -> decltype(auto)
 
template<typename Functor >
auto apply_nonnull (Functor &&functor, const domain &var) -> decltype(auto)
 
template<typename Functor >
auto apply_nonnull (Functor &&functor, domain &var) -> decltype(auto)
 
template<typename Functor >
auto apply_nonnull (Functor &&functor, domain &&var) -> decltype(auto)
 
OSSIA_EXPORT ossia::value wrap (const ossia::value &val, const ossia::value &min, const ossia::value &max)
 
OSSIA_EXPORT ossia::value fold (const ossia::value &val, const ossia::value &min, const ossia::value &max)
 
OSSIA_EXPORT ossia::value wrap (ossia::value &&val, const ossia::value &min, const ossia::value &max)
 
OSSIA_EXPORT ossia::value fold (ossia::value &&val, const ossia::value &min, const ossia::value &max)
 
domain convert_domain (const domain &dom, ossia::val_type newtype)
 
void convert_compatible_domain (domain &dom, ossia::val_type newtype)
 
template<typename T >
bool operator!= (const domain_base< T > &lhs, const domain_base< T > &rhs)
 
OSSIA_EXPORT bool operator== (const destination &, const destination &) noexcept
 
OSSIA_EXPORT bool operator!= (const destination &, const destination &) noexcept
 
OSSIA_EXPORT bool operator== (const destination &, const ossia::net::parameter_base &) noexcept
 
OSSIA_EXPORT bool operator!= (const destination &, const ossia::net::parameter_base &) noexcept
 
OSSIA_EXPORT std::string to_pretty_string (const destination &d) noexcept
 
template<typename T >
convert (const ossia::value &val)
 convert Convert a value to the given type. More...
 
template<typename T >
void convert_inplace (ossia::value &val)
 
template<typename T >
convert (const T &cur, const ossia::value &val)
 
template<typename T >
convert (const std::vector< ossia::value > &val)
 convert Convert lists to array<float, 2/3/4>
 
template<typename Fun , typename... Args>
auto lift (ossia::val_type type, Fun f, Args &&... args)
 
template<typename Fun , typename... Args>
auto lift_inplace (ossia::val_type type, Fun f, Args &&... args)
 
template<typename T >
constexpr bool operator== (const T &, const ossia::impulse &)
 
template<typename T >
constexpr bool operator!= (const T &, const ossia::impulse &)
 
template<typename T >
constexpr bool operator> (const T &, const ossia::impulse &)
 
template<typename T >
constexpr bool operator>= (const T &, const ossia::impulse &)
 
template<typename T >
constexpr bool operator< (const T &, const ossia::impulse &)
 
template<typename T >
constexpr bool operator<= (const T &, const ossia::impulse &)
 
template<typename T >
constexpr bool operator== (const ossia::impulse &, const T &)
 
template<typename T >
constexpr bool operator!= (const ossia::impulse &, const T &)
 
template<typename T >
constexpr bool operator> (const ossia::impulse &, const T &)
 
template<typename T >
constexpr bool operator>= (const ossia::impulse &, const T &)
 
template<typename T >
constexpr bool operator< (const ossia::impulse &, const T &)
 
template<typename T >
constexpr bool operator<= (const ossia::impulse &, const T &)
 
template OSSIA_EXPORT impulse convert< ossia::impulse > (const ossia::value &val)
 
template OSSIA_EXPORT int32_t convert< int32_t > (const ossia::value &val)
 
template OSSIA_EXPORT float convert< float > (const ossia::value &val)
 
template OSSIA_EXPORT double convert< double > (const ossia::value &val)
 
template OSSIA_EXPORT bool convert< bool > (const ossia::value &val)
 
template OSSIA_EXPORT value_map_type convert< value_map_type > (const ossia::value &val)
 
template OSSIA_EXPORT std::string convert< std::string > (const ossia::value &val)
 
template OSSIA_EXPORT std::vector< ossia::valueconvert< std::vector< ossia::value > > (const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 2 > convert< std::array< float, 2 > > (const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 3 > convert< std::array< float, 3 > > (const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 4 > convert< std::array< float, 4 > > (const ossia::value &val)
 
template OSSIA_EXPORT impulse convert< ossia::impulse > (const ossia::impulse &, const ossia::value &val)
 
template OSSIA_EXPORT int32_t convert< int32_t > (const int32_t &, const ossia::value &val)
 
template OSSIA_EXPORT float convert< float > (const float &, const ossia::value &val)
 
template OSSIA_EXPORT double convert< double > (const double &, const ossia::value &val)
 
template OSSIA_EXPORT bool convert< bool > (const bool &, const ossia::value &val)
 
template OSSIA_EXPORT value_map_type convert< value_map_type > (const value_map_type &, const ossia::value &val)
 
template OSSIA_EXPORT std::string convert< std::string > (const std::string &, const ossia::value &val)
 
template OSSIA_EXPORT std::vector< ossia::valueconvert< std::vector< ossia::value > > (const std::vector< ossia::value > &, const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 2 > convert< std::array< float, 2 > > (const std::array< float, 2 > &, const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 3 > convert< std::array< float, 3 > > (const std::array< float, 3 > &, const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 4 > convert< std::array< float, 4 > > (const std::array< float, 4 > &, const ossia::value &val)
 
template OSSIA_EXPORT std::array< float, 2 > convert< std::array< float, 2 > > (const std::vector< ossia::value > &val)
 
template OSSIA_EXPORT std::array< float, 3 > convert< std::array< float, 3 > > (const std::vector< ossia::value > &val)
 
template OSSIA_EXPORT std::array< float, 4 > convert< std::array< float, 4 > > (const std::vector< ossia::value > &val)
 
std::string to_pretty_string (const destination_index &index)
 
bool operator== (const value &lhs, const value &rhs)
 
bool operator!= (const value &lhs, const value &rhs)
 
bool operator> (const value &lhs, const value &rhs)
 
bool operator>= (const value &lhs, const value &rhs)
 
bool operator< (const value &lhs, const value &rhs)
 
bool operator<= (const value &lhs, const value &rhs)
 
ossia::value get_value_at_index (const ossia::value &val, const ossia::destination_index &idx)
 get_value_at_index More...
 
bool is_numeric (const ossia::value &v)
 is_numeric True if the value is of a numeric type (int, bool, float, char...)
 
bool is_array (const ossia::value &v)
 is_numeric True if the value is of an array type (list, vec...)
 
ossia::value convert (const ossia::value &val, const ossia::value &cur)
 
ossia::value convert (const ossia::value &val, ossia::val_type newtype)
 
void convert_inplace (ossia::value &val, ossia::val_type newtype)
 
void convert_inplace (ossia::value &val, const ossia::value &cur)
 
OSSIA_EXPORT std::string value_to_pretty_string (const ossia::value &val)
 getValueAsString Returns a string corresponding to the value More...
 
OSSIA_EXPORT ossia::value parse_pretty_value (std::string_view str)
 
ossia::value init_value (ossia::val_type type)
 
template<typename T >
OSSIA_EXPORT T convert (const ossia::value &val)
 convert Convert a value to the given type. More...
 
template<typename T >
OSSIA_EXPORT T convert (const T &cur, const ossia::value &val)
 
template<typename T >
OSSIA_EXPORT T convert (const std::vector< ossia::value > &val)
 convert Convert lists to array<float, 2/3/4>
 
template<typename T , typename U >
vec2f make_vec (T f1, U f2)
 
template<typename T , typename U , typename V >
vec3f make_vec (T f1, U f2, V f3)
 
template<typename T , typename U , typename V , typename W >
vec4f make_vec (T f1, U f2, V f3, W f4)
 
template<std::size_t N>
std::array< float, N > fill_vec (float f)
 
template<typename Impl , typename Parent >
auto make_parameter (Parent &parent)
 
template<typename T , typename... Args>
auto make (PhidgetHandle phid, ossia::net::device_base &dev, ossia::net::node_base &par_node)
 
bool operator== (phidget_id lhs, phidget_id rhs)
 

Variables

SampleFormat *OSSIA_RESTRICT out
 
SampleFormat *OSSIA_RESTRICT int channels
 
constexpr const auto pi = 3.141592653589793238462643383279502884
 
constexpr const auto two_pi = 6.283185307179586476925286766559005768
 
constexpr const auto half_pi = 1.570796326794896619231321691639751442
 
constexpr const auto rad_to_deg = 5.729577951308232087679815481410517033e+01
 
constexpr const auto deg_to_rad = 1.745329251994329576923690768488612713e-02
 
constexpr const auto ln_2 = 6.931471805599453094172321214581765680e-01
 
constexpr const auto sqrt_2 = 1.414213562373095048801688724209698078e+00
 
constexpr const time_value Infinite {time_value::infinity}
 
constexpr const time_value Zero {0}
 
constexpr const time_value One {1}
 

Typedef Documentation

◆ destination_index

using ossia::destination_index = typedef ossia::small_vector<int32_t, 2>

Identifies an element in a nested list. For instance :

List_A{
List_B{1, 2, 3},
List_C{
List_D{4},
List_E{5}
}
}
destination_index{} => List_A
destination_index{0} => List_B
destination_index{0, 1} => '1'
destination_index{0, 2} => '2'
destination_index{0, 3} => '3'
destination_index{1} => List_C
destination_index{1, 0} => List_D
destination_index{1, 0, 0} => '4'
destination_index{1, 1} => List_E
destination_index{1, 1, 0} => '5'
ossia::small_vector< int32_t, 2 > destination_index
Definition: destination_index.hpp:40

◆ expression

An expression is a formula that checks truth values according to values in a network tree.

For instance :

(a:/b == 50) && !(c:/d < e:/f)

Expressions are built with factories found in expression.hpp :

  • make_expression_true : a constant "true" node.
  • make_expression_false : a constant "false" node.
  • make_expression_atom : a relational comparison node (==, <=, !=, etc...) between two ossia::value.
  • make_expression_pulse : a node that becomes true if a message is received opn a given address since the last time update() has been called on it.
  • make_expression_not : standard logical not operator.
  • make_expression_composition : standard logical and, or, xor, operators between two expressions..
See also
expression_atom
expression_bool
expression_composition
expression_not
expression_pulse

◆ state_element

A variant of elements that are meant to be triggered during execution of a score.

See also
message
state
state_element.hpp

Enumeration Type Documentation

◆ curve_segment_type

The curve_segment_type enum.

Represents the result type of either the X or Y parameter of a curve.

◆ val_type

enum ossia::val_type : int8_t
strong

Enum to represent the types that a value can take.

Note
If changing this, also take care of changing :
Enumerator
INT 

float

VEC2F 

int32_t

VEC3F 

array<float, 2>

VEC4F 

array<float, 3>

IMPULSE 

array<float, 4>

BOOL 

ossia::impulse

STRING 

bool

LIST 

std::string

MAP 

std::vector<value>

NONE 

map<string, value>

◆ access_mode

enum ossia::access_mode : int8_t
strong

Address behaviors at crossing domain boundaries time.

Enumerator
GET 

The value can be retrieved and changed.

SET 

The value can be retrieved.

The value can be changed

◆ bounding_mode

enum ossia::bounding_mode : int8_t
strong

Address behaviors at crossing domain boundaries.

Enumerator
CLIP 

The bounds are ignored.

WRAP 
See also
ossia::clamp
FOLD 
See also
ossia::wrap
LOW 
See also
ossia::fold
HIGH 
See also
ossia::clamp_min

Function Documentation

◆ logger()

OSSIA_EXPORT logger_type & ossia::logger ( )
noexcept

Where the errors will be logged. Default is stderr.

It is also accessible through spdlog::get("ossia");

The logger is first created in ossia::context construction.

◆ float_to_sample()

template<typename SampleFormat , int N>
constexpr SampleFormat ossia::float_to_sample ( ossia::audio_sample  sample)
constexprnoexcept

Generic versions found on KVR static inline int quantize(double x, int w) { const double range = exp2((double) w);

return (int) clamp(floor(x * range * 0.5), - range * 0.5, range * 0.5 - 1.0); }

static inline double dequantize(int n, int w) { const double range = exp2((double) w);

return ((2.0 * (double) n + range) / (range - 1.0)) - 1.0; }

◆ get_attribute()

template<typename T >
auto ossia::get_attribute ( const any_map e,
std::string_view  name 
)

get_attribute Get an attribute of an any_map.

Example :

auto desc = get_attribute<description>(e, "description");

The value will be default-constructed if it is not found (e.g. empty string, 0...)

◆ get_optional_attribute()

template<typename T >
std::optional<T> ossia::get_optional_attribute ( const any_map e,
std::string_view  name 
)

get_optional_attribute Maybe get an attribute of an any_map.

Example :

auto desc = get_optional_attribute<description>(e, "description");
if(desc)
std::cerr << "The description is: " << *desc << "\n";

The value will be an empty std::optional if it is not found.

◆ flatten_and_filter()

OSSIA_EXPORT void ossia::flatten_and_filter ( state ,
const state_element element 
)

append each message of the state to the current state in order to eliminate address redundancy

Parameters
std::shared_ptr<State>the State to fill
std::shared_ptr<StateElement>the StateElement to store

◆ underlying_type()

ossia::val_type ossia::underlying_type ( const complex_type &  t)

Get the implementation type of a high level type. If unknown will be ossia::impulse.

◆ generic_buffer_type()

OSSIA_EXPORT extended_type ossia::generic_buffer_type ( )

Represents a "raw" data buffer, that should not be interpreted as a readable string. Only meaningful for strings.

◆ filesystem_path_type()

OSSIA_EXPORT extended_type ossia::filesystem_path_type ( )

Represents a filesystem path : "c:\\windows\\virus.exe", "../../share/pony.png", etc. Only meaningful for strings.

◆ url_type()

OSSIA_EXPORT extended_type ossia::url_type ( )

Represents an URL or URI : "http://foo.com/whatever", "120.10.10.15:123/foo", "mailto:john.smith@ossia.io"

◆ float_array_type()

OSSIA_EXPORT extended_type ossia::float_array_type ( )

Means that the array should be interpreted as a fixed float array (e.g. vec2f, etc)

◆ check_units_convertible()

OSSIA_EXPORT bool ossia::check_units_convertible ( const ossia::unit_t ,
const ossia::unit_t  
)

Checks ///.

Check if two units are convertible into each other.

i.e. if they are in the same dataspace

◆ get_dataspace_text()

OSSIA_EXPORT std::string_view ossia::get_dataspace_text ( const ossia::unit_t )

Parse ///.

get_dataspace_text

Returns
Text corresponding to the dataspace. For instance "color" or "gain".

◆ get_unit_text()

OSSIA_EXPORT std::string_view ossia::get_unit_text ( const ossia::unit_t )

get_unit_text

Returns
Text corresponding to the unit. For instance "rgb" or "cartesian3D".

◆ get_unit_accessors()

OSSIA_EXPORT std::string_view ossia::get_unit_accessors ( const ossia::unit_t )

get_unit_accessors

Returns
If the unit has an array-like type (e.g. RGB color, XY point), this returns a string of array attributes. Else an empty string.

◆ get_pretty_unit_text()

OSSIA_EXPORT std::string_view ossia::get_pretty_unit_text ( const ossia::unit_t )

get_pretty_unit_text Unit for human readability and debugging

Format is dataspace.unit, e.g. distance.m/s or color.rgb

◆ parse_unit() [1/3]

OSSIA_EXPORT ossia::unit_t ossia::parse_unit ( std::string_view  text,
const ossia::unit_t dataspace 
)

parse_unit Takes a text and a dataspace and gives a corresponding unit.

Parameters
textThe text to parse
dataspaceA dataspace such as ossia::color_u, ossia::distance_u...
Returns
Corresponding unit, or the same unit as input if it was not found.

◆ parse_unit() [2/3]

template<typename T >
ossia::unit_t ossia::parse_unit ( std::string_view  text,
dataspace 
)

parse_unit Alternative if we already have a dataspace type at hand.

Note
T should be a dataspace, such as ossia::color_u.
Todo:
In 2020 enforce this with concepts...

◆ parse_dataspace()

OSSIA_EXPORT ossia::unit_t ossia::parse_dataspace ( std::string_view  text)

parse_dataspace

Parameters
textSomething like color, etc.
Returns
A value corresponding to the dataspace, without any specific unit.

◆ get_unit_accessor()

OSSIA_EXPORT char ossia::get_unit_accessor ( const ossia::unit_t ,
uint8_t  n 
)

get_unit_accessor Return the character corresponding to the accessor

e.g. for unit == rgb, n == 1, the function returns 'g'.

Note
Will return 0 (as in "(char)0") if anything is invalid.

◆ make_value()

OSSIA_EXPORT value_with_unit ossia::make_value ( const ossia::value v,
const ossia::unit_t u 
)

Convert ///.

make_value Create a value_with_unit

Parameters
vA value
uA unit
Returns
The same value with the unit attached if the types were correct.

◆ make_unit()

OSSIA_EXPORT ossia::unit_t ossia::make_unit ( uint64_t  dataspace,
uint64_t  unit 
)

get_unit Create an unit from indexes in the variant

Parameters
dataspaceIdentifier in the first variant
unitstd::optional identifier in the second variant

Ex. : position.opengl_u == (1, 4). This is useful for concise serialization / deserialization.

Returns
A corresponding unit

◆ matching_type()

OSSIA_EXPORT ossia::val_type ossia::matching_type ( const ossia::unit_t u)

underlying_type Get the implementation type of an unit

Parameters
uAn unit

Will return Impulse if the unit is invalid.

Returns
The matching type. For instance vec3f for position.cart3D.

◆ convert() [1/4]

OSSIA_EXPORT ossia::value_with_unit ossia::convert ( const ossia::value_with_unit v,
const ossia::unit_t t 
)

convert Convert a value to another unit in the same dataspace

Parameters
vA value
tAn unit of the same dataspace than the value.

E.g. you can convert 1cm in millimeters, but not 1cm in RGB colors.

Returns
The converted value if both value and unit are valid and convertible, else the input value

◆ to_value()

OSSIA_EXPORT ossia::value ossia::to_value ( const ossia::value_with_unit v)

convert Convert a value + unit to a simple value

Parameters
vValue to convert
Returns
Corresponding ossia::value

◆ to_pretty_string()

OSSIA_EXPORT std::string ossia::to_pretty_string ( const ossia::value_with_unit v)

to_pretty_string Pretty string of unit & value

Returns
For example "[0.2, 1.6, 3.4] rgb"

◆ merge()

OSSIA_EXPORT ossia::value_with_unit ossia::merge ( const ossia::value_with_unit ,
const ossia::value ,
ossia::destination_index   
)

merge Merge a computed value in a unit-aware value

The computed value is assumed to be of the same dataspace. For instance if v is a HSV color, then t can also be an HSV color, or just "h", "s", or "v" component, but not a "r" color.

Parameters
Thevalue with an unit
Thevalue to merge
std::optionaldestination index or bitset to merge with
Returns

◆ convert() [2/4]

OSSIA_EXPORT ossia::value ossia::convert ( const ossia::value v,
const ossia::unit_t source_unit,
const ossia::unit_t destination_unit 
)

convert Convert a value to another unit.

Parameters
vA value.
source_unitThe unit of v.
destination_unitThe unit in which v shall be converted.

Dataspaces ought to be similar.

Returns
Converted value, else the input value.

◆ parse_unit() [3/3]

template<typename T >
OSSIA_EXPORT ossia::unit_t ossia::parse_unit ( std::string_view  text,
dataspace 
)

parse_unit Alternative if we already have a dataspace type at hand.

Note
T should be a dataspace, such as ossia::color_u.
Todo:
In 2020 enforce this with concepts...

◆ convert_compatible_domain()

void ossia::convert_compatible_domain ( domain dom,
ossia::val_type  newtype 
)
inline
Note
check this if the order in domain_base_variant changes.

◆ convert() [3/4]

template<typename T >
T ossia::convert ( const ossia::value val)

convert Convert a value to the given type.

Parameters
valA value
Returns
The closest possible conversion of the value to T, else a default-constructed T.

◆ get_value_at_index()

OSSIA_EXPORT ossia::value ossia::get_value_at_index ( const ossia::value val,
const ossia::destination_index idx 
)

get_value_at_index

for ossia::list{{1, 2}, 3} and index {}, return {{1, 2}, 3}. for ossia::list{{1, 2}, 3} and index {0}, return {1, 2}. for ossia::list{{1, 2}, 3} and index {0, 0}, return 1. for ossia::list{{1, 2}, 3} and index {0, 1}, return 2. for ossia::list{{1, 2}, 3} and index {0, 2}, return {}. for ossia::list{{1, 2}, 3} and index {1}, return 3. for ossia::list{{1, 2}, 3} and index {1, 0}, return {}. for ossia::list{{1, 2}, 3} and index {2}, return {}.

See also
destination_index
Returns
The value if it is found, else nothing.

◆ value_to_pretty_string()

OSSIA_EXPORT std::string ossia::value_to_pretty_string ( const ossia::value val)

getValueAsString Returns a string corresponding to the value

Parameters
vala valid value
Returns
a string in the format : "type: value".

ex. "int: 3" "string: tutu" "list: [ int: 2, float: 3 ]" etc...

◆ convert() [4/4]

template<typename T >
OSSIA_EXPORT T ossia::convert ( const ossia::value val)

convert Convert a value to the given type.

Parameters
valA value
Returns
The closest possible conversion of the value to T, else a default-constructed T.