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

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tracktion::engine::TempoSetting Class Reference

A tempo value, as used in a TempoSequence. More...

#include "tracktion_TempoSetting.h"

Inheritance diagram for tracktion::engine::TempoSetting:
juce::ReferenceCountedObject tracktion::engine::CurveEditorPoint tracktion::engine::Selectable

Public Types

using Ptr = juce::ReferenceCountedObjectPtr< TempoSetting >
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 

Public Member Functions

 TempoSetting (TempoSequence &, const juce::ValueTree &)
 Constructs a TempoSetting belonging to a given TempoSequence.
 
 ~TempoSetting () override
 Destructor.
 
EditgetEdit () const
 Returns the Edit this setting belongs to.
 
juce::String getSelectableDescription () override
 Returns the description of this Selectable.
 
BeatPosition getStartBeat () const
 Returns the start beat of the setting.
 
double getBpm () const
 Returns the BPM of the setting.
 
float getCurve () const
 Returns the curve of the setting.
 
TimePosition getStartTime () const
 Returns the start time in seconds of the tempo setting.
 
void set (BeatPosition, double newBpm, float newCurve, bool remapEditPositions)
 Sets the properties of this tempo setting.
 
void setBpm (double newBpm)
 Sets the BPM of this tempo setting.
 
void setCurve (float curve)
 Sets the curve of this tempo setting.
 
void setStartBeat (BeatPosition)
 
void removeFromEdit ()
 Removes the TempoSetting from the sequence.
 
TimeDuration getApproxBeatLength () const
 Returns the approximate length of one beat based on the bpm and matching time sig denonimator.
 
TempoSettinggetPreviousTempo () const
 Returns the previous tempo setting in the sequence.
 
TimeSigSettinggetMatchingTimeSig () const
 Returns the time signature at this tempo's time in the sequence.
 
HashCode getHash () const noexcept
 
- Public Member Functions inherited from juce::ReferenceCountedObject
void incReferenceCount () noexcept
 
void decReferenceCount () noexcept
 
bool decReferenceCountWithoutDeleting () noexcept
 
int getReferenceCount () const noexcept
 
- Public Member Functions inherited from tracktion::engine::CurveEditorPoint
 CurveEditorPoint (int i, CurveEditor *ed)
 
void selectionStatusChanged (bool isNowSelected) override
 Can be overridden to tell this object that it has just been selected or deselected.
 
- Public Member Functions inherited from tracktion::engine::Selectable
virtual void changed ()
 This should be called to send a change notification to any SelectableListeners that are registered with this object.
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point.
 
void addListener (SelectableListener *)
 
void removeListener (SelectableListener *)
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions.
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 

Static Public Member Functions

static juce::ValueTree create (BeatPosition startBeat, double bpm, float curve)
 Creates a tree to prepresent a TempoSetting.
 
- Static Public Member Functions inherited from tracktion::engine::CurveEditorPoint
static bool arePointsConsecutive (const SelectableList &)
 
static bool arePointsOnSameCurve (const SelectableList &)
 
static TimeRange getPointTimeRange (const SelectableList &)
 
- Static Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
 

Public Attributes

TempoSequenceownerSequence
 
juce::ValueTree state
 
juce::CachedValue< BeatPositionstartBeatNumber
 
juce::CachedValue< doublebpm
 
juce::CachedValue< floatcurve
 
TimePosition startTime
 
- Public Attributes inherited from tracktion::engine::CurveEditorPoint
int index
 
juce::Component::SafePointer< CurveEditoreditor
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Static Public Attributes

static constexpr double minBPM
 Minimum BPM a setting can have.
 
static constexpr double maxBPM
 Maximum BPM a setting can have.
 

Additional Inherited Members

- Protected Member Functions inherited from juce::ReferenceCountedObject
 ReferenceCountedObject (const ReferenceCountedObject &) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&) noexcept
 
void resetReferenceCount () noexcept
 

Detailed Description

A tempo value, as used in a TempoSequence.

This specifies the BPM, time sig, etc. at a particular time

Definition at line 20 of file tracktion_TempoSetting.h.

Member Typedef Documentation

◆ Ptr

Definition at line 34 of file tracktion_TempoSetting.h.

Constructor & Destructor Documentation

◆ TempoSetting()

tracktion::engine::TempoSetting::TempoSetting ( TempoSequence ts,
const juce::ValueTree v 
)

Constructs a TempoSetting belonging to a given TempoSequence.

Don't construct these directly, use the appropriate insert methods of TempoSequence.

Definition at line 14 of file tracktion_TempoSetting.cpp.

◆ ~TempoSetting()

tracktion::engine::TempoSetting::~TempoSetting ( )
override

Destructor.

Definition at line 25 of file tracktion_TempoSetting.cpp.

Member Function Documentation

◆ create()

juce::ValueTree tracktion::engine::TempoSetting::create ( BeatPosition  startBeat,
double  bpm,
float  curve 
)
static

Creates a tree to prepresent a TempoSetting.

Definition at line 29 of file tracktion_TempoSetting.cpp.

◆ getApproxBeatLength()

TimeDuration tracktion::engine::TempoSetting::getApproxBeatLength ( ) const

Returns the approximate length of one beat based on the bpm and matching time sig denonimator.

Definition at line 97 of file tracktion_TempoSetting.cpp.

◆ getBpm()

double tracktion::engine::TempoSetting::getBpm ( ) const

Returns the BPM of the setting.

Definition at line 57 of file tracktion_TempoSetting.h.

◆ getCurve()

float tracktion::engine::TempoSetting::getCurve ( ) const

Returns the curve of the setting.

Definition at line 60 of file tracktion_TempoSetting.h.

◆ getEdit()

Edit & tracktion::engine::TempoSetting::getEdit ( ) const

Returns the Edit this setting belongs to.

Definition at line 37 of file tracktion_TempoSetting.cpp.

◆ getHash()

HashCode tracktion::engine::TempoSetting::getHash ( ) const
noexcept

Definition at line 118 of file tracktion_TempoSetting.cpp.

◆ getMatchingTimeSig()

TimeSigSetting & tracktion::engine::TempoSetting::getMatchingTimeSig ( ) const

Returns the time signature at this tempo's time in the sequence.

Definition at line 113 of file tracktion_TempoSetting.cpp.

◆ getPreviousTempo()

TempoSetting * tracktion::engine::TempoSetting::getPreviousTempo ( ) const

Returns the previous tempo setting in the sequence.

Definition at line 108 of file tracktion_TempoSetting.cpp.

◆ getSelectableDescription()

juce::String tracktion::engine::TempoSetting::getSelectableDescription ( )
overridevirtual

Returns the description of this Selectable.

Implements tracktion::engine::Selectable.

Definition at line 43 of file tracktion_TempoSetting.cpp.

◆ getStartBeat()

BeatPosition tracktion::engine::TempoSetting::getStartBeat ( ) const

Returns the start beat of the setting.

Definition at line 54 of file tracktion_TempoSetting.h.

◆ getStartTime()

TimePosition tracktion::engine::TempoSetting::getStartTime ( ) const

Returns the start time in seconds of the tempo setting.

Definition at line 49 of file tracktion_TempoSetting.cpp.

◆ removeFromEdit()

void tracktion::engine::TempoSetting::removeFromEdit ( )

Removes the TempoSetting from the sequence.

Definition at line 102 of file tracktion_TempoSetting.cpp.

◆ set()

void tracktion::engine::TempoSetting::set ( BeatPosition  newStartBeat,
double  newBpm,
float  newCurve,
bool  remapEditPositions 
)

Sets the properties of this tempo setting.

Parameters
startBeatNumThe new start beat number to set.
newBpmThe new bpm value to set.
newCurveThe new curve to set.
remapEditPositionsIf true, this will adjust any Edit items start/end positions so they fall on the same beat as they currently do.

Definition at line 55 of file tracktion_TempoSetting.cpp.

◆ setBpm()

void tracktion::engine::TempoSetting::setBpm ( double  newBpm)

Sets the BPM of this tempo setting.

Definition at line 87 of file tracktion_TempoSetting.cpp.

◆ setCurve()

void tracktion::engine::TempoSetting::setCurve ( float  curve)

Sets the curve of this tempo setting.

<0.0 is a log curve 0.0 is a linear curve >0.0 is an exponential curve

Definition at line 92 of file tracktion_TempoSetting.cpp.

◆ setStartBeat()

void tracktion::engine::TempoSetting::setStartBeat ( BeatPosition  b)

Definition at line 82 of file tracktion_TempoSetting.cpp.

Member Data Documentation

◆ bpm

juce::CachedValue<double> tracktion::engine::TempoSetting::bpm

Definition at line 108 of file tracktion_TempoSetting.h.

◆ curve

juce::CachedValue<float> tracktion::engine::TempoSetting::curve

Definition at line 109 of file tracktion_TempoSetting.h.

◆ maxBPM

constexpr double tracktion::engine::TempoSetting::maxBPM
staticconstexpr

Maximum BPM a setting can have.

Definition at line 46 of file tracktion_TempoSetting.h.

◆ minBPM

constexpr double tracktion::engine::TempoSetting::minBPM
staticconstexpr

Minimum BPM a setting can have.

Definition at line 43 of file tracktion_TempoSetting.h.

◆ ownerSequence

TempoSequence& tracktion::engine::TempoSetting::ownerSequence

Definition at line 104 of file tracktion_TempoSetting.h.

◆ startBeatNumber

juce::CachedValue<BeatPosition> tracktion::engine::TempoSetting::startBeatNumber

Definition at line 107 of file tracktion_TempoSetting.h.

◆ startTime

TimePosition tracktion::engine::TempoSetting::startTime

Definition at line 112 of file tracktion_TempoSetting.h.

◆ state

juce::ValueTree tracktion::engine::TempoSetting::state

Definition at line 105 of file tracktion_TempoSetting.h.


The documentation for this class was generated from the following files: