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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_TimeStretchingWaveNode.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
14//==============================================================================
15//==============================================================================
23{
24public:
26
27 //==============================================================================
31 bool isReadyToProcess() override;
32 void process (ProcessContext&) override;
33
34private:
35 //==============================================================================
38 Clip::Ptr clipPtr;
39
40 AudioFile file;
41 AudioFileInfo fileInfo;
43
44 double sampleRate = 44100.0, fileSpeedRatio = 1.0, nextEditTime = -1.0;
45 TimeStretcher timestretcher;
46 float speedRatio = 1.0f, pitchSemitones = 0;
47 float timestetchSpeedRatio = 1.0f, timestetchSemitonesUp = 1.0f;
48
50 int stretchBlockSize = 512;
51
52 //==============================================================================
53 int64_t timeToFileSample (double) const noexcept;
54 void reset (double newStartTime);
55 bool fillNextBlock();
56};
57
58}} // namespace tracktion { inline namespace engine
Base class for Clips that produce some kind of audio e.g.
Handles time/pitch stretching using various supported libraries.
Node that reads from a file node and timestretches its output.
std::vector< Node * > getDirectInputNodes() override
Should return all the inputs directly feeding in to this node.
bool isReadyToProcess() override
Should return true when this node is ready to be processed.
tracktion::graph::NodeProperties getNodeProperties() override
Should return the properties of the node.
void process(ProcessContext &) override
Called when the node is to be processed.
void prepareToPlay(const tracktion::graph::PlaybackInitialisationInfo &) override
Called once before playback begins for each node.
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...
typedef int64_t
Holds some really basic properties of a node.
Passed into Nodes when they are being initialised, to give them useful contextual information that th...