|
Ingen
0.5.1
|
A Block in a Graph (which is also a Block). More...
#include <BlockImpl.hpp>
Inheritance diagram for Ingen::Server::BlockImpl:
Collaboration diagram for Ingen::Server::BlockImpl:Public Types | |
| enum | Mark { UNVISITED, VISITING, VISITED } |
| Mark used during graph compilation. | |
Public Types inherited from Ingen::Node | |
| enum | GraphType { GRAPH, BLOCK, PORT } |
| typedef std::pair< const Node *, const Node * > | ArcsKey |
| typedef std::map< ArcsKey, SPtr< Arc > > | Arcs |
Public Types inherited from Ingen::Resource | |
| enum | Graph { DEFAULT, EXTERNAL, INTERNAL } |
Public Member Functions | |
| BlockImpl (PluginImpl *plugin, const Raul::Symbol &symbol, bool poly, GraphImpl *parent, SampleRate rate) | |
| virtual GraphType | graph_type () const |
| virtual void | activate (BufferFactory &bufs) |
| Activate this Block. More... | |
| virtual void | deactivate () |
| Deactivate this Block. More... | |
| virtual BlockImpl * | duplicate (Engine &engine, const Raul::Symbol &symbol, GraphImpl *parent) |
| Duplicate this Node. More... | |
| bool | activated () const |
| Return true iff this block is activated. | |
| bool | enabled () const |
| Return true iff this block is enabled (not bypassed). More... | |
| void | set_enabled (bool e) |
| Enable or disable (bypass) this block. More... | |
| virtual LilvState * | load_preset (const Raul::URI &uri) |
| Load a preset from the world for this block. More... | |
| virtual void | apply_state (Worker *worker, const LilvState *state) |
Restore state. More... | |
| virtual boost::optional< Resource > | save_preset (const Raul::URI &bundle, const Properties &props) |
| Save current state as preset. More... | |
| virtual void | learn () |
| Learn the next incoming MIDI event (for internals) | |
| virtual void | pre_process (RunContext &context) |
| Do whatever needs doing in the process thread before process() is called. | |
| virtual void | process (RunContext &context) |
| Run block for an entire process cycle (calls run()). More... | |
| virtual void | run (RunContext &context)=0 |
| Run block for a portion of process cycle (called from process()). More... | |
| virtual void | post_process (RunContext &context) |
| Do whatever needs doing in the process thread after process() is called. | |
| virtual void | set_port_buffer (uint32_t voice, uint32_t port_num, BufferRef buf, SampleCount offset) |
| Set the buffer of a port to a given buffer (e.g. More... | |
| virtual Node * | port (uint32_t index) const |
| virtual PortImpl * | port_impl (uint32_t index) const |
| virtual PortImpl * | port_by_symbol (const char *symbol) |
| Get a port by symbol. More... | |
| std::set< BlockImpl * > & | providers () |
| Blocks that are connected to this Block's inputs. More... | |
| std::set< BlockImpl * > & | dependants () |
| Blocks that are connected to this Block's outputs. More... | |
| virtual void | set_polyphonic (bool p) |
| Flag block as polyphonic. More... | |
| virtual bool | prepare_poly (BufferFactory &bufs, uint32_t poly) |
| Prepare for a new (external) polyphony value. More... | |
| virtual bool | apply_poly (RunContext &context, Raul::Maid &maid, uint32_t poly) |
| Apply a new (external) polyphony value. More... | |
| virtual const Resource * | plugin () const |
| Information about the Plugin this Block is an instance of. More... | |
| virtual const PluginImpl * | plugin_impl () const |
| Information about the Plugin this Block is an instance of. More... | |
| virtual void | plugin (PluginImpl *pi) |
| virtual void | set_buffer_size (RunContext &context, BufferFactory &bufs, LV2_URID type, uint32_t size) |
| GraphImpl * | parent_graph () const |
| The Graph this Block belongs to. More... | |
| uint32_t | num_ports () const |
| virtual uint32_t | polyphony () const |
| Mark | get_mark () const |
| void | set_mark (Mark m) |
Public Member Functions inherited from Ingen::Server::NodeImpl | |
| const Raul::Symbol & | symbol () const |
| Node * | graph_parent () const |
| NodeImpl * | parent () const |
| virtual void | set_path (const Raul::Path &new_path) |
| Rename. | |
| const Atom & | get_property (const Raul::URI &key) const |
| Get a single property value. More... | |
| const Raul::Path & | path () const |
Public Member Functions inherited from Ingen::Node | |
| Arcs & | arcs () |
| const Arcs & | arcs () const |
| virtual LilvInstance * | instance () |
| virtual bool | save_state (const std::string &dir) const |
| Raul::URI | base_uri () const |
Public Member Functions inherited from Ingen::Resource | |
| Resource (const URIs &uris, const Raul::URI &uri) | |
| Resource & | operator= (const Resource &rhs) |
| virtual const Atom & | set_property (const Raul::URI &uri, const Atom &value, Graph ctx=Graph::DEFAULT) |
| Set (replace) a property value. More... | |
| virtual const Atom & | set_property (const Raul::URI &uri, const URIs::Quark &value, Graph ctx=Graph::DEFAULT) |
| Set (replace) a property value. More... | |
| virtual bool | add_property (const Raul::URI &uri, const Atom &value, Graph ctx=Graph::DEFAULT) |
| Add a property value. More... | |
| virtual void | remove_property (const Raul::URI &uri, const Atom &value) |
| Remove a property. More... | |
| virtual void | remove_property (const Raul::URI &uri, const URIs::Quark &value) |
| Remove a property. More... | |
| virtual bool | has_property (const Raul::URI &uri, const Atom &value) const |
| Return true iff a property is set with a specific value. More... | |
| virtual bool | has_property (const Raul::URI &uri, const URIs::Quark &value) const |
| Return true iff a property is set with a specific value. More... | |
| void | set_properties (const Properties &p) |
| Set (replace) several properties at once. More... | |
| void | add_properties (const Properties &p) |
| Add several properties at once. More... | |
| void | remove_properties (const Properties &p) |
| Remove several properties at once. More... | |
| virtual void | on_property (const Raul::URI &uri, const Atom &value) |
| Hook called whenever a property is added. More... | |
| virtual void | on_property_removed (const Raul::URI &uri, const Atom &value) |
| Hook called whenever a property value is removed. More... | |
| virtual void | set_uri (const Raul::URI &uri) |
| Properties | properties (Resource::Graph ctx) const |
| Get all the properties with a given context. More... | |
| const URIs & | uris () const |
| const Raul::URI & | uri () const |
| const Properties & | properties () const |
| Properties & | properties () |
Protected Member Functions | |
| PortImpl * | nth_port_by_type (uint32_t n, bool input, PortType type) |
Protected Member Functions inherited from Ingen::Server::NodeImpl | |
| NodeImpl (const Ingen::URIs &uris, NodeImpl *parent, const Raul::Symbol &symbol) | |
Protected Member Functions inherited from Ingen::Node | |
| Node (const URIs &uris, const Raul::Path &path) | |
Protected Member Functions inherited from Ingen::Resource | |
| const Atom & | set_property (const Raul::URI &uri, const Atom &value) const |
Protected Attributes | |
| PluginImpl * | _plugin |
| Raul::Array< PortImpl * > * | _ports |
| Access in audio thread only. | |
| uint32_t | _polyphony |
| std::set< BlockImpl * > | _providers |
| Blocks connected to this one's input ports. | |
| std::set< BlockImpl * > | _dependants |
| Blocks this one's output ports are connected to. | |
| Mark | _mark |
| Mark for graph compilation algorithm. | |
| bool | _polyphonic |
| bool | _activated |
| bool | _enabled |
Protected Attributes inherited from Ingen::Server::NodeImpl | |
| NodeImpl * | _parent |
| Raul::Path | _path |
| Raul::Symbol | _symbol |
Protected Attributes inherited from Ingen::Node | |
| Arcs | _arcs |
| Graphs only. | |
Protected Attributes inherited from Ingen::Resource | |
| const URIs & | _uris |
Additional Inherited Members | |
Static Public Member Functions inherited from Ingen::Node | |
| static Raul::URI | main_uri () |
| static bool | uri_is_path (const Raul::URI &uri) |
| static Raul::Path | uri_to_path (const Raul::URI &uri) |
| static Raul::URI | path_to_uri (const Raul::Path &path) |
Static Public Member Functions inherited from Ingen::Resource | |
| static Raul::URI | graph_to_uri (Graph g) |
| static Graph | uri_to_graph (const char *uri) |
| static bool | type (const URIs &uris, const Properties &properties, bool &graph, bool &block, bool &port, bool &is_output) |
| Get the ingen type from a set of Properties. More... | |
A Block in a Graph (which is also a Block).
This is what is often called a "Module" in modular synthesizers. A Block is a unit with input/output ports, a process() method, and some other things.
|
virtual |
Activate this Block.
This function must be called in a non-realtime thread before it is inserted in to a graph. Any non-realtime actions that need to be done before the Block is ready for use should be done here.
Reimplemented in Ingen::Server::GraphImpl, Ingen::Server::LV2Block, and Ingen::Server::Internals::BlockDelayNode.
Referenced by Ingen::Server::LV2Block::activate(), and Ingen::Server::GraphImpl::duplicate().
|
virtual |
Deactivate this Block.
This function must be called in a non-realtime thread after the block has been removed from its graph (i.e. processing is finished).
Reimplemented in Ingen::Server::GraphImpl, and Ingen::Server::LV2Block.
Referenced by Ingen::Server::LV2Block::deactivate().
|
inlinevirtual |
Duplicate this Node.
Reimplemented in Ingen::Server::GraphImpl, Ingen::Server::LV2Block, and Ingen::Server::InternalBlock.
Referenced by Ingen::Server::GraphImpl::duplicate().
|
inline |
Return true iff this block is enabled (not bypassed).
|
inline |
Enable or disable (bypass) this block.
Referenced by Ingen::Server::Events::Delta::post_process().
|
inlinevirtual |
Load a preset from the world for this block.
Reimplemented in Ingen::Server::LV2Block.
|
inlinevirtual |
Restore state.
Reimplemented in Ingen::Server::LV2Block.
Referenced by Ingen::Server::Events::Delta::post_process().
|
inlinevirtual |
Save current state as preset.
Reimplemented in Ingen::Server::LV2Block.
|
virtual |
Run block for an entire process cycle (calls run()).
Reimplemented in Ingen::Server::GraphImpl.
References Ingen::Server::PortImpl::next_value_offset().
Referenced by Ingen::Server::Task::run().
|
pure virtual |
Run block for a portion of process cycle (called from process()).
Implemented in Ingen::Server::GraphImpl, Ingen::Server::LV2Block, Ingen::Server::Internals::NoteNode, Ingen::Server::Internals::TriggerNode, Ingen::Server::Internals::BlockDelayNode, Ingen::Server::Internals::ControllerNode, and Ingen::Server::Internals::TimeNode.
|
virtual |
Set the buffer of a port to a given buffer (e.g.
connect plugin to buffer)
Reimplemented in Ingen::Server::LV2Block.
Referenced by Ingen::Server::LV2Block::set_port_buffer().
|
virtual |
Get a port by symbol.
Referenced by Ingen::Server::LV2Block::apply_state().
|
inline |
Blocks that are connected to this Block's inputs.
|
inline |
Blocks that are connected to this Block's outputs.
|
inlinevirtual |
Flag block as polyphonic.
Note this will not actually allocate voices etc., prepare_poly and apply_poly must be called after this function to truly make a block polyphonic.
|
virtual |
Prepare for a new (external) polyphony value.
Preprocessor thread, poly is actually applied by apply_poly.
Implements Ingen::Server::NodeImpl.
Reimplemented in Ingen::Server::LV2Block, and Ingen::Server::Internals::NoteNode.
Referenced by Ingen::Server::LV2Block::prepare_poly().
|
virtual |
Apply a new (external) polyphony value.
| context | Process context (process thread only). |
| poly | Must be <= the most recent value passed to prepare_poly. |
| maid | Any objects no longer needed will be pushed to this |
Implements Ingen::Server::NodeImpl.
Reimplemented in Ingen::Server::LV2Block, and Ingen::Server::Internals::NoteNode.
Referenced by Ingen::Server::LV2Block::apply_poly().
|
virtual |
Information about the Plugin this Block is an instance of.
Not the best name - not all blocks come from plugins (ie Graph)
Reimplemented from Ingen::Node.
Referenced by Ingen::Server::BlockFactory::refresh().
|
virtual |
Information about the Plugin this Block is an instance of.
Not the best name - not all blocks come from plugins (ie Graph)
|
inlinevirtual |
The Graph this Block belongs to.
Reimplemented from Ingen::Server::NodeImpl.
Referenced by Ingen::Server::LV2Block::apply_state(), Ingen::Server::LV2Block::deactivate(), Ingen::Server::LV2Block::instantiate(), Ingen::Server::LV2Block::LV2Block(), and Ingen::Server::LV2Block::save_preset().
1.8.12