Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::actions::MixerSelectionsAction Class Reference

Action for manipulating plugins (plugin slot selections in the mixer). More...

#include <src/gui/backend/backend/legacy_actions/mixer_selections_action.h>

Inheritance diagram for zrythm::gui::actions::MixerSelectionsAction:
Collaboration diagram for zrythm::gui::actions::MixerSelectionsAction:

Public Types

enum class  Type {
  Copy , Paste , Create , Delete ,
  Move , ChangeStatus , ChangeLoadBehavior
}
using PluginSlotType = plugins::PluginSlotType
using Plugin = plugins::Plugin
using PluginUuid = Plugin::Uuid
using PluginPtrVariant = plugins::PluginPtrVariant
using PluginConfiguration = plugins::PluginConfiguration
Public Types inherited from zrythm::gui::actions::UndoableAction
enum class  Type {
  TracklistSelections , ChannelSend , MixerSelections , ArrangerSelections ,
  MidiMapping , PortConnection , Port , Range ,
  Transport , Chord
}
 Type of UndoableAction. More...
using PortConnectionsManager = dsp::PortConnectionsManager

Public Member Functions

 MixerSelectionsAction (QObject *parent=nullptr)
 MixerSelectionsAction (std::optional< PluginSpan > ms, const dsp::PortConnectionsManager *connections_mgr, Type type, std::optional< Track::Uuid > to_track_id, std::optional< plugins::PluginSlot > to_slot, const PluginConfiguration *setting, int num_plugins, int new_val, zrythm::plugins::BridgeMode new_bridge_mode, QObject *parent=nullptr)
 Create a new action.
QString to_string () const override
 Stringizes the action to be used in Undo/Redo buttons.
void get_plugins (std::vector< Plugin * > &plugins) override
Public Member Functions inherited from zrythm::gui::actions::UndoableAction
 UndoableAction (Type type)
 UndoableAction (Type type, dsp::FramesPerTick frames_per_tick, sample_rate_t sample_rate)
void init_loaded (sample_rate_t engine_sample_rate)
 Non virtual function following the NVI pattern.
virtual bool needs_pause () const
 Returns whether the action requires pausing the engine.
virtual bool needs_transport_total_bar_update (bool perform) const
 Returns whether the total transport bars need to be recalculated.
virtual bool affects_audio_region_internal_positions () const
 Whether audio region loop/fade/etc.
virtual void get_plugins (std::vector< plugins::Plugin * > &plugins)
 Get the plugins referenced in this action.
auto get_frames_per_tick () const
auto get_ticks_per_frame () const
void set_num_actions (int num_actions)
 Sets the number of actions for this action.
void save_or_load_port_connections (bool performing)
 To be used by actions that save/load port connections.
void perform ()
 Performs the action.
void undo ()
 Undoes the action.

Data Fields

Type mixer_selections_action_type_ = Type ()
std::optional< plugins::PluginSlotto_slot_
 Starting target slot.
std::optional< Track::Uuidto_track_uuid_
 To track position.
bool new_channel_ = false
 Whether the plugins will be copied/moved into a new channel, if applicable.
int num_plugins_ = 0
 Number of plugins to create, when creating new plugins.
int new_val_ = 0
 Used when changing status.
zrythm::plugins::BridgeMode new_bridge_mode_
 Used when changing load behavior.
std::unique_ptr< PluginConfiguration > setting_
 PluginConfiguration to use when creating.
std::optional< std::vector< PluginPtrVariant > > ms_before_
 Clone of mixer selections at start.
std::optional< std::vector< PluginUuid > > ms_before_simple_
std::optional< std::vector< PluginPtrVariant > > deleted_ms_
 Deleted plugins (ie, plugins replaced during move/copy).
std::vector< std::unique_ptr< AutomationTrack > > deleted_ats_
 Automation tracks associated with the deleted plugins.
std::vector< std::unique_ptr< AutomationTrack > > ats_
 Automation tracks associated with the plugins.
Data Fields inherited from zrythm::gui::actions::UndoableAction
Type undoable_action_type_ {}
 Undoable action type.
dsp::FramesPerTick frames_per_tick_
 A snapshot of AudioEngine.frames_per_tick when the action is executed.
sample_rate_t sample_rate_ = 0
 Sample rate of this action.
int num_actions_ = 1
 Number of actions to perform.
std::unique_ptr< dsp::PortConnectionsManagerport_connections_before_
 An (optional) clone of the port connections at the start of the action, used for reverting port connections when undoing.
std::unique_ptr< dsp::PortConnectionsManagerport_connections_after_

Friends

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

Detailed Description

Action for manipulating plugins (plugin slot selections in the mixer).

See also
MixerSelections

Definition at line 22 of file mixer_selections_action.h.

Member Typedef Documentation

◆ Plugin

using zrythm::gui::actions::MixerSelectionsAction::Plugin = plugins::Plugin

Definition at line 47 of file mixer_selections_action.h.

◆ PluginConfiguration

using zrythm::gui::actions::MixerSelectionsAction::PluginConfiguration = plugins::PluginConfiguration

Definition at line 50 of file mixer_selections_action.h.

◆ PluginPtrVariant

using zrythm::gui::actions::MixerSelectionsAction::PluginPtrVariant = plugins::PluginPtrVariant

Definition at line 49 of file mixer_selections_action.h.

◆ PluginSlotType

using zrythm::gui::actions::MixerSelectionsAction::PluginSlotType = plugins::PluginSlotType

Definition at line 46 of file mixer_selections_action.h.

◆ PluginUuid

using zrythm::gui::actions::MixerSelectionsAction::PluginUuid = Plugin::Uuid

Definition at line 48 of file mixer_selections_action.h.

Member Enumeration Documentation

◆ Type

Enumerator
Copy 

Duplicate from existing plugins.

Paste 

Create new from clipboard.

Create 

Create new from PluginConfiguration.

Definition at line 32 of file mixer_selections_action.h.

Constructor & Destructor Documentation

◆ MixerSelectionsAction()

zrythm::gui::actions::MixerSelectionsAction::MixerSelectionsAction ( std::optional< PluginSpan > ms,
const dsp::PortConnectionsManager * connections_mgr,
Type type,
std::optional< Track::Uuid > to_track_id,
std::optional< plugins::PluginSlot > to_slot,
const PluginConfiguration * setting,
int num_plugins,
int new_val,
zrythm::plugins::BridgeMode new_bridge_mode,
QObject * parent = nullptr )

Create a new action.

Parameters
msThe mixer selections before the action is performed.
slot_typeTarget slot type.
to_track_name_hashTarget track name hash, or 0 for new channel.
to_slotTarget slot.
settingThe plugin setting, if creating plugins.
num_pluginsThe number of plugins to create, if creating plugins.

Member Function Documentation

◆ get_plugins()

void zrythm::gui::actions::MixerSelectionsAction::get_plugins ( std::vector< Plugin * > & plugins)
inlineoverride

Definition at line 78 of file mixer_selections_action.h.

◆ to_string()

QString zrythm::gui::actions::MixerSelectionsAction::to_string ( ) const
overridevirtual

Stringizes the action to be used in Undo/Redo buttons.

Implements zrythm::gui::actions::UndoableAction.

Field Documentation

◆ ats_

std::vector<std::unique_ptr<AutomationTrack> > zrythm::gui::actions::MixerSelectionsAction::ats_

Automation tracks associated with the plugins.

These are used when undoing so we can readd the automation events, if applicable.

Definition at line 202 of file mixer_selections_action.h.

◆ deleted_ats_

std::vector<std::unique_ptr<AutomationTrack> > zrythm::gui::actions::MixerSelectionsAction::deleted_ats_

Automation tracks associated with the deleted plugins.

These are used when undoing so we can readd the automation events, if applicable.

Definition at line 194 of file mixer_selections_action.h.

◆ deleted_ms_

std::optional<std::vector<PluginPtrVariant> > zrythm::gui::actions::MixerSelectionsAction::deleted_ms_

Deleted plugins (ie, plugins replaced during move/copy).

Used during undo to bring them back.

Definition at line 186 of file mixer_selections_action.h.

◆ mixer_selections_action_type_

Type zrythm::gui::actions::MixerSelectionsAction::mixer_selections_action_type_ = Type ()

Definition at line 142 of file mixer_selections_action.h.

◆ ms_before_

std::optional<std::vector<PluginPtrVariant> > zrythm::gui::actions::MixerSelectionsAction::ms_before_

Clone of mixer selections at start.

Definition at line 177 of file mixer_selections_action.h.

◆ ms_before_simple_

std::optional<std::vector<PluginUuid> > zrythm::gui::actions::MixerSelectionsAction::ms_before_simple_

Definition at line 179 of file mixer_selections_action.h.

◆ new_bridge_mode_

zrythm::plugins::BridgeMode zrythm::gui::actions::MixerSelectionsAction::new_bridge_mode_
Initial value:
=
zrythm::plugins::BridgeMode::None

Used when changing load behavior.

Definition at line 166 of file mixer_selections_action.h.

◆ new_channel_

bool zrythm::gui::actions::MixerSelectionsAction::new_channel_ = false

Whether the plugins will be copied/moved into a new channel, if applicable.

Definition at line 157 of file mixer_selections_action.h.

◆ new_val_

int zrythm::gui::actions::MixerSelectionsAction::new_val_ = 0

Used when changing status.

Definition at line 163 of file mixer_selections_action.h.

◆ num_plugins_

int zrythm::gui::actions::MixerSelectionsAction::num_plugins_ = 0

Number of plugins to create, when creating new plugins.

Definition at line 160 of file mixer_selections_action.h.

◆ setting_

std::unique_ptr<PluginConfiguration> zrythm::gui::actions::MixerSelectionsAction::setting_

PluginConfiguration to use when creating.

Definition at line 172 of file mixer_selections_action.h.

◆ to_slot_

std::optional<plugins::PluginSlot> zrythm::gui::actions::MixerSelectionsAction::to_slot_

Starting target slot.

The rest of the slots will start from this so they can be calculated when doing/undoing.

Definition at line 150 of file mixer_selections_action.h.

◆ to_track_uuid_

std::optional<Track::Uuid> zrythm::gui::actions::MixerSelectionsAction::to_track_uuid_

To track position.

Definition at line 153 of file mixer_selections_action.h.


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