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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_PitchSequence.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//==============================================================================
18{
19public:
22
23 void initialise (Edit&, const juce::ValueTree&);
24 void freeResources();
25
26 Edit& getEdit() const;
27
28 void copyFrom (const PitchSequence&);
29 void clear();
30
31 const juce::Array<PitchSetting*>& getPitches() const;
32 int getNumPitches() const;
33 PitchSetting* getPitch (int index) const;
34 PitchSetting& getPitchAt (TimePosition) const;
35 PitchSetting& getPitchAtBeat (BeatPosition) const;
36 int indexOfPitch (const PitchSetting*) const;
37
38 PitchSetting::Ptr insertPitch (TimePosition);
39 PitchSetting::Ptr insertPitch (BeatPosition, int pitch);
40
41 void movePitchStart (PitchSetting&, BeatDuration deltaBeats, bool snapToBeat);
42
44 void insertSpaceIntoSequence (TimePosition, TimeDuration amountOfSpace, bool snapToBeat);
45
46 void sortEvents();
47
48 juce::ValueTree state;
49
50private:
51 struct PitchList;
53 Edit* edit = nullptr;
54
55 int indexOfPitchAt (TimePosition) const;
56 int indexOfNextPitchAt (TimePosition) const;
57
58 juce::UndoManager* getUndoManager() const;
59
61};
62
63}} // namespace tracktion { inline namespace engine
The Tracktion Edit class!
void insertSpaceIntoSequence(TimePosition, TimeDuration amountOfSpace, bool snapToBeat)
Inserts space in to a sequence, shifting all PitchSettings.
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Represents a duration in beats.
Represents a position in beats.
Represents a duration in real-life time.
Represents a position in real-life time.