TracktionEngine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
engine::CombiningNode Class Referencefinal

An Node that mixes a sequence of clips of other nodes. More...

#include <tracktion_CombiningNode.h>

Inheritance diagram for engine::CombiningNode:

Public Member Functions

 CombiningNode (EditItemID, ProcessState &)
 
 ~CombiningNode () override
 
void addInput (std::unique_ptr< Node >, TimeRange)
 Adds an input node to be played at a given time range.
 
void addInput (std::unique_ptr< Node >, BeatRange)
 Adds an input node to be played at a given beat range.
 
int getNumInputs () const
 Returns the number of inputs added.
 
std::vector< Node * > getInternalNodes () override
 Returns the inputs that have been added.
 
std::vector< Node * > getDirectInputNodes () override
 
tracktion::graph::NodeProperties getNodeProperties () override
 
void prepareToPlay (const tracktion::graph::PlaybackInitialisationInfo &) override
 
bool isReadyToProcess () override
 
void prefetchBlock (juce::Range< int64_t >) override
 
void process (ProcessContext &) override
 
size_t getAllocatedBytes () const override
 
- Public Member Functions inherited from engine::TracktionEngineNode
 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.
 
ProcessStategetProcessState ()
 Returns the ProcessState in use.
 
void setProcessState (ProcessState &)
 

Detailed Description

An Node that mixes a sequence of clips of other nodes.

This node takes a set of input Nodes with associated start + end times, and mixes together their output.

It initialises and releases its inputs as required according to its current play position.

Constructor & Destructor Documentation

◆ CombiningNode()

engine::CombiningNode::CombiningNode ( EditItemID  ,
ProcessState  
)

◆ ~CombiningNode()

engine::CombiningNode::~CombiningNode ( )
override

Member Function Documentation

◆ addInput() [1/2]

void engine::CombiningNode::addInput ( std::unique_ptr< Node >  ,
TimeRange   
)

Adds an input node to be played at a given time range.

The offset is relative to the combining node's zero-time, so the input node's time of 0 is equal to its (start + offset) relative to the combiner node's start.

Any nodes passed-in will be deleted by this node when required.

◆ addInput() [2/2]

void engine::CombiningNode::addInput ( std::unique_ptr< Node >  ,
BeatRange   
)

Adds an input node to be played at a given beat range.

The offset is relative to the combining node's zero-time, so the input node's time of 0 is equal to its (start + offset) relative to the combiner node's start.

Any nodes passed-in will be deleted by this node when required.

◆ getNumInputs()

int engine::CombiningNode::getNumInputs ( ) const

Returns the number of inputs added.

◆ getInternalNodes()

std::vector< Node * > engine::CombiningNode::getInternalNodes ( )
override

Returns the inputs that have been added.

N.B. This is a bit of a temporary hack to ensure WaveNodes can access previous Nodes that have been added via a CombinngNode. This will be cleaned up in the future.

◆ getDirectInputNodes()

std::vector< Node * > engine::CombiningNode::getDirectInputNodes ( )
override

◆ getNodeProperties()

tracktion::graph::NodeProperties engine::CombiningNode::getNodeProperties ( )
override

◆ prepareToPlay()

void engine::CombiningNode::prepareToPlay ( const tracktion::graph::PlaybackInitialisationInfo &  )
override

◆ isReadyToProcess()

bool engine::CombiningNode::isReadyToProcess ( )
override

◆ prefetchBlock()

void engine::CombiningNode::prefetchBlock ( juce::Range< int64_t >  )
override

◆ process()

void engine::CombiningNode::process ( ProcessContext &  )
override

◆ getAllocatedBytes()

size_t engine::CombiningNode::getAllocatedBytes ( ) const
override

The documentation for this class was generated from the following file: