Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::structure::tracks::TrackLane Class Reference

A container of MIDI or Audio regions. More...

#include <src/structure/tracks/track_lane.h>

Inheritance diagram for zrythm::structure::tracks::TrackLane:
Collaboration diagram for zrythm::structure::tracks::TrackLane:

Data Structures

struct  TrackLaneDependencies

Public Types

using SoloedLanesExistFunc = std::function<bool ()>
 Function to check if other soloed lanes exist in the owner.
Public Types inherited from zrythm::utils::UuidIdentifiableObject< TrackLane >
using uuid_base_type
 Exposes the CRTP parameter for concept checking.
Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::MidiRegion >
using ArrangerObjectChildType
Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::AudioRegion >
using ArrangerObjectChildType

Public Member Functions

 TrackLane (TrackLaneDependencies dependencies, QObject *parent=nullptr)
QString name () const
void setName (const QString &name)
Q_SIGNAL void nameChanged (const QString &name)
double height () const
void setHeight (const double height)
Q_SIGNAL void heightChanged (double height)
bool soloed () const
void setSoloed (bool solo)
Q_SIGNAL void soloChanged (bool solo)
bool muted () const
void setMuted (bool mute)
Q_SIGNAL void muteChanged (bool mute)
Q_INVOKABLE bool effectivelyMuted () const
 Returns if the lane is effectively muted (explicitly or implicitly muted).
std::uint8_t midiChannel () const
void setMidiChannel (std::uint8_t midi_ch)
Q_SIGNAL void midiChannelChanged (std::uint8_t midi_ch)
void generate_name (size_t index)
 Generates a default name for the lane at the given index.
std::string get_field_name_for_serialization (const arrangement::MidiRegion *_) const override
 Generate a snapshot for playback.
std::string get_field_name_for_serialization (const arrangement::AudioRegion *_) const override
Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< TrackLane >
 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< arrangement::MidiRegion >
 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 (double 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< arrangement::AudioRegion >
 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 (double 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.

Static Public Attributes

static constexpr auto default_format_str = QT_TR_NOOP_UTF8 ("Lane {}")

Properties

zrythm::structure::arrangement::AudioRegion QString name
double height
bool muted
bool soloed
std::uint8_t midiChannel

Friends

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

Additional Inherited Members

Protected Member Functions inherited from zrythm::utils::UuidIdentifiableBase
void set_raw_uuid (const QUuid &id)

Detailed Description

A container of MIDI or Audio regions.

Intended to be used as part of a TrackLaneList in a LanedTrackMixin as part of a Track. In practice, only Instrument, Audio and MIDI tracks have lanes.

For convenience, this handles all cases by including both MidiRegion and AudioRegion objects. In practice, only one list will be used.

Definition at line 23 of file track_lane.h.

Member Typedef Documentation

◆ SoloedLanesExistFunc

Function to check if other soloed lanes exist in the owner.

Definition at line 51 of file track_lane.h.

Constructor & Destructor Documentation

◆ TrackLane()

zrythm::structure::tracks::TrackLane::TrackLane ( TrackLaneDependencies dependencies,
QObject * parent = nullptr )
inline

Definition at line 61 of file track_lane.h.

Member Function Documentation

◆ effectivelyMuted()

Q_INVOKABLE bool zrythm::structure::tracks::TrackLane::effectivelyMuted ( ) const
inline

Returns if the lane is effectively muted (explicitly or implicitly muted).

Definition at line 127 of file track_lane.h.

◆ generate_name()

void zrythm::structure::tracks::TrackLane::generate_name ( size_t index)

Generates a default name for the lane at the given index.

Parameters
index

◆ get_field_name_for_serialization() [1/2]

std::string zrythm::structure::tracks::TrackLane::get_field_name_for_serialization ( const arrangement::AudioRegion * _) const
inlineoverride

Definition at line 172 of file track_lane.h.

◆ get_field_name_for_serialization() [2/2]

std::string zrythm::structure::tracks::TrackLane::get_field_name_for_serialization ( const arrangement::MidiRegion * _) const
inlineoverride

Generate a snapshot for playback.

TODO

Definition at line 167 of file track_lane.h.

◆ height()

double zrythm::structure::tracks::TrackLane::height ( ) const
inline

Definition at line 90 of file track_lane.h.

◆ midiChannel()

std::uint8_t zrythm::structure::tracks::TrackLane::midiChannel ( ) const
inline

Definition at line 140 of file track_lane.h.

◆ muted()

bool zrythm::structure::tracks::TrackLane::muted ( ) const
inline

Definition at line 112 of file track_lane.h.

◆ name()

QString zrythm::structure::tracks::TrackLane::name ( ) const
inline

Definition at line 78 of file track_lane.h.

◆ setHeight()

void zrythm::structure::tracks::TrackLane::setHeight ( const double height)
inline

Definition at line 91 of file track_lane.h.

◆ setMidiChannel()

void zrythm::structure::tracks::TrackLane::setMidiChannel ( std::uint8_t midi_ch)
inline

Definition at line 141 of file track_lane.h.

◆ setMuted()

void zrythm::structure::tracks::TrackLane::setMuted ( bool mute)
inline

Definition at line 113 of file track_lane.h.

◆ setName()

void zrythm::structure::tracks::TrackLane::setName ( const QString & name)
inline

Definition at line 79 of file track_lane.h.

◆ setSoloed()

void zrythm::structure::tracks::TrackLane::setSoloed ( bool solo)
inline

Definition at line 102 of file track_lane.h.

◆ soloed()

bool zrythm::structure::tracks::TrackLane::soloed ( ) const
inline

Definition at line 101 of file track_lane.h.

Field Documentation

◆ default_format_str

auto zrythm::structure::tracks::TrackLane::default_format_str = QT_TR_NOOP_UTF8 ("Lane {}")
staticconstexpr

Definition at line 53 of file track_lane.h.

Property Documentation

◆ height

double zrythm::structure::tracks::TrackLane::height
readwrite

Definition at line 38 of file track_lane.h.

◆ midiChannel

std::uint8_t zrythm::structure::tracks::TrackLane::midiChannel
readwrite

Definition at line 41 of file track_lane.h.

◆ muted

bool zrythm::structure::tracks::TrackLane::muted
readwrite

Definition at line 39 of file track_lane.h.

◆ name

zrythm::structure::arrangement::AudioRegion QString zrythm::structure::tracks::TrackLane::name
readwrite

Definition at line 37 of file track_lane.h.

◆ soloed

bool zrythm::structure::tracks::TrackLane::soloed
readwrite

Definition at line 40 of file track_lane.h.


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