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

« « « Anklang Documentation
Loading...
Searching...
No Matches
tracktion_PitchSetting.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//==============================================================================
17class PitchSetting : public TrackItem,
19{
20public:
22 ~PitchSetting() override;
23
26
28
29 BeatPosition getStartBeatNumber() const { return startBeat; }
30 void setStartBeat (BeatPosition);
31
32 int getPitch() const { return pitch; }
33 void setPitch (int);
34
35 Scale::ScaleType getScale() const { return scale; }
36 void setScaleID (Scale::ScaleType);
37
38 void removeFromEdit();
39
40 juce::String getName() const override;
41 Track* getTrack() const override;
42 ClipPosition getPosition() const override;
43
44 juce::ValueTree state;
47 juce::CachedValue<bool> accidentalsSharp;
49
50private:
51 void valueTreeChanged() override { changed(); }
52
54};
55
56inline bool operator< (const PitchSetting& p1, const PitchSetting& p2) noexcept
57{
58 return p1.startBeat.get() < p2.startBeat.get();
59}
60
61}} // namespace tracktion { inline namespace engine
The Tracktion Edit class!
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
ClipPosition getPosition() const override
Must return the position of this item.
Track * getTrack() const override
Must return the track this item lives on.
virtual void changed()
This should be called to send a change notification to any SelectableListeners that are registered wi...
Base class for EditItems that live in a Track, e.g.
Base class for tracks which contain clips and plugins and can be added to Edit[s].
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Represents a position in beats.
Represents the position of a clip on a timeline.