Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::TempoMapWrapper Class Reference
Inheritance diagram for zrythm::dsp::TempoMapWrapper:
Collaboration diagram for zrythm::dsp::TempoMapWrapper:

Signals

void tempoEventsChanged ()
void timeSignatureEventsChanged ()
void sampleRateChanged ()
void baseBpmChanged ()
void baseTimeSignatureChanged ()

Public Member Functions

 TempoMapWrapper (TempoMap &tempo_map, QObject *parent=nullptr)
QQmlListProperty< TempoEventWrappertempoEvents ()
QQmlListProperty< TimeSignatureEventWrappertimeSignatureEvents ()
Q_INVOKABLE int timeSignatureNumeratorAtTick (int64_t tick) const
 Returns the time signature at the given tick.
Q_INVOKABLE int timeSignatureDenominatorAtTick (int64_t tick) const
Q_INVOKABLE double tempoAtTick (int64_t tick) const
Q_INVOKABLE int getPpq () const
double sampleRate () const
void setSampleRate (double sampleRate)
double baseBpm () const
void setBaseBpm (double bpm)
int baseTimeSignatureNumerator () const
int baseTimeSignatureDenominator () const
void setBaseTimeSignatureNumerator (int numerator)
void setBaseTimeSignatureDenominator (int denominator)
Q_INVOKABLE void addTempoEvent (qint64 tick, double bpm, TempoEventWrapper::CurveType curveType)
Q_INVOKABLE void addTimeSignatureEvent (qint64 tick, int numerator, int denominator)
Q_INVOKABLE void clearTempoEvents ()
Q_INVOKABLE void clearTimeSignatureEvents ()
Q_INVOKABLE MusicalPositionWrappergetMusicalPosition (int64_t tick) const
Q_INVOKABLE QString getMusicalPositionString (int64_t tick) const
Q_INVOKABLE int64_t getTickFromMusicalPosition (int bar, int beat, int sixteenth, int tick) const
Q_INVOKABLE int getMusicalPositionBar (int64_t tick) const
Q_INVOKABLE int getMusicalPositionBeat (int64_t tick) const
Q_INVOKABLE int getMusicalPositionSixteenth (int64_t tick) const
Q_INVOKABLE int getMusicalPositionTick (int64_t tick) const
void rebuildWrappers ()
 To be called when the tempo map has been modified directly.
const TempoMap & get_tempo_map () const
 Read-only access to tempo map.

Properties

QQmlListProperty< TempoEventWrappertempoEvents
QQmlListProperty< TimeSignatureEventWrappertimeSignatureEvents
double sampleRate
double baseBpm
int baseTimeSignatureNumerator
int baseTimeSignatureDenominator

Detailed Description

Definition at line 103 of file tempo_map_qml_adapter.h.

Constructor & Destructor Documentation

◆ TempoMapWrapper()

zrythm::dsp::TempoMapWrapper::TempoMapWrapper ( TempoMap & tempo_map,
QObject * parent = nullptr )
inlineexplicit

Definition at line 116 of file tempo_map_qml_adapter.h.

Member Function Documentation

◆ addTempoEvent()

Q_INVOKABLE void zrythm::dsp::TempoMapWrapper::addTempoEvent ( qint64 tick,
double bpm,
TempoEventWrapper::CurveType curveType )
inline

Definition at line 203 of file tempo_map_qml_adapter.h.

◆ addTimeSignatureEvent()

Q_INVOKABLE void zrythm::dsp::TempoMapWrapper::addTimeSignatureEvent ( qint64 tick,
int numerator,
int denominator )
inline

Definition at line 213 of file tempo_map_qml_adapter.h.

◆ baseBpm()

double zrythm::dsp::TempoMapWrapper::baseBpm ( ) const
inline

Definition at line 162 of file tempo_map_qml_adapter.h.

◆ baseTimeSignatureDenominator()

int zrythm::dsp::TempoMapWrapper::baseTimeSignatureDenominator ( ) const
inline

Definition at line 177 of file tempo_map_qml_adapter.h.

◆ baseTimeSignatureNumerator()

int zrythm::dsp::TempoMapWrapper::baseTimeSignatureNumerator ( ) const
inline

Definition at line 173 of file tempo_map_qml_adapter.h.

◆ clearTempoEvents()

Q_INVOKABLE void zrythm::dsp::TempoMapWrapper::clearTempoEvents ( )
inline

Definition at line 221 of file tempo_map_qml_adapter.h.

◆ clearTimeSignatureEvents()

Q_INVOKABLE void zrythm::dsp::TempoMapWrapper::clearTimeSignatureEvents ( )
inline

Definition at line 228 of file tempo_map_qml_adapter.h.

◆ get_tempo_map()

const TempoMap & zrythm::dsp::TempoMapWrapper::get_tempo_map ( ) const
inline

Read-only access to tempo map.

Definition at line 283 of file tempo_map_qml_adapter.h.

◆ getMusicalPosition()

Q_INVOKABLE MusicalPositionWrapper * zrythm::dsp::TempoMapWrapper::getMusicalPosition ( int64_t tick) const
inline

Definition at line 235 of file tempo_map_qml_adapter.h.

◆ getMusicalPositionBar()

Q_INVOKABLE int zrythm::dsp::TempoMapWrapper::getMusicalPositionBar ( int64_t tick) const
inline

Definition at line 256 of file tempo_map_qml_adapter.h.

◆ getMusicalPositionBeat()

Q_INVOKABLE int zrythm::dsp::TempoMapWrapper::getMusicalPositionBeat ( int64_t tick) const
inline

Definition at line 260 of file tempo_map_qml_adapter.h.

◆ getMusicalPositionSixteenth()

Q_INVOKABLE int zrythm::dsp::TempoMapWrapper::getMusicalPositionSixteenth ( int64_t tick) const
inline

Definition at line 264 of file tempo_map_qml_adapter.h.

◆ getMusicalPositionTick()

Q_INVOKABLE int zrythm::dsp::TempoMapWrapper::getMusicalPositionTick ( int64_t tick) const
inline

Definition at line 268 of file tempo_map_qml_adapter.h.

◆ getPpq()

Q_INVOKABLE int zrythm::dsp::TempoMapWrapper::getPpq ( ) const
inline

Definition at line 141 of file tempo_map_qml_adapter.h.

◆ getTickFromMusicalPosition()

Q_INVOKABLE int64_t zrythm::dsp::TempoMapWrapper::getTickFromMusicalPosition ( int bar,
int beat,
int sixteenth,
int tick ) const
inline

Definition at line 244 of file tempo_map_qml_adapter.h.

◆ rebuildWrappers()

void zrythm::dsp::TempoMapWrapper::rebuildWrappers ( )
inline

To be called when the tempo map has been modified directly.

Definition at line 276 of file tempo_map_qml_adapter.h.

◆ sampleRate()

double zrythm::dsp::TempoMapWrapper::sampleRate ( ) const
inline

Definition at line 146 of file tempo_map_qml_adapter.h.

◆ setBaseBpm()

void zrythm::dsp::TempoMapWrapper::setBaseBpm ( double bpm)
inline

Definition at line 163 of file tempo_map_qml_adapter.h.

◆ setBaseTimeSignatureDenominator()

void zrythm::dsp::TempoMapWrapper::setBaseTimeSignatureDenominator ( int denominator)
inline

Definition at line 191 of file tempo_map_qml_adapter.h.

◆ setBaseTimeSignatureNumerator()

void zrythm::dsp::TempoMapWrapper::setBaseTimeSignatureNumerator ( int numerator)
inline

Definition at line 181 of file tempo_map_qml_adapter.h.

◆ setSampleRate()

void zrythm::dsp::TempoMapWrapper::setSampleRate ( double sampleRate)
inline

Definition at line 150 of file tempo_map_qml_adapter.h.

◆ tempoEvents()

QQmlListProperty< TempoEventWrapper > zrythm::dsp::TempoMapWrapper::tempoEvents ( )
inline

Definition at line 122 of file tempo_map_qml_adapter.h.

◆ timeSignatureEvents()

QQmlListProperty< TimeSignatureEventWrapper > zrythm::dsp::TempoMapWrapper::timeSignatureEvents ( )
inline

Definition at line 127 of file tempo_map_qml_adapter.h.

Property Documentation

◆ baseBpm

double zrythm::dsp::TempoMapWrapper::baseBpm
readwrite

Definition at line 109 of file tempo_map_qml_adapter.h.

◆ baseTimeSignatureDenominator

int zrythm::dsp::TempoMapWrapper::baseTimeSignatureDenominator
readwrite

Definition at line 111 of file tempo_map_qml_adapter.h.

◆ baseTimeSignatureNumerator

int zrythm::dsp::TempoMapWrapper::baseTimeSignatureNumerator
readwrite

Definition at line 110 of file tempo_map_qml_adapter.h.

◆ sampleRate

double zrythm::dsp::TempoMapWrapper::sampleRate
readwrite

Definition at line 108 of file tempo_map_qml_adapter.h.

◆ tempoEvents

QQmlListProperty<TempoEventWrapper> zrythm::dsp::TempoMapWrapper::tempoEvents
read

Definition at line 106 of file tempo_map_qml_adapter.h.

◆ timeSignatureEvents

QQmlListProperty<TimeSignatureEventWrapper> zrythm::dsp::TempoMapWrapper::timeSignatureEvents
read

Definition at line 107 of file tempo_map_qml_adapter.h.


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