Zrythm v2.0.0-DEV
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 = GenericBoolGetter
 Function to check if other soloed lanes exist in the owner.
Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::MidiRegion >
using ArrangerObjectChildType
using ArrangerObjectListModel
Public Types inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::AudioRegion >
using ArrangerObjectChildType
using ArrangerObjectListModel

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 & operator= (const UuidIdentifiableObject &other)=default
auto get_uuid () const
Public Member Functions inherited from zrythm::structure::arrangement::ArrangerObjectOwner< arrangement::MidiRegion >
 ArrangerObjectOwner (ArrangerObjectRegistry &registry, dsp::FileAudioSourceRegistry &file_audio_source_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.
ArrangerObjectListModel * get_model () const
ArrangerObjectUuidReference remove_object (this SelfT &self, const ArrangerObject::Uuid &id)
void insert_object (this SelfT &self, const ArrangerObjectUuidReference &obj_ref, int idx)
void add_object (this SelfT &self, 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 (ArrangerObjectRegistry &registry, dsp::FileAudioSourceRegistry &file_audio_source_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.
ArrangerObjectListModel * get_model () const
ArrangerObjectUuidReference remove_object (this SelfT &self, const ArrangerObject::Uuid &id)
void insert_object (this SelfT &self, const ArrangerObjectUuidReference &obj_ref, int idx)
void add_object (this SelfT &self, 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)

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 52 of file track_lane.h.

Constructor & Destructor Documentation

◆ TrackLane()

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

Definition at line 63 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 133 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 178 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 173 of file track_lane.h.

◆ height()

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

Definition at line 96 of file track_lane.h.

◆ midiChannel()

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

Definition at line 146 of file track_lane.h.

◆ muted()

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

Definition at line 118 of file track_lane.h.

◆ name()

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

Definition at line 84 of file track_lane.h.

◆ setHeight()

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

Definition at line 97 of file track_lane.h.

◆ setMidiChannel()

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

Definition at line 147 of file track_lane.h.

◆ setMuted()

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

Definition at line 119 of file track_lane.h.

◆ setName()

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

Definition at line 85 of file track_lane.h.

◆ setSoloed()

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

Definition at line 108 of file track_lane.h.

◆ soloed()

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

Definition at line 107 of file track_lane.h.

◆ from_json

void from_json ( const nlohmann::json & j,
TrackLane & lane )
friend

Definition at line 207 of file track_lane.h.

◆ init_from

void init_from ( TrackLane & obj,
const TrackLane & other,
utils::ObjectCloneType clone_type )
friend

Definition at line 225 of file track_lane.h.

◆ to_json

void to_json ( nlohmann::json & j,
const TrackLane & lane )
friend

Definition at line 190 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 54 of file track_lane.h.

Property Documentation

◆ height

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

Definition at line 39 of file track_lane.h.

◆ midiChannel

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

Definition at line 42 of file track_lane.h.

◆ muted

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

Definition at line 40 of file track_lane.h.

◆ name

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

Definition at line 38 of file track_lane.h.

◆ soloed

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

Definition at line 41 of file track_lane.h.


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