12namespace tracktion {
inline namespace engine
16BeatPosition
toBeats (TimePosition,
const TempoSequence&);
19TimePosition
toTime (BeatPosition,
const TempoSequence&);
154ClipPosition
createClipPosition (
const TempoSequence&, BeatRange, BeatDuration offset = {});
192namespace tracktion {
inline namespace engine {
255 : range (TimeRange (start, end))
260 : range (TimeRange (start, length))
265 : range (BeatRange (start, end))
270 : range (BeatRange (start, length))
Holds a list of TempoSetting objects, to form a sequence of tempo changes.
BeatPosition toBeats(TimePosition tp, const TempoSequence &ts)
Converts a TimePosition to a BeatPosition given a TempoSequence.
ClipPosition createClipPosition(const TempoSequence &, TimeRange range, TimeDuration offset)
Creates a ClipPosition from either a time or beat range.
TimePosition toTime(BeatPosition bp, const TempoSequence &ts)
Converts a BeatPosition to a TimePosition given a TempoSequence.
RangeType< BeatPosition > BeatRange
A RangeType based on beats.
RangeType< TimePosition > TimeRange
A RangeType based on real time (i.e.
Represents a duration in beats.
static constexpr BeatDuration fromBeats(T durationInBeats)
Create a BeatPosition from a number of beats.
Represents a position in beats.
static constexpr BeatPosition fromBeats(T positionInBeats)
Create a BeatPosition from a number of beats.
Represents a duration in real-life time.
static constexpr TimeDuration fromSeconds(T positionInSeconds)
Create a TimeDuration from a number of seconds.
Represents a position in real-life time.
static constexpr TimePosition fromSeconds(T positionInSeconds)
Create a TimePosition from a number of seconds.
Represents the position of a clip on a timeline.
TimePosition getEnd() const
Returns the end time.
TimePosition getStartOfSource() const
Returns what would be the the start of the source material in the timeline.
TimeDuration offset
The offset this ClipPosition has.
TimePosition getStart() const
Returns the start time.
TimeRange time
The TimeRange this ClipPosition occupies.
bool operator==(const ClipPosition &other) const
Compares two ClipPositions.
TimeDuration getOffset() const
Returns the offset.
ClipPosition rescaled(TimePosition anchorTime, double factor) const
Returns a ClipPosition scaled around an anchor point.
bool operator!=(const ClipPosition &other) const
Compares two ClipPositions.
TimeDuration getLength() const
Returns the length.
Represents a time range in an Edit stored as either time or beats.
friend TimeRange toTime(EditTimeRange, const TempoSequence &)
Converts an EditTimeRange to a TimeRange.
EditTimeRange(TimeRange)
Creates an EditTimeRange from a TimeRange.
friend BeatRange toBeats(EditTimeRange, const TempoSequence &)
Converts an EditTimeRange to a BeatRange.
bool isBeats() const
Returns true if the time is stored as beats, false if stored as a TimePosition.
Represents a time point in an Edit stored as either time or beats.
friend BeatPosition toBeats(EditTime, const TempoSequence &)
Converts an EditTime to a BeatPosition.
bool isBeats() const
Returns true if the time is stored as beats, false if stored as a TimePosition.
EditTime()
Creates an empty EditTime, starting at 0.
friend TimePosition toTime(EditTime, const TempoSequence &)
Converts an EditTime to a TimePosition.