Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::structure::arrangement::TempoObjectManager Class Referencefinal

Manages tempo and time signature objects for a project. More...

#include <src/structure/arrangement/tempo_object_manager.h>

Inheritance diagram for zrythm::structure::arrangement::TempoObjectManager:
Collaboration diagram for zrythm::structure::arrangement::TempoObjectManager:

Public Member Functions

 TempoObjectManager (utils::IObjectRegistry &registry, QObject *parent=nullptr)
void sync_to_tempo_map (dsp::TempoMapWrapper &wrapper)
 Rebuilds the given tempo map from this manager's objects.
std::string get_field_name_for_serialization (const TempoObject *) const override
std::string get_field_name_for_serialization (const TimeSignatureObject *) const override
Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< TempoObjectManager >
 UuidIdentifiableObject (QObject *parent=nullptr)
auto get_uuid () const
Public Member Functions inherited from zrythm::utils::UuidIdentifiableBase
 UuidIdentifiableBase (QObject *parent=nullptr)
 UuidIdentifiableBase (const QUuid &id, QObject *parent=nullptr)
QUuid raw_uuid () const
Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObjectOwner< TempoObject >
 ArrangerObjectOwner (utils::IObjectRegistry &registry, T &derived)
auto & get_children_vector () const
auto get_children_view () const
auto get_sorted_children_view () const
void add_ticks_to_children (dsp::ContentTick ticks)
bool contains_object (const ArrangerObject::Uuid &id) const
 O(1) lookup if an object with the given ID exists.
ArrangerObjectListModelget_model () const
ArrangerObjectUuidReference remove_object (const ArrangerObject::Uuid &id)
void insert_object (const ArrangerObjectUuidReference &obj_ref, int idx)
void add_object (const ArrangerObjectUuidReference &obj_ref)
void clear_objects ()
virtual std::string get_field_name_for_serialization (const ChildT *) const=0
 Get the children field name to be used during serialization/deserialization.
Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObjectOwner< TimeSignatureObject >
 ArrangerObjectOwner (utils::IObjectRegistry &registry, T &derived)
auto & get_children_vector () const
auto get_children_view () const
auto get_sorted_children_view () const
void add_ticks_to_children (dsp::ContentTick ticks)
bool contains_object (const ArrangerObject::Uuid &id) const
 O(1) lookup if an object with the given ID exists.
ArrangerObjectListModelget_model () const
ArrangerObjectUuidReference remove_object (const ArrangerObject::Uuid &id)
void insert_object (const ArrangerObjectUuidReference &obj_ref, int idx)
void add_object (const ArrangerObjectUuidReference &obj_ref)
void clear_objects ()
virtual std::string get_field_name_for_serialization (const ChildT *) const=0
 Get the children field name to be used during serialization/deserialization.

Friends

void init_from (TempoObjectManager &obj, const TempoObjectManager &other, utils::ObjectCloneType clone_type)
void to_json (nlohmann::json &j, const TempoObjectManager &manager)
void from_json (const nlohmann::json &j, TempoObjectManager &manager)

Additional Inherited Members

Public Types inherited from zrythm::utils::UuidIdentifiableObject< TempoObjectManager >
using uuid_base_type
 Exposes the CRTP parameter for concept checking.
Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< TempoObject >
using ArrangerObjectChildType
Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< TimeSignatureObject >
using ArrangerObjectChildType
Protected Member Functions inherited from zrythm::utils::UuidIdentifiableBase
void set_raw_uuid (const QUuid &id)

Detailed Description

Manages tempo and time signature objects for a project.

Definition at line 17 of file tempo_object_manager.h.

Member Function Documentation

◆ get_field_name_for_serialization() [1/2]

std::string zrythm::structure::arrangement::TempoObjectManager::get_field_name_for_serialization ( const TempoObject * ) const
inlineoverride

Definition at line 58 of file tempo_object_manager.h.

◆ get_field_name_for_serialization() [2/2]

std::string zrythm::structure::arrangement::TempoObjectManager::get_field_name_for_serialization ( const TimeSignatureObject * ) const
inlineoverride

Definition at line 64 of file tempo_object_manager.h.

◆ sync_to_tempo_map()

void zrythm::structure::arrangement::TempoObjectManager::sync_to_tempo_map ( dsp::TempoMapWrapper & wrapper)

Rebuilds the given tempo map from this manager's objects.

Clears the map's inserted time-signature and tempo events and re-adds them from the manager's sorted children (time signatures first, then tempos). The map's base tempo / base time signature are unaffected (they are intrinsic to the map and govern the region from tick 0 up to the first inserted event).

Must not be called while the audio engine is running.


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