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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_ContainerClip.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//==============================================================================
22 public ClipOwner
23{
24public:
27
29 ~ContainerClip() override;
30
32
33 //==============================================================================
37 EditItemID getClipOwnerID() override;
41 Edit& getClipOwnerEdit() override;
42
43 //==============================================================================
45 juce::File getOriginalFile() const override { return {}; }
47 bool isUsingFile (const AudioFile&) override;
48
49 //==============================================================================
51 void initialise() override;
53 void cloneFrom (Clip*) override;
54
55 //==============================================================================
59 bool isMidi() const override;
60
62 TimeDuration getSourceLength() const override;
64 HashCode getHash() const override;
65
67 void setLoopDefaults() override;
69 void setLoopRangeBeats (BeatRange) override;
70
71 //==============================================================================
73 void flushStateToValueTree() override;
75 void pitchTempoTrackChanged() override;
76
77private:
78 //==============================================================================
79 juce::ValueTree clipListState;
80
81 void clipCreated (Clip&) override;
82 void clipAddedOrRemoved() override;
83 void clipOrderChanged() override;
84 void clipPositionChanged() override;
85
86 //==============================================================================
88};
89
90}} // namespace tracktion { inline namespace engine
Base class for Clips that produce some kind of audio e.g.
Base class for items that can contain clips.
A clip in an edit.
A clip that can contain multiple other clips and mix their output together.
bool isMidi() const override
Returns true if this is a MidiClip.
juce::ValueTree & getClipOwnerState() override
Must return the state of this ClipOwner.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
Selectable * getClipOwnerSelectable() override
Must return the selectable if this ClipOwner is one.
TimeDuration getSourceLength() const override
Must return the length in seconds of the source material e.g.
void cloneFrom(Clip *) override
Clones the given clip to this clip.
EditItemID getClipOwnerID() override
Must return the ID of this ClipOwner.
void flushStateToValueTree() override
Can be overridden to ensure any state (e.g.
bool isUsingFile(const AudioFile &) override
Should return true if the clip is referencing the file in any way.
void pitchTempoTrackChanged() override
Called when there are pitch or tempo changes made which might require clips to adjust timing informat...
void initialise() override
Initialises the Clip.
void setLoopRangeBeats(BeatRange) override
Sets the loop range the clip should use in beats.
juce::File getOriginalFile() const override
Must return the file that the source ProjectItemID refers to.
HashCode getHash() const override
Must return a unique hash for this clip's source.
Edit & getClipOwnerEdit() override
Must return the Edit this ClipOwner belongs to.
void setLoopDefaults() override
Override this to fill in the LoopInfo structure as best fits the source.
The Tracktion Edit class!
Base class for things that can be selected, and whose properties can appear in the properties panel.
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Represents a duration in real-life time.
ID for objects of type EditElement - e.g.