tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_SlotControlNode.h
Go to the documentation of this file.
1 /*
2 ,--. ,--. ,--. ,--.
3 ,-' '-.,--.--.,--,--.,---.| |,-.,-' '-.`--' ,---. ,--,--, Copyright 2024
4 '-. .-'| .--' ,-. | .--'| /'-. .-',--.| .-. || \ Tracktion Software
5 | | | | \ '-' \ `--.| \ \ | | | |' '-' '| || | Corporation
6 `---' `--' `--`--'`---'`--'`--' `---' `--' `---' `--''--' www.tracktion.com
7
8 Tracktion Engine uses a GPL/commercial licence - see LICENCE.md for details.
9*/
10
11namespace tracktion { inline namespace engine
12{
13
14class DynamicOffsetNode;
15
16//==============================================================================
17//==============================================================================
22{
23public:
24 SlotControlNode (ProcessState& editProcessState,
26 std::optional<BeatDuration> stopDuration,
27 std::function<void (MonotonicBeat)> stopFunction,
28 EditItemID slotID,
30
31 const LaunchHandle& getLaunchHandle() const;
32 const LaunchHandle* getLaunchHandleIfNotUnique() const;
33
34 //==============================================================================
37
39 bool isReadyToProcess() override;
40 void prefetchBlock (juce::Range<int64_t>) override;
41 void process (ProcessContext&) override;
42
43private:
44 //==============================================================================
46 std::optional<BeatDuration> stopDuration;
47 std::function<void (MonotonicBeat)> stopFunction;
48 bool wasPlaying = false;
49
50 const EditItemID slotID;
52
53 PlayHeadState localPlayheadState;
54 ProcessState localProcessState;
56 std::vector<Node*> orderedNodes, leafNodes;
57 LoopingMidiNode* midiNode = nullptr;
59 BeatDuration lastOffset;
60
61 void processSplitSection (ProcessContext&, LaunchHandle::SplitStatus);
62 void processSection (ProcessContext&, BeatRange editBeatRange, TimeRange editTimeRange, BeatRange clipBeatRange,
63 bool isPlaying, std::optional<BeatPosition> playStartTime);
64 void processStop (ProcessContext&, double timestampForMidiNoteOffs);
65};
66
67}} // namespace tracktion { inline namespace engine
A handle used to control the launching of a clip.
Represents two beat ranges where the play state can be different in each.
A Node that plays MIDI data from a MidiMessageSequence, at a specific MIDI channel.
void prepareToPlay(const tracktion::graph::PlaybackInitialisationInfo &) override
Called once before playback begins for each node.
void prefetchBlock(juce::Range< int64_t >) override
Called before once on all Nodes before they are processed.
bool isReadyToProcess() override
Should return true when this node is ready to be processed.
void process(ProcessContext &) override
Called when the node is to be processed.
std::vector< Node * > getDirectInputNodes() override
Should return all the inputs directly feeding in to this node.
tracktion::graph::NodeProperties getNodeProperties() override
Should return the properties of the node.
Base class for Nodes that provides information about the current process call.
Main graph Node processor class.
Struct to describe a single iteration of a process call.
Determines how this block releates to other previous render blocks and if the play head has jumped in...
Represents a duration in beats.
ID for objects of type EditElement - e.g.
Holds the state of a process call.
Holds some really basic properties of a node.
Passed into Nodes when they are being initialised, to give them useful contextual information that th...