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

A track that can host modulator plugins. More...

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

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

Public Member Functions

 ModulatorTrack (FinalTrackDependencies dependencies)
PluginPtrVariant insert_modulator (plugins::PluginSlot::SlotNo slot, plugins::PluginUuidReference modulator_id, bool replace_mode, bool confirm, bool gen_automatables, bool recalc_graph, bool pub_events)
 Inserts and connects a Modulator to the Track.
std::optional< PluginPtrVariant > get_modulator (plugins::PluginSlot::SlotNo slot) const
auto get_modulator_macro_processors () const
Public Member Functions inherited from zrythm::structure::tracks::Track
bool has_piano_roll () const
bool is_folder () const
bool is_audio_group () const
bool is_midi_group () const
bool is_audio_bus () const
bool is_midi_bus () const
bool is_modulator () const
bool is_chord () const
bool is_marker () const
bool is_audio () const
bool is_instrument () const
bool is_midi () const
bool is_master () const
Type type () const
AutomationTracklistautomationTracklist () const
QString name () const
void setName (const QString &name)
Q_SIGNAL void nameChanged (const QString &name)
QColor color () const
void setColor (const QColor &color)
Q_SIGNAL void colorChanged (const QColor &color)
QString comment () const
void setComment (const QString &comment)
Q_SIGNAL void commentChanged (const QString &comment)
bool visible () const
void setVisible (bool visible)
Q_SIGNAL void visibleChanged (bool visible)
bool enabled () const
void setEnabled (bool enabled)
Q_SIGNAL void enabledChanged (bool enabled)
double height () const
void setHeight (double height)
Q_SIGNAL void heightChanged (double height)
double fullVisibleHeight () const
Q_SIGNAL void fullVisibleHeightChanged ()
QString icon () const
void setIcon (const QString &icon)
Q_SIGNAL void iconChanged (const QString &icon)
Channelchannel () const
plugins::PluginGroupmodulators () const
TrackLaneListlanes () const
RecordableTrackMixinrecordableTrackMixin () const
PianoRollTrackMixinpianoRollTrackMixin () const
bool clipLauncherMode () const
void setClipLauncherMode (bool mode)
Q_SIGNAL void clipLauncherModeChanged (bool mode)
Q_INVOKABLE void regeneratePlaybackCaches (utils::ExpandableTickRange affectedRange)
 To be connected to to notify of any changes to the playable content, like MIDI or audio events.
bool is_deletable () const
bool is_copyable () const
bool has_automation () const
double get_full_visible_height () const
 Returns the full visible height (main height + height of all visible automation tracks + height of all visible lanes).
bool multiply_heights (double multiplier, bool visible_only, bool check_only)
bool can_be_group_target () const
template<arrangement::RegionObject RegionT>
auto generate_name_for_region (const RegionT &region, AutomationTrack *automation_track=nullptr)
void collect_timeline_objects (std::vector< ArrangerObjectPtrVariant > &objects) const
 Appends all the timeine objects in the track to objects.
bool contains_uninstantiated_plugin () const
utils::Utf8String get_name () const
 Getter for the track name.
auto get_input_signal_type () const
auto get_output_signal_type () const
uint8_t get_midi_ch (const arrangement::MidiRegion &midi_region) const
 Returns the MIDI channel that this region should be played on, starting from 1.
void collect_plugins (std::vector< plugins::PluginPtrVariant > &plugins) const
 Fills in the given array with all plugins in the track.
void set_caches (CacheType types)
 Set various caches (snapshots, track name hash, plugin input/output ports, etc).
utils::Utf8String get_full_designation_for_port (const dsp::Port &port) const
void generate_basic_automation_tracks ()
 Adds basic automation tracks.
auto & get_plugin_registry () const
auto & get_plugin_registry ()
auto & get_port_registry () const
auto & get_port_registry ()
auto & get_param_registry () const
auto & get_param_registry ()
auto & get_object_registry () const
auto & get_object_registry ()
TrackProcessorget_track_processor () const
auto get_icon_name () const
Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< Track >
UuidIdentifiableObject & operator= (const UuidIdentifiableObject &other)=default
auto get_uuid () const

Friends

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

Additional Inherited Members

Public Types inherited from zrythm::structure::tracks::Track
enum class  Type : basic_enum_base_type_t {
  Instrument , Audio , Master , Chord ,
  Marker , Modulator , AudioBus , AudioGroup ,
  Midi , MidiBus , MidiGroup , Folder
}
using Plugin = plugins::Plugin
using PluginUuid = Plugin::Uuid
using PortType = dsp::PortType
using PluginRegistry = plugins::PluginRegistry
using PluginPtrVariant = PluginRegistry::VariantType
using PluginSlot = plugins::PluginSlot
using ArrangerObject = structure::arrangement::ArrangerObject
using ArrangerObjectPtrVariant
using ArrangerObjectRegistry = structure::arrangement::ArrangerObjectRegistry
using Color = utils::Color
Static Public Member Functions inherited from zrythm::structure::tracks::Track
static bool type_can_have_region_type (Type type, ArrangerObject::Type region_type)
static constexpr bool type_is_foldable (Type type)
static constexpr bool type_is_copyable (Type type)
static constexpr bool type_is_deletable (Type type)
 Returns whether a track of the given type should be deletable by the user.
static Type type_get_from_plugin_descriptor (const zrythm::plugins::PluginDescriptor &descr)
static consteval bool type_has_mono_compat_switch (const Type tt)
static constexpr bool type_is_compatible_for_moving (const Type type1, const Type type2)
 Returns if regions in tracks from type1 can be moved to type2.
static constexpr bool type_has_piano_roll (const Type type)
 Returns if the Track should have a piano roll.
static constexpr bool type_has_inputs (const Type type)
 Returns if the Track should have an inputs selector.
static constexpr bool type_can_be_group_target (const Type type)
 Returns if the Track can be a direct route target.
static constexpr bool type_can_have_automation (const Type type)
static constexpr bool type_can_have_lanes (const Type type)
template<typename T>
static consteval Type get_type_for_class ()
static bool is_plugin_descriptor_valid_for_slot_type (const plugins::PluginDescriptor &descr, zrythm::plugins::PluginSlotType slot_type, Track::Type track_type)
 Returns if descr can be dropped at slot_type in a track of type track_type.
Static Public Attributes inherited from zrythm::structure::tracks::Track
static constexpr int MIN_HEIGHT = 26
static constexpr int DEF_HEIGHT = 52
Protected Types inherited from zrythm::structure::tracks::Track
enum class  TrackFeatures : std::uint8_t {
  Modulators = 1 << 0 , Automation = 1 << 1 , Lanes = 1 << 2 , Recording = 1 << 3 ,
  PianoRoll = 1 << 4
}
Protected Member Functions inherited from zrythm::structure::tracks::Track
 Track (Type type, PortType in_signal_type, PortType out_signal_type, TrackFeatures enabled_features, BaseTrackDependencies dependencies)
 Constructor to be used by subclasses.
virtual void set_playback_caches ()
 Set the playback caches for a track.
void generate_automation_tracks_for_processor (std::vector< utils::QObjectUniquePtr< AutomationTrack > > &ats, const dsp::ProcessorBase &processor)
utils::QObjectUniquePtr< TrackProcessormake_track_processor (std::optional< TrackProcessor::FillEventsCallback > fill_events_cb=std::nullopt, std::optional< TrackProcessor::TransformMidiInputsFunc > transform_midi_inputs_func=std::nullopt, std::optional< TrackProcessor::AppendMidiInputsToOutputsFunc > append_midi_inputs_to_outputs_func=std::nullopt)
 Implementations with a processor must call this in their constructor.
virtual void collect_additional_timeline_objects (std::vector< ArrangerObjectPtrVariant > &objects) const
 Called by collect_timeline_objects to collect any additional objects not handled by this class (such as markers and scales).
Protected Attributes inherited from zrythm::structure::tracks::Track
BaseTrackDependencies base_dependencies_
Type type_ {}
 The type of track this is.
TrackFeatures features_ {}
utils::Utf8String name_
 Track name, used in channel too.
utils::Utf8String icon_name_
 Icon name of the track.
bool visible_ = true
 Whole Track is visible or not.
double main_height_ { DEF_HEIGHT }
 Height of the main part (without lanes).
bool enabled_ = true
 Active (enabled) or not.
Color color_
 Track color.
PortType in_signal_type_ = {}
 The input signal type (eg audio bus tracks have audio input signals).
PortType out_signal_type_ = {}
 The output signal type (eg midi tracks have MIDI output signals).
utils::Utf8String comment_
 User comments.
std::optional< dsp::FileAudioSourceUuidReference > frozen_clip_id_
 Pool ID of the clip if track is frozen (unset if not frozen).
utils::QObjectUniquePtr< AutomationTracklistautomation_tracklist_
 Automation tracks, if track is automatable.
utils::QObjectUniquePtr< TrackProcessorprocessor_
 The TrackProcessor, used for processing.
utils::QObjectUniquePtr< Channelchannel_
 Channel for this track, if any.
utils::QObjectUniquePtr< plugins::PluginGroupmodulators_
 Modulators.
std::vector< utils::QObjectUniquePtr< dsp::ModulatorMacroProcessor > > modulator_macro_processors_
 Modulator macros.
utils::QObjectUniquePtr< TrackLaneListlanes_
utils::QObjectUniquePtr< RecordableTrackMixinrecordable_track_mixin_
utils::QObjectUniquePtr< PianoRollTrackMixinpiano_roll_track_mixin_
utils::QObjectUniquePtr< utils::PlaybackCacheSchedulerplayable_content_cache_request_debouncer_
 Debouncer/scheduler of audio/MIDI cache requests.
bool clip_launcher_mode_ {}
Properties inherited from zrythm::structure::tracks::Track
Type type
zrythm::structure::tracks::AutomationTracklistautomationTracklist
QString name
QColor color
QString comment
QString icon
bool visible
bool enabled
double height
double fullVisibleHeight
zrythm::structure::tracks::Channelchannel
zrythm::plugins::PluginGroupmodulators
zrythm::structure::tracks::TrackLaneListlanes
zrythm::structure::tracks::RecordableTrackMixinrecordableTrackMixin
zrythm::structure::tracks::PianoRollTrackMixinpianoRollTrackMixin
bool clipLauncherMode

Detailed Description

A track that can host modulator plugins.

Definition at line 13 of file modulator_track.h.

Member Function Documentation

◆ get_modulator_macro_processors()

auto zrythm::structure::tracks::ModulatorTrack::get_modulator_macro_processors ( ) const
inline

Definition at line 52 of file modulator_track.h.

◆ insert_modulator()

PluginPtrVariant zrythm::structure::tracks::ModulatorTrack::insert_modulator ( plugins::PluginSlot::SlotNo slot,
plugins::PluginUuidReference modulator_id,
bool replace_mode,
bool confirm,
bool gen_automatables,
bool recalc_graph,
bool pub_events )

Inserts and connects a Modulator to the Track.

Parameters
replace_modeWhether to perform the operation in replace mode (replace current modulator if true, not touching other modulators, or push other modulators forward if false).

◆ from_json

void from_json ( const nlohmann::json & j,
ModulatorTrack & track )
friend

Definition at line 62 of file modulator_track.h.

◆ to_json

void to_json ( nlohmann::json & j,
const ModulatorTrack & track )
friend

Definition at line 58 of file modulator_track.h.


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