Loading...
Searching...
No Matches
oscr Namespace Reference

Detailed Description

This file instantiates the classes that are provided by this plug-in.

Classes

struct  con_unvalidated
 
struct  con_unvalidated_dynamic_port
 
struct  controller_needs_factory
 
struct  controller_needs_factory< avnd::field_reflection< N, Field > >
 
struct  ControllerIntSpinBox
 
struct  ControllerLineEdit
 
class  CustomControl
 
struct  CustomControlFactory
 
struct  CustomControlFactory< Node, avnd::field_reflection< N, Field > >
 
struct  CustomFloatControl
 
struct  CustomFloatControlBase
 
struct  CustomGenericControl
 
class  CustomItem
 
class  CustomMultiControl
 halp::custom_multi_control. Values are normalized; a gesture is one undo step. More...
 
class  CustomNodeProcess
 
class  CustomTextGraphicsKnob
 
class  CustomTextGraphicsSlider
 
struct  Deserializer
 
class  DeviceImplementation
 
struct  dispatch_control_reconnect
 
struct  dispatch_control_setup
 
struct  drain_request
 
struct  dynamic_ports_component_data
 
struct  dynamic_ports_component_data< T >
 
struct  EdgeItem
 
struct  exec_worker_delivery
 
class  Executor
 
struct  ExecutorFactory
 
struct  function_argument
 The argument type of a std::function<void(Arg)>. More...
 
struct  function_argument< std::function< R(Arg)> >
 
struct  GetGUIValue
 
struct  GetGUIValue< T >
 
struct  GraphWidget
 
struct  InletInitFunc
 
struct  latest_value
 
class  LayerFactory
 
struct  LayoutBuilder
 
struct  Logger
 
struct  MatchingWidget
 
struct  MatchingWidget< Field >
 
struct  message_ring
 
struct  MessageBusReader
 
struct  MessageBusSender
 
struct  MessageBusUi
 
struct  MessageBusUi< Info >
 
struct  MessageBusWrapperFromUi
 
struct  MessageBusWrapperFromUi< Info >
 
struct  MessageBusWrapperToUi
 
struct  MessageBusWrapperToUi< Info >
 
struct  MidiFileOctaver
 
struct  node_with_deferred_stop
 
struct  node_with_ui_wakeups
 
struct  node_with_worker
 
struct  NodeItem
 
struct  NormalizerFromMapper
 
struct  OutletInitFunc
 
struct  pmf_member_type
 
struct  pmf_member_type< V T::* >
 
struct  Port
 
struct  ProcessFactory
 
class  ProcessModel
 
struct  processor_write_back
 
class  Protocol
 
class  ProtocolFactory
 
class  ProtocolSettingsWidget
 
struct  QPainterAdapter
 
struct  rgba_color
 
struct  RootItem
 
class  ScoreLayerFactory
 
struct  Serializer
 
struct  SetGUIValue
 
struct  SetGUIValue< T >
 
struct  setup_control_for_exec
 
struct  setup_control_for_exec< Node, Field, N, NField >
 
struct  setup_control_for_exec_base
 
struct  StringListControl
 
struct  ToggleGridConfig
 The cell names and row length of a halp::toggle_grid. More...
 
struct  ui_wakeups
 
struct  update_control_in_value_in_ui
 
struct  update_control_out_value_in_ui
 
struct  update_control_value_in_ui
 
class  ValueBarItem
 halp::display_style::bar More...
 
struct  ValueListConfig
 The columns and count bounds of a halp::value_list. More...
 
struct  View
 

Typedefs

template<typename N >
using reflect_mapped_controls = typename avnd::mapped_control_input_introspection< N >::field_reflections_type
 
template<typename N >
using reflect_controller_controls = boost::mp11::mp_copy_if< typename avnd::control_input_introspection< N >::field_reflections_type, controller_needs_factory >
 The controller fields that get a CustomGenericControl, and only those.
 
template<typename BaseInletType , typename Node , typename T , typename FieldIndex >
using ControlTypeToUse = std::conditional_t< avnd::controller_interaction_port< T >, CustomGenericControl< BaseInletType, Node, T, FieldIndex >, BaseInletType >
 
template<typename Node >
using exec_base_node_t = std::conditional_t< avnd::has_worker< Node >, node_with_worker< Node >, node_with_ui_wakeups< Node > >
 
template<typename Node >
using exec_node_t = std::conditional_t< stops_with_extra_tick< Node >, node_with_deferred_stop< Node >, exec_base_node_t< Node > >
 
template<typename T >
using pmf_member_type_t = typename pmf_member_type< T >::type
 

Functions

template<typename T >
void custom_factories (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 
double scalarValue (const ossia::value &v)
 
double normalizedValue (const Process::ControlInlet &port, const ossia::value &v)
 A control's value, normalized over its range.
 
template<typename Field >
ossia::value resolveControlPath (const ossia::value &v, const score::DocumentContext &ctx)
 
void sendToTimeline (const Process::ProcessModel &proc, const score::DocumentContext &ctx, const halp::timeline_clip &clip)
 
template<typename... T>
void free_on_main_thread (const std::weak_ptr< Execution::GCCommandQueue > &gcq, T &... t)
 
template<typename Node >
std::function< void(QByteArray)> ui_to_processor_bus (Node &eff, std::weak_ptr< Execution::ExecutionCommandQueue > qex_ptr, std::weak_ptr< Execution::GCCommandQueue > gcq)
 
QMimeData * make_drag_mime (const halp::drag_payload &payload)
 
void hideAllInlets (Process::ProcessModel &proc, bool outlets)
 A fully custom item shows the inlets it wants; the node shows its outlets.
 
template<typename T >
void setupNewPort (Process::Port *obj)
 
template<std::size_t N, typename T >
void setupNewPort (const avnd::field_reflection< N, T > &spec, Process::Port *obj)
 
template<typename T >
void setupNewPort (const T &spec, Process::Port *obj)
 
void inplaceMirror (unsigned char *bytes, int width, int height, int bytes_per_pixel)
 
template<avnd::cpu_texture Tex>
void loadInputTexture (QRhi &rhi, auto &m_readbacks, Tex &cpu_tex, int k)
 
template<typename Object , typename Delivery >
void bind_worker (Object &obj, std::weak_ptr< Object > obj_wp, Delivery deliver)
 
void instantiate_aether (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 
void instantiate_convolver (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 
void instantiate_audiofilters (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 
void instantiate_tests (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 
void instantiate_tests2 (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 
template<typename F >
QGraphicsItem * makeidget (const F &field, QGraphicsItem *parent)
 
template<>
void custom_factories< grph::Graph > (std::vector< score::InterfaceBase * > &fx, const score::ApplicationContext &ctx, const score::InterfaceKey &key)
 

Variables

template<typename T >
constexpr bool control_value_owns_memory = !std::is_trivially_destructible_v<T> || sizeof(T) > 64
 
thread_local processor_write_back control_written_by_processor {}
 
template<typename Field >
constexpr bool field_has_ui_controls
 

Typedef Documentation

◆ exec_node_t

template<typename Node >
using oscr::exec_node_t = typedef std::conditional_t< stops_with_extra_tick<Node>, node_with_deferred_stop<Node>, exec_base_node_t<Node> >

The exec node score gives an avnd object: with worker-result delivery if the object has a worker, the plain avendish node otherwise.

Function Documentation

◆ bind_worker()

template<typename Object , typename Delivery >
void oscr::bind_worker ( Object &  obj,
std::weak_ptr< Object >  obj_wp,
Delivery  deliver 
)

Binds an avendish object's worker: request() posts a job to score::TaskPool, which runs Object::worker::work(args...) unless the object is gone by then. A non-empty result is handed, on the pool thread, to deliver as a closure that applies it to the object if the object is still alive. The bindings differ only in how the closure reaches the object's processing thread, which is the Delivery's business:

struct Delivery { // On the requesting thread, when the job is posted. The Job lives // until the job has run, on the pool thread, and is destroyed there. Job begin(); }; struct Job { // On the pool thread, with the closure. template <typename F> void operator()(F&& apply); };

◆ free_on_main_thread()

template<typename... T>
void oscr::free_on_main_thread ( const std::weak_ptr< Execution::GCCommandQueue > &  gcq,
T &...  t 
)

Hands what the audio thread is done with to the main thread, which frees it when it runs the GC queue. When the queue is gone (the execution is being torn down) it is freed where it is.

◆ make_drag_mime()

QMimeData * oscr::make_drag_mime ( const halp::drag_payload &  payload)
inline

What a drag of payload carries: its files as file URLs, and its own data under its own type.

◆ resolveControlPath()

template<typename Field >
ossia::value oscr::resolveControlPath ( const ossia::value &  v,
const score::DocumentContext &  ctx 
)

A path to write to (halp::save_file_path): t and n are expanded as the recorders do, then the path is resolved.

◆ scalarValue()

double oscr::scalarValue ( const ossia::value &  v)
inline

The number a control stands for: for a time chooser's {x, mode}, seconds. The UI has no tempo: a synced value is its length at 120 BPM, which keeps the proportions between synced values.

◆ sendToTimeline()

void oscr::sendToTimeline ( const Process::ProcessModel &  proc,
const score::DocumentContext &  ctx,
const halp::timeline_clip &  clip 
)

Places a file in the timeline the way dropping it would, as a new box of the scenario that holds proc, starting where the clip says it was made and below the box of proc, reached from the scenario's start so that it plays at that date. The clip's stretch reaches the drop as a dragged clip's does, under Process::clip_metadata_mime. One undoable command. Does nothing, and says why in the log, when the process is not inside a scenario or nothing knows how to make a process of the file.

◆ ui_to_processor_bus()

template<typename Node >
std::function< void(QByteArray)> oscr::ui_to_processor_bus ( Node &  eff,
std::weak_ptr< Execution::ExecutionCommandQueue >  qex_ptr,
std::weak_ptr< Execution::GCCommandQueue >  gcq 
)

The UI to processor bus of an object: what the view sends is decoded here, on the UI thread, and reaches process_message() through the execution queue, in the order it was sent. Nothing is allocated or freed on the audio thread: a message that owns memory travels in a block made here, and the block comes back through the GC queue once the processor has seen it.

A process_message() that takes its message by value frees what it does not keep on the audio thread; taking it by reference avoids that.

Variable Documentation

◆ control_value_owns_memory

template<typename T >
constexpr bool oscr::control_value_owns_memory = !std::is_trivially_destructible_v<T> || sizeof(T) > 64
inlineconstexpr

A value from the UI on its way to the audio thread. A value that owns memory (a text, a list) is converted on the UI thread into a block of its own; the audio thread swaps it into the object and sends the block, which then holds the previous value, back to be freed on the main thread. So does a value too large for the closures of the execution queue, such as a list of fixed capacity. Other values travel as they are.

◆ field_has_ui_controls

template<typename Field >
constexpr bool oscr::field_has_ui_controls
constexpr
Initial value:
= !ossia_port<avnd::concrete_port_type<Field>>
&& (!avnd::dynamic_ports_port<Field>
|| avnd::parameter_port<avnd::concrete_port_type<Field>>)

Whether the model ports of this field are control inlets that drive the object from the UI. A dynamic group of e.g. audio or message ports has nothing to set up here (and no value to convert to).