TracktionEngine
|
A Node that switches between two of its inputs based on a flag. More...
#include <tracktion_ArrangerLauncherSwitchingNode.h>
Public Member Functions | |
ArrangerLauncherSwitchingNode (ProcessState &, AudioTrack &, std::unique_ptr< Node > arrangerNode, std::vector< std::unique_ptr< SlotControlNode > > launcherNodes) | |
std::vector< Node * > | getDirectInputNodes () override |
Should return all the inputs directly feeding in to this node. | |
std::vector< Node * > | getInternalNodes () override |
Can return Nodes that are internal to this Node but don't make up the main graph constructed from getDirectInputNodes(). | |
tracktion::graph::NodeProperties | getNodeProperties () override |
Should return the properties of the node. | |
void | prepareToPlay (const PlaybackInitialisationInfo &) override |
bool | isReadyToProcess () override |
Should return true when this node is ready to be processed. | |
void | prefetchBlock (juce::Range< int64_t >) override |
Called before once on all Nodes before they are processed. | |
void | process (ProcessContext &) override |
Called when the node is to be processed. | |
![]() | |
Node ()=default | |
virtual | ~Node ()=default |
void | initialise (const PlaybackInitialisationInfo &) |
Call once after the graph has been constructed to initialise buffers etc. | |
void | prepareForNextBlock (juce::Range< int64_t > referenceSampleRange) |
Call before processing the next block, used to reset the process status. | |
void | process (choc::buffer::FrameCount numSamples, juce::Range< int64_t > referenceSampleRange) |
Call to process the node, which will in turn call the process method with the buffers to fill. | |
bool | hasProcessed () const |
Returns true if this node has processed and its outputs can be retrieved. | |
AudioAndMidiBuffer | getProcessedOutput () |
Returns the processed audio and MIDI output. | |
virtual TransformResult | transform (Node &, const std::vector< Node * > &, TransformCache &) |
Called after construction to give the node a chance to modify its topology. | |
void | retain () |
Retains the buffers so they won't be deallocated after the Node has processed. | |
void | release () |
Releases the buffers allowing internal storage to be deallocated. | |
virtual size_t | getAllocatedBytes () const |
void | enablePreProcess (bool) |
![]() | |
TracktionEngineNode (ProcessState &) | |
Creates a TracktionEngineNode. | |
virtual | ~TracktionEngineNode ()=default |
Destructor. | |
int | getNumSamples () const |
Returns the number of samples in the current process block. | |
double | getSampleRate () const |
Returns the sample rate of the current process block. | |
juce::Range< int64_t > | getTimelineSampleRange () const |
Returns the timeline sample range of the current process block. | |
TimeRange | getEditTimeRange () const |
Returns the edit time range of the current process block. | |
BeatRange | getEditBeatRange () const |
Returns the edit beat range of the current process block. | |
juce::Range< int64_t > | getReferenceSampleRange () const |
Returns the reference sample range (from the DeviceManager) of the current process block. | |
tempo::Key | getKey () const |
Returns the key of the current process block. | |
double | getPlaybackSpeedRatio () const |
Returns the playback speed ratio of the current process block. | |
std::optional< TimePosition > | getTimeOfNextChange () const |
May return the time of the next tempo or time sig change. | |
std::optional< BeatPosition > | getBeatOfNextChange () const |
May return the time of the next tempo or time sig change. | |
tracktion::graph::PlayHeadState & | getPlayHeadState () |
Returns the PlayHeadState in use. | |
tracktion::graph::PlayHead & | getPlayHead () |
Returns the PlayHead in use. | |
ProcessState & | getProcessState () |
Returns the ProcessState in use. | |
void | setProcessState (ProcessState &) |
![]() | |
virtual | ~Listener ()=default |
Additional Inherited Members | |
![]() | |
void * | internal = nullptr |
int | numOutputNodes = -1 |
![]() | |
virtual void | prepareToPlay (const PlaybackInitialisationInfo &) |
Called once before playback begins for each node. | |
virtual void | preProcess (choc::buffer::FrameCount, juce::Range< int64_t >) |
Called when the node is to be processed, just before process. | |
void | setOptimisations (NodeOptimisations) |
This can be called to provide some hints about allocating or playing back a Node to improve efficiency. | |
void | setBufferViewToUse (Node *sourceNode, const choc::buffer::ChannelArrayView< float > &) |
This can be called during prepareToPlay to set a BufferView to use which can improve efficiency. | |
void | setAudioOutput (Node *sourceNode, const choc::buffer::ChannelArrayView< float > &) |
This can be called during your process function to set a view to the output. | |
A Node that switches between two of its inputs based on a flag.
tracktion::engine::ArrangerLauncherSwitchingNode::ArrangerLauncherSwitchingNode | ( | ProcessState & | , |
AudioTrack & | , | ||
std::unique_ptr< Node > | arrangerNode, | ||
std::vector< std::unique_ptr< SlotControlNode > > | launcherNodes | ||
) |
|
overridevirtual |
Should return all the inputs directly feeding in to this node.
Reimplemented from tracktion::graph::Node.
|
overridevirtual |
Can return Nodes that are internal to this Node but don't make up the main graph constructed from getDirectInputNodes().
Most uses cases won't need to implement this but it could be used in situations where sub-graphs are created and processed internally to a Node but other Nodes in a graph still need to have access to them. This call can make them visible.
Reimplemented from tracktion::graph::Node.
|
overridevirtual |
Should return the properties of the node.
This should not be called until after initialise.
Implements tracktion::graph::Node.
|
override |
|
overridevirtual |
Should return true when this node is ready to be processed.
This is usually when its input's output buffers are ready.
Implements tracktion::graph::Node.
|
overridevirtual |
Called before once on all Nodes before they are processed.
This can be used to prefetch audio data or update mute statuses etc..
Reimplemented from tracktion::graph::Node.
|
overridevirtual |
Called when the node is to be processed.
This should add in to the buffers available making sure not to change their size at all.
Implements tracktion::graph::Node.