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

A Node that plays MIDI data from a MidiMessageSequence, at a specific MIDI channel. More...

#include <tracktion_LoopingMidiNode.h>

Inheritance diagram for engine::LoopingMidiNode:

Public Member Functions

 LoopingMidiNode (std::vector< juce::MidiMessageSequence > sequences, juce::Range< int > midiChannelNumbers, bool useMPE, BeatRange editRange, BeatRange loopRange, BeatDuration offset, LiveClipLevel, ProcessState &, EditItemID, const QuantisationType &, const GrooveTemplate *, float grooveStrength, std::function< bool()> shouldBeMutedDelegate=nullptr)
 
EditItemID getItemID () const
 Returns the EditItemID to identify this Node.
 
MPESourceID getMPESourceID () const
 Returns the MPESourceID used by this Node.
 
const std::shared_ptr< ActiveNoteList > & getActiveNoteList () const
 Returns the ActiveNoteList in use for this Node.
 
void setDynamicOffsetBeats (BeatDuration) override
 Sets an offset to be applied to all times in this node, effectively shifting it forwards or backwards in time.
 
void killActiveNotes (MidiMessageArray &, double timestampForNoteOffs)
 Iterates the ActiveNoteList adding note-off events for the active notes and then resets them.
 
tracktion::graph::NodeProperties getNodeProperties () override
 
void prepareToPlay (const tracktion::graph::PlaybackInitialisationInfo &) override
 
bool isReadyToProcess () override
 
void process (ProcessContext &) 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 &)
 
- Public Member Functions inherited from engine::DynamicallyOffsettableNodeBase
 DynamicallyOffsettableNodeBase ()=default
 
virtual ~DynamicallyOffsettableNodeBase ()=default
 
virtual void setDynamicOffsetTime (TimeDuration)
 Sets an offset to be applied to all times in this node, effectively shifting it forwards or backwards in time.
 

Detailed Description

A Node that plays MIDI data from a MidiMessageSequence, at a specific MIDI channel.

N.B. In order to loop correctly at changing tempos, the sequence time base must be in beats.

Constructor & Destructor Documentation

◆ LoopingMidiNode()

engine::LoopingMidiNode::LoopingMidiNode ( std::vector< juce::MidiMessageSequence >  sequences,
juce::Range< int >  midiChannelNumbers,
bool  useMPE,
BeatRange  editRange,
BeatRange  loopRange,
BeatDuration  offset,
LiveClipLevel  ,
ProcessState ,
EditItemID  ,
const QuantisationType ,
const GrooveTemplate ,
float  grooveStrength,
std::function< bool()>  shouldBeMutedDelegate = nullptr 
)

Member Function Documentation

◆ getItemID()

EditItemID engine::LoopingMidiNode::getItemID ( ) const

Returns the EditItemID to identify this Node.

◆ getMPESourceID()

MPESourceID engine::LoopingMidiNode::getMPESourceID ( ) const

Returns the MPESourceID used by this Node.

◆ getActiveNoteList()

const std::shared_ptr< ActiveNoteList > & engine::LoopingMidiNode::getActiveNoteList ( ) const

Returns the ActiveNoteList in use for this Node.

Call this after prepareToPlay to get the one in use.

◆ setDynamicOffsetBeats()

void engine::LoopingMidiNode::setDynamicOffsetBeats ( BeatDuration  )
overridevirtual

Sets an offset to be applied to all times in this node, effectively shifting it forwards or backwards in time.

Reimplemented from engine::DynamicallyOffsettableNodeBase.

◆ killActiveNotes()

void engine::LoopingMidiNode::killActiveNotes ( MidiMessageArray ,
double  timestampForNoteOffs 
)

Iterates the ActiveNoteList adding note-off events for the active notes and then resets them.

◆ getNodeProperties()

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

◆ prepareToPlay()

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

◆ isReadyToProcess()

bool engine::LoopingMidiNode::isReadyToProcess ( )
override

◆ process()

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

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