|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
An action that performs changes to the arranger selections. More...
#include <src/gui/backend/backend/legacy_actions/arranger_selections_action.h>


Data Structures | |
| class | RecordAction |
| class | MoveOrDuplicateAction |
| class | MoveOrDuplicateTimelineAction |
| class | MoveOrDuplicateMidiAction |
| class | MoveOrDuplicateChordAction |
| class | MoveOrDuplicateAutomationAction |
| class | MoveMidiAction |
| class | MoveChordAction |
| class | LinkAction |
| class | AutomationFillAction |
| class | SplitAction |
| class | MergeAction |
| class | ResizeAction |
| class | QuantizeAction |
Public Types | |
| enum class | Type { AutomationFill , Create , Delete , Duplicate , Edit , Link , Merge , Move , Quantize , Record , Resize , Split } |
| enum class | ResizeType { L , R , LLoop , RLoop , LFade , RFade , LStretch , RStretch } |
| Type used when the action is a RESIZE action. More... | |
| enum class | EditType { Name , Position , Primitive , Scale , Fades , Mute , EditorFunction } |
| Type used when the action is an EDIT action. More... | |
| using | Position = zrythm::dsp::Position |
| 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 | |
| ArrangerObjectRegistry & | get_arranger_object_registry () const |
| bool | needs_transport_total_bar_update (bool perform) const override |
| Returns whether the total transport bars need to be recalculated. | |
| bool | needs_pause () const override |
| Returns whether the action requires pausing the engine. | |
| QString | to_string () const final |
| Stringizes the action to be used in Undo/Redo buttons. | |
| 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 | 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 | type_ {} |
| Action type. | |
| std::optional< std::vector< ArrangerObjectPtrVariant > > | sel_ |
| A clone of the ArrangerSelections before the change. | |
| std::optional< std::vector< ArrangerObjectPtrVariant > > | sel_after_ |
| A clone of the ArrangerSelections after the change (used in the EDIT action and quantize). | |
| EditType | edit_type_ {} |
| Type of edit action, if an Edit action. | |
| double | ticks_ {} |
| Ticks diff. | |
| int | delta_tracks_ {} |
| Tracks moved. | |
| int | delta_lanes_ {} |
| Lanes moved. | |
| int | delta_chords_ = 0 |
| Chords moved (up/down in the Chord editor). | |
| int | delta_pitch_ = 0 |
| Delta of MidiNote pitch. | |
| int | delta_vel_ = 0 |
| Delta of MidiNote velocity. | |
| double | delta_normalized_amount_ = 0.0 |
| Difference in a normalized amount, such as automation point normalized value. | |
| std::optional< std::pair< Position, Position > > | selected_positions_in_audio_editor_ |
| std::optional< ArrangerObject::Uuid > | clip_editor_region_id_ |
| Clip editor region ID (for non-timeline actions). | |
| std::optional< dsp::PortUuid > | target_port_ |
| Target port (used to find corresponding automation track when moving/copying automation regions to another automation track/another track). | |
| utils::Utf8String | str_ |
| String, when changing a string. | |
| Position | pos_ |
| Position, when changing a Position. | |
| std::vector< ArrangerObject::Uuid > | r1_ |
| Used when splitting - these are the split BoundedObject's. | |
| std::vector< ArrangerObject::Uuid > | r2_ |
| bool | first_run_ = false |
| Number of split objects. | |
| std::unique_ptr< gui::old_dsp::QuantizeOptions > | opts_ {} |
| QuantizeOptions clone, if quantizing. | |
| std::optional< ArrangerObjectPtrVariant > | region_before_ |
| Used for automation autofill action. | |
| std::optional< ArrangerObjectPtrVariant > | region_after_ |
| ResizeType | resize_type_ = (ResizeType) 0 |
| Used by the resize action. | |
| 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::PortConnectionsManager > | port_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::PortConnectionsManager > | port_connections_after_ |
Protected Member Functions | |
| ArrangerSelectionsAction (ArrangerObjectSpan before_sel, Type type) | |
| Generic constructor to be used by others. | |
| void | set_before_selections (ArrangerObjectSpan src_var) |
Sets sel_ to a clone of src. | |
| void | set_after_selections (ArrangerObjectSpan src_var) |
Sets sel_after_ to a clone of src. | |
Friends | |
| void | init_from (ArrangerSelectionsAction &obj, const ArrangerSelectionsAction &other, utils::ObjectCloneType clone_type) |
An action that performs changes to the arranger selections.
This class represents an undoable action that can be performed on the arranger selections, such as creating, deleting, moving, or resizing selected objects.
The action has a Type enum that specifies the type of action being performed, such as Create, Delete, Move, or Resize. For Resize actions, there is a ResizeType enum that specifies the type of resize operation. For Edit actions, there is an EditType enum that specifies the type of edit operation, such as changing the name or position of the selected objects.
Definition at line 29 of file arranger_selections_action.h.
| using zrythm::gui::actions::ArrangerSelectionsAction::Position = zrythm::dsp::Position |
Definition at line 115 of file arranger_selections_action.h.
|
strong |
Type used when the action is an EDIT action.
Definition at line 78 of file arranger_selections_action.h.
|
strong |
Type used when the action is a RESIZE action.
Definition at line 63 of file arranger_selections_action.h.
|
strong |
Definition at line 44 of file arranger_selections_action.h.
|
inlineprotected |
Generic constructor to be used by others.
Internally calls set_before_selections().
| before_sel | Selections before the change. |
Definition at line 162 of file arranger_selections_action.h.
|
inlineoverridevirtual |
Returns whether the action requires pausing the engine.
Reimplemented from zrythm::gui::actions::UndoableAction.
Definition at line 146 of file arranger_selections_action.h.
|
overridevirtual |
Returns whether the total transport bars need to be recalculated.
Reimplemented from zrythm::gui::actions::UndoableAction.
|
protected |
Sets sel_after_ to a clone of src.
| src |
|
protected |
Sets sel_ to a clone of src.
| src |
|
nodiscardfinalvirtual |
Stringizes the action to be used in Undo/Redo buttons.
Implements zrythm::gui::actions::UndoableAction.
| std::optional<ArrangerObject::Uuid> zrythm::gui::actions::ArrangerSelectionsAction::clip_editor_region_id_ |
Clip editor region ID (for non-timeline actions).
Definition at line 264 of file arranger_selections_action.h.
| int zrythm::gui::actions::ArrangerSelectionsAction::delta_chords_ = 0 |
Chords moved (up/down in the Chord editor).
Definition at line 249 of file arranger_selections_action.h.
| int zrythm::gui::actions::ArrangerSelectionsAction::delta_lanes_ {} |
Lanes moved.
Definition at line 247 of file arranger_selections_action.h.
| double zrythm::gui::actions::ArrangerSelectionsAction::delta_normalized_amount_ = 0.0 |
Difference in a normalized amount, such as automation point normalized value.
Definition at line 258 of file arranger_selections_action.h.
| int zrythm::gui::actions::ArrangerSelectionsAction::delta_pitch_ = 0 |
Delta of MidiNote pitch.
Definition at line 251 of file arranger_selections_action.h.
| int zrythm::gui::actions::ArrangerSelectionsAction::delta_tracks_ {} |
Tracks moved.
Definition at line 245 of file arranger_selections_action.h.
| int zrythm::gui::actions::ArrangerSelectionsAction::delta_vel_ = 0 |
Delta of MidiNote velocity.
Definition at line 253 of file arranger_selections_action.h.
| EditType zrythm::gui::actions::ArrangerSelectionsAction::edit_type_ {} |
Type of edit action, if an Edit action.
Definition at line 240 of file arranger_selections_action.h.
| bool zrythm::gui::actions::ArrangerSelectionsAction::first_run_ = false |
Number of split objects.
If this is true, the first "do" call does nothing in some cases.
Can be ignored depending on the action.
Definition at line 289 of file arranger_selections_action.h.
| std::unique_ptr<gui::old_dsp::QuantizeOptions> zrythm::gui::actions::ArrangerSelectionsAction::opts_ {} |
QuantizeOptions clone, if quantizing.
Definition at line 292 of file arranger_selections_action.h.
| Position zrythm::gui::actions::ArrangerSelectionsAction::pos_ |
Position, when changing a Position.
Definition at line 275 of file arranger_selections_action.h.
| std::vector<ArrangerObject::Uuid> zrythm::gui::actions::ArrangerSelectionsAction::r1_ |
Used when splitting - these are the split BoundedObject's.
Definition at line 278 of file arranger_selections_action.h.
| std::vector<ArrangerObject::Uuid> zrythm::gui::actions::ArrangerSelectionsAction::r2_ |
Definition at line 279 of file arranger_selections_action.h.
| std::optional<ArrangerObjectPtrVariant> zrythm::gui::actions::ArrangerSelectionsAction::region_after_ |
Definition at line 298 of file arranger_selections_action.h.
| std::optional<ArrangerObjectPtrVariant> zrythm::gui::actions::ArrangerSelectionsAction::region_before_ |
Used for automation autofill action.
These are assumed to be inherited from Region.
Definition at line 297 of file arranger_selections_action.h.
| ResizeType zrythm::gui::actions::ArrangerSelectionsAction::resize_type_ = (ResizeType) 0 |
Used by the resize action.
Definition at line 301 of file arranger_selections_action.h.
| std::optional<std::vector<ArrangerObjectPtrVariant> > zrythm::gui::actions::ArrangerSelectionsAction::sel_ |
A clone of the ArrangerSelections before the change.
Definition at line 231 of file arranger_selections_action.h.
| std::optional<std::vector<ArrangerObjectPtrVariant> > zrythm::gui::actions::ArrangerSelectionsAction::sel_after_ |
A clone of the ArrangerSelections after the change (used in the EDIT action and quantize).
Definition at line 237 of file arranger_selections_action.h.
| std::optional<std::pair<Position, Position> > zrythm::gui::actions::ArrangerSelectionsAction::selected_positions_in_audio_editor_ |
Definition at line 261 of file arranger_selections_action.h.
| utils::Utf8String zrythm::gui::actions::ArrangerSelectionsAction::str_ |
String, when changing a string.
Definition at line 272 of file arranger_selections_action.h.
| std::optional<dsp::PortUuid> zrythm::gui::actions::ArrangerSelectionsAction::target_port_ |
Target port (used to find corresponding automation track when moving/copying automation regions to another automation track/another track).
Definition at line 269 of file arranger_selections_action.h.
| double zrythm::gui::actions::ArrangerSelectionsAction::ticks_ {} |
Ticks diff.
Definition at line 243 of file arranger_selections_action.h.
| Type zrythm::gui::actions::ArrangerSelectionsAction::type_ {} |
Action type.
Definition at line 228 of file arranger_selections_action.h.