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

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
tracktion::core::tempo::Sequence Struct Reference

Represents a tempo map with at least one TempoChange and TimeSigChange. More...

#include "tracktion_Tempo.h"

Classes

struct  Position
 A Sequence::Position is an iterator through a Sequence. More...
 

Public Member Functions

 Sequence (std::vector< TempoChange >, std::vector< TimeSigChange >, LengthOfOneBeat)
 Creates a Sequence for at least one TempoChange and at least one TimeSigChange.
 
 Sequence (std::vector< TempoChange >, std::vector< TimeSigChange >, std::vector< KeyChange >, LengthOfOneBeat)
 Creates a Sequence for at least one TempoChange and at least one TimeSigChange and an optional number of KeyChange[s].
 
 Sequence (const Sequence &)
 Copies another Sequence.
 
 Sequence (Sequence &&)
 Move constructor.
 
Sequenceoperator= (const Sequence &)
 Copies another Sequence.
 
Sequenceoperator= (Sequence &&)
 Moves another Sequence.
 
BeatPosition toBeats (TimePosition) const
 Converts a time to a number of beats.
 
BeatPosition toBeats (BarsAndBeats) const
 Converts a number of BarsAndBeats to a position.
 
TimePosition toTime (BeatPosition) const
 Converts a number of beats a time.
 
TimePosition toTime (BarsAndBeats) const
 Converts a number of BarsAndBeats to a position.
 
BarsAndBeats toBarsAndBeats (TimePosition) const
 Converts a time to a number of BarsAndBeats.
 
double getBpmAt (TimePosition) const
 Returns the tempo at a position.
 
BeatsPerSecond getBeatsPerSecondAt (TimePosition) const
 Returns the number of beats per second at a position.
 
Key getKeyAt (TimePosition) const
 Returns the key at a position.
 
TimeSignature getTimeSignatureAt (TimePosition) const
 Returns the TimeSignature at a position.
 
size_t hash () const
 Returns a unique hash of this sequence.
 

Detailed Description

Represents a tempo map with at least one TempoChange and TimeSigChange.

Once constructed, this can be used to convert between time and beats.

Definition at line 118 of file tracktion_Tempo.h.

Constructor & Destructor Documentation

◆ Sequence() [1/4]

tracktion::core::tempo::Sequence::Sequence ( std::vector< TempoChange tempos,
std::vector< TimeSigChange timeSigs,
LengthOfOneBeat  lengthOfOneBeat 
)

Creates a Sequence for at least one TempoChange and at least one TimeSigChange.

Definition at line 480 of file tracktion_Tempo.h.

◆ Sequence() [2/4]

tracktion::core::tempo::Sequence::Sequence ( std::vector< TempoChange tempos,
std::vector< TimeSigChange timeSigs,
std::vector< KeyChange keys,
LengthOfOneBeat  lengthOfOneBeat 
)

Creates a Sequence for at least one TempoChange and at least one TimeSigChange and an optional number of KeyChange[s].

Definition at line 486 of file tracktion_Tempo.h.

◆ Sequence() [3/4]

tracktion::core::tempo::Sequence::Sequence ( const Sequence o)

Copies another Sequence.

Definition at line 639 of file tracktion_Tempo.h.

◆ Sequence() [4/4]

tracktion::core::tempo::Sequence::Sequence ( Sequence &&  o)

Move constructor.

Definition at line 645 of file tracktion_Tempo.h.

Member Function Documentation

◆ getBeatsPerSecondAt()

BeatsPerSecond tracktion::core::tempo::Sequence::getBeatsPerSecondAt ( TimePosition  t) const

Returns the number of beats per second at a position.

Definition at line 736 of file tracktion_Tempo.h.

◆ getBpmAt()

double tracktion::core::tempo::Sequence::getBpmAt ( TimePosition  t) const

Returns the tempo at a position.

Definition at line 694 of file tracktion_Tempo.h.

◆ getKeyAt()

Key tracktion::core::tempo::Sequence::getKeyAt ( TimePosition  t) const

Returns the key at a position.

Definition at line 708 of file tracktion_Tempo.h.

◆ getTimeSignatureAt()

TimeSignature tracktion::core::tempo::Sequence::getTimeSignatureAt ( TimePosition  t) const

Returns the TimeSignature at a position.

Definition at line 722 of file tracktion_Tempo.h.

◆ hash()

size_t tracktion::core::tempo::Sequence::hash ( ) const

Returns a unique hash of this sequence.

Definition at line 750 of file tracktion_Tempo.h.

◆ operator=() [1/2]

Sequence & tracktion::core::tempo::Sequence::operator= ( const Sequence o)

Copies another Sequence.

Definition at line 651 of file tracktion_Tempo.h.

◆ operator=() [2/2]

Sequence & tracktion::core::tempo::Sequence::operator= ( Sequence &&  o)

Moves another Sequence.

Definition at line 659 of file tracktion_Tempo.h.

◆ toBarsAndBeats()

BarsAndBeats tracktion::core::tempo::Sequence::toBarsAndBeats ( TimePosition  t) const

Converts a time to a number of BarsAndBeats.

Definition at line 688 of file tracktion_Tempo.h.

◆ toBeats() [1/2]

BeatPosition tracktion::core::tempo::Sequence::toBeats ( BarsAndBeats  barsAndBeats) const

Converts a number of BarsAndBeats to a position.

Definition at line 673 of file tracktion_Tempo.h.

◆ toBeats() [2/2]

BeatPosition tracktion::core::tempo::Sequence::toBeats ( TimePosition  time) const

Converts a time to a number of beats.

Definition at line 668 of file tracktion_Tempo.h.

◆ toTime() [1/2]

TimePosition tracktion::core::tempo::Sequence::toTime ( BarsAndBeats  barsAndBeats) const

Converts a number of BarsAndBeats to a position.

Definition at line 683 of file tracktion_Tempo.h.

◆ toTime() [2/2]

TimePosition tracktion::core::tempo::Sequence::toTime ( BeatPosition  beats) const

Converts a number of beats a time.

Definition at line 678 of file tracktion_Tempo.h.


The documentation for this struct was generated from the following file: