11namespace tracktion {
inline namespace engine
172 BeatRange
toBeats (TimeRange)
const;
181 TimeRange
toTime (BeatRange)
const;
199 [[ deprecated (
"Use new overload set above") ]] tempo::BarsAndBeats timeToBarsBeats (
TimePosition)
const;
200 [[ deprecated (
"Use new overload set above") ]]
TimePosition barsBeatsToTime (tempo::BarsAndBeats)
const;
201 [[ deprecated (
"Use new overload set above") ]]
BeatPosition barsBeatsToBeats (tempo::BarsAndBeats)
const;
203 [[ deprecated (
"Use new overload set above") ]] BeatRange timeToBeats (TimeRange range)
const;
205 [[ deprecated (
"Use new overload set above") ]] TimeRange beatsToTime (BeatRange range)
const;
214 void freeResources();
216 void updateTempoData();
224 juce::ValueTree state;
231 tempo::Sequence internalSequence { {{
BeatPosition(), 120.0, 0.0f }},
233 tempo::LengthOfOneBeat::dependsOnTimeSignature };
236 void updateTempoDataIfNeeded()
const;
237 void handleAsyncUpdate()
override;
242 HashCode createHashForTemposInRange (TimeRange)
const;
254 void savePreChangeState (
Edit&);
255 void remapEdit (
Edit&);
273 BeatRange loopPositionBeats;
The Tracktion Edit class!
Holds a pointer to some type of Selectable, which automatically becomes null if the selectable is del...
Base class for things that can be selected, and whose properties can appear in the properties panel.
Holds a list of TempoSetting objects, to form a sequence of tempo changes.
TimePosition toTime(BeatPosition) const
Converts a number of beats a time.
Edit & getEdit() const
Returns the Edit this TempoSequence refers to.
void moveTempoStart(int index, BeatDuration deltaBeats, bool snapToBeat)
Moves the TempoSetting at a given index by a number of beats.
void removeTimeSig(int index)
Removes the TimeSigSetting at a given index.
void insertSpaceIntoSequence(TimePosition time, TimeDuration amountOfSpaceInSeconds, bool snapToBeat)
Inserts space in to a sequence, shifting TempoSettings and TimeSigs.
void deleteRegion(TimeRange)
Removes a region in a sequence, shifting TempoSettings and TimeSigs.
void moveTimeSigStart(int index, BeatDuration deltaBeats, bool snapToBeat)
Moves the TimeSigSetting at a given index by a number of beats.
void createEmptyState()
Resets this to a default, empty state.
TimeSigSetting & getTimeSigAt(TimePosition) const
Returns the TimeSigSetting at a given position.
void removeTimeSigsBetween(TimeRange)
Removes any TimeSigSetting[s] within the range.
TempoSetting::Ptr insertTempo(TimePosition)
Inserts a tempo break that can be edited later.
const juce::Array< TimeSigSetting * > & getTimeSigs() const
Returns an array of the TimeSigSetting.
int countTemposInRegion(TimeRange) const
Returns the number of TempoSetting[s] in the given range.
int indexOfTempo(const TempoSetting *) const
Returns the index of the given TempoSetting.
int getNumTimeSigs() const
Returns the number of TimeSigSetting[s] in the sequence.
~TempoSequence() override
Destructor.
bool isTripletsAtTime(TimePosition) const
Returns true if the TempoSetting is triplets at the given time.
int indexOfTimeSig(const TimeSigSetting *) const
Returns the index of a given TimeSigSetting.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
BeatPosition toBeats(TimePosition) const
Converts a time to a number of beats.
int getNumTempos() const
Returns the current number of TempoSettings.
void copyFrom(const TempoSequence &)
Copies the contents of another TempoSequence.
const juce::Array< TempoSetting * > & getTempos() const
Returns the TempoSettings.
tempo::BarsAndBeats toBarsAndBeats(TimePosition) const
Converts a time to a number of BarsAndBeats.
const tempo::Sequence & getInternalSequence() const
N.B.
void removeTemposBetween(TimeRange, bool remapEdit)
Removes any TempoSetting[s] within the range.
TimeSigSetting * getTimeSig(int index) const
Returns the TimeSigSetting at a given index.
void removeTempo(int index, bool remapEdit)
Removes the TempoSetting at a given index.
TempoSetting * getTempo(int index) const
Returns the TempoSetting at the given index.
int indexOfTimeSigAt(TimePosition) const
Returns the index of TimeSigSetting at a given position.
const juce::ValueTree & getState() const
Returns the state this TempoSequence models.
double getBeatsPerSecondAt(TimePosition, bool lengthOfOneBeatDependsOnTimeSignature=false) const
Returns the tempo at a given position.
TempoSetting & getTempoAt(TimePosition) const
Returns the TempoSetting at the given position.
void setState(const juce::ValueTree &, bool remapEdit)
Sets the state this TempoSequence should refer to.
Edit & edit
The Edit this sequence belongs to.
int indexOfNextTempoAt(TimePosition) const
Returns the index of the TempoSetting after the given position.
int indexOfTempoAt(TimePosition) const
Returns the index of the TempoSetting at the given position.
double getBpmAt(TimePosition) const
Returns the tempo at a given position.
TimeSigSetting::Ptr insertTimeSig(TimePosition)
Inserts a new TimeSigSetting at the given position.
A tempo value, as used in a TempoSequence.
tempo::Sequence::Position createPosition(const TempoSequence &s)
Creates a Position to iterate over the given TempoSequence.
Represents a duration in beats.
Represents a position in beats.
Represents a duration in real-life time.
Represents a position in real-life time.
Takes a copy of all the beat related things in an edit in terms of bars/beats and then remaps these a...